/* =============================================================================
   BedHub Directory — style.css
   Colors: blue #2D6DB5 | dark blue #1E4F8A | orange #E8732A | navy #112240
   Fonts: Nunito + Nunito Sans
   ============================================================================= */

/* -------------------------------------------------------------------------
   CSS Variables
   ------------------------------------------------------------------------- */
:root {
    --blue:         #2D6DB5;
    --blue-dark:    #1E4F8A;
    --blue-light:   #EBF2FB;
    --orange:       #E8732A;
    --orange-dark:  #C45B18;
    --orange-light: #FEF0E6;
    --navy:         #112240;
    --navy-light:   #1E3A5F;
    --off-white:    #F5F8FC;
    --white:        #FFFFFF;
    --border:       #E2EAF3;
    --text:         #1A2233;
    --text-muted:   #5A6A82;
    --text-light:   #8A9AB5;
    --green:        #22863A;
    --green-light:  #E6F4EA;
    --amber:        #B45309;
    --amber-light:  #FEF3C7;
    --red:          #C0392B;
    --red-light:    #FDEDEC;
    --shadow-sm:    0 1px 3px rgba(17,34,64,.08);
    --shadow:       0 4px 16px rgba(17,34,64,.12);
    --shadow-lg:    0 8px 32px rgba(17,34,64,.16);
    --radius-sm:    4px;
    --radius:       8px;
    --radius-lg:    12px;
    --radius-xl:    20px;
    --radius-full:  9999px;
    --transition:   0.2s ease;
    --nav-height:   68px;
    --container:    1280px;
    --container-sm: 960px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Nunito Sans', 'Nunito', sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito', 'Nunito Sans', sans-serif;
    font-weight: 700;
    line-height: 1.25;
    color: var(--navy);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a {
    color: var(--blue);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--blue-dark); }

ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.25rem; }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
}

input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
}

/* -------------------------------------------------------------------------
   Layout Helpers
   ------------------------------------------------------------------------- */
.container {
    max-width: var(--container);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.container-sm {
    max-width: var(--container-sm);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.section-sm {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap     { gap: 1rem; }

/* -------------------------------------------------------------------------
   Navigation
   ------------------------------------------------------------------------- */
/* ----- Top bar --------------------------------------------------------- */
#top-navbar {
    background: rgb(16, 52, 93);
    height: 40px;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.top-bar-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 25px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    font-weight: 500;
    border-radius: 150px;
    text-decoration: none;
    transition: background .2s;
    white-space: nowrap;
}
.top-bar-btn:hover { background: rgba(255,255,255,.25); color: #fff; }

.top-bar-operator-btn {
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    font-size: 11px;
}
.top-bar-operator-btn:hover { text-decoration: underline; }

/* ----- Main nav -------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 40px; /* sits below the top bar */
    z-index: 1000;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: background .25s, box-shadow .25s, border-color .25s;
}

.site-header.scrolled { box-shadow: var(--shadow); }

/* Transparent overlay nav (homepage hero) */
/* Overlay nav: always dark blue gradient, always white text */
.site-header--overlay,
.site-header--overlay.scrolled {
    background: linear-gradient(125deg, #0A447E 80%, #10508E 0%);
    border-bottom: 1px solid rgba(255,255,255,.1);
    box-shadow: none;
}
.site-header--overlay .nav-link,
.site-header--overlay .nav-link--btn,
.site-header--overlay.scrolled .nav-link,
.site-header--overlay.scrolled .nav-link--btn {
    color: #fff;
}
.site-header--overlay .nav-link:hover,
.site-header--overlay .nav-link--btn:hover {
    color: #fff;
    background: rgba(255,255,255,.12);
}
.site-header--overlay .hamburger-bar { background: #fff; }
.site-header--overlay .dropdown-menu { background: #fff; }
.site-header--overlay .dropdown-menu .dropdown-item { color: #1C1C1C; }

.nav-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 25px;
    height: var(--nav-height);
}

/* Nav CTA buttons (Find a Home / Care Map) */
.nav-cta-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .5px;
    border-radius: 150px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s, color .2s;
}
.nav-btn--blue   { background: #196EC1; color: #fff; }
.nav-btn--blue:hover { background: #145A9F; color: #fff; }
.nav-btn--orange { background: #FF6106; color: #fff; }
.nav-btn--orange:hover { background: #EB5600; color: #fff; }

/* Hidden on desktop, shown inside mobile open menu */
.nav-mobile-only { display: none; }

/* Logo */
.nav-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.nav-logo img {
    height: 36px;
    width: auto;
    display: block;
}
.footer-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    margin-bottom: 16px;
}
.footer-logo img {
    height: 40px;
    width: auto;
    display: block;
}

/* Legacy text logo spans (kept for fallback) */
.logo-bed { color: var(--blue); }
.site-header--overlay .logo-bed { color: #fff; }
.logo-hub { color: var(--orange); }

.site-header--dark .logo-bed { color: #6DAEF0; }
.site-header--dark .logo-hub { color: var(--orange); }

/* Primary nav */
.primary-nav {
    flex: 1;
    display: flex;
    justify-content: center; /* center links between logo and CTA */
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-item { position: relative; }

.nav-link,
.nav-link--btn {
    display: inline-flex;
    align-items: center;
    gap: 0.17rem;
    padding: 0.26rem 0.42rem;
    font-size: 1.04rem;
    font-weight: 600;
    color: var(--text);
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.nav-link:hover,
.nav-link--btn:hover {
    color: var(--blue);
    background: var(--blue-light);
}

.nav-caret {
    font-size: 0.34rem;
    transition: transform var(--transition);
}

.nav-item--dropdown.is-open .nav-caret {
    transform: rotate(180deg);
}

/* Dropdown menus */
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 124px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    z-index: 999;
}

.nav-item--dropdown.is-open .dropdown-menu {
    display: block;
    animation: dropIn 0.18s ease;
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    display: block;
    padding: 0.31rem 0.62rem;
    font-size: 1.01rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}

.dropdown-item:hover {
    background: var(--blue-light);
    color: var(--blue-dark);
}

/* Nav Search */
.nav-search { flex: 0 0 auto; }

.nav-search-inner {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.nav-search-inner:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(45,109,181,.15);
}

.nav-search-input {
    border: none;
    outline: none;
    padding: 0.45rem 0.9rem;
    font-size: 0.87rem;
    width: 200px;
    background: transparent;
    color: var(--text);
}

.nav-search-input::placeholder { color: var(--text-light); }

.nav-search-btn {
    padding: 0.45rem 0.9rem;
    background: var(--blue);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.nav-search-btn:hover { background: var(--blue-dark); }

/* Nav Auth */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.nav-link--subtle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.hamburger-bar {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.site-header--dark .hamburger-bar { background: var(--white); }

.nav-hamburger.is-open .hamburger-bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-hamburger.is-open .hamburger-bar:nth-child(2) { opacity: 0; }
.nav-hamburger.is-open .hamburger-bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.4rem;
    font-family: 'Nunito', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), color var(--transition),
                border-color var(--transition), box-shadow var(--transition),
                transform 0.1s;
    white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
}
.btn-primary:hover {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
    color: var(--white);
}

.btn-orange {
    background: var(--orange);
    color: var(--white);
    border-color: var(--orange);
}
.btn-orange:hover {
    background: var(--orange-dark);
    border-color: var(--orange-dark);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--blue);
    border-color: var(--blue);
}
.btn-outline:hover {
    background: var(--blue);
    color: var(--white);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.7);
}
.btn-outline-white:hover {
    background: var(--white);
    color: var(--blue);
}

.btn-outline-orange {
    background: transparent;
    color: #E8732A;
    border-color: #E8732A;
}
.btn-outline-orange:hover {
    background: #E8732A;
    color: var(--white);
}
.nav-cta-list {
    font-size: .82rem;
    padding: 7px 14px;
    margin-right: 6px;
}

/* Operator sign-in button in nav */
.nav-operator-btn {
    display: inline-block;
    font-family: 'Nunito', sans-serif;
    font-size: .82rem;
    font-weight: 700;
    color: var(--blue);
    border: 1.5px solid var(--blue);
    border-radius: 7px;
    padding: 7px 14px;
    white-space: nowrap;
    text-decoration: none;
    transition: background .15s, color .15s;
    margin-left: 8px;
    flex-shrink: 0;
}
.nav-operator-btn:hover {
    background: var(--blue);
    color: #fff;
}
@media (max-width: 768px) { .nav-operator-btn { display: none; } }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}
.btn-ghost:hover {
    background: var(--off-white);
    color: var(--text);
}

.btn-sm  { padding: 0.38rem 0.9rem; font-size: 0.82rem; }
.btn-lg  { padding: 0.8rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* -------------------------------------------------------------------------
   Hero / Banner
   ------------------------------------------------------------------------- */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue-dark) 60%, var(--blue) 100%);
    color: var(--white);
    padding: 5rem 1.25rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/assets/images/pattern.svg') center/auto repeat;
    opacity: 0.04;
    pointer-events: none;
}

.hero h1 { color: var(--white); }
.hero p  { color: rgba(255,255,255,.85); font-size: 1.1rem; }

.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    text-align: left;
}

.hero-split .hero-media img,
.hero-split .hero-media video {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* Hero search bar */
.hero-search {
    display: flex;
    max-width: 600px;
    margin: 2rem auto 0;
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-search input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1rem;
    outline: none;
    color: var(--text);
}

.hero-search button {
    padding: 1rem 2rem;
    background: var(--orange);
    color: var(--white);
    border: none;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    transition: background var(--transition);
}

.hero-search button:hover { background: var(--orange-dark); }

/* Page hero (smaller) */
.page-hero {
    background: linear-gradient(135deg, var(--navy), var(--blue-dark));
    color: var(--white);
    padding: 3rem 1.25rem;
}

.page-hero h1 { color: var(--white); font-size: clamp(1.4rem, 3vw, 2.2rem); }
.page-hero p  { color: rgba(255,255,255,.8); }

/* -------------------------------------------------------------------------
   Badges
   ------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2em 0.65em;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-accepting  { background: var(--green-light); color: var(--green); }
.badge-waitlisted { background: var(--amber-light);  color: var(--amber); }
.badge-full       { background: var(--red-light);   color: var(--red); }
.badge-unknown    { background: var(--off-white);    color: var(--text-muted); }

/* Tier badges */
.tier-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18em 0.6em;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tier-free     { background: #E9ECEF; color: #495057; }
.tier-basic    { background: #DBE9FF; color: var(--blue-dark); }
.tier-standard { background: #D4EDDA; color: #155724; }
.tier-premium  { background: linear-gradient(135deg, var(--orange-light), #FFF3E0); color: var(--orange-dark); border: 1px solid #FFCA9E; }

/* Verified badge */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--blue);
}

/* -------------------------------------------------------------------------
   Flash Messages
   ------------------------------------------------------------------------- */
.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    font-size: 0.93rem;
    font-weight: 600;
}

.flash-success { background: var(--green-light); color: var(--green);     border-bottom: 2px solid var(--green); }
.flash-error   { background: var(--red-light);   color: var(--red);       border-bottom: 2px solid var(--red); }
.flash-warning { background: var(--amber-light);  color: var(--amber);    border-bottom: 2px solid var(--amber); }
.flash-info    { background: var(--blue-light);   color: var(--blue-dark); border-bottom: 2px solid var(--blue); }

.flash-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    opacity: 0.6;
    cursor: pointer;
    padding: 0 0.25rem;
    transition: opacity var(--transition);
}
.flash-close:hover { opacity: 1; }

/* -------------------------------------------------------------------------
   Listing Cards
   ------------------------------------------------------------------------- */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.listing-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition);
}

.listing-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.listing-card__photo {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--off-white);
    overflow: hidden;
    flex-shrink: 0;
}

.listing-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.listing-card:hover .listing-card__photo img {
    transform: scale(1.04);
}

.listing-card__photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-light);
    color: var(--blue);
}

.listing-card__badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.listing-card__save {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255,255,255,.92);
    border: none;
    border-radius: var(--radius-full);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    color: var(--text-muted);
}

.listing-card__save:hover,
.listing-card__save.is-saved {
    background: var(--white);
    color: var(--orange);
}

.listing-card__body {
    padding: 1.1rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.listing-card__name {
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--navy);
    text-decoration: none;
    line-height: 1.3;
}

.listing-card__name:hover { color: var(--blue); }

.listing-card__address {
    font-size: 0.87rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
}

.listing-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.listing-card__meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.listing-card__desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
}

.listing-card__footer {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

/* Featured card highlight */
.listing-card--featured {
    border-color: var(--orange);
}

.listing-card--featured .listing-card__photo::after {
    content: 'Featured';
    position: absolute;
    bottom: 0.6rem;
    right: 0.6rem;
    background: var(--orange);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.2em 0.6em;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.listing-card__distance {
    font-size: 0.8rem;
    color: var(--blue);
    font-weight: 700;
}

/* -------------------------------------------------------------------------
   Filters Sidebar
   ------------------------------------------------------------------------- */
.search-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

.filters-sidebar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
}

.filters-sidebar__title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child { margin-bottom: 0; }

.filter-group__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    accent-color: var(--blue);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Results header */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.results-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.results-sort select {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.87rem;
    background: var(--white);
    color: var(--text);
}

/* -------------------------------------------------------------------------
   Pagination
   ------------------------------------------------------------------------- */
.pagination { margin-top: 2.5rem; }

.pagination-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.6rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    background: var(--white);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.pagination-link:hover {
    background: var(--blue-light);
    border-color: var(--blue);
    color: var(--blue-dark);
}

.pagination-link.active {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--white);
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* -------------------------------------------------------------------------
   Detail / Profile Page
   ------------------------------------------------------------------------- */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: start;
}

.detail-main { min-width: 0; }

.detail-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
}

.detail-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.detail-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.detail-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.detail-section__title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 1rem;
}

/* Photo gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.photo-gallery__main {
    grid-column: 1 / -1;
    aspect-ratio: 16/7;
    overflow: hidden;
}

.photo-gallery__main img,
.photo-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: opacity var(--transition);
}

.photo-gallery__thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.photo-gallery__main img:hover,
.photo-gallery__thumb img:hover { opacity: 0.9; }

/* Tags */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    list-style: none;
}

.tag {
    display: inline-block;
    padding: 0.28em 0.75em;
    background: var(--blue-light);
    color: var(--blue-dark);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
}

/* Key facts grid */
.facts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.fact-item {
    background: var(--off-white);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
}

.fact-item__label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.fact-item__value {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--navy);
}

/* -------------------------------------------------------------------------
   Forms
   ------------------------------------------------------------------------- */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    font-size: 0.87rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.45rem;
}

.form-label .required { color: var(--red); margin-left: 0.2rem; }

.form-control {
    display: block;
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    appearance: none;
}

.form-control:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(45,109,181,.15);
}

.form-control::placeholder { color: var(--text-light); }

.form-control:disabled,
.form-control[readonly] {
    background: var(--off-white);
    color: var(--text-muted);
    cursor: not-allowed;
}

.form-control--error { border-color: var(--red); }
.form-control--error:focus { box-shadow: 0 0 0 3px rgba(192,57,43,.15); }

.form-error {
    font-size: 0.82rem;
    color: var(--red);
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.form-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 110px;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%235A6A82' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.form-row   { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    accent-color: var(--blue);
    width: 16px;
    height: 16px;
    margin-top: 3px;
    flex-shrink: 0;
}

.form-check-label { font-size: 0.9rem; }

.form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.form-card__title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

/* -------------------------------------------------------------------------
   Operator Dashboard
   ------------------------------------------------------------------------- */
.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
    min-height: calc(100vh - var(--nav-height) - 80px);
}

.dashboard-sidebar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 0;
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
}

.dashboard-nav__label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    padding: 0.9rem 0.75rem 0.4rem;
    display: block;
}

.dashboard-nav__link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    margin: 0 0.5rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}

.dashboard-nav__link:hover {
    background: var(--blue-light);
    color: var(--blue-dark);
}

.dashboard-nav__link.active {
    background: var(--blue);
    color: var(--white);
}

.dashboard-content { min-width: 0; }

/* Stat cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.stat-card__value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--blue);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-card__label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Data table */
.data-table-wrap {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table thead { background: var(--off-white); }

.data-table th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--off-white); }

.table-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state__icon  { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state__title { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }

/* -------------------------------------------------------------------------
   Admin Styles
   ------------------------------------------------------------------------- */
.admin-header-bar {
    background: var(--navy);
    color: var(--white);
    padding: 0.5rem 1.25rem;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-header-bar a { color: rgba(255,255,255,.7); }
.admin-header-bar a:hover { color: var(--white); }

.admin-badge {
    background: var(--orange);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.15em 0.5em;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* -------------------------------------------------------------------------
   Pricing Cards
   ------------------------------------------------------------------------- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.pricing-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    transition: box-shadow var(--transition), transform var(--transition);
}

.pricing-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.pricing-card--featured {
    border-top: 4px solid var(--blue);
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.pricing-card--featured:hover {
    transform: translateY(-9px);
}

.pricing-badge {
    position: absolute;
    top: -1px;
    right: 1.5rem;
    background: var(--orange);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.3em 0.75em;
    border-radius: 0 0 var(--radius) var(--radius);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pricing-card__tier {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--blue);
    margin-bottom: 0.5rem;
}

.pricing-card__price { margin-bottom: 1.5rem; }

.pricing-card__amount {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
}

.pricing-card__amount sup {
    font-size: 1.2rem;
    vertical-align: super;
    font-weight: 700;
}

.pricing-card__period {
    font-size: 0.87rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.pricing-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.pricing-card__features li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text);
    margin: 0;
}

.pricing-card__features li::before {
    content: '✓';
    color: var(--green);
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 0.05em;
}

.pricing-card__features li.disabled {
    color: var(--text-light);
    text-decoration: line-through;
}

.pricing-card__features li.disabled::before {
    content: '×';
    color: var(--text-light);
}

/* -------------------------------------------------------------------------
   Map
   ------------------------------------------------------------------------- */
.map-container {
    width: 100%;
    height: 520px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--blue-light);
    position: relative;
}

.map-container--full {
    height: 100vh;
    border-radius: 0;
    border: none;
}

#care-map { width: 100%; height: 100%; }

.leaflet-popup-content-wrapper {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.leaflet-popup-content { font-family: 'Nunito Sans', sans-serif; margin: 0.75rem 1rem; }
.map-popup-name { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 0.95rem; color: var(--navy); margin-bottom: 0.3rem; }
.map-popup-addr { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.5rem; }

/* -------------------------------------------------------------------------
   Featured Homes Section
   ------------------------------------------------------------------------- */
.featured-section {
    background: var(--off-white);
    padding: 4rem 1.25rem;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-header h2 { margin: 0; }

.scroll-row {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

.scroll-row .listing-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

.scroll-row::-webkit-scrollbar { height: 6px; }
.scroll-row::-webkit-scrollbar-track { background: var(--border); border-radius: 3px; }
.scroll-row::-webkit-scrollbar-thumb { background: var(--blue-light); border-radius: 3px; }
.scroll-row::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* -------------------------------------------------------------------------
   CTA Section
   ------------------------------------------------------------------------- */
.cta-section {
    background: linear-gradient(135deg, var(--blue-dark), var(--navy));
    color: var(--white);
    padding: 4.5rem 1.25rem;
    text-align: center;
}

.cta-section h2 { color: var(--white); }
.cta-section p  { color: rgba(255,255,255,.8); max-width: 540px; margin: 0 auto 2rem; }

/* -------------------------------------------------------------------------
   Tabs
   ------------------------------------------------------------------------- */
.tabs {
    border-bottom: 2px solid var(--border);
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
}

.tab-link {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color var(--transition), border-color var(--transition);
    white-space: nowrap;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    cursor: pointer;
    font-family: inherit;
}

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

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* -------------------------------------------------------------------------
   Alerts
   ------------------------------------------------------------------------- */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-info    { background: var(--blue-light);  color: var(--blue-dark); border: 1px solid #B3CEED; }
.alert-success { background: var(--green-light); color: var(--green);     border: 1px solid #A8D5B0; }
.alert-warning { background: var(--amber-light); color: var(--amber);     border: 1px solid #FBBF24; }
.alert-danger  { background: var(--red-light);   color: var(--red);       border: 1px solid #F5A3A0; }

/* -------------------------------------------------------------------------
   Breadcrumb
   ------------------------------------------------------------------------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.breadcrumb a { color: var(--blue); font-weight: 600; }
.breadcrumb a:hover { color: var(--blue-dark); }
.breadcrumb-sep { color: var(--text-light); }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer {
    background: #0A447E;
    color: rgba(255,255,255,.75);
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 60px 25px 50px;
    display: grid;
    grid-template-columns: 220px 1fr 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* Logo — image-based */
/* (rules already defined earlier in nav section) */

/* Social icons — orange circles */
.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #FF6106;
    color: #fff;
    text-decoration: none;
    transition: background .2s;
    flex-shrink: 0;
}
.social-link:hover { background: #EB5600; }

/* Footer columns */
.footer-heading {
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #fff;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-links li { margin: 0; }

.footer-links a {
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.9rem;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    transition: color .15s;
}
.footer-links a:hover { color: #fff; }

/* Bottom bar */
.footer-bottom {
    background: #003061;
    padding: 16px 25px;
    text-align: center;
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.84rem;
    color: rgba(255,255,255,.5);
}
.footer-bottom a { color: rgba(255,255,255,.65); text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* -------------------------------------------------------------------------
   Utility Classes
   ------------------------------------------------------------------------- */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--text-muted); }
.text-sm      { font-size: 0.87rem; }
.text-xs      { font-size: 0.78rem; }
.text-lg      { font-size: 1.1rem; }
.text-blue    { color: var(--blue); }
.text-orange  { color: var(--orange); }
.text-navy    { color: var(--navy); }
.text-white   { color: var(--white); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.font-bold    { font-weight: 700; }
.font-black   { font-weight: 800; }
.font-nunito  { font-family: 'Nunito', sans-serif; }

.bg-blue      { background: var(--blue); }
.bg-navy      { background: var(--navy); }
.bg-orange    { background: var(--orange); }
.bg-off-white { background: var(--off-white); }
.bg-white     { background: var(--white); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.rounded      { border-radius: var(--radius); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow    { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.border     { border: 1px solid var(--border); }
.border-top { border-top: 1px solid var(--border); }

.d-none  { display: none !important; }
.d-block { display: block; }
.d-flex  { display: flex; }
.d-grid  { display: grid; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.overflow-hidden { overflow: hidden; }

.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;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(45,109,181,.2);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

/* -------------------------------------------------------------------------
   Responsive — 1024px
   ------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .detail-layout   { grid-template-columns: 1fr; }
    .detail-sidebar  { position: static; }
    .search-layout   { grid-template-columns: 1fr; }
    .filters-sidebar { position: static; }
    .pricing-grid    { grid-template-columns: repeat(2, 1fr); }
    .pricing-card--featured { transform: none; }
    .footer-inner    { grid-template-columns: 1fr 1fr; gap: 2rem; padding: 40px 25px 36px; }
    .footer-brand    { grid-column: 1 / -1; }
}

/* -------------------------------------------------------------------------
   Responsive — 768px
   ------------------------------------------------------------------------- */
@media (max-width: 768px) {
    :root { --nav-height: 60px; }

    .primary-nav,
    .nav-cta-group { display: none; }
    #top-navbar .top-bar-btn { display: none; }

    /* Mobile-only nav items: shown inside open menu */

    .primary-nav.is-open {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        position: fixed;
        top: calc(40px + var(--nav-height));
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--white);
        padding: 1.5rem;
        overflow-y: auto;
        z-index: 999;
        animation: slideIn 0.22s ease;
    }

    @keyframes slideIn {
        from { opacity: 0; transform: translateX(-20px); }
        to   { opacity: 1; transform: translateX(0); }
    }

    .primary-nav.is-open .nav-list {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0.25rem;
        width: 100%;
    }

    .primary-nav.is-open .nav-mobile-only { display: flex; }

    .primary-nav.is-open .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        background: var(--off-white);
        border-radius: var(--radius);
        margin-top: 0.5rem;
    }

    /* Divider above mobile CTAs */
    .nav-mobile-divider {
        border-top: 1px solid var(--border);
        margin: 0.75rem 0 0.5rem;
        padding: 0 !important;
        height: 0;
    }

    /* Mobile CTA buttons take full width */
    .nav-mobile-cta {
        width: 100%;
        justify-content: center;
        border-radius: var(--radius) !important;
        padding: 0.65rem 1rem;
        font-size: 0.95rem;
    }

    /* Operator link in mobile menu */
    .nav-mobile-operator-link {
        color: #6b7a99 !important;
        font-size: 0.88rem;
    }

    /* Fix white-on-white text when overlay nav opens on mobile */
    .site-header--overlay .primary-nav.is-open .nav-link,
    .site-header--overlay .primary-nav.is-open .nav-link--btn {
        color: var(--text);
    }
    .site-header--overlay .primary-nav.is-open .nav-link:hover,
    .site-header--overlay .primary-nav.is-open .nav-link--btn:hover {
        color: var(--blue);
        background: var(--blue-light);
    }
    .site-header--overlay .primary-nav.is-open .dropdown-menu .dropdown-item {
        color: var(--text);
    }

    /* "bed" stays white on overlay header (home page) on mobile */
    .site-header--overlay .logo-bed { color: #fff !important; }

    /* Search bar — connected block, no rounded pills */
    .hero-search {
        border-radius: 10px;
        overflow: hidden;
        flex-direction: column;
        margin: 1.5rem 1rem 0;
        max-width: 100%;
    }
    .hero-search input  { border-radius: 0; width: 100%; border-bottom: 1px solid #e2e8f0; }
    .hero-search button { border-radius: 0; width: 100%; }

    .nav-hamburger   { display: flex; }
    .hero-split      { grid-template-columns: 1fr; }
    .hero-split .hero-media { order: -1; }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .listings-grid  { grid-template-columns: 1fr; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .dashboard-sidebar { position: static; }
    .pricing-grid   { grid-template-columns: 1fr; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .footer-inner   { grid-template-columns: 1fr 1fr; }
    .footer-brand   { grid-column: 1 / -1; }
    .section-header { flex-direction: column; align-items: flex-start; }
    .facts-grid     { grid-template-columns: 1fr; }
    .photo-gallery  { grid-template-columns: repeat(2, 1fr); }
    .photo-gallery__main { grid-column: 1 / -1; }

    .hero-search { margin: 1.5rem 0 0; }
}

/* -------------------------------------------------------------------------
   Responsive — 480px
   ------------------------------------------------------------------------- */
@media (max-width: 480px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }

    .nav-logo   { font-size: 1.35rem; }
    .btn-lg     { padding: 0.7rem 1.5rem; font-size: 0.95rem; }
    .section    { padding-top: 2.5rem; padding-bottom: 2.5rem; }
    .detail-card { padding: 1.25rem; }
    .form-card  { padding: 1.25rem; }
    .pricing-card { padding: 1.5rem; }
    .map-container { height: 350px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 0.5rem; }

    .data-table th,
    .data-table td { padding: 0.65rem 0.6rem; font-size: 0.82rem; }
}

/* -------------------------------------------------------------------------
   Print
   ------------------------------------------------------------------------- */
@media print {
    .site-header,
    .site-footer,
    .filters-sidebar,
    .dashboard-sidebar,
    .pagination,
    .btn { display: none !important; }

    body { font-size: 12pt; color: #000; }
    a    { color: #000; text-decoration: underline; }
}

/* -------------------------------------------------------------------------
   Auth pages (login / register)
   ------------------------------------------------------------------------- */
.auth-page {
    min-height: calc(100vh - 140px);
    background: #f7f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.auth-card {
    background: #fff;
    border: 1px solid #e4eaf3;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 4px 24px rgba(17, 34, 64, 0.09);
}

.auth-logo-wrap {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-logo {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    text-decoration: none;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #112240;
    text-align: center;
    margin: 0 0 0.4rem;
}

.auth-subtitle {
    text-align: center;
    color: #6b7fa3;
    font-size: 0.9rem;
    margin: 0 0 2rem;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #6b7fa3;
}

.auth-links a {
    color: #2D6DB5;
    font-weight: 600;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}
