/* Ceboom — public listing pages (listings.php, listing.php).
   Brand tokens and header/footer styles mirror index.php. */

:root {
    --teal: #0a2e1f;
    --abyss: #051a11;
    --brass: #b39b7d;
    --coral: #d97757;
    --sand: #f3ede1;
    --white: #ffffff;
    --ink: #16241d;
    --ink-soft: #5c6b62;
    --border: #e1d6c2;
    --ease: cubic-bezier(.22,.68,0,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Work Sans', sans-serif; background: var(--sand); margin: 0; color: var(--ink); line-height: 1.65; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: 'Fraunces', serif; margin: 0; line-height: 1.1; color: var(--teal); }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 2px; }

.eyebrow { font-family: 'Space Mono', monospace; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--coral); font-weight: 700; }
section { padding: 60px 24px; max-width: 1180px; margin: 0 auto; }

.btn { display: inline-flex; align-items: center; gap: 9px; padding: 14px 28px; border-radius: 3px; font-weight: 600; font-size: 0.92rem; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease); border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn-coral { background: var(--coral); color: var(--white); }
.btn-coral:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(217,119,87,.3); }
.btn-outline { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn-outline:hover { background: var(--teal); color: var(--white); }
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(10,46,31,.25); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.section-head { max-width: 700px; margin: 0 0 40px; }
.section-head .eyebrow { margin-bottom: 10px; display: block; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 600; }
.section-head p { color: var(--ink-soft); margin-top: 14px; font-size: 1.02rem; }

/* ===== BREADCRUMB ===== */
.breadcrumb { background: var(--abyss); color: #b9c4be; font-size: 0.76rem; padding: 9px 24px; }
.breadcrumb-inner { max-width: 1200px; margin: 0 auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.breadcrumb a { color: #b9c4be; text-decoration: none; }
.breadcrumb a:hover { color: var(--brass); }
.breadcrumb .current { color: var(--brass); }

/* ===== STICKY SUB-NAV / PAGE NAVIGATOR ===== */
.subnav { position: sticky; top: 0; z-index: 900; background: var(--white); border-bottom: 1px solid var(--border); overflow-x: auto; white-space: nowrap; }
.subnav-inner { max-width: 1180px; margin: 0 auto; display: flex; gap: 4px; padding: 0 24px; }
.subnav a { display: inline-block; padding: 16px 14px; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.subnav a:hover { color: var(--teal); }
.subnav a.active { color: var(--coral); border-bottom-color: var(--coral); }

/* ===== HEADER (mirrors index.php so header.php renders correctly) ===== */
header { background: var(--teal); color: var(--white); position: sticky; top: 0; z-index: 1000; border-bottom: 3px solid var(--brass); }
.top-bar { background: rgba(0,0,0,.22); padding: 9px 24px; font-size: 0.78rem; display: flex; justify-content: center; align-items: center; gap: 26px; flex-wrap: wrap; }
.top-bar a { text-decoration: none; color: #e9e2d4; display: inline-flex; gap: 7px; align-items: center; }
.top-bar a:hover { color: var(--brass); }
.top-bar i { color: var(--brass); }
nav.main-nav { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 8px 24px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.logo-img { height: 66px; width: auto; object-fit: contain; }
.tagline { font-family: 'Fraunces', serif; font-style: italic; font-weight: 500; font-size: 0.88rem; color: var(--brass); line-height: 1.25; max-width: 200px; border-left: 1px solid rgba(255,255,255,.25); padding-left: 16px; }
@media (max-width: 720px) { .tagline { display: none; } }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { text-decoration: none; color: #fff; font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: 10px 16px; border-radius: 3px; transition: color .25s, background .25s; }
.nav-links a:hover { color: var(--brass); background: rgba(255,255,255,.06); }
.nav-links a.cta { background: var(--brass); color: var(--teal); margin-left: 8px; }
.nav-links a.cta:hover { background: #c7af8e; color: var(--teal); }
.nav-right { display: flex; align-items: center; gap: 4px; }
.search-toggle { display: inline-flex; align-items: center; gap: 7px; background: none; border: none; color: #fff; font-size: 0.85rem; cursor: pointer; padding: 10px 12px; border-radius: 3px; transition: background .2s, color .2s; }
.search-toggle i { font-size: 1rem; }
@media (max-width: 480px) { .search-toggle strong { display: none; } }
.search-toggle:hover, .search-toggle[aria-expanded="true"] { color: var(--brass); background: rgba(255,255,255,.06); }
.search-panel { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 3px solid var(--brass); box-shadow: 0 14px 30px rgba(5,26,17,.18); padding: 0; max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); z-index: 1001; }
.search-panel.open { max-height: 360px; padding: 18px 24px; overflow-y: auto; }
.search-panel-inner { max-width: 640px; margin: 0 auto; }
.search-panel input[type="search"] { width: 100%; padding: 13px 16px; border: 1px solid var(--border); border-radius: 3px; font-family: 'Work Sans', sans-serif; font-size: 0.98rem; background: var(--sand); color: var(--ink); }
.search-panel input[type="search"]:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(179,155,125,.25); }
.search-results { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.search-results a { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 3px; text-decoration: none; color: var(--ink); font-size: 0.92rem; transition: background .15s; }
.search-results a:hover { background: var(--sand); color: var(--teal); }
.search-results a .cat { font-family: 'Space Mono', monospace; font-size: 0.68rem; color: var(--ink-soft); text-transform: uppercase; }
.search-empty { color: var(--ink-soft); font-size: 0.88rem; padding: 10px 12px; }
.burger { display: none; background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; padding: 8px; }
@media (max-width: 880px) {
    .nav-links { position: absolute; top: 100%; left: 0; right: 0; background: var(--teal); flex-direction: column; align-items: stretch; padding: 10px 16px 18px; max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); border-bottom: 3px solid var(--brass); }
    .nav-links.open { max-height: 420px; }
    .nav-links a { padding: 13px 10px; }
    .nav-links a.cta { margin: 6px 0 0; text-align: center; }
    .burger { display: block; }
}

/* ===== HERO (reference prop-hero pattern) ===== */
.prop-hero { position: relative; min-height: 58vh; display: flex; align-items: center; overflow: hidden; color: var(--white); background: linear-gradient(160deg, var(--abyss) 0%, var(--teal) 70%); border-bottom: 3px solid var(--brass); }
.prop-hero img.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.prop-hero .scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(5,26,17,.75) 0%, rgba(10,46,31,.5) 45%, rgba(5,26,17,.88) 100%); }
.hero-content { position: relative; z-index: 2; padding: 60px 24px; max-width: 820px; margin: 0 auto; text-align: center; }
.hero-content .eyebrow { color: var(--brass); }
.hero-content h1 { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--white); margin-top: 12px; font-weight: 600; }
.hero-content .sub { margin-top: 16px; font-size: 1.05rem; color: #e7ece9; }
.hero-actions { margin-top: 28px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.ribbon { position: absolute; top: 18px; right: 18px; z-index: 2; }
.ribbon .pill { font-family: 'Space Mono', monospace; font-size: 0.66rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; padding: 7px 14px; border-radius: 20px; background: rgba(5,26,17,.78); color: var(--brass); border: 1px solid rgba(179,155,125,.4); }
.ribbon .pill.sold { background: rgba(92,107,98,.92); color: #fff; }
.page-band { min-height: 34vh; }
.page-band .hero-content { padding: 70px 24px; }

/* ===== CATALOG FILTERS ===== */
.catalog-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.catalog-filters input[type="search"], .catalog-filters select {
    font-family: inherit; font-size: 0.9rem; padding: 11px 13px;
    border: 1px solid var(--border); border-radius: 3px; background: var(--white); color: var(--ink);
}
.catalog-filters input[type="search"] { flex: 1; min-width: 200px; }
.result-note { font-family: 'Space Mono', monospace; font-size: 0.7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 20px; }

/* ===== LISTING CARDS ===== */
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.listing-card {
    background: var(--white); border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
    text-decoration: none; display: flex; flex-direction: column;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.listing-card:hover { transform: translateY(-5px); box-shadow: 0 18px 36px rgba(5,26,17,.16); }
.listing-card .photo { position: relative; aspect-ratio: 4 / 3; background: var(--teal); }
.listing-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.listing-card .photo .no-photo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: rgba(179,155,125,.35); }
.listing-card .status-pill {
    position: absolute; top: 12px; left: 12px; font-family: 'Space Mono', monospace; font-size: 0.62rem;
    letter-spacing: .06em; text-transform: uppercase; font-weight: 700; padding: 5px 11px; border-radius: 20px;
    background: rgba(5,26,17,.78); color: var(--brass);
}
.listing-card .status-pill.sold { background: rgba(92,107,98,.9); color: #fff; }
.listing-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.listing-card h3 { font-size: 1.08rem; font-weight: 600; }
.listing-card .loc { font-size: 0.84rem; color: var(--ink-soft); display: flex; gap: 7px; align-items: center; }
.listing-card .loc i { color: var(--brass); }
.listing-card .meta { display: flex; gap: 14px; font-size: 0.8rem; color: var(--ink-soft); flex-wrap: wrap; }
.listing-card .meta i { color: var(--brass); margin-right: 4px; }
.listing-card .price { margin-top: auto; padding-top: 10px; font-family: 'Fraunces', serif; font-size: 1.15rem; font-weight: 600; color: var(--teal); }

.catalog-empty { background: var(--white); border: 1px dashed var(--border); border-radius: 6px; padding: 60px 30px; text-align: center; color: var(--ink-soft); }

/* ===== PAGINATION ===== */
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pager a, .pager span { padding: 9px 15px; border-radius: 3px; border: 1px solid var(--border); background: var(--white); text-decoration: none; font-size: 0.88rem; color: var(--ink); }
.pager a:hover { border-color: var(--brass); color: var(--teal); }
.pager .current { background: var(--teal); color: var(--white); border-color: var(--teal); font-weight: 600; }

/* ===== LISTING DETAIL (reference layout) ===== */
.overview-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: start; }
@media (max-width: 880px) { .overview-grid { grid-template-columns: 1fr; } }
.overview-grid .unit-info > .eyebrow { display: block; margin-bottom: 10px; }
.overview-grid .unit-info h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 600; }
.overview-grid .unit-info p { color: var(--ink-soft); margin: 14px 0 0; }

.price-card { background: var(--white); border: 1px solid var(--border); border-radius: 4px; padding: 24px 26px; }
.price-card .area-tag { font-size: 0.78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.price-card .tcp { font-family: 'Fraunces', serif; font-size: 1.45rem; color: var(--coral); font-weight: 600; margin: 6px 0 16px; }
.price-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 0.88rem; }
.price-row:last-child { border-bottom: none; }
.price-row .label { color: var(--ink-soft); }
.price-row .val { font-family: 'Space Mono', monospace; font-weight: 700; color: var(--teal); text-align: right; }
.price-card .btn { margin-top: 18px; width: 100%; justify-content: center; }

.gallery .main-photo { border-radius: 4px; overflow: hidden; background: var(--teal); aspect-ratio: 16 / 10; }
.gallery .main-photo img { width: 100%; height: 100%; object-fit: cover; }
.gallery .main-photo .no-photo { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 4rem; color: rgba(179,155,125,.35); }
.gallery .video-embed { margin-top: 12px; border-radius: 4px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--abyss); }
.gallery .video-embed iframe, .video-solo iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-solo { border-radius: 4px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--abyss); max-width: 900px; }
.gallery .thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; margin-top: 12px; }
.gallery .thumbs button { padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; cursor: pointer; background: none; aspect-ratio: 4 / 3; }
.gallery .thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .thumbs button.active { border-color: var(--coral); }

/* Features as reference amenity cards */
.amenity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.amenity-card { background: var(--white); border: 1px solid var(--border); border-radius: 4px; padding: 18px 20px; display: flex; align-items: center; gap: 14px; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.amenity-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(10,46,31,.08); }
.amenity-card .ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: var(--sand); color: var(--coral); display: flex; align-items: center; justify-content: center; font-size: 0.95rem; }
.amenity-card span.label { font-weight: 500; font-size: 0.92rem; }

/* Quick CTA band */
.cta-band { text-align: center; }
.cta-band .section-head { margin-left: auto; margin-right: auto; }
.cta-band .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== FOOTER (mirrors index.php so footer.php renders correctly) ===== */
footer { background: var(--abyss); color: #fff; padding: 60px 24px 30px; margin-top: 40px; }
.footer-inquire { max-width: 640px; margin: 0 auto 50px; }
.footer-inquire .eyebrow { display: block; text-align: center; margin-bottom: 6px; }
.footer-inquire h4 { color: #fff; text-align: center; font-size: 1.2rem; font-weight: 600; margin: 0 0 24px; }
.inquiry-form { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); border-radius: 4px; padding: 30px 32px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field-row { display: flex; gap: 16px; }
.field-row .field { flex: 1; }
.field label { font-size: 0.82rem; font-weight: 600; color: #b9c4be; }
.field input, .field select, .field textarea { font-family: 'Work Sans', sans-serif; font-size: 0.95rem; padding: 12px 14px; border: 1px solid rgba(255,255,255,.15); border-radius: 3px; background: rgba(255,255,255,.07); color: #fff; transition: border-color .2s, box-shadow .2s; }
.field input::placeholder, .field textarea::placeholder { color: #7f8d86; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(179,155,125,.25); }
.field select option { color: #16241d; }
.form-alert { padding: 13px 16px; border-radius: 3px; font-size: 0.9rem; margin-bottom: 20px; }
.form-alert.success { background: rgba(46,166,111,.15); border: 1px solid #2ea66f; color: #bfe8d2; }
.form-alert.error { background: rgba(217,119,87,.18); border: 1px solid var(--coral); color: #f3c9bb; }
@media (max-width: 540px) { .field-row { flex-direction: column; gap: 0; } }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; }
.footer-col h4 { color: var(--brass); margin-bottom: 18px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: .06em; font-family: 'Work Sans', sans-serif; font-weight: 700; }
.footer-col p, .footer-col a { color: #b9c4be; text-decoration: none; font-size: 0.9rem; margin: 0 0 9px; display: block; }
.footer-col a:hover { color: var(--brass); }
.footer-tagline { font-family: 'Fraunces', serif; font-style: italic; color: var(--brass); font-size: 0.9rem; margin: 0 0 10px; }
.social-icons { display: flex; gap: 12px; margin-top: 4px; }
.social-icons a { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--brass); transition: background .25s, color .25s; }
.social-icons a:hover { background: var(--brass); color: var(--teal); }
.foot-bottom { text-align: center; margin-top: 44px; font-size: 0.74rem; color: #5d6b64; border-top: 1px solid rgba(255,255,255,.08); padding-top: 22px; }
.agents-footer { max-width: 1200px; margin: 0 auto 50px; }
.agents-footer .eyebrow { color: var(--brass); display: block; text-align: center; margin-bottom: 6px; }
.agents-footer h4 { color: #fff; text-align: center; font-size: 1.15rem; font-weight: 600; margin: 0 0 30px; }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.agent-card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 4px; padding: 20px 22px; }
.agent-card h5 { color: #fff; font-family: 'Work Sans', sans-serif; font-size: 1rem; font-weight: 700; margin: 0 0 10px; }
.agent-card .a-row { display: flex; align-items: flex-start; gap: 8px; font-size: 0.82rem; color: #b9c4be; margin-bottom: 6px; }
.agent-card .a-row i { color: var(--brass); margin-top: 2px; width: 14px; text-align: center; }
.agent-card .a-row a { color: #b9c4be; text-decoration: none; }
.agent-card .a-row a:hover { color: var(--brass); }
.agent-card .licenses { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 4px; }
.agent-card .licenses span { font-family: 'Space Mono', monospace; font-size: 0.7rem; color: var(--brass); letter-spacing: .02em; }
.safety-banner { text-align: center; margin-top: 34px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); font-family: 'Fraunces', serif; font-style: italic; font-size: 0.95rem; color: var(--brass); }

/* ===== BLOG ===== */
.post-card .date { font-family: 'Space Mono', monospace; font-size: 0.66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.post-card .excerpt { font-size: 0.88rem; color: var(--ink-soft); margin: 0; }
.post-card .read-more { margin-top: auto; padding-top: 10px; font-size: 0.84rem; font-weight: 600; color: var(--coral); display: inline-flex; gap: 7px; align-items: center; }
.post-body { max-width: 760px; margin: 0 auto; }
.post-body h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); font-weight: 600; margin: 34px 0 12px; }
.post-body h3 { font-size: 1.12rem; font-weight: 600; margin: 26px 0 10px; }
.post-body p { color: var(--ink); margin: 0 0 16px; font-size: 1.0rem; }
.post-body ul { margin: 0 0 16px; padding-left: 22px; color: var(--ink); }
.post-body li { margin-bottom: 8px; }
.post-body a { color: var(--coral); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { color: var(--teal); }
