/* ==========================================================================
   Bích Thuận Real Estate — design tokens & base
   ========================================================================== */
:root {
  --navy: #0f2540;
  --navy-deep: #0a1a2e;
  --navy-light: #1e3a5f;
  --gold: #c9a24d;
  --gold-light: #e6c874;
  --cream: #faf7f1;
  --paper: #ffffff;
  --ink: #1a2233;
  --muted: #66707f;
  --line: #e8e3d9;
  --success: #2e7d46;
  --danger: #c0392b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 10px rgba(15, 37, 64, 0.06);
  --shadow-md: 0 12px 32px rgba(15, 37, 64, 0.12);
  --shadow-lg: 0 24px 60px rgba(15, 37, 64, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-head: "Playfair Display", "Be Vietnam Pro", Georgia, serif;
  --font-body: "Be Vietnam Pro", -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; margin: 0 0 .5em; color: var(--navy-deep); line-height: 1.25; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.icon { width: 20px; height: 20px; flex-shrink: 0; }

/* Scroll reveal */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal="fade"] { transform: none; }
[data-reveal-delay="1"] { transition-delay: .1s; }
[data-reveal-delay="2"] { transition-delay: .22s; }
[data-reveal-delay="3"] { transition-delay: .34s; }
[data-reveal-delay="4"] { transition-delay: .46s; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 12px;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--gold); }

.section { padding: 96px 0; }
.section-head { max-width: 620px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-head.left { margin-left: 0; text-align: left; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
  white-space: nowrap;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--navy-deep); box-shadow: 0 10px 24px rgba(201, 162, 77, .35); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(201, 162, 77, .45); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.4); color: inherit; }
.btn-outline:hover { background: rgba(255,255,255,.12); transform: translateY(-3px); }
.btn-dark { background: var(--navy-deep); color: #fff; }
.btn-dark:hover { background: var(--navy); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-sm { padding: 9px 18px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-danger { background: #fdecea; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 12px 0; background: rgba(250, 247, 241, .92); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm);
  transition: padding .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

/* Trang chủ có hero nền tối nên header mặc định trong suốt + chữ trắng, chỉ đổi thành nền đặc khi cuộn */
body.page-home .site-header:not(.is-scrolled) { padding: 22px 0; background: transparent; backdrop-filter: none; box-shadow: none; }

.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--navy-deep); transition: color .35s var(--ease); min-width: 0; }
body.page-home .site-header:not(.is-scrolled) .brand { color: #fff; }
.brand-mark { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-light), var(--gold)); display: flex; align-items: center; justify-content: center; color: var(--navy-deep); font-weight: 800; flex-shrink: 0; }
.brand-text { min-width: 0; }
.brand-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { display: block; font-family: var(--font-body); font-size: .68rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }

.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a { position: relative; font-weight: 500; font-size: .95rem; color: var(--ink); padding: 6px 0; transition: color .35s var(--ease); }
body.page-home .site-header:not(.is-scrolled) .nav-links a { color: #fff; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--gold); transition: width .3s var(--ease); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.header-phone { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--navy-deep); transition: color .35s var(--ease); }
body.page-home .site-header:not(.is-scrolled) .header-phone { color: #fff; }
.header-phone .icon { color: var(--gold); }

.nav-toggle { display: none; background: none; border: none; padding: 10px; color: var(--navy-deep); }
.nav-toggle .icon { width: 24px; height: 24px; }
body.page-home .site-header:not(.is-scrolled) .nav-toggle { color: #fff; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center;
  background: radial-gradient(ellipse at top left, var(--navy-light), var(--navy-deep) 65%);
  overflow: hidden; color: #fff; padding-top: 120px;
}
.hero-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35; animation: float 16s ease-in-out infinite; }
.hero-blob.b1 { width: 480px; height: 480px; background: var(--gold); top: -140px; right: -100px; animation-duration: 18s; }
.hero-blob.b2 { width: 360px; height: 360px; background: #3a6ea5; bottom: -120px; left: -80px; animation-duration: 22s; animation-delay: -4s; }
.hero-blob.b3 { width: 240px; height: 240px; background: var(--gold-light); bottom: 10%; right: 15%; opacity: .18; animation-duration: 14s; animation-delay: -8s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.08); }
  66% { transform: translate(-20px, 25px) scale(0.96); }
}

.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse at center, black, transparent 75%); }

.hero-content { position: relative; z-index: 2; max-width: 760px; }
.hero-content .eyebrow { color: var(--gold-light); }
.hero-content h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); color: #fff; }
.hero-content h1 em { font-style: normal; color: var(--gold-light); }
.hero-content p.lead { font-size: 1.15rem; color: rgba(255,255,255,.82); max-width: 560px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }

.hero-anim { animation: heroUp 1s var(--ease) both; }
.hero-anim.d1 { animation-delay: .08s; }
.hero-anim.d2 { animation-delay: .2s; }
.hero-anim.d3 { animation-delay: .32s; }
.hero-anim.d4 { animation-delay: .44s; }
@keyframes heroUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

/* Search / filter card */
.search-card {
  position: relative; z-index: 2; background: rgba(255,255,255,.97); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 14px; align-items: end;
}
.search-field { display: flex; flex-direction: column; gap: 6px; }
.search-field label { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.search-field select, .search-field input {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 12px; background: var(--cream); color: var(--ink); transition: border-color .25s, box-shadow .25s;
}
.search-field select:focus, .search-field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,77,.18); }
.search-card .btn { height: 46px; }

.scroll-cue { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; color: rgba(255,255,255,.7); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.scroll-cue .dot-wrap { width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.4); border-radius: 20px; display: flex; justify-content: center; padding-top: 8px; }
.scroll-cue .dot { width: 4px; height: 8px; border-radius: 2px; background: var(--gold-light); animation: scrollDot 1.8s ease-in-out infinite; }
@keyframes scrollDot { 0% { opacity: 1; transform: translateY(0); } 70% { opacity: 0; transform: translateY(14px); } 100% { opacity: 0; } }

/* ==========================================================================
   Stats
   ========================================================================== */
.stats-strip { position: relative; z-index: 3; margin-top: -64px; }
.stats-card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 36px 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { text-align: center; padding: 8px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat .num { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; color: var(--navy-deep); display: flex; justify-content: center; align-items: baseline; gap: 2px; }
.stat .num .plus { color: var(--gold); font-size: 1.6rem; }
.stat .label { color: var(--muted); font-size: .88rem; margin-top: 4px; }

/* ==========================================================================
   Property cards & grid
   ========================================================================== */
.section-toolbar { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; gap: 24px; flex-wrap: wrap; }
.section-toolbar .section-head { text-align: left; margin: 0; }

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

.listing-card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease); position: relative; display: flex; flex-direction: column;
}
.listing-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.listing-media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: linear-gradient(135deg, var(--navy-light), var(--navy)); }
.listing-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.listing-card:hover .listing-media img { transform: scale(1.08); }
.listing-media .no-image { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: rgba(255,255,255,.55); gap: 8px; }
.listing-media .no-image .icon { width: 34px; height: 34px; }
.listing-media .no-image span { font-size: .78rem; letter-spacing: .04em; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.badge-gold { background: var(--gold); color: var(--navy-deep); }
.badge-navy { background: var(--navy-deep); color: #fff; }
.badge-status { background: rgba(255,255,255,.94); color: var(--navy-deep); }
.badge-danger { background: var(--danger); color: #fff; }

.listing-tags { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; z-index: 2; }
.listing-tags.right { left: auto; right: 14px; }
.listing-featured { position: absolute; top: 14px; right: 14px; z-index: 2; }

.listing-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.listing-price { font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; color: var(--navy-deep); }
.listing-title { font-size: 1.05rem; font-weight: 600; color: var(--ink); line-height: 1.4; }
.listing-title a { transition: color .25s; }
.listing-title a:hover { color: var(--navy-light); }
.listing-loc { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .88rem; }
.listing-loc .icon { width: 15px; height: 15px; color: var(--gold); }
.listing-meta { display: flex; gap: 16px; margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); color: var(--muted); font-size: .85rem; }
.listing-meta span { display: flex; align-items: center; gap: 6px; }
.listing-meta .icon { width: 16px; height: 16px; color: var(--navy-light); }

.view-all-wrap { text-align: center; margin-top: 48px; }

/* ==========================================================================
   Bản tin (posts)
   ========================================================================== */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.post-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.post-media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: linear-gradient(135deg, var(--navy-light), var(--navy)); }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.post-card:hover .post-media img { transform: scale(1.08); }
.post-media .play-badge { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(10,26,46,.15); }
.post-media .play-badge .icon { width: 48px; height: 48px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.45)); }
.post-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-date { color: var(--gold); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.post-title { font-size: 1.08rem; font-weight: 600; color: var(--ink); line-height: 1.4; }
.post-title a { transition: color .25s; }
.post-title a:hover { color: var(--navy-light); }
.post-excerpt { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; }
.post-more { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); font-weight: 600; color: var(--navy-deep); display: inline-flex; align-items: center; gap: 6px; }
.post-more .icon { width: 16px; height: 16px; }

.post-video-wrap { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; box-shadow: var(--shadow-md); background: #000; margin-bottom: 32px; }
.post-video-wrap iframe, .post-video-wrap video { width: 100%; height: 100%; border: none; display: block; object-fit: contain; }
.post-content { color: var(--ink); font-size: 1.02rem; line-height: 1.85; white-space: pre-line; margin: 32px 0; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .icon { width: 48px; height: 48px; color: var(--gold); margin: 0 auto 16px; }

/* ==========================================================================
   Filter bar (listings page)
   ========================================================================== */
.filter-bar { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr) auto; gap: 14px; margin-bottom: 40px; align-items: end; }
.filter-bar .search-field select, .filter-bar .search-field input { background: var(--cream); }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; border-radius: 10px; font-weight: 600; font-size: .9rem; color: var(--ink); background: var(--paper); box-shadow: var(--shadow-sm); transition: all .25s; }
.pagination a:hover { background: var(--navy-deep); color: #fff; }
.pagination .active { background: var(--gold); color: var(--navy-deep); }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ==========================================================================
   About section
   ========================================================================== */
.about-section { background: var(--paper); }
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.about-portrait { position: relative; }
.about-portrait .frame { aspect-ratio: 3/4; border-radius: var(--radius); background: linear-gradient(155deg, var(--navy-light), var(--navy-deep)); display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: var(--shadow-lg); }
.about-portrait .frame img { width: 100%; height: 100%; object-fit: cover; }
.about-portrait .frame .placeholder-mono { font-family: var(--font-head); font-size: 4.5rem; color: rgba(255,255,255,.85); }
.about-portrait .badge-float { position: absolute; bottom: -22px; right: -22px; background: var(--paper); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 18px 22px; display: flex; align-items: center; gap: 12px; }
.about-portrait .badge-float .icon { width: 30px; height: 30px; color: var(--gold); }
.about-portrait .badge-float strong { display: block; font-family: var(--font-head); font-size: 1.3rem; color: var(--navy-deep); }
.about-portrait .badge-float span { font-size: .78rem; color: var(--muted); }

.about-text .name { font-size: 1rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.about-text p { color: var(--muted); font-size: 1.02rem; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
.feature-item { display: flex; gap: 12px; align-items: flex-start; }
.feature-item .ico-wrap { width: 42px; height: 42px; border-radius: 12px; background: rgba(201,162,77,.14); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feature-item .ico-wrap .icon { color: var(--gold); width: 20px; height: 20px; }
.feature-item h4 { font-size: .95rem; margin-bottom: 2px; }
.feature-item p { font-size: .85rem; margin: 0; color: var(--muted); }

/* ==========================================================================
   CTA banner
   ========================================================================== */
.cta-banner { background: linear-gradient(120deg, var(--navy-deep), var(--navy-light)); border-radius: var(--radius); padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 32px; color: #fff; position: relative; overflow: hidden; }
.cta-banner::after { content: ""; position: absolute; width: 320px; height: 320px; background: radial-gradient(circle, rgba(201,162,77,.25), transparent 70%); top: -100px; right: -60px; }
.cta-banner h2 { color: #fff; margin-bottom: 8px; }
.cta-banner p { color: rgba(255,255,255,.75); margin: 0; }
.cta-banner-inner { position: relative; z-index: 1; }

/* ==========================================================================
   Contact section
   ========================================================================== */
.contact-section { background: var(--navy-deep); color: #fff; position: relative; overflow: hidden; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; }
.contact-info h2 { color: #fff; }
.contact-info > p { color: rgba(255,255,255,.72); }
.contact-cards { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.contact-card { display: flex; align-items: center; gap: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-sm); padding: 16px 18px; transition: background .3s, transform .3s; }
.contact-card:hover { background: rgba(255,255,255,.11); transform: translateX(4px); }
.contact-card .ico-wrap { width: 44px; height: 44px; border-radius: 12px; background: var(--gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-card .ico-wrap .icon { color: var(--navy-deep); }
.contact-card strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gold-light); }
.contact-card span { font-size: 1rem; }

.contact-form { background: #fff; border-radius: var(--radius); padding: 36px; color: var(--ink); box-shadow: var(--shadow-lg); }
.contact-form h3 { margin-bottom: 6px; }
.contact-form p.muted { color: var(--muted); margin-bottom: 24px; font-size: .92rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.form-group input, .form-group select, .form-group textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--cream); transition: border-color .25s, box-shadow .25s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,77,.18); }
.form-group textarea { resize: vertical; min-height: 110px; }
.form-success { display: flex; align-items: center; gap: 10px; background: #eaf7ee; color: var(--success); padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight: 600; font-size: .92rem; }

/* ==========================================================================
   Floating action buttons
   ========================================================================== */
.fab-stack { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 14px; z-index: 300; }
.fab { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); color: #fff; position: relative; transition: transform .3s var(--ease); }
.fab:hover { transform: scale(1.1); }
.fab.fab-phone { background: var(--navy-deep); }
.fab.fab-zalo { background: #0068ff; }
.fab .icon { width: 24px; height: 24px; }
.fab::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid currentColor; animation: pulseRing 2.2s ease-out infinite; opacity: 0; }
.fab.fab-phone::before { animation-delay: 0s; }
.fab.fab-zalo::before { animation-delay: 1.1s; }
@keyframes pulseRing { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.6); opacity: 0; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.65); padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand { color: #fff; }
.footer-brand p { color: rgba(255,255,255,.6); font-size: .9rem; margin-top: 12px; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: .9rem; transition: color .25s; }
.footer-col a:hover { color: var(--gold-light); }
.footer-col .contact-line { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.footer-col .contact-line .icon { width: 16px; height: 16px; color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: .82rem; flex-wrap: wrap; gap: 12px; }
.social-row { display: flex; gap: 10px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; transition: background .25s, transform .25s; }
.social-row a:hover { background: var(--gold); color: var(--navy-deep); transform: translateY(-3px); }

/* ==========================================================================
   Listing detail page
   ========================================================================== */
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .88rem; margin-bottom: 24px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--navy-light); }
.breadcrumb .sep { opacity: .5; }

.gallery-main { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--navy-light), var(--navy)); box-shadow: var(--shadow-md); cursor: zoom-in; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 12px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumbs img { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; cursor: pointer; opacity: .6; transition: opacity .25s, outline .25s; flex-shrink: 0; }
.gallery-thumbs img.active { opacity: 1; outline: 2px solid var(--gold); }

.detail-layout { display: grid; grid-template-columns: 1.6fr .9fr; gap: 48px; margin-top: 40px; align-items: flex-start; }
.detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 18px; flex-wrap: wrap; }
.detail-header h1 { font-size: 1.9rem; margin-bottom: 8px; }
.detail-price { font-family: var(--font-head); font-size: 1.9rem; color: var(--gold); font-weight: 700; white-space: nowrap; }

.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0; }
.spec-item { background: var(--paper); border-radius: var(--radius-sm); padding: 16px; text-align: center; box-shadow: var(--shadow-sm); }
.spec-item .icon { color: var(--gold); width: 22px; height: 22px; margin-bottom: 8px; }
.spec-item strong { display: block; font-size: 1.05rem; color: var(--navy-deep); }
.spec-item span { font-size: .78rem; color: var(--muted); }

.detail-desc h3 { margin-top: 32px; }
.detail-desc p { color: var(--muted); white-space: pre-line; }

.sidebar-card { background: var(--paper); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-md); position: sticky; top: 110px; }
.sidebar-card .agent { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.sidebar-card .agent .avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-light), var(--gold)); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 700; color: var(--navy-deep); font-size: 1.3rem; }
.sidebar-card .agent strong { display: block; }
.sidebar-card .agent span { font-size: .82rem; color: var(--muted); }
.sidebar-card .btn { margin-bottom: 10px; }

.related-heading { margin-top: 72px; margin-bottom: 28px; }

/* ==========================================================================
   Auth / admin
   ========================================================================== */
.auth-page { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at top, var(--navy-light), var(--navy-deep)); padding: 24px; }
.auth-card { width: 100%; max-width: 400px; background: var(--paper); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-lg); }
.auth-card .brand-mark { margin: 0 auto 18px; }
.auth-card h1 { text-align: center; font-size: 1.5rem; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 28px; font-size: .92rem; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .88rem; margin-bottom: 18px; }
.alert-error { background: #fdecea; color: var(--danger); }
.alert-success { background: #eaf7ee; color: var(--success); }

.admin-shell { display: flex; min-height: 100vh; min-height: 100dvh; background: var(--cream); }
.admin-nav-toggle { display: none; position: fixed; top: 14px; left: 14px; z-index: 260; width: 44px; height: 44px; border-radius: 10px; background: var(--navy-deep); color: #fff; align-items: center; justify-content: center; box-shadow: var(--shadow-md); border: none; }
.admin-sidebar-overlay { position: fixed; inset: 0; background: rgba(10,26,46,.55); z-index: 239; opacity: 0; pointer-events: none; transition: opacity .3s; }
.admin-sidebar-overlay.open { opacity: 1; pointer-events: auto; }
.admin-sidebar { width: 240px; background: var(--navy-deep); color: rgba(255,255,255,.75); flex-shrink: 0; padding: 28px 18px; display: flex; flex-direction: column; }
.admin-sidebar .brand { color: #fff; padding: 0 8px 24px; font-size: 1.05rem; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; font-size: .92rem; font-weight: 500; transition: background .25s, color .25s; }
.admin-nav a .icon { width: 18px; height: 18px; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-sidebar .logout-link { margin-top: auto; }

.admin-main { flex: 1; padding: 32px 40px; max-width: calc(100vw - 240px); }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.admin-topbar h1 { font-size: 1.6rem; margin: 0; }
.admin-topbar p { color: var(--muted); margin: 4px 0 0; font-size: .9rem; }

.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.data-table td { padding: 14px; border-bottom: 1px solid var(--line); font-size: .92rem; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .thumb { width: 56px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--cream); }
.data-table .row-actions { display: flex; gap: 8px; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--cream); border: 1px solid var(--line); transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--navy-deep); color: #fff; border-color: var(--navy-deep); }
.icon-btn.danger:hover { background: var(--danger); border-color: var(--danger); }
.icon-btn .icon { width: 16px; height: 16px; }

.status-pill { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.status-pill.selling { background: #eaf7ee; color: var(--success); }
.status-pill.pending { background: #fff6e0; color: #a67c00; }
.status-pill.sold { background: #f1f1f1; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.form-grid .span-3 { grid-column: span 3; }
.form-grid .span-2 { grid-column: span 2; }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: 18px; height: 18px; }

.upload-zone { border: 2px dashed var(--line); border-radius: var(--radius-sm); padding: 28px; text-align: center; color: var(--muted); transition: border-color .25s, background .25s; cursor: pointer; }
.upload-zone.dragover { border-color: var(--gold); background: rgba(201,162,77,.08); }
.upload-zone .icon { width: 30px; height: 30px; color: var(--gold); margin-bottom: 8px; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin-top: 16px; }
.preview-grid .thumb-wrap { position: relative; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: var(--cream); }
.preview-grid .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.existing-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin-bottom: 16px; }
.existing-images .thumb-wrap { position: relative; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; }
.existing-images .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.existing-images button { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.existing-images button .icon { width: 14px; height: 14px; }

.creds-banner { background: #fff6e0; border: 1px solid #f0d98a; color: #7a5c00; padding: 16px 20px; border-radius: var(--radius-sm); margin-bottom: 24px; font-size: .88rem; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10,15,25,.94); z-index: 500; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .3s; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 8px; object-fit: contain; }
.lightbox-close { position: absolute; top: 24px; right: 28px; color: #fff; background: rgba(255,255,255,.1); border-radius: 50%; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; background: rgba(255,255,255,.1); border-radius: 50%; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.lightbox-prev { left: 24px; } .lightbox-next { right: 24px; }
.lightbox-prev .icon { transform: rotate(180deg); }

/* Mobile nav drawer */
.mobile-drawer { position: fixed; inset: 0; z-index: 250; background: var(--navy-deep); display: flex; flex-direction: column; padding: 100px 32px 32px; transform: translateX(100%); transition: transform .4s var(--ease); }
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer a { color: #fff; font-size: 1.2rem; font-weight: 600; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.1); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .nav-links, .header-phone, .header-actions .btn { display: none; }
  .nav-toggle { display: block; }
  .stats-strip { margin-top: 24px; }
  .listing-grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .search-card { grid-template-columns: 1fr 1fr; }
  .search-card .btn { grid-column: 1 / -1; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar .btn { grid-column: 1 / -1; }
  .about-grid, .detail-layout, .contact-grid { grid-template-columns: 1fr; }
  .stats-card { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-main { max-width: 100vw; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .listing-grid, .post-grid { grid-template-columns: 1fr; }
  .search-card { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
  .form-row, .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-grid .span-3 { grid-column: span 1; }
  .cta-banner { flex-direction: column; text-align: center; padding: 36px 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .admin-nav-toggle { display: flex; }
  .admin-sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; height: 100dvh; z-index: 240;
    transform: translateX(-100%); transition: transform .35s var(--ease); box-shadow: var(--shadow-lg);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { padding: 84px 18px 20px; max-width: 100vw; }
  .data-table { display: block; overflow-x: auto; }
  .detail-price { white-space: normal; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .site-header { padding: 10px 0; }
  body.page-home .site-header:not(.is-scrolled) { padding: 16px 0; }
  .brand { gap: 8px; font-size: 1.02rem; }
  .brand-mark { width: 36px; height: 36px; font-size: .95rem; }
  .brand small { font-size: .6rem; }
  .hero { padding-top: 100px; }
  .hero-content p.lead { font-size: 1rem; }
  .hero-cta { margin-bottom: 40px; }
  .section { padding: 48px 0; }
  .cta-banner { padding: 28px 18px; }
  .sidebar-card { padding: 20px; }
  .contact-form { padding: 24px; }
  .spec-grid { gap: 10px; }
  .spec-item { padding: 12px 6px; }
  .auth-card { padding: 28px 22px; }
  .stats-card { padding: 24px 16px; }
  .stat .num { font-size: 1.9rem; }
}
