/*
Theme Name: Serenity Point
Theme URI: https://www.serenitypointsc.com/
Author: Roger Grant
Description: Custom theme for SerenityPointSC.com - Serenity Point luxury waterfront community, Little River SC. Traci Miles branding.
Version: 0.9.0
Requires PHP: 8.1
Text Domain: serenity-point
*/

:root {
  --gold:#eb9623; --gold-dark:#c16d0d; --blue:#70a9c1; --blue-deep:#3c6173;
  --cream:#fbf0e0; --cream-lt:#fdf8f0; --ink:#2b2b2b; --muted:#6f6f6f; --line:#e7ddcd;
}

* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); background: #fff;
  font: 400 17px/1.6 "Source Sans Pro", -apple-system, Segoe UI, sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--gold-dark); }
h1, h2, h3 { line-height: 1.2; color: var(--blue-deep); }
h1 { font-size: 40px; font-weight: 700; }
h2 { font-size: 30px; font-weight: 600; }
h3 { font-size: 22px; font-weight: 600; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 3px solid var(--gold); background: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 16px; flex-wrap: wrap; }
.site-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.site-brand img { height: 64px; width: auto; }
.site-brand .site-title { font-size: 24px; font-weight: 700; color: var(--blue-deep); }
.site-brand .site-tag { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.header-phone { font-size: 20px; font-weight: 600; color: var(--gold-dark); text-decoration: none; white-space: nowrap; }

/* Nav */
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { display: block; padding: 10px 16px; text-decoration: none; color: var(--blue-deep); font-weight: 600; font-size: 15px; border-radius: 6px; }
.site-nav a:hover, .site-nav .current-menu-item a { background: var(--cream); color: var(--gold-dark); }

/* Hero */
.hero { position: relative; background: var(--blue-deep); color: #fff; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero-inner { position: relative; padding: 110px 20px 120px; max-width: 860px; margin: 0 auto; text-align: center; }
.hero-eyebrow { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.hero h1 { color: #fff; margin: 10px 0 14px; font-size: 48px; }
.hero p { font-size: 20px; color: #f0ece2; max-width: 640px; margin: 0 auto 26px; }
.btn { display: inline-block; padding: 13px 26px; border-radius: 8px; font-weight: 700; text-decoration: none; font-size: 16px; }
.btn-gold { background: var(--gold-dark); color: #fff; }
.btn-gold:hover { background: var(--gold); color: #fff; }
.btn-ghost { border: 2px solid #fff; color: #fff; margin-left: 10px; }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--cream-lt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.section-head .eyebrow { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dark); font-weight: 700; }

/* Facts strip */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px; text-align: center; }
.fact .num { font-size: 26px; font-weight: 700; color: var(--blue-deep); }
.fact .lbl { font-size: 14px; color: var(--muted); }

/* Video */
.video-frame { position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; box-shadow: 0 12px 40px rgba(60,97,115,.25); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-item h3 { margin: 0 0 8px; font-size: 19px; }
.faq-item p { margin: 0; color: #444; }

/* Listings placeholders (module fills these) */
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.listing-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.listing-card .photo { aspect-ratio: 4/3; background: var(--cream); object-fit: cover; width: 100%; }
.listing-card .body { padding: 16px 18px; }
.listing-card .price { font-size: 22px; font-weight: 700; color: var(--blue-deep); }
.listing-card .addr { font-weight: 600; }
.listing-card .meta { font-size: 14px; color: var(--muted); }
.badge-sold { display: inline-block; background: var(--blue-deep); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .06em; }

/* Footer */
.site-footer { background: var(--blue-deep); color: #dfe9ee; margin-top: 64px; }
.site-footer .wrap { padding: 44px 20px 30px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }
.site-footer a { color: var(--gold); text-decoration: none; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.15); padding: 16px 20px; font-size: 13px; color: #9fb6c1; text-align: center; }

@media (max-width: 700px) {
  h1, .hero h1 { font-size: 32px; }
  .hero-inner { padding: 70px 20px 80px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .btn-ghost { margin-left: 0; margin-top: 10px; }
}

/* Hero slider */
.hero-slider .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero-slider .slide.on { opacity: .55; }
.hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(35,55,68,.55), rgba(35,55,68,.35)); }
.hero-inner { text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.hero-inner .btn { text-shadow: none; }

/* Mobile header compaction */
@media (max-width: 700px) {
  .site-header .wrap { padding-top: 10px; padding-bottom: 10px; gap: 8px; justify-content: center; text-align: center; }
  .site-brand { gap: 10px; }
  .site-brand img { height: 40px; }
  .site-brand .site-title { font-size: 18px; }
  .site-brand .site-tag { display: none; }
  .site-nav { width: 100%; }
  .site-nav ul { justify-content: center; gap: 0; }
  .site-nav a { padding: 8px 10px; font-size: 14px; }
  .header-phone { font-size: 16px; }
  .section { padding: 44px 0; }
  .hero-inner { padding: 56px 16px 64px; }
}

/* ---- Sold history date-range controls (v0.4) ---- */
.sold-controls { display:flex; flex-wrap:wrap; align-items:center; gap:14px; margin:0 0 14px; }
.sold-controls label { display:flex; align-items:center; gap:6px; font-size:14px; font-weight:600; color:var(--blue-deep); }
.sold-controls select, .sold-controls input[type=date] {
  padding:7px 10px; border:1px solid var(--line); border-radius:4px;
  background:var(--cream-lt); font:inherit; font-size:14px; color:var(--ink);
}
.sold-controls .sold-count { margin-left:auto; font-size:13px; color:var(--blue-deep); }
table.sold-history { width:100%; border-collapse:collapse; }
table.sold-history th, table.sold-history td { padding:10px 8px; text-align:left; }
table.sold-history thead th {
  position:sticky; top:0; z-index:2; background:var(--cream-lt);
  font-weight:700; box-shadow:0 2px 0 var(--line); white-space:nowrap;
}
table.sold-history tbody td { border-bottom:1px solid var(--line); }
table.sold-history td.ago, table.sold-history td.date-cell, table.sold-history td.size-cell { white-space:nowrap; }
table.sold-history td.addr-cell { font-weight:600; }
table.sold-history td.price-cell { font-weight:700; white-space:nowrap; }
table.sold-history td.none-cell { padding:16px 8px; color:var(--blue-deep); }
table.sold-history a.mls-link { text-decoration:underline; }
.sold-summary { margin:0 0 14px; }
@media (max-width:900px) {
  .sold-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .sold-scroll table.sold-history { min-width:760px; }
}
@media (max-width:700px) {
  /* Stacked labels + one-line filter row: Address full width above,
     Quick Range / From / To sharing a single row. */
  .sold-controls { display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; margin-bottom:10px; }
  .sold-controls label { flex-direction:column; align-items:stretch; gap:3px; font-size:13px; }
  .sold-controls label:first-child { grid-column:1 / -1; }
  .sold-controls select, .sold-controls input[type=date] {
    width:100%; min-width:0; padding:6px 6px; font-size:13px; box-sizing:border-box;
  }
  .sold-controls .sold-count { grid-column:1 / -1; margin-left:0; }
  table.sold-history { font-size:14px; }
}
