/* ============================================================================
   HomeQuest — main stylesheet
   Palette: deep navy #0e2a47 + gold #d9a441, white cards, system fonts.
   ============================================================================ */

:root {
    --navy: #0e2a47;
    --navy-dark: #0a1e33;
    --navy-light: #163a63;
    --gold: #d9a441;
    --gold-dark: #b8892e;
    --gold-light: #f2ce7a;
    --bg: #f4f6f9;
    --white: #ffffff;
    --text: #22303e;
    --text-muted: #67788a;
    --border: #e2e8f0;
    --success: #1e8e5a;
    --danger: #c0392b;
    --info: #2471a3;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 12px 32px rgba(14, 42, 71, 0.12);
    --shadow-sm: 0 2px 8px rgba(14, 42, 71, 0.07);
    --shadow-lg: 0 22px 50px rgba(14, 42, 71, 0.18);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection { background: var(--gold-light); color: var(--navy-dark); }

img { max-width: 100%; display: block; }
a { color: var(--navy-light); text-decoration: none; }
a:hover { color: var(--gold-dark); }
ul { list-style: none; }

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Slim, brand-tinted scrollbars (WebKit / Chromium) */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #eef1f5; }
::-webkit-scrollbar-thumb { background: #b7c4d4; border-radius: 6px; border: 2px solid #eef1f5; }
::-webkit-scrollbar-thumb:hover { background: #8fa3ba; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ta-right { text-align: right; }
.inline { display: inline; }
.block-small { display: block; font-size: 0.75rem; margin-top: 2px; }

/* ============================================================================
   Buttons
   ============================================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px; border-radius: var(--radius-sm); border: 1.5px solid transparent;
    font-size: 0.95rem; font-weight: 600; cursor: pointer; line-height: 1.2;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .1s ease;
    font-family: inherit; text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-light); color: #fff; }

.btn-gold { background: var(--gold); color: #1d2733; }
.btn-gold:hover { background: var(--gold-dark); color: #fff; }

.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

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

.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }

.btn-icon {
    padding: 7px; border-radius: 8px; background: #f1f4f8; color: var(--text-muted);
    border: 1px solid transparent; display: inline-flex;
}
.btn-icon:hover { background: var(--navy); color: #fff; }
.btn-danger-icon:hover { background: var(--danger); color: #fff; }
.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover { color: var(--danger); background: #fdecea; }

/* ============================================================================
   Badges
   ============================================================================ */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.4px; line-height: 1.6;
    text-transform: uppercase;
}
.badge-success { background: #e2f3ea; color: var(--success); }
.badge-warning { background: #fdf1d7; color: var(--gold-dark); }
.badge-danger  { background: #fde7e4; color: var(--danger); }
.badge-info    { background: #e1eff8; color: var(--info); }
.badge-muted   { background: #eceff3; color: var(--text-muted); }

.badge-status { position: absolute; top: 14px; left: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.18); backdrop-filter: blur(2px); }
.badge-purpose { position: absolute; top: 14px; right: 14px; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.18); }
.badge-purpose-rent { background: var(--gold); color: #1d2733; }
.badge-purpose-sale { background: var(--navy); color: #fff; }

/* ============================================================================
   Alerts / flash
   ============================================================================ */
.alert {
    padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 18px;
    font-size: 0.93rem; border-left: 4px solid;
}
.alert-success { background: #e2f3ea; color: #14603a; border-color: var(--success); }
.alert-danger  { background: #fde7e4; color: #94281d; border-color: var(--danger); }
.alert-warning { background: #fdf1d7; color: #8a6a1d; border-color: var(--gold); }

.flash-wrap { max-width: 1200px; margin: 0 auto; padding: 18px 20px 0; }
.flash-wrap .alert:last-child { margin-bottom: 0; }

/* ============================================================================
   Header / navigation
   ============================================================================ */
.site-header {
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 100%);
    color: #fff; position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.20);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { flex: 0 0 auto; }
.brand-name { font-size: 1.35rem; font-weight: 800; color: #fff; letter-spacing: 0.3px; }
.brand-name em { color: var(--gold); font-style: normal; }

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a:not(.btn) { color: #c9d7e6; font-weight: 500; font-size: 0.95rem; padding: 6px 2px; }
.site-nav a:not(.btn):hover { color: var(--gold); }
.site-nav a.is-active:not(.btn) { color: var(--gold); border-bottom: 2px solid var(--gold); }
.nav-cta { margin-left: 6px; }

.nav-toggle {
    display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2.5px; background: #fff; border-radius: 2px; transition: .25s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============================================================================
   Hero
   ============================================================================ */
.hero { position: relative; color: #fff; min-height: 640px; display: flex; align-items: center; }
.hero-media {
    position: absolute; inset: 0; background: url("../images/hero.jpg") center / cover no-repeat;
}
.hero-overlay {
    position: absolute; inset: 0;
    background:
        radial-gradient(700px 420px at 78% 22%, rgba(217,164,65,0.14) 0%, rgba(217,164,65,0) 60%),
        linear-gradient(115deg, rgba(10,30,51,0.94) 0%, rgba(14,42,71,0.66) 55%, rgba(14,42,71,0.28) 100%);
}
.hero-content { position: relative; z-index: 1; padding: 70px 0; max-width: 720px; }
.hero-eyebrow { color: var(--gold); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 0.85rem; margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.12; margin-bottom: 16px; }
.hero h1 span { color: var(--gold); }
.hero-sub { font-size: 1.1rem; color: #d5e0ec; margin-bottom: 30px; max-width: 560px; }

.quick-search {
    display: flex; gap: 10px; background: #fff; padding: 12px; border-radius: 14px;
    box-shadow: var(--shadow); flex-wrap: wrap;
}
.qs-field { display: flex; align-items: center; gap: 8px; background: #f4f6f9; border-radius: 9px; padding: 0 12px; color: var(--text-muted); flex: 1; min-width: 140px; }
.qs-field.qs-wide { flex: 2.2; }
.qs-field input, .qs-field select {
    width: 100%; background: transparent; border: 0; outline: 0; padding: 12px 0;
    font-size: 0.95rem; font-family: inherit; color: var(--text); cursor: pointer;
}
.quick-search .btn { padding: 13px 30px; }

.hero-stats { display: flex; gap: 44px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-size: 1.8rem; color: var(--gold); line-height: 1.1; }
.hero-stats span { font-size: 0.85rem; color: #c9d7e6; letter-spacing: 1px; text-transform: uppercase; }

/* ============================================================================
   Sections
   ============================================================================ */
.section { padding: 64px 0; }
.section-alt { background: #fff; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-eyebrow { color: var(--gold-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: 0.8rem; margin-bottom: 8px; }
.section-title { font-size: clamp(1.6rem, 3.2vw, 2.2rem); color: var(--navy); line-height: 1.2; }

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

/* ============================================================================
   Cards / property card
   ============================================================================ */
.card {
    background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.property-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.property-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #d4dce6; }
.property-media { position: relative; overflow: hidden; aspect-ratio: 4/3; background: #e8edf3; }
.property-media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10,30,51,0.18) 0%, rgba(10,30,51,0) 32%, rgba(10,30,51,0.32) 100%);
    pointer-events: none;
}
.property-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.property-card:hover .property-media img { transform: scale(1.06); }
.property-body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.property-title { font-size: 1.04rem; line-height: 1.35; }
.property-title a { color: var(--navy); }
.property-title a:hover { color: var(--gold-dark); }
.property-location { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.86rem; }
.property-location svg { color: var(--gold-dark); flex: 0 0 auto; }
.property-price { font-size: 1.22rem; font-weight: 800; color: var(--navy); margin-top: 6px; }
.property-price small { font-size: 0.78rem; font-weight: 500; color: var(--text-muted); margin-left: 4px; }
.property-facts { display: flex; gap: 18px; margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--border); color: var(--text-muted); font-size: 0.85rem; }
.property-facts li { display: inline-flex; align-items: center; gap: 5px; }
.property-facts svg { color: var(--gold-dark); flex: 0 0 auto; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }

/* ============================================================================
   Steps / how it works
   ============================================================================ */
.step { text-align: center; padding: 30px 22px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num {
    width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: #1d2733;
    font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.step h3 { color: var(--navy); margin: 12px 0 8px; }
.step p { color: var(--text-muted); font-size: 0.93rem; }

/* ============================================================================
   CTA band
   ============================================================================ */
.cta-band { background: linear-gradient(115deg, var(--navy) 0%, var(--navy-light) 100%); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 56px 0; flex-wrap: wrap; }
.cta-inner h2 { font-size: 1.7rem; margin-bottom: 6px; }
.cta-inner p { color: #c9d7e6; }

/* ============================================================================
   Page banner (inner pages)
   ============================================================================ */
.page-banner { background: linear-gradient(115deg, var(--navy) 0%, var(--navy-light) 100%); color: #fff; padding: 46px 0; border-bottom: 3px solid var(--gold); }
.page-banner h1 { font-size: 1.9rem; }
.page-banner p { color: #c9d7e6; margin-top: 4px; }

/* ============================================================================
   Listings page
   ============================================================================ */
.listings-wrap { padding-top: 0; }
.listings-layout { display: grid; grid-template-columns: 290px 1fr; gap: 28px; align-items: start; }

.filter-panel { position: sticky; top: 88px; padding: 22px; }
.filter-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.filter-head h2 { font-size: 1.15rem; color: var(--navy); }
.filter-close { display: none; background: none; border: 0; cursor: pointer; color: var(--text-muted); }

.listings-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.result-count { color: var(--text-muted); font-size: 0.92rem; }

.price-range { display: flex; align-items: center; gap: 8px; }
.price-range input { flex: 1; }

/* ============================================================================
   Pagination
   ============================================================================ */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.pager {
    padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: #fff; color: var(--navy); font-weight: 600; font-size: 0.9rem;
}
.pager:hover { border-color: var(--navy); }
.pager.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager.is-disabled { opacity: 0.45; pointer-events: none; }

/* ============================================================================
   Property detail
   ============================================================================ */
.detail-hero { background: #fff; border-bottom: 1px solid var(--border); padding: 16px 0; }
.breadcrumb { font-size: 0.88rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--gold-dark); }

.detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 30px; align-items: start; }
.detail-media { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.detail-media img { width: 100%; max-height: 460px; object-fit: cover; }

.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin: 22px 0; }
.detail-head h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--navy); }
.detail-price { font-size: 1.6rem; font-weight: 800; color: var(--navy); white-space: nowrap; }
.detail-price small { display: block; font-size: 0.78rem; font-weight: 500; color: var(--text-muted); text-align: right; }

.facts-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px;
}
.facts-grid li {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 12px 14px; display: flex; flex-direction: column; gap: 2px;
}
.fact-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.fact-value { font-weight: 700; color: var(--navy); }

.detail-section { margin-bottom: 28px; }
.detail-section h2 { font-size: 1.25rem; color: var(--navy); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--gold); display: inline-block; }
.detail-description { color: var(--text); white-space: pre-line; }

.highlights li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; color: var(--text); }
.highlights li svg { color: var(--success); flex: 0 0 auto; margin-top: 4px; }

.detail-side { display: flex; flex-direction: column; gap: 22px; }
.agent-card, .inquiry-card { padding: 24px; }
.agent-card h3, .inquiry-card h3 { color: var(--navy); font-size: 1.1rem; margin-bottom: 16px; }
.agent-avatar {
    width: 64px; height: 64px; border-radius: 50%; background: var(--navy); color: var(--gold);
    display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800;
    margin-bottom: 12px;
}
.agent-name { font-weight: 700; color: var(--navy); }
.agent-details { margin-top: 12px; }
.agent-details li { display: flex; align-items: center; gap: 9px; padding: 5px 0; color: var(--text-muted); font-size: 0.9rem; word-break: break-word; }
.agent-details svg { color: var(--gold-dark); flex: 0 0 auto; }
.empty-inquiry { color: var(--text-muted); }

/* ============================================================================
   About
   ============================================================================ */
.about-story { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-photo { border-radius: var(--radius); min-height: 420px; background: url("../images/about.jpg") center / cover no-repeat; box-shadow: var(--shadow); }
.about-copy p { margin-bottom: 14px; }
.about-values { margin-top: 18px; }
.about-values li { display: flex; gap: 14px; padding: 12px 0; }
.about-values svg { flex: 0 0 auto; margin-top: 3px; }
.about-values strong { display: block; color: var(--navy); }
.about-values span { color: var(--text-muted); font-size: 0.9rem; }

.offer-card { padding: 28px 24px; transition: transform .2s ease, box-shadow .2s ease; }
.offer-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.offer-icon {
    width: 56px; height: 56px; border-radius: 14px; background: #eef3f8; color: var(--navy);
    display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.offer-card h3 { color: var(--navy); margin-bottom: 8px; font-size: 1.1rem; }
.offer-card p { color: var(--text-muted); font-size: 0.93rem; }

/* ============================================================================
   Contact
   ============================================================================ */
.contact-layout { display: grid; grid-template-columns: 380px 1fr; gap: 30px; align-items: start; }
.contact-info { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.info-card { padding: 22px; }
.info-icon {
    width: 46px; height: 46px; border-radius: 12px; background: #eef3f8; color: var(--navy);
    display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.info-card h3 { font-size: 1rem; color: var(--navy); margin-bottom: 6px; }
.info-card p { color: var(--text-muted); font-size: 0.9rem; }
.contact-form-card { padding: 30px; }
.contact-form-card h2 { color: var(--navy); margin-bottom: 6px; }
.contact-form-card .muted { margin-bottom: 20px; }

/* ============================================================================
   Forms
   ============================================================================ */
.form-group { margin-bottom: 16px; }
.form-group label, .form-group legend { display: block; font-weight: 600; font-size: 0.88rem; color: var(--navy); margin-bottom: 6px; }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="tel"],
.form-group input[type="search"], .form-group input[type="number"], .form-group input[type="password"],
.form-group input[type="file"], .form-group select, .form-group textarea {
    width: 100%; padding: 11px 13px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 0.95rem; color: var(--text); background: #fff; outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,164,65,0.18);
}
.form-group textarea { resize: vertical; }
.form-error { color: var(--danger); font-size: 0.82rem; display: block; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group-wide { grid-column: 1 / -1; }
.form-group-flex { flex: 1; margin-bottom: 0; min-width: 200px; }
.checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.93rem; color: var(--text); }
.checkbox input { width: 18px; height: 18px; accent-color: var(--navy); }

.form-card { padding: 30px; }
.form-section { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.form-section h3 { color: var(--navy); font-size: 1.05rem; margin-bottom: 18px; }
.form-actions { display: flex; gap: 12px; align-items: center; }

/* ============================================================================
   Tables (admin)
   ============================================================================ */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th {
    text-align: left; padding: 12px 14px; background: #f1f4f8; color: var(--text-muted);
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.8px; border-bottom: 1px solid var(--border);
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfd; }

.cell-property { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.cell-thumb { width: 52px; height: 40px; object-fit: cover; border-radius: 6px; background: #e8edf3; flex: 0 0 auto; }
.link-strong { color: var(--navy); font-weight: 600; }
.link-strong:hover { color: var(--gold-dark); }
.link-more { font-size: 0.88rem; font-weight: 600; color: var(--navy); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.table-card { padding: 22px; }
.table-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.table-card-head h2 { font-size: 1.05rem; color: var(--navy); }

/* ============================================================================
   Admin layout
   ============================================================================ */
.admin-body { display: flex; flex-direction: row; align-items: stretch; background: var(--bg); }

.admin-sidebar {
    width: 240px; background: var(--navy); color: #c9d7e6; min-height: 100vh;
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 90;
    transition: margin-left .25s ease;
}
.admin-brand { padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.admin-brand .brand-name { font-size: 1.2rem; }
.admin-nav { flex: 1; padding: 16px 10px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.admin-nav a {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 9px;
    color: #c9d7e6; font-weight: 500; font-size: 0.93rem;
}
.admin-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-nav a.is-active { background: var(--gold); color: #1d2733; font-weight: 700; }
.admin-nav .admin-view-site { margin-top: auto; border-top: 1px solid rgba(255,255,255,0.08); border-radius: 0; padding-top: 14px; }

.admin-shell { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
    background: #fff; border-bottom: 1px solid var(--border); padding: 0 26px; height: 64px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 80;
}
.admin-topbar-title { font-weight: 700; color: var(--navy); }
.admin-user { display: flex; align-items: center; gap: 14px; }
.admin-user-info { text-align: right; }
.admin-user-info strong { display: block; font-size: 0.9rem; color: var(--navy); }
.admin-user-info .badge { font-size: 0.68rem; }
.admin-toggle { margin-left: -6px; }
.admin-toggle span { background: var(--navy); }

.admin-content { padding: 28px 26px; }

.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; margin-top: 24px; }

.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-bottom: 24px; }
.stat-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-icon {
    width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.icon-navy { background: #e7edf5; color: var(--navy); }
.icon-green { background: #e2f3ea; color: var(--success); }
.icon-gold { background: #fdf1d7; color: var(--gold-dark); }
.icon-purple { background: #efe7f5; color: #7d3c98; }
.icon-blue { background: #e1eff8; color: var(--info); }
.stat-value { display: block; font-size: 1.5rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat-value em.stat-new {
    font-style: normal; font-size: 0.8rem; background: var(--danger); color: #fff;
    padding: 2px 8px; border-radius: 999px; margin-left: 4px; vertical-align: middle;
}
.stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; }

.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }

.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-toolbar h2 { font-size: 1.3rem; color: var(--navy); }

.admin-filters { display: flex; gap: 12px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.admin-filters .form-group { margin-bottom: 0; }
.admin-filters select { width: 180px; }

.tabs { display: flex; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tab {
    padding: 8px 16px; border-radius: 999px; font-size: 0.88rem; font-weight: 600; color: var(--text-muted);
    background: #f1f4f8;
}
.tab:hover { background: #e7edf5; color: var(--navy); }
.tab.is-active { background: var(--navy); color: #fff; }
.tab-count { margin-left: 6px; opacity: 0.75; }

.inquiry-row { padding: 18px; border-bottom: 1px solid var(--border); }
.inquiry-row:last-child { border-bottom: 0; }
.inquiry-row.is-unread { background: #f4f8fc; }
.inquiry-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.inquiry-head .badge { margin-left: 8px; }
.inquiry-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 8px; }
.inquiry-meta svg { color: var(--gold-dark); }
.inquiry-message { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; white-space: pre-line; }
.inquiry-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================================
   Login page
   ============================================================================ */
.login-body {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
    background: linear-gradient(140deg, var(--navy-dark) 0%, var(--navy-light) 60%, #1b4a7a 100%);
}
.login-wrap { width: 100%; max-width: 430px; }
.login-card { padding: 36px 34px; text-align: center; }
.login-brand { justify-content: center; margin-bottom: 20px; }
.login-brand .brand-name { color: var(--navy); }
.login-card h1 { font-size: 1.5rem; color: var(--navy); margin: 0 0 8px; }
.login-card > p { margin: 0 0 22px; }
.login-card form { text-align: left; }
.demo-credentials {
    margin-top: 22px; background: #f4f8fc; border: 1px dashed var(--navy-light);
    border-radius: var(--radius-sm); padding: 14px; text-align: left; font-size: 0.85rem;
}
.demo-credentials p { font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.demo-credentials li { padding: 2px 0; color: var(--text); }
.login-back { display: inline-block; margin-top: 18px; color: var(--text-muted); font-size: 0.88rem; }
.login-back:hover { color: var(--navy); }

/* ============================================================================
   Footer
   ============================================================================ */
.site-footer { background: var(--navy-dark); color: #c9d7e6; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 50px 0 40px; }
.brand-footer .brand-name { font-size: 1.2rem; }
.footer-text { font-size: 0.9rem; margin-top: 12px; max-width: 360px; color: #9fb4cb; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: #c9d7e6; font-size: 0.9rem; }
.footer-col a:hover { color: var(--gold); }
.footer-contact li { display: flex; align-items: flex-start; gap: 9px; font-size: 0.9rem; color: #9fb4cb; }
.footer-contact svg { flex: 0 0 auto; margin-top: 4px; color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 18px 0; font-size: 0.85rem; color: #8ba1b8; text-align: center; }

/* ============================================================================
   Photo lightbox
   ============================================================================ */
body.scroll-locked { overflow: hidden; }

.lightbox {
    position: fixed; inset: 0; z-index: 1000;
    display: none; align-items: center; justify-content: center; padding: 24px;
}
.lightbox.is-open { display: flex; }

.lightbox-backdrop {
    position: absolute; inset: 0; width: 100%; height: 100%;
    background: rgba(10, 30, 51, 0.92); backdrop-filter: blur(4px);
    border: 0; cursor: zoom-out;
}
.lightbox-panel {
    position: relative; width: 100%; max-width: 1000px;
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-lg); outline: none;
}
.lightbox.is-open .lightbox-panel { animation: lb-in .25s ease; }

@keyframes lb-in {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

.lightbox-close {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(10, 30, 51, 0.7); color: #fff; border: 1px solid rgba(255,255,255,0.25);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    transition: background .18s ease, transform .1s ease;
}
.lightbox-close:hover { background: var(--danger); transform: rotate(90deg); }

.lightbox-img {
    width: 100%; max-height: 72vh; min-height: 240px;
    object-fit: contain; background: var(--navy-dark); display: block;
}
.lightbox-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 14px 18px;
}
.lightbox-title { font-weight: 700; color: var(--navy); font-size: 0.98rem; }
.lightbox-link { flex: 0 0 auto; }

/* Zoom hint on the detail-page photo */
.detail-media { cursor: zoom-in; }
.zoom-hint {
    position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px; border-radius: 999px;
    background: rgba(10, 30, 51, 0.78); color: #fff;
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.4px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25); pointer-events: none;
}
.zoom-hint svg { color: var(--gold); }

/* ============================================================================
   Page Not Found (404)
   ============================================================================ */
.error-code {
    font-size: 4rem; font-weight: 800; line-height: 1; color: var(--gold);
    margin: 0 0 6px; letter-spacing: 2px;
}
.notfound-card { text-align: center; padding: 56px 26px; max-width: 620px; margin: 0 auto; }
.notfound-card h1 { font-size: 1.6rem; color: var(--navy); margin-bottom: 8px; }
.notfound-card p { color: var(--text-muted); margin-bottom: 24px; }
.notfound-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 720px) {
    .lightbox { padding: 0; }
    .lightbox-panel { border-radius: 0; height: 100%; display: flex; flex-direction: column; }
    .lightbox-img { max-height: none; flex: 1; object-fit: contain; }
    .lightbox-footer { flex-direction: column; text-align: center; }
}

/* ============================================================================
   Responsive
   ============================================================================ */
@media (max-width: 1080px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: repeat(3, 1fr); }
    .admin-grid-2 { grid-template-columns: 1fr; }
    .detail-layout { grid-template-columns: 1fr; }
    .detail-side { flex-direction: row; flex-wrap: wrap; }
    .detail-side .card { flex: 1 1 320px; }
    .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .listings-layout { grid-template-columns: 1fr; }
    .filter-panel { position: static; }
    .about-story { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-stats { gap: 26px; }
    .facts-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-sidebar { margin-left: -240px; }
    .admin-sidebar.is-open { margin-left: 0; position: fixed; box-shadow: 0 0 40px rgba(0,0,0,0.4); }
    .form-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .nav-toggle { display: flex; }
    .site-nav {
        position: absolute; top: 70px; left: 0; right: 0; background: var(--navy);
        flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 20px 24px;
        display: none; box-shadow: 0 14px 24px rgba(0,0,0,0.25);
    }
    .site-nav.is-open { display: flex; }
    .site-nav a:not(.btn) { padding: 10px 0; width: 100%; }
    .nav-cta { width: 100%; margin: 8px 0 0; }
    .hero { min-height: 560px; }
    .quick-search { flex-direction: column; }
    .qs-field, .qs-field.qs-wide { min-width: 100%; }
    .grid-4, .grid-3 { grid-template-columns: 1fr; }
    .hero-stats { justify-content: space-around; }
    .contact-info { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .cta-inner { text-align: center; justify-content: center; }
    .form-row { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-content, .admin-topbar { padding-left: 16px; padding-right: 16px; }
    .detail-head { flex-direction: column; }
    .detail-price small { text-align: left; }
    .table-card { padding: 14px; }
}
