/* =========================================================================
   Salling Properties, Inc. — public site styles.
   Faithful to the original site's layout (header → hero → sections → footer,
   category cards, photo+details listing rows, simple footer), with a light,
   clean modern polish only: the original's bright blue (#3498db), Francois One
   headings, consistent spacing and typography. No layout reinvention.
   The body class `theme-classic` flips a few tokens to an even flatter look
   (toggle in Admin → Settings → Site theme).
   ========================================================================= */

@font-face {
  font-family: "Francois One";
  src: url("/assets/fonts/francois-one.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --primary:      #3498db;   /* original bright brand blue                  */
  --primary-dark: #1e73be;   /* original secondary/darker blue              */
  --primary-ink:  #216a9c;   /* link hover                                  */
  --ink:          #333333;
  --body:         #444444;
  --muted:        #777777;
  --line:         #e2e6ea;
  --soft:         #f7f9fb;
  --white:        #ffffff;
  --sale:         #c47f1a;   /* "For Sale" accent                           */
  --radius:       4px;
  --shadow:       0 1px 3px rgba(0,0,0,.08);
  --maxw:         1140px;
  --font:         "Lato",system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --font-head:    "Francois One","Arial Narrow",system-ui,Arial,sans-serif;
}

.theme-classic { --radius: 0px; --shadow: none; --soft: #f2f2f2; --line: #dddddd; }

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); color: var(--body); background: var(--white); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--primary); }
a:hover { color: var(--primary-ink); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 400; line-height: 1.2; color: var(--ink); letter-spacing: .01em; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--primary); color: #fff; padding: .6rem 1rem; }
.skip-link:focus { left: 0; }

/* ---- Header (top bar → brand → menu), faithful to original ------------- */
.site-header { background: var(--white); border-bottom: 3px solid var(--primary); }

.topbar { background: var(--primary-dark); color: #eaf3fb; font-size: .85rem; }
.topbar-inner { max-width: var(--maxw); margin: auto; padding: .35rem 1.1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.topbar-info { list-style: none; display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; }
.topbar-info li { display: flex; align-items: center; gap: .4rem; }
.topbar-info a { color: #fff; text-decoration: none; }
.topbar-info a:hover { text-decoration: underline; }
.ti-ico { opacity: .85; }
.topbar-social { display: flex; gap: .4rem; }
.topbar-social a { color: #fff; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; text-decoration: none; font-size: .8rem; }
.topbar-social a:hover { background: rgba(255,255,255,.15); }

.headerbar-inner { max-width: var(--maxw); margin: auto; padding: 1rem 1.1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { text-decoration: none; display: inline-flex; flex-direction: column; line-height: 1.1; }
.brand img { max-height: 60px; width: auto; }
.brand-name { font-family: var(--font-head); font-size: 1.7rem; color: var(--primary-dark); }
.brand-tag { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: .1rem; }

.primary-nav .nav-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; }
.primary-nav a { display: block; padding: .5rem .85rem; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .93rem; }
.primary-nav a:hover { color: var(--primary); }
.primary-nav a[aria-current="page"] { color: var(--primary); border-bottom: 2px solid var(--primary); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 26px; height: 3px; background: var(--primary-dark); border-radius: 1px; content: ""; }
.nav-toggle-bars::before, .nav-toggle-bars::after { position: absolute; left: 0; }
.nav-toggle-bars::before { top: -8px; }
.nav-toggle-bars::after { top: 8px; }

/* ---- Hero (image banner + title), no glass ----------------------------- */
.hero { position: relative; background-size: cover; background-position: center; color: #fff; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30,115,190,.62), rgba(20,60,100,.72)); }
.hero-inner { position: relative; max-width: var(--maxw); margin: auto; padding: 3rem 1.1rem; text-align: center; }
.hero--home .hero-inner { padding: 4.5rem 1.1rem; }
.hero h1 { color: #fff; margin: 0; font-size: clamp(1.9rem, 4.5vw, 3rem); text-transform: uppercase; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.hero-card { max-width: 780px; margin: 0 auto; }
.hero-card p { margin: .9rem auto 0; font-size: 1.15rem; max-width: 680px; color: #eaf3fb; }

/* ---- Content rows / blocks --------------------------------------------- */
.row { padding: 2.6rem 1.1rem; }
.row:nth-child(even) { background: var(--soft); }
.row-inner { max-width: var(--maxw); margin: auto; }
.row--multi .row-inner { display: grid; grid-template-columns: var(--cols, 1fr); gap: 2rem; align-items: start; }
.col > *:first-child { margin-top: 0; }
.col > *:last-child { margin-bottom: 0; }

.blk-heading { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 1rem; color: var(--primary-dark); }
.blk-text { font-size: 1.05rem; }
.blk-text p { margin: 0 0 1rem; }
.blk-image { margin: 0; }
.blk-image img { border: 1px solid var(--line); cursor: zoom-in; }
.blk-button { margin: 1.2rem 0; }
.btn { display: inline-block; background: var(--primary); color: #fff; text-decoration: none; padding: .75rem 1.8rem; border-radius: var(--radius); font-weight: 700; border: 0; cursor: pointer; font-size: 1rem; font-family: var(--font-head); letter-spacing: .02em; }
.btn:hover { background: var(--primary-dark); color: #fff; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.icon-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.icon-list li { display: flex; gap: .6rem; align-items: baseline; }
.icon-list i, .icon-list .ico { color: var(--primary); }
.embed-frame { border: 1px solid var(--line); }
.embed-frame iframe { width: 100%; border: 0; display: block; }

/* ---- Category cards (home) --------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.25rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; box-shadow: var(--shadow); }
a.card--link:hover { border-color: var(--primary); }
.card-media { aspect-ratio: 3/2; overflow: hidden; background: var(--soft); }
.card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: .9rem 1rem 1.1rem; text-align: center; }
.card-body h3 { margin: 0 0 .25rem; font-size: 1.25rem; color: var(--primary-dark); }
.card-body p { margin: 0; color: var(--muted); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }

/* ---- Property listings (photo + details rows, like the original) ------- */
.listings { max-width: var(--maxw); margin: auto; padding: 2.4rem 1.1rem 3rem; }
.listing-group { margin-bottom: 2.5rem; }
.listing-group-title { font-family: var(--font-head); font-size: 1.5rem; text-transform: uppercase; letter-spacing: .04em; color: var(--primary-dark); margin: 0 0 1.25rem; padding-bottom: .4rem; border-bottom: 2px solid var(--primary); }
.listing-grid { display: flex; flex-direction: column; }

.listing { display: grid; grid-template-columns: 300px 1fr; gap: 1.6rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.listing:first-child { padding-top: 0; }
.listing-media { }
.listing-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius); cursor: zoom-in; display: block; }
.listing-caption { font-size: .75rem; color: var(--muted); text-align: center; margin: .35rem 0 0; }
.listing-thumbs { display: flex; gap: .35rem; margin-top: .4rem; flex-wrap: wrap; }
.listing-thumb { width: 60px; height: 46px; object-fit: cover; border: 1px solid var(--line); border-radius: 2px; cursor: zoom-in; }
.listing-status { display: inline-block; font-family: var(--font-head); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin-bottom: .35rem; }
.listing-status.status-sale { color: var(--sale); }
.listing-status.status-escrow { color: var(--muted); }
.listing-title { margin: 0 0 .3rem; font-size: 1.35rem; color: var(--ink); }
.listing-meta { margin: 0 0 .7rem; color: var(--primary-dark); font-weight: 700; }
.listing-features { margin: 0 0 .9rem; padding-left: 1.15rem; }
.listing-features li { margin-bottom: .25rem; }
.listing-price { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin: 0; }
.listing-links { margin: .7rem 0 0; font-weight: 700; }
.listing-links a { text-decoration: none; white-space: nowrap; }
.listing-links a:hover { text-decoration: underline; }
.listing-links .fas { color: var(--primary); margin-right: .15rem; }
.listing-links .sep { color: var(--muted); font-weight: 400; margin: 0 .4rem; }
.listing-map { margin: .5rem 0 0; }
.listings-empty { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); }
.listings-empty p { margin: .3rem 0; }

/* ---- Contact form ------------------------------------------------------- */
.contact-form { display: grid; gap: 1rem; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.cf-field { display: flex; flex-direction: column; gap: .3rem; }
.cf-field span { font-weight: 700; font-size: .9rem; color: var(--ink); }
.cf-field em { color: var(--muted); font-weight: 400; }
.cf-field input, .cf-field textarea { padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; background: var(--white); color: var(--ink); }
.cf-field input:focus, .cf-field textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(52,152,219,.16); }
.hp-field { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.field-err { color: #b3261e; font-size: .85rem; }
.form-error { background: #fde8e8; color: #8f1a12; border: 1px solid #f3c2be; padding: .6rem .8rem; border-radius: var(--radius); }
.contact-form--done { background: #eaf6ef; border: 1px solid #bfe3cd; border-radius: var(--radius); padding: 1.5rem; text-align: center; }
.contact-form--done h3 { margin: 0 0 .4rem; color: #1e7d46; }

/* ---- Footer (simple, like the original) -------------------------------- */
.site-footer { background: var(--primary-dark); color: #dbe8f3; margin-top: 0; }
.footer-inner { max-width: var(--maxw); margin: auto; padding: 2.25rem 1.1rem 1.5rem; display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.footer-col h2 { color: #fff; font-size: 1.15rem; margin: 0 0 .7rem; }
.footer-about h2 { font-size: 1.4rem; }
.footer-addr { margin: 0 0 .5rem; }
.footer-col a { color: #eaf3fb; text-decoration: none; }
.footer-col a:hover { text-decoration: underline; color: #fff; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.footer-social { display: flex; gap: .5rem; margin-top: 1rem; }
.footer-social a { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; }
.footer-social a:hover { background: rgba(255,255,255,.15); }
.footer-bar { border-top: 1px solid rgba(255,255,255,.18); }
.footer-bar-inner { max-width: var(--maxw); margin: auto; padding: .9rem 1.1rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: #bcd2e6; }
.footer-bar-inner a { color: #dbe8f3; }
.footer-bar-inner p { margin: 0; }

/* ---- Lightbox ----------------------------------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; padding: 2rem; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; box-shadow: 0 10px 50px rgba(0,0,0,.6); }
.lightbox-close, .lightbox-nav { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer; width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1; display: flex; align-items: center; justify-content: center; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.28); }
.lightbox-close { top: 1.2rem; right: 1.2rem; }
.lightbox-prev { left: 1.2rem; }
.lightbox-next { right: 1.2rem; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 860px) {
  .row--multi .row-inner { grid-template-columns: 1fr !important; }
  .listing { grid-template-columns: 200px 1fr; gap: 1.1rem; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .listing { grid-template-columns: 1fr; }
  .cf-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .headerbar-inner { position: relative; }
  .primary-nav { display: none; width: 100%; }
  body.nav-open .primary-nav { display: block; }
  .primary-nav .nav-list { flex-direction: column; }
  .primary-nav a { padding: .75rem .25rem; border-bottom: 1px solid var(--line); }
  .primary-nav a[aria-current="page"] { border-bottom: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--primary); }
  .topbar-info { gap: .35rem 1rem; font-size: .8rem; }
}
