@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800;900&display=swap');

/* ===========================
   Color Palette
=========================== */
/* ========================
   Page Transitions (View Transitions API)
========================= */
@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: 0.3s ease-out both fade-out;
}

::view-transition-new(root) {
    animation: 0.3s ease-in both fade-in;
}

@keyframes fade-out {
    to { opacity: 0; }
}

@keyframes fade-in {
    from { opacity: 0; }
}

/* Blur + scale transition for rent <-> buy navigation */
::view-transition-old(page-main) {
    animation: 0.32s cubic-bezier(0.4, 0, 1, 1) both vt-page-out;
}

::view-transition-new(page-main) {
    animation: 0.42s cubic-bezier(0, 0, 0.2, 1) both vt-page-in;
}

@keyframes vt-page-out {
    to {
        opacity: 0;
        transform: scale(0.94);
        filter: blur(10px);
    }
}

@keyframes vt-page-in {
    from {
        opacity: 0;
        transform: scale(1.05);
        filter: blur(10px);
    }
}

:root {
    --dark: #22333b;           /* deep dark — text, navs, dark sections */
    --teal: #e7d8c9;           /* almond-cream — accent highlights */
    --white: #ffffff;          /* pure white — main background */

    /* mapped aliases */
    --coral: #22333b;
    --golden: #e7d8c9;
    --green: #e7d8c9;
    --blue: #e7d8c9;

    --off-white: #eee4e1;      /* parchment — alternating section backgrounds */
    --border: #e7d8c9;         /* almond-cream border */
    --text: #22333b;           /* deep dark — body text */
    --muted: #7a6b5a;          /* warm muted brown — secondary text */

    --parchment: #eee4e1;
    --almond-cream: #e7d8c9;
}

/* ===========================
   Reset & Base
=========================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Geist', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--white);
}

/* ===========================
   Accessibility
=========================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    background: var(--blue);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform 0.2s;
    z-index: 9999;
}

.skip-link:focus {
    transform: translateY(0);
}

:where(a, button, input):focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

/* ===========================
   Navigation
=========================== */
.navbar {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: max-content;
    max-width: calc(100vw - 40px);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar--hidden {
    transform: translateX(-50%) translateY(calc(-100% - 40px));
}

.nav-pill {
    background: var(--white);
    border-radius: 10px;
    padding: 10px 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    position: relative;
    view-transition-name: nav-pill;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li a,
.nav-links li .dropdown-toggle {
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 6px 14px;
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.18s, transform 0.18s ease, font-weight 0.18s;
    white-space: nowrap;
    position: relative;
    transform-origin: center;
}

.nav-links li a:hover,
.nav-links li .dropdown-toggle:hover {
    color: var(--dark);
    font-weight: 700;
    transform: scale(1.12);
}

.nav-links li a.nav-active {
    color: var(--dark);
    font-weight: 700;
}

/* Ink indicator hidden */
.nav-ink {
    display: none;
}

/* Nav pill stays put across page transitions — no crossfade */
::view-transition-old(nav-pill),
::view-transition-new(nav-pill),
::view-transition-old(nav-home-pill),
::view-transition-new(nav-home-pill) {
    animation: none;
    mix-blend-mode: normal;
}

/* Suppress navDrop when arriving via page navigation */
html.is-navigating .navbar {
    animation: none;
}

.nav-sep {
    width: 1px;
    height: 16px;
    background: var(--border);
    flex-shrink: 0;
}

.nav-pill--home {
    view-transition-name: nav-home-pill;
}

.nav-brand {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
}

.nav-brand-icon {
    flex-shrink: 0;
    display: block;
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.has-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--white);
    border-radius: 10px;
    list-style: none;
    min-width: 160px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    z-index: 200;
    border: 1px solid var(--border);
}

.has-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    padding: 10px 16px;
    white-space: nowrap;
    color: var(--text) !important;
    display: block;
    font-size: 0.88rem;
    transition: background 0.15s;
}

.dropdown-menu li a:hover {
    background: var(--off-white);
    color: var(--blue) !important;
}

/* ===========================
   Launch Animations
=========================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeLeft {
    from {
        opacity: 0;
        transform: translateX(36px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes ribbonGrow {
    from {
        transform: scaleX(0);
        transform-origin: left;
    }

    to {
        transform: scaleX(1);
        transform-origin: left;
    }
}

@keyframes navDrop {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-16px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}


/* Apply nav animation */
.navbar {
    animation: navDrop 0.5s ease both 0.05s;
}

/* ===========================
   Homepage Layout
=========================== */
.home-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===========================
   Homepage Hero
=========================== */
.home-hero {
    background: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Centered hero content */
.home-hero-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 120px 40px 80px;
    max-width: 820px;
    width: 100%;
    animation: fadeUp 0.6s ease both 0.15s;
}

.hero-dots {
    font-size: 0.7rem;
    color: var(--teal);
    opacity: 0.5;
    letter-spacing: 0.6em;
    margin-bottom: 22px;
}

.home-hero-center h1 {
    font-size: 4.5rem;
    font-weight: 300;
    color: var(--dark);
    line-height: 1.08;
    margin-bottom: 22px;
    letter-spacing: -2.5px;
}

.hero-btn-home {
    display: inline-block;
    background: var(--dark);
    color: var(--white);
    padding: 14px 30px;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    border: none;
    transition: background 0.2s, color 0.2s;
    animation: fadeUp 0.55s ease both 0.65s;
    min-height: 44px;
}

.hero-btn-home:hover {
    background: var(--teal);
    color: var(--dark);
}

/* Top 4-segment ribbon bar */
.hero-top-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 7px;
    display: flex;
    animation: fadeUp 0.4s ease both 0.1s;
}

.ribbon-seg {
    flex: 1;
}

.ribbon-seg--coral {
    background: #22333b;
}

.ribbon-seg--golden {
    background: #c6ac8f;
}

.ribbon-seg--green {
    background: #22333b;
}

.ribbon-seg--blue {
    background: #c6ac8f;
}

/* Split two-column inner */
.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 120px 60px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Left: text column */
.hero-text {
    text-align: left;
}

.hero-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--coral);
    margin-bottom: 14px;
    animation: fadeUp 0.55s ease both 0.2s;
}

.hero-eyebrow.light {
    color: rgba(34, 51, 59, 0.65);
}

.hero-text h1 {
    font-size: 4.4rem;
    font-weight: 300;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -2px;
    animation: fadeUp 0.55s ease both 0.35s;
}

/* "Matched for You" golden marker underline */
.headline-mark {
    font-weight: 800;
    display: inline;
    position: relative;
    white-space: nowrap;
}

.headline-mark::after {
    content: '';
    position: absolute;
    left: -4px;
    right: -4px;
    bottom: 5px;
    height: 16px;
    background: var(--golden);
    opacity: 0.4;
    border-radius: 4px;
    z-index: -1;
}

.home-hero-sub {
    font-size: 1rem;
    color: rgba(34, 51, 59, 0.65);
    max-width: 520px;
    margin-bottom: 36px;
    line-height: 1.75;
    animation: fadeUp 0.55s ease both 0.5s;
}

/* Hero CTA group */
.hero-cta-group {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 52px;
}

/* Ghost button (secondary CTA) */
.hero-btn-ghost {
    display: inline-block;
    background: transparent;
    color: rgba(34, 51, 59, 0.75);
    padding: 14px 28px;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    border: 1.5px solid rgba(34, 51, 59, 0.25);
    transition: border-color 0.2s, color 0.2s;
    animation: fadeUp 0.55s ease both 0.65s;
    min-height: 44px;
}

.hero-btn-ghost:hover {
    border-color: var(--dark);
    color: var(--dark);
}

/* Trust stats row */
.hero-trust-row {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeUp 0.55s ease both 0.85s;
}

.hero-trust-divider {
    width: 1px;
    height: 36px;
    background: rgba(34, 51, 59, 0.15);
    flex-shrink: 0;
}

.hero-trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.hero-trust-num {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -1px;
    line-height: 1;
}

.hero-trust-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(34, 51, 59, 0.5);
}

/* ===========================
   How It Works Section
=========================== */
.home-how {
    background: var(--dark);
    padding: 80px 40px;
    border-top: none;
}

.home-how-inner {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.home-how-inner h2 {
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--white);
    margin-bottom: 56px;
    letter-spacing: -1px;
}

.home-how-steps {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    justify-content: center;
}

.how-step {
    flex: 1;
    max-width: 260px;
    text-align: left;
}

.how-step-num {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.45);
    display: block;
    margin-bottom: 14px;
}

.how-step h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
    line-height: 1.3;
}

.how-step p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.75;
}

.how-step-arrow {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.3);
    opacity: 1;
    margin-top: 28px;
    flex-shrink: 0;
}

.home-how .section-eyebrow {
    color: rgba(255, 255, 255, 0.5);
}

/* ===========================
   Resources Section
=========================== */
.home-resources {
    background: var(--white);
    padding: 80px 40px;
    border-top: 1px solid var(--border);
}

.home-resources-inner {
    max-width: 960px;
    margin: 0 auto;
}

.home-resources-inner h2 {
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--dark);
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.home-resources-sub {
    font-size: 0.95rem;
    color: var(--muted);
    max-width: 580px;
    line-height: 1.7;
    margin-bottom: 40px;
}

.home-resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.resource-card {
    display: flex;
    flex-direction: column;
    padding: 28px;
    background: var(--off-white);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.resource-card:hover {
    border-color: var(--teal);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.resource-card-tag {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 12px;
}

.resource-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.resource-card p {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.65;
    flex: 1;
    margin-bottom: 20px;
}

.resource-card-link {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dark);
}

.hero-btn {
    display: inline-block;
    background: var(--blue);
    color: #fff;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
    animation: fadeUp 0.55s ease both 0.65s;
}

.hero-btn:hover {
    background: #a8916e;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(198, 172, 143, 0.4);
}

/* Hero options: Buy / Rent / Sell vertical stack */
.hero-options {
    display: flex;
    flex-direction: column;
    align-self: center;
    margin-left: auto;
    flex-shrink: 0;
    width: 300px;
    animation: fadeLeft 0.7s ease both 0.5s;
    border: 2px solid var(--dark);
    overflow: hidden;
}

.hero-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 36px 32px;
    text-decoration: none;
    transition: opacity 0.18s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-option:last-child {
    border-bottom: none;
}

.hero-option--dark {
    background: var(--dark);
    color: var(--white);
}

.hero-option--teal {
    background: var(--teal);
    color: var(--dark);
}

.hero-option--teal .hero-option-arrow {
    color: var(--dark);
}

.hero-option:hover {
    opacity: 0.78;
}

.hero-option-label {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-option-arrow {
    font-size: 1.3rem;
    opacity: 0.7;
}

/* ===========================
   Homepage Featured Carousel (bottom third)
=========================== */
.home-carousel-section {
    background: var(--dark);
    padding: 8px 40px 40px;
    flex-shrink: 0;
}

.home-carousel-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 24px;
}

.home-carousel-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
    line-height: 1.2;
}

.carousel-view-all {
    color: var(--teal);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.carousel-view-all:hover {
    opacity: 0.7;
}

.home-carousel-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.home-carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0 8px;
}

.home-carousel-track::-webkit-scrollbar {
    display: none;
}

/* Carousel arrow buttons */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(8, 15, 15, 0.85);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, opacity 0.2s;
    backdrop-filter: blur(8px);
}

.carousel-arrow:hover {
    background: var(--teal);
    border-color: var(--teal);
    color: var(--dark);
}

.carousel-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.carousel-arrow--left {
    left: -20px;
}

.carousel-arrow--right {
    right: -20px;
}

/* Carousel cards */
.carousel-card {
    flex: 0 0 280px;
    background: #141f1f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.carousel-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--teal);
}

.carousel-card-img {
    width: 100%;
    height: 170px;
    position: relative;
    overflow: hidden;
    background: #1a2828;
}

.carousel-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.carousel-card:hover .carousel-card-img img {
    transform: scale(1.05);
}

.carousel-card-img .property-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--dark);
    color: var(--white);
    padding: 4px 10px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 3px;
    z-index: 2;
}

.carousel-card-info {
    padding: 18px;
}

.carousel-card-price {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 4px;
}

.carousel-card-address {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carousel-card-specs {
    display: flex;
    gap: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 900px) {
    .home-carousel-section {
        padding: 28px 24px 32px;
    }

    .carousel-arrow {
        display: none;
    }

    .carousel-card {
        flex: 0 0 260px;
    }
}

@media (max-width: 640px) {
    .home-carousel-header h2 {
        font-size: 1.3rem;
    }

    .carousel-card {
        flex: 0 0 240px;
    }

    .carousel-card-img {
        height: 140px;
    }
}

/* ===========================
   Homepage Contact Form
=========================== */
.home-contact {
    background: var(--off-white);
    padding: 32px 60px;
    min-height: unset;
}

.home-contact-inner {
    max-width: none;
    width: 100%;
    text-align: left;
}

.home-contact-sub {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.6;
    margin-top: 6px;
    margin-bottom: 16px;
}

/* Horizontal single-row form */
.home-form {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 14px;
    width: 100%;
}

.home-form-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.home-form-field--wide {
    flex: 1.6;
}

.home-form-field label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

.home-form input,
.home-form textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--dark);
    background: var(--white);
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--text);
    outline: none;
    border-radius: 0;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    min-height: 44px;
}

.home-form input::placeholder,
.home-form textarea::placeholder {
    color: var(--border);
}

.home-form input:focus,
.home-form textarea:focus {
    border-color: var(--teal);
}

.home-form textarea {
    resize: none;
    height: 43px;
    min-height: unset;
}

.home-form-submit {
    flex-shrink: 0;
    align-self: flex-end;
    background: var(--dark);
    color: var(--white);
    border: none;
    height: 43px;
    padding: 0 32px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.home-form-submit:hover {
    background: var(--teal);
    color: var(--dark);
}

.home-form-success {
    padding: 32px 0 8px;
}

.home-form-success-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.home-form-success-sub {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.6;
}

.home-form-success-check {
    width: 48px;
    height: 48px;
    color: var(--dark);
    margin-bottom: 16px;
}

.home-form-success-check svg {
    width: 100%;
    height: 100%;
}

@media (max-width: 900px) {
    .home-form {
        flex-direction: column;
        align-items: stretch;
    }

    .home-form-field--wide {
        flex: 1;
    }

    .home-form textarea {
        height: 80px;
    }

    .home-form-submit {
        height: auto;
        padding: 14px 32px;
        align-self: stretch;
        width: 100%;
        min-height: 44px;
    }

    .home-contact {
        padding: 44px 32px 48px;
    }
}

/* ===========================
   Rent Page Hero
=========================== */
.rent-hero {
    background: url('../images/Rectangle 15.png') center center / cover no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.rent-hero:not(.theme-dark)::before {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(7.5px);
    -webkit-backdrop-filter: blur(7.5px);
    background: linear-gradient(160deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0.52) 100%);
    pointer-events: none;
    z-index: 0;
}

.rent-hero:not(.theme-dark) .rent-hero-content {
    position: relative;
    z-index: 1;
    color: #ffffff;
}

.rent-hero:not(.theme-dark) .rent-hero-content h1 {
    color: #ffffff;
}

.rent-hero:not(.theme-dark) .rent-sub,
.rent-hero:not(.theme-dark) .rent-eyebrow {
    color: rgba(255, 255, 255, 0.85);
}

/* Dark theme for hero (used on Buy page) */
.rent-hero.theme-dark {
    background: url('../images/Rectangle 16.png') center center / cover no-repeat;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.rent-hero.theme-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(7.5px);
    -webkit-backdrop-filter: blur(7.5px);
    background: linear-gradient(160deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0.52) 100%);
    pointer-events: none;
    z-index: 0;
}

.rent-hero.theme-dark .rent-hero-content {
    position: relative;
    z-index: 1;
}

.rent-hero.theme-dark h1,
.rent-hero.theme-dark h1 strong {
    color: var(--white);
}

.rent-hero.theme-dark .rent-sub {
    color: rgba(255, 255, 255, 0.8);
}

/* Sell page hero — overrides theme-dark background with sell-specific image */
.rent-hero.sell-hero {
    background: url('../images/sell page bg.jpg') center center / cover no-repeat;
}

.rent-hero.sell-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: linear-gradient(160deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0.52) 100%);
    pointer-events: none;
    z-index: 0;
}

.rent-hero-content {
    text-align: center;
    color: var(--dark);
    width: 100%;
    max-width: 820px;
    padding: 120px 24px 80px;
}

.rent-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}

.rent-hero-content h1 {
    font-size: 4.2rem;
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -1px;
    color: var(--dark);
}

.rent-hero-content h1 strong {
    font-weight: 800;
}

.rent-sub {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 40px;
}

/* Search widget on white: swap shadow for border */
.rent-search {
    box-shadow: none;
    border: 1px solid var(--dark);
    border-radius: 0;
}

/* Confirmation screen — hidden by CSS until widget gets --confirmed class */
.rent-confirm {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 32px;
    gap: 14px;
}

.rent-search--confirmed .search-tabs,
.rent-search--confirmed .rent-panel {
    display: none !important;
}

.rent-search--confirmed .rent-confirm {
    display: flex;
}

.rent-confirm-check {
    color: var(--dark);
    opacity: 0.7;
    flex-shrink: 0;
}

.rent-confirm-heading {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.rent-confirm-sub {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.7;
    max-width: 320px;
    margin: 0;
}

.rent-hero:not(.theme-dark) .rent-search {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px) saturate(1.1);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.buy-search,
.theme-dark .rent-search {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--dark);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px) saturate(1.1);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
}

.rent-search .search-tabs {
    background: #f2f2f2;
    border-bottom: 1px solid var(--dark);
    padding: 10px 10px 0;
    gap: 6px;
}

.buy-search .search-tabs,
.theme-dark .rent-search .search-tabs {
    background: #f2f2f2;
    border-bottom: 1px solid var(--dark);
    padding: 10px 10px 0;
    gap: 6px;
}

.rent-search .search-tab {
    border-radius: 10px 10px 0 0;
    color: var(--muted);
    background: #e9e9e9;
    border: 1px solid var(--dark);
    border-bottom: 1px solid var(--dark);
    margin: 0 0 -1px;
    padding: 10px 12px;
    position: relative;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.buy-search .search-tab,
.theme-dark .rent-search .search-tab {
    border-radius: 10px 10px 0 0;
    color: var(--muted);
    background: #e9e9e9;
    border: 1px solid var(--dark);
    border-bottom: 1px solid var(--dark);
    margin: 0 0 -1px;
    padding: 10px 12px;
    position: relative;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.rent-search .search-tab.active {
    color: var(--dark);
    background: var(--white);
    border-bottom-color: var(--white);
    z-index: 2;
    transform: translateY(0);
}

.buy-search .search-tab.active,
.theme-dark .rent-search .search-tab.active {
    color: var(--dark);
    background: var(--white);
    border-bottom-color: var(--white);
    z-index: 2;
}

.rent-search .search-tab:hover {
    color: var(--dark);
    background: #f7f7f7;
}

.buy-search .search-tab:hover,
.theme-dark .rent-search .search-tab:hover {
    color: var(--dark);
    background: #f7f7f7;
}

.rent-search .search-input {
    border-radius: 0;
    border-color: var(--dark);
    color: var(--dark);
    background: #fff;
}

.buy-search .search-input,
.theme-dark .rent-search .search-input {
    background: transparent;
    border-color: var(--dark);
    color: var(--dark);
}

.sell-hero .rent-search .search-input,
.buy-hero .rent-search .search-input {
    background: #fff;
}

.buy-search .search-input::placeholder,
.theme-dark .rent-search .search-input::placeholder {
    color: var(--muted);
}

.sell-hero .rent-search .search-input::placeholder,
.buy-hero .rent-search .search-input::placeholder {
    color: rgba(34, 51, 59, 0.5);
}

.rent-search .search-input:focus {
    border-color: var(--teal);
}

.buy-search .search-input:focus,
.theme-dark .rent-search .search-input:focus {
    border-color: var(--golden);
}

.rent-search-btn {
    background: var(--dark) !important;
    color: var(--white) !important;
    border-radius: 0 !important;
}

.rent-search-btn:hover {
    background: var(--teal) !important;
    color: var(--dark) !important;
}

.buy-search-btn {
    background: var(--white) !important;
    color: var(--dark) !important;
}

.buy-search-btn:hover {
    background: var(--golden) !important;
    color: var(--dark) !important;
}

/* Back button: outlined */
.rent-search .rent-back-btn {
    background: transparent !important;
    color: var(--dark) !important;
    border: 1px solid var(--dark) !important;
}

.rent-search .rent-back-btn:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    color: var(--dark) !important;
}

.rent-search .rent-back-btn:disabled,
.rent-search .rent-back-btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}

.buy-search .buy-back-btn,
.theme-dark .rent-search .rent-back-btn {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.62) !important;
}

.buy-search .buy-back-btn:hover,
.theme-dark .rent-search .rent-back-btn:hover {
    background: rgba(255, 255, 255, 0.10) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

.buy-search .buy-back-btn:disabled,
.buy-search .buy-back-btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}

/* Completed tab: grey text + green checkmark */
.search-tab.completed {
    color: #b0b0b0 !important;
    border-bottom-color: transparent !important;
}

.rent-search .search-tab.completed {
    color: #7f7f7f !important;
    border-bottom-color: var(--dark) !important;
}

.rent-search .search-tab.active.completed {
    color: var(--dark) !important;
    background: var(--white) !important;
    border-bottom-color: var(--white) !important;
}

.buy-search .search-tab.completed {
    color: rgba(255, 255, 255, 0.55) !important;
    border-bottom-color: rgba(255, 255, 255, 0.34) !important;
}

.buy-search .search-tab.active.completed {
    color: rgba(255, 255, 255, 0.95) !important;
    background: rgba(10, 10, 10, 0.78) !important;
    border-bottom-color: rgba(10, 10, 10, 0.78) !important;
}

.search-tab.completed::after {
    content: '\2713';
    color: #4caf50;
    margin-left: 6px;
    font-size: 0.65rem;
    font-weight: 800;
}

/* Tab panels */
.rent-panel {
    display: none;
    padding: 16px;
    animation: rentFadeIn 0.25s ease-out;
}

.buy-search .rent-panel {
    animation: buyBlurShiftIn 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rent-panel.active {
    display: block;
}

@keyframes rentFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes buyBlurShiftIn {
    from {
        opacity: 0;
        transform: translateY(10px);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.rent-panel-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.rent-panel-inner .search-input {
    flex: 1;
    min-width: 200px;
}

/* Option button grid */
.rent-opts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.rent-opts--multi {
    margin-bottom: 14px;
}

/* Numbered block layout for beds / baths */
.rent-opts--numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    justify-content: center;
}

.rent-opt {
    padding: 10px 18px;
    background: var(--white);
    border: 1px solid var(--dark);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.rent-opt:hover {
    background: var(--off-white);
    border-color: var(--dark);
    color: var(--dark);
}

.rent-opt.selected {
    background: var(--dark);
    color: var(--white);
    border-color: var(--dark);
}

.theme-dark .rent-search .rent-opt {
    background: var(--white);
    border-color: var(--dark);
    color: var(--dark);
}

.theme-dark .rent-search .rent-opt:hover {
    background: var(--off-white);
    border-color: var(--dark);
    color: var(--dark);
}

.theme-dark .rent-search .rent-opt.selected {
    background: var(--dark);
    color: var(--white);
    border-color: var(--dark);
}

/* Footer inside panel */
.rent-panel-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.rent-panel-footer--nav {
    justify-content: flex-end;
}

/* Contact panel — white background (rent only) */
.rent-panel[data-panel="contact"] {
    background: #fff;
}

.theme-dark .rent-panel[data-panel="contact"] {
    background: #fff;
}

/* Contact panel form fields */
.rent-contact-label {
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--muted);
    text-align: center;
    margin-bottom: 12px;
}

.buy-search .rent-contact-label,
.theme-dark .rent-contact-label {
    color: var(--muted);
}

.rent-contact-fields {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.rent-contact-input {
    flex: 1;
    min-width: 120px;
    padding: 9px 12px;
    font-size: 0.88rem;
    font-family: inherit;
    background: none;
    border: 1px solid var(--dark);
    border-radius: 6px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.rent-contact-input:focus {
    border-color: var(--teal);
}

.rent-contact-input::placeholder {
    color: var(--muted);
}

.buy-search .rent-contact-input,
.theme-dark .rent-contact-input {
    border-color: var(--dark);
    color: var(--dark);
}

.buy-search .rent-contact-input:focus,
.theme-dark .rent-contact-input:focus {
    border-color: var(--teal);
}

.buy-search .rent-contact-input::placeholder,
.theme-dark .rent-contact-input::placeholder {
    color: var(--muted);
}

@media (max-width: 900px) {
    .rent-hero-content {
        padding: 100px 24px 60px;
    }

    .rent-hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 640px) {
    .rent-hero-content h1 {
        font-size: 2.4rem;
    }

    .rent-sub {
        font-size: 0.95rem;
    }
}

/* ===========================
   Buy Page Hero
=========================== */
.hero {
    position: relative;
    min-height: 100vh;
    background-image: url('https://images.unsplash.com/photo-1493809842364-78817add7ffb?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.25) 60%, rgba(0, 0, 0, 0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    width: 100%;
    max-width: 820px;
    padding: 24px;
}

.hero-content h1 {
    font-size: 4.2rem;
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero-content h1 strong {
    font-weight: 800;
}

.hero-sub {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 40px;
}

/* Hero stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-top: 36px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--golden);
    line-height: 1;
}

.stat-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.25);
}

/* ===========================
   Search Widget
=========================== */
.search-widget {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
}

.search-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
}

.search-tab {
    flex: 1;
    padding: 14px 8px;
    border: none;
    background: var(--white);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #999;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-bottom-color 0.2s;
}

.search-tab:hover {
    color: var(--blue);
}

.search-tab.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.search-form {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 20px;
    border: 1.5px solid var(--border);
    border-radius: 30px;
    font-size: 0.95rem;
    color: var(--muted);
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--blue);
}

.search-feedback {
    width: 100%;
    order: 99;
    font-size: 0.85rem;
    color: var(--coral);
    display: none;
    text-align: left;
    padding-left: 4px;
}

.search-feedback.visible {
    display: block;
}

.search-btn {
    background: var(--blue);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}

.search-btn:hover {
    background: #a8916e;
    transform: translateY(-1px);
}

/* ===========================
   Info Strip (ribbon)
=========================== */
.info-strip {
    background: var(--blue);
    padding: 32px 40px;
}

.info-strip-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.info-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.info-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.info-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.22);
}

/* ===========================
   Shared Section Styles
=========================== */
.section-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 80px 40px;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 44px;
    gap: 16px;
}

.section-header.centered {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.section-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--coral);
    margin-bottom: 8px;
}

.section-eyebrow.light {
    color: rgba(255, 255, 255, 0.65);
}

.section-header h2,
.about-text h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.view-all-link {
    color: var(--blue);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.view-all-link:hover {
    opacity: 0.7;
}

/* ===========================
   About Section
=========================== */
.about-section {
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text h2 {
    margin-bottom: 20px;
}

.about-text p {
    font-size: 0.96rem;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 14px;
}

.about-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--blue);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.about-link:hover {
    opacity: 0.7;
}

.about-visual {
    position: relative;
    height: 360px;
}

.about-visual-block {
    position: absolute;
    border-radius: 16px;
}

.about-visual-block--1 {
    width: 75%;
    height: 80%;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, var(--blue) 0%, #5a7a77 100%);
}

.about-visual-block--2 {
    width: 55%;
    height: 55%;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, var(--coral) 0%, #1a2828 100%);
}

.about-badge {
    position: absolute;
    bottom: 28px;
    right: 12px;
    background: var(--white);
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.about-badge-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--blue);
    line-height: 1;
}

.about-badge-text {
    font-size: 0.72rem;
    color: #888;
    text-align: center;
    max-width: 80px;
    line-height: 1.4;
    margin-top: 4px;
}

/* ===========================
   Featured Listings (ribbon: off-white)
=========================== */
.listings-section {
    background: var(--off-white);
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.listing-card {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
    border: 1px solid var(--border);
}

.listing-card:hover,
.listing-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.11);
    outline: none;
}

.listing-img {
    height: 210px;
    position: relative;
}

.listing-img--warm {
    background: linear-gradient(135deg, var(--coral) 0%, #1a2828 100%);
}

.listing-img--cool {
    background: linear-gradient(135deg, var(--blue) 0%, #5a7a77 100%);
}

.listing-img--green {
    background: linear-gradient(135deg, var(--green) 0%, #5a7a77 100%);
}

.listing-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--white);
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

.listing-badge--new {
    background: var(--golden);
    color: var(--text);
}

.listing-badge--rent {
    background: var(--green);
    color: #fff;
}

.listing-fav {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s, transform 0.15s;
}

.listing-fav:hover {
    color: var(--coral);
    transform: scale(1.1);
}

.listing-fav[aria-pressed="true"] {
    color: var(--coral);
}

.listing-fav[aria-pressed="true"] svg {
    fill: var(--coral);
    stroke: var(--coral);
}

.listing-details {
    padding: 20px;
}

.listing-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.listing-price-mo {
    font-size: 1rem;
    font-weight: 500;
    color: var(--muted);
}

.listing-specs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 10px;
}

.dot {
    color: #ccc;
}

.listing-address {
    font-size: 0.92rem;
    color: var(--text);
    font-weight: 500;
}

.listing-city {
    font-size: 0.85rem;
    color: #999;
    margin-top: 2px;
}

/* ===========================
   Why Choose Us (white ribbon)
=========================== */
.why-section {
    background: var(--white);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.why-card {
    text-align: center;
    padding: 32px 20px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.why-card:hover {
    border-color: transparent;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.why-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    transition: transform 0.2s;
}

.why-card:hover .why-icon {
    transform: scale(1.08);
}

/* Each card gets a unique accent color */
.why-card:nth-child(1) .why-icon {
    background: rgba(34, 51, 59, 0.07);
    color: var(--dark);
}

.why-card:nth-child(2) .why-icon {
    background: rgba(198, 172, 143, 0.22);
    color: var(--teal);
}

.why-card:nth-child(3) .why-icon {
    background: rgba(34, 51, 59, 0.07);
    color: var(--dark);
}

.why-card:nth-child(4) .why-icon {
    background: rgba(198, 172, 143, 0.22);
    color: var(--teal);
}

.why-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.why-card p {
    font-size: 0.87rem;
    color: var(--muted);
    line-height: 1.7;
}

/* ===========================
   Call to Action (coral ribbon)
=========================== */
.cta-section {
    background: var(--coral);
    padding: 90px 40px;
    text-align: center;
}

.cta-inner {
    max-width: 680px;
    margin: 0 auto;
}

.cta-section h2 {
    font-size: 2.4rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 14px;
}

.cta-sub {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta-primary {
    background: var(--white);
    color: var(--coral);
    padding: 14px 36px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.btn-cta-secondary {
    background: transparent;
    color: #fff;
    padding: 14px 36px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: border-color 0.2s, background 0.2s;
}

.btn-cta-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* ===========================
   Footer (steel-blue ribbon)
=========================== */
.footer {
    background: #22333b;
    color: rgba(255, 255, 255, 0.82);
}

.footer-body {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.footer-col {
    display: flex;
    flex-direction: column;
    padding: 52px 44px 44px;
    min-height: 440px;
}

.footer-col + .footer-col {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    color: var(--golden);
    text-transform: uppercase;
    margin-bottom: 36px;
}

/* ---- Col 1: Nav links ---- */
.footer-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.footer-nav-links a {
    font-size: 1.35rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    line-height: 1.75;
    transition: color 0.18s;
}

.footer-nav-links a:hover {
    color: #fff;
}

.footer-secondary {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 36px;
}

.footer-secondary a {
    font-size: 0.77rem;
    color: rgba(255, 255, 255, 0.38);
    text-decoration: none;
    transition: color 0.18s;
}

.footer-secondary a:hover {
    color: rgba(255, 255, 255, 0.65);
}

.footer-copy {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 6px;
}

/* ---- Col 2: CTA + Social ---- */
.footer-cta-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.01em;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.footer-cta-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.75);
    color: #fff;
}

.footer-social {
    display: flex;
    gap: 14px;
    background: rgba(255, 255, 255, 0.08);
    padding: 12px 20px;
    border-radius: 50px;
    align-self: flex-start;
    margin-top: 12px;
}

.footer-social a {
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.footer-social a:hover {
    color: var(--golden);
}

/* ---- Col 3: Contact ---- */
.footer-address {
    font-style: normal;
    flex: 1;
}

.footer-address p {
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    line-height: 2;
}

.footer-address a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-address a:hover {
    color: #fff;
}

.footer-disclaimer {
    font-size: 0.77rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.32);
    margin-top: auto;
    padding-top: 36px;
}

/* ===========================
   Responsive
=========================== */
@media (max-width: 1024px) {
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {

    /* Hero split stacks vertically */
    .hero-inner {
        grid-template-columns: 1fr;
        padding: 100px 28px 60px;
        gap: 48px;
    }

    .hero-text {
        text-align: center;
    }

    .home-hero-sub {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-btn {
        display: block;
        text-align: center;
        max-width: 260px;
        margin: 0 auto;
    }

    .home-hero-center {
        padding: 72px 28px 36px;
    }

    .home-hero-center h1 {
        font-size: 2.4rem;
    }

    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-visual {
        height: 260px;
    }

    .footer-body {
        grid-template-columns: 1fr 1fr;
    }

    .footer-col {
        min-height: 360px;
        padding: 40px 28px 36px;
    }

    .footer-col:nth-child(3) {
        grid-column: 1 / -1;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        min-height: unset;
    }

    .section-container {
        padding: 60px 24px;
    }

    .home-how {
        padding: 64px 28px;
    }

    .home-resources {
        padding: 64px 28px;
    }

    .home-how-steps {
        flex-direction: column;
        align-items: flex-start;
        gap: 28px;
    }

    .how-step {
        max-width: none;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .navbar {
        top: 12px;
    }

    .nav-pill {
        padding: 8px 10px;
    }

    .nav-links li a,
    .nav-links li .dropdown-toggle {
        font-size: 0.78rem;
        padding: 5px 8px;
    }

    .home-hero-content h1 {
        font-size: 3rem;
    }

    .hero-content h1 {
        font-size: 2.6rem;
    }

    .hero-stats {
        gap: 20px;
    }

    .search-tabs {
        flex-wrap: wrap;
    }

    .search-tab {
        font-size: 0.72rem;
        padding: 10px 8px;
        flex: 1 1 30%;
    }

    .listings-grid {
        grid-template-columns: 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cta-section h2 {
        font-size: 1.8rem;
    }

    .info-strip-inner {
        gap: 28px;
    }

    .info-divider {
        display: none;
    }

    .footer-body {
        grid-template-columns: 1fr;
    }

    .footer-col {
        min-height: unset;
        padding: 32px 24px;
        border-left: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer-col:first-child {
        border-top: none;
    }

    .footer-col:nth-child(3) {
        grid-column: auto;
    }

    .footer-cta-btn {
        min-height: 80px;
    }

    /* Hero heading — smaller on phones */
    .home-hero-center {
        padding: 56px 20px 32px;
    }

    .home-hero-center h1 {
        font-size: 2rem;
        letter-spacing: -1px;
    }

    .home-hero-sub {
        font-size: 0.9rem;
    }

    /* How It Works — tighter padding, hide arrows */
    .home-how {
        padding: 48px 20px;
    }

    .home-how-inner h2 {
        font-size: 1.8rem;
        margin-bottom: 36px;
    }

    .how-step-arrow {
        display: none;
    }

    /* Resources — tighter padding */
    .home-resources {
        padding: 48px 20px;
    }

    .home-resources-inner h2 {
        font-size: 1.8rem;
    }

    /* Section container — tightest mobile padding */
    .section-container {
        padding: 48px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* ===========================
   Contact Page — Hero
=========================== */
.contact-hero {
    background: var(--blue);
    min-height: 38vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 40px 64px;
    position: relative;
    overflow: hidden;
}

.contact-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(255, 255, 255, 0.07) 0%, transparent 60%);
    pointer-events: none;
}

.contact-hero-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--golden);
    margin-bottom: 16px;
    animation: fadeUp 0.55s ease both 0.2s;
}

.contact-hero h1 {
    font-size: 3.6rem;
    font-weight: 300;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 16px;
    animation: fadeUp 0.55s ease both 0.35s;
}

.contact-hero h1 strong {
    font-weight: 800;
}

.contact-hero-sub {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 520px;
    line-height: 1.7;
    animation: fadeUp 0.55s ease both 0.5s;
}

/* ===========================
   Contact Form — Brandon-style
=========================== */
.cf-section {
    background: #f0f0f0;
    padding: 64px 24px 96px;
}

.cf-container {
    max-width: 1100px;
    margin: 0 auto;
    border: 1px solid var(--text);
    background: var(--white);
}

.cf-split {
    display: flex;
    min-height: 560px;
}

/* Sidebar */
.cf-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: #f0f0f0;
    border-right: 1px solid var(--text);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.cf-sidebar-brand {
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cf-sidebar-sub {
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--muted);
    text-transform: none;
    letter-spacing: 0;
}

.cf-sidebar-items {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cf-sidebar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 20px;
}

.cf-sidebar-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.cf-sidebar-value {
    font-size: 0.92rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.cf-sidebar-value:hover {
    color: var(--coral);
}

.cf-sidebar-hours {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cf-hours-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.83rem;
    color: var(--text);
}

.cf-hours-row span:last-child {
    color: var(--muted);
}

/* Form Panel */
.cf-panel {
    flex: 1;
    padding: 40px;
    background: var(--white);
    overflow-y: auto;
}

.cf-panel-header {
    margin-bottom: 32px;
}

.cf-badge {
    display: inline-block;
    background: var(--coral);
    color: #fff;
    padding: 4px 10px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.cf-panel h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: 0;
}

/* Floating label groups */
.cf-floating-group {
    position: relative;
    margin-bottom: 20px;
}

.cf-floating-group input {
    width: 100%;
    padding: 22px 12px 8px;
    border: 1px solid var(--text);
    border-radius: 0;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.cf-floating-group label {
    position: absolute;
    left: 12px;
    top: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    pointer-events: none;
    transition: all 0.2s ease;
}

.cf-floating-group input:focus+label,
.cf-floating-group input:not(:placeholder-shown)+label {
    top: 5px;
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cf-floating-group input:focus {
    border-color: var(--coral);
}

.cf-floating-group input:focus+label {
    color: var(--coral);
}

/* Input groups (label + button group / textarea) */
.cf-input-group {
    margin-bottom: 24px;
}

.cf-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}

/* Option buttons */
.cf-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cf-opt-btn {
    padding: 9px 16px;
    background: #f0f0f0;
    border: 1px solid transparent;
    border-radius: 0;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
}

.cf-opt-btn:hover {
    background: #e0e0e0;
    color: var(--text);
}

.cf-opt-btn.active {
    background: var(--text);
    color: var(--white);
    border-color: var(--text);
}

/* Textarea */
.cf-input-group textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid var(--text);
    border-radius: 0;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.6;
}

.cf-input-group textarea:focus {
    border-color: var(--coral);
}

/* Submit button */
.cf-submit {
    width: 100%;
    padding: 16px;
    background: var(--text);
    color: var(--white);
    border: none;
    border-radius: 0;
    font-size: 0.78rem;
    font-weight: 800;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.cf-submit:hover {
    background: var(--coral);
}

/* Contact page responsive */
@media (max-width: 900px) {
    .cf-split {
        flex-direction: column;
    }

    .cf-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--text);
        padding: 28px 24px;
        gap: 24px;
    }

    /* ===========================
   Popular Properties Section
=========================== */
    .popular-properties-section {
        padding: 80px 0 100px;
        background: var(--off-white);
        overflow: hidden;
    }

    .popular-properties-section .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 24px;
    }

    .popular-properties-section .section-header {
        margin-bottom: 40px;
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }

    .popular-properties-section h2 {
        font-size: 2.4rem;
        font-weight: 800;
        letter-spacing: -0.02em;
        color: var(--dark);
        margin: 0;
    }

    .popular-properties-section .section-eyebrow {
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: var(--muted);
        margin-bottom: 8px;
        display: block;
    }

    /* Horizontal Scroll Container */
    .popular-properties-scroll {
        display: flex;
        gap: 24px;
        overflow-x: auto;
        padding: 20px 24px 40px;
        /* room for shadow */
        margin: 0 -24px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
    }

    .popular-properties-scroll::-webkit-scrollbar {
        display: none;
        /* Safari and Chrome */
    }

    /* Property Card */
    .property-card {
        flex: 0 0 340px;
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: 12px;
        overflow: hidden;
        transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease;
        cursor: pointer;
        text-decoration: none;
        color: inherit;
    }

    .property-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
        border-color: var(--teal);
    }

    .property-img-wrapper {
        width: 100%;
        height: 220px;
        background: #eef1f0;
        position: relative;
        overflow: hidden;
    }

    .property-img-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s ease;
    }

    .property-card:hover .property-img-wrapper img {
        transform: scale(1.05);
    }

    .property-badge {
        position: absolute;
        top: 16px;
        left: 16px;
        background: var(--dark);
        color: var(--white);
        padding: 6px 12px;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        border-radius: 4px;
        z-index: 2;
    }

    .property-info {
        padding: 24px;
    }

    .property-price {
        display: block;
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--dark);
        margin-bottom: 8px;
    }

    .property-address {
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--muted);
        margin-bottom: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .property-specs {
        display: flex;
        gap: 16px;
        padding-top: 16px;
        border-top: 1px solid #f0f3f2;
    }

    .spec-item {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--dark);
    }

    .spec-item svg {
        color: var(--muted);
    }

    /* Dark theme overrides for Buy page */
    .theme-dark-section {
        background: #0d1616;
    }

    .theme-dark-section h2 {
        color: var(--white);
    }

    .theme-dark-section .property-card {
        background: #141f1f;
        border-color: rgba(255, 255, 255, 0.1);
    }

    .theme-dark-section .property-card:hover {
        border-color: var(--golden);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }

    .theme-dark-section .property-price {
        color: var(--white);
    }

    .theme-dark-section .property-address {
        color: rgba(255, 255, 255, 0.6);
    }

    .theme-dark-section .property-specs {
        border-top-color: rgba(255, 255, 255, 0.05);
    }

    .theme-dark-section .spec-item {
        color: rgba(255, 255, 255, 0.9);
    }

    .cf-sidebar-items {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .cf-sidebar-item {
        border-bottom: none;
        padding-bottom: 0;
    }

    .contact-hero h1 {
        font-size: 2.6rem;
    }
}

@media (max-width: 640px) {
    .contact-hero {
        padding: 100px 24px 48px;
    }

    .contact-hero h1 {
        font-size: 2rem;
        letter-spacing: -1px;
    }

    .cf-section {
        padding: 40px 0 64px;
    }

    .cf-container {
        border-left: none;
        border-right: none;
    }

    .cf-panel {
        padding: 24px 20px;
    }
}