/* Custom CSS for Friends & Family */

/* Lazy Loading Styles */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img.lazy:not([src]) {
    visibility: hidden;
}

img {
    opacity: 1;
}

:root {
    /* Theme palette (SVN) */
    --primary: #F47C00;
    --primary-rgb: 244, 124, 0;
    --accent: #002868;
    --accent-rgb: 0, 40, 104;
    --light: #999999;
    --dark: #181816;
    --gray: #555759;

    /* Backward compatibility with existing variables */
    --primary-blue: var(--accent);
    --accent-orange: var(--primary);
    --light-orange: var(--light);
    --text-gray: var(--gray);
    --text-dark: var(--dark);

    /* Existing semantic colors */
    --success-green: #00ff40;
    --whatsapp-green: #009f28;

    /* Derived states */
    --primary-hover: #d96f00; /* darker primary */
    --accent-hover: #001e4f;  /* darker accent */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito Sans', Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    font-weight: 400;
    font-size: 1.1rem;
}
h1, h2, h3, h4 {
    font-family:  'Noto Serif', serif;
}

/* Hero Section */
.hero-section {
    min-height: 100vh ;
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 2;
}
.hero-section > .container {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Logo */
.logo-container {
    max-width: 300px;
    margin-bottom: 3rem;
}
@media (max-width: 767.98px) {
    .logo-container {
        margin-left: auto;
        margin-right: auto;
    }
}

.logo-img {
    max-width: 100%;
    height: auto;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--dark);
    transition: background-color 400ms ease;
    background-size: initial;
    background-position: initial;
    z-index: 1;
}

@media (max-width: 767.98px) {
    .hero-background {
        background-position: 65%;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
}

/* Slides under the dark overlay */
.hero-slides {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 1000ms ease;
    will-change: opacity, transform;
}

.hero-slide.is-active {
    opacity: 1;
}

/* Richer, drone-like motions per slide for variety */
.hero-slide:nth-child(1).is-active {
    animation: heroKenBurnsA var(--hero-slide-duration, 5000ms) linear forwards;
}
.hero-slide:nth-child(2).is-active {
    animation: heroKenBurnsB var(--hero-slide-duration, 5000ms) linear forwards;
}
.hero-slide:nth-child(3).is-active {
    animation: heroKenBurnsC var(--hero-slide-duration, 5000ms) linear forwards;
}

@keyframes heroKenBurnsA {
    from { transform: scale(1.08) translateX(-26px) translateY(-14px) rotate(-0.5deg); }
    to   { transform: scale(1.18) translateX(26px)  translateY(14px)  rotate(0.5deg); }
}

@keyframes heroKenBurnsB {
    from { transform: scale(1.08) translateX(28px) translateY(-16px) rotate(0.6deg); }
    to   { transform: scale(1.18) translateX(-28px) translateY(16px)  rotate(-0.6deg); }
}

@keyframes heroKenBurnsC {
    from { transform: scale(1.08) translateX(0px)  translateY(20px)  rotate(0.4deg); }
    to   { transform: scale(1.18) translateX(0px)  translateY(-20px) rotate(-0.4deg); }
}

/* 50% dim overlay when slideshow starts */
.hero-background.dim {
    background-color: rgba(0,0,0,0.5);
}

/* Ensure content is above layers */
.hero-section > .container {
    position: relative;
    z-index: 3;
}

.hero-title {
    font-size: 3.75rem;
    line-height: 1.2;
    margin-bottom: 2rem;
}
@media (max-width: 767.98px) {
    .hero-title {
        text-align: center;
    }
}

.hero-subtitle {
    font-size: 1.375rem;
    line-height: 1.5;
    margin-bottom: 4rem;
}

.friends-family-logo {
    position: relative;
}

.logo-icon {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Buttons */
.btn-cta {
    background-color: var(--accent-orange);
    border: none;
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.btn-cta:hover {
    background-color: var(--primary-hover);
    color: white;
    transform: translateY(-2px);
}
.btn-outline-cta, .btn-outline-cta:active {
    border: 2px solid var(--accent-orange);
    color: var(--accent-orange);
    background: transparent;
    padding: 5px 6px 2px 25px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    transition: all 0.3s ease;
    height: 54px;
    font-weight: 700;
    font-size: 1.1rem;
}
.btn-outline-cta.btn-outline-secondary {
    border-color: var(--text-gray);
    color: var(--text-gray);
    height: 36px;
    font-weight: 500;
    font-size: 1rem;
    padding: 5px 4px 4px 15px;
    margin-bottom: 5px;
}

.btn-outline-cta--whatsapp {
    border-color: var(--whatsapp-green);
    color: var(--whatsapp-green);
}
.btn-outline-cta--whatsapp:hover {
    background-color: var(--whatsapp-green)!important;
    color: white;
}
.btn-outline-cta--whatsapp:hover .btn-icon {
    transform: none!important;
}

.btn-outline-cta--hero {
    background-color: #fff!important;
    border-color: #fff!important;
    color: var(--accent-orange)!important;
}
.btn-outline-cta--hero:hover {
    color: #fff!important;
    border-color: var(--accent-orange)!important;
    background-color: var(--accent-orange)!important;
}
@media (max-width: 767.98px) {
    .btn-outline-cta--hero {
        position: fixed!important;
        left: 1rem;
        right: 1rem;
        bottom: 1.5rem;
        z-index: 3;
    }
}

.btn-outline-cta .btn-icon {
    margin-left: 25px;
    font-size: 2.5rem;
    transition: transform 0.3s ease;
}
.btn-outline-cta.btn-outline-secondary .btn-icon {
    font-size: 1.5rem;
    margin-left: 10px;
}

.btn-outline-cta:hover {
    background-color: var(--accent-orange);
    color: white;
}
.btn-outline-cta.btn-outline-secondary:hover {
    background-color: var(--text-gray);
}

.btn-outline-cta:hover .btn-icon {
    transform: rotate(45deg);
}

.btn-icononly {
    padding: 0;
    border: 0;
}
.btn-icononly .btn-icon {
    margin-left: 0!important;
}
.btn-icononly:hover {
    background-color: transparent;
    color: var(--accent-orange);
}
/* Section Styling */
.section-title {
    font-size: 3.125rem;
    line-height: 1.2;
}

.text-primary {
    color: var(--primary-blue) !important;
}
.text-blue {
    color: var(--primary-blue) !important;
}

.text-cta {
    color: var(--accent-orange) !important;
}
.blue-on-black {
    color: #174a97
}

.bg-cta {
    background-color: var(--accent-orange) !important;
}

.bg-primary {
    background-color: var(--primary-blue) !important;
}

/* About Section */
.about-section, .why-section {
    background-color: #e7e4da !important;
}

/* Sticky title on larger screens */
@media (min-width: 992px) {
    .about-section .about-sticky {
        position: sticky;
        top: 2rem; /* space from top while scrolling */
        align-self: flex-start; /* ensure the column sizes to content height */
        height: max-content;
    }
    .why-section .why-sticky {
        position: sticky;
        top: 2rem;
        align-self: flex-start;
        height: max-content;
    }
    .next-steps-section .next-sticky {
        position: sticky;
        top: 2rem;
        align-self: flex-start;
        height: max-content;
    }
}

.media-badges .badge {
    background-color: var(--text-gray) !important;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.875rem;
}

/* Property Cards */
.property-carousel {
    overflow: hidden;
    background: #e7e4da;
    position: relative;
}

.property-scroll-container {
    display: flex;
    gap: 1rem;
    overflow: hidden;
    /* Use instant scroll for JS-driven auto-scroll to avoid jitter */
    scroll-behavior: auto;
    padding: 1rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-orange) transparent;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.property-scroll-container:active {
    cursor: grabbing;
    scroll-behavior: auto;
}

.property-scroll-container.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.property-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.property-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.property-scroll-container::-webkit-scrollbar-thumb {
    background: var(--accent-orange);
    border-radius: 3px;
}

.property-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover, #d96f00);
}

.property-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    flex: 0 0 auto;
    width: calc(40% - 0.5rem); /* Desktop: 2.5 cards visible */
    pointer-events: none; /* Prevent interference with drag */
}

.property-scroll-container:not(.dragging) .property-card {
    pointer-events: auto; /* Re-enable when not dragging */
}

.property-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.property-image {
    height: 300px;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    background-size: cover;
    background-position: center;
}
.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-info {
    padding: 1rem 1.5rem;
    background: #fff;
}

.property-info h5 {
    color: var(--accent-orange);
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1rem;
}

/* Mobile responsive */
@media (max-width: 767.98px) {
    .property-card {
        width: calc(100% - 0.67rem); /* Mobile: 1.5 cards visible */
    }

    .property-scroll-container {
        -webkit-overflow-scrolling: auto; /* Disable native momentum scrolling */
        overflow-scrolling: auto;
        touch-action: none; /* Disable all native touch behaviors */
    }
}

/* How Section */

.testimonial-image {
    position: relative;
    height: 300px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.testimonial-image  img {
    border-radius: 15px;
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

.testimonial-image .quote-icon {
    background: white;
    color: var(--accent-orange);
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
}
@media (max-width: 992px) {
    .testimonial-image {
        height: auto;
        margin-bottom: 3rem;
    }
    .testimonial-image .quote-icon {
        left: 50%;
        bottom: -30px;
        transform: translateX(-50%);
        top: auto;
    }
}

/* Results Section */

.results-section {
    position: relative;
    background: #e7e4da;
}
.results-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: #000;
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.result-card {
    border-radius: 15px;
    min-height: 343px;
    position: relative;
    background: #000;
    overflow: hidden;
}

.result-image {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    z-index: 0;
    opacity: .2;
}
.result-image img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.result-content {
    padding: 1.5rem;
    position: relative;
}

.result-profit {
    color: var(--success-green) !important;
    font-size: 1.125rem;
    margin-top: 1rem;
}

/* Next Steps Section */
.next-steps-section {
    position: relative;
    padding-bottom: 100px!important;
    background: #e7e4da;
}

section.next-steps-section::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    height: 100px;
    z-index: 1;
}

section.next-steps-section::after {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #e7e4da;
    height: 100px;
    border-radius: 0 0 100px 100px;
    z-index: 2;
}

.steps-container {
    max-width: 100%;
}

.step-item {
    align-items: flex-start;
}

.step-circle {
    border: 1px solid var(--accent-orange);
    color: var(--accent-orange);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 2rem;
    flex-shrink: 0;
    position: relative;
}

/*.step-circle::after {*/
/*    content: '';*/
/*    position: absolute;*/
/*    right: -10px;*/
/*    top: 50%;*/
/*    transform: translateY(-50%);*/
/*    width: 0;*/
/*    height: 0;*/
/*    border-left: 10px solid var(--accent-orange);*/
/*    border-top: 8px solid transparent;*/
/*    border-bottom: 8px solid transparent;*/
/*}*/

.step-content h4 {
    margin-bottom: 0.5rem;
}

/* Contact Form */
.contact-section {
    background-color: var(--primary-blue);
    padding-top: 5rem;
    padding-bottom: 5rem;
    position: relative;
    z-index: 4;
}

/* Office Locations Section */
.office-locations-section {
    background-color: var(--dark);
    color: #fff;
    padding: 100px 0;
}

.office-locations-section .section-title {
    color: #fff;
}

.office-card {
    border: 1px solid #333;
    padding: 30px;
    border-radius: 15px;
    height: 100%;
}

.office-card h5 {
    margin-bottom: 20px;
}

.office-card p {
    margin-bottom: 10px;
}

.office-card p:last-child {
    margin-bottom: 0;
}

.office-card .bi {
    color: var(--accent-orange);
    margin-right: 10px;
}


.form-floating>label {
    color: #9a9a9a
}

.form-check-input:checked {
    background-color: var(--accent-orange);
    border-color: var(--accent-orange);
}

.form-check-input:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 0.25rem rgba(247, 74, 39, 0.25);
}

/* Footer */
.footer {
    border-top: 1px solid #e9ecef;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .step-circle {
        width: 60px;
        height: 60px;
        margin-right: 1rem;
        font-size: 1.25rem;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
        text-align: center;
    }

    .section-title {
        font-size: 2rem;
        text-align: center;
        margin-bottom: 2rem;
    }

    .property-card {
        margin-bottom: 1rem;
    }

    .step-item {
        flex-direction: column;
        text-align: center;
        margin-bottom: 2rem;
    }

    .step-circle {
        margin: 0 auto 1rem auto;
    }

    .step-circle::after {
        display: none;
    }
}

/* Animation */
/* Scroll-reveal default state for animated elements */
.property-card,
.result-card,
.step-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
    animation-play-state: paused; /* pause by default; JS starts when in-view */
}

.property-card:nth-child(1) { animation-delay: 0.1s; }
.property-card:nth-child(2) { animation-delay: 0.2s; }
.property-card:nth-child(3) { animation-delay: 0.3s; }

.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.2s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }

.step-item:nth-child(1) { animation-delay: 0.1s; }
.step-item:nth-child(2) { animation-delay: 0.2s; }
.step-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Generic reveal utility to animate on scroll for any element */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
    animation-play-state: paused; /* will be set to running via IntersectionObserver */
}

/* Optional stagger helpers */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Pre-reveal state (no animation attached yet) */
.pre-reveal {
    opacity: 0;
    transform: translateY(20px);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Utility Classes */
.text-success {
    color: var(--success-green) !important;
}

.bg-light {
    background-color: var(--light-orange) !important;
}

/* WhatsApp Button */
.btn-success {
    background-color: var(--whatsapp-green) !important;
    border-color: var(--whatsapp-green) !important;
}

/* Spin animation for Bootstrap Icons */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Hero CTA pulse (infinite, subtle attention grabber) */
.hero-cta-pulse {
    animation: heroCtaPulse 2.2s ease-in-out infinite;
    will-change: transform, box-shadow;
}
/* Ensure pulse wins over intro's animation: none */
.hero-intro .btn.btn-outline-cta--hero.hero-cta-pulse {
    animation: heroCtaPulse 2.2s ease-in-out infinite !important;
}

@keyframes heroCtaPulse {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    }
    50% {
        transform: translateY(0) scale(1.045);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
    }
}

/* Hero intro (Step 1): show only logo with a subtle intro */
.hero-intro .hero-title,
.hero-intro .hero-subtitle,
.hero-intro .btn.btn-outline-cta--hero {
    opacity: 0 !important;
    animation: none !important;
}

.hero-intro .logo-container:not(.hero-logo-flip) {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    animation: logoIntro 0.9s ease-out forwards;
    animation-delay: 0.2s;
}

@keyframes logoIntro {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Prepare hero texts to slide in slightly from above during intro */
.hero-intro .hero-title,
.hero-intro .hero-subtitle {
    transform: translateY(-12px);
}

.hero-intro .show-hero-title,
.hero-intro .show-hero-subtitle {
    opacity: 1 !important;
    transform: translateY(0);
    transition: opacity 420ms ease, transform 420ms ease;
}

/* CTA button: slightly larger drop and slower transition for emphasis */
.btn.btn-outline-cta--hero {
    transform: translateY(-16px);
}

.btn.btn-outline-cta--hero.show-hero-cta {
    opacity: 1 !important;
    transform: translateY(0);
    transition: opacity 560ms ease, transform 560ms ease;
}

.how-section {
    background: #000;
}
