/* Navy + teal, taken from the company logo, on clean white surfaces.
   System fonts only: nothing is downloaded before the page can paint, which
   matters on a phone's mobile data. No inline styles anywhere (the page's
   Content-Security-Policy forbids them). */
:root {
  --navy: #0b1163;
  --navy-deep: #070b45;
  --navy-mid: #1a2594;
  --teal: #00808f;
  --teal-dark: #00616d;
  --teal-soft: #e3f2f4;
  --bg: #f3f6fb;
  --card: #ffffff;
  --ink: #0f1a3a;
  --muted: #5a6685;
  --line: #e0e6f1;
  --wa: #14894a;
  --wa-dark: #0f6e3b;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(11, 17, 99, .06), 0 8px 24px rgba(11, 17, 99, .08);
  --bar-h: 76px;
  --maxw: 1160px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.25; color: var(--navy); letter-spacing: -.015em; }
a { color: inherit; }
button { font: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
svg { flex: none; }

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: relative;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: calc(13px + env(safe-area-inset-top)) 0 12px;
}
.site-header::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-mid) 55%, var(--teal) 100%);
}
.site-header .inner { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 12px; }
.site-header img { height: 46px; width: auto; max-width: 160px; object-fit: contain; }
.site-header .who { min-width: 0; }
.site-header .brand { font-weight: 800; font-size: 1.08rem; line-height: 1.2; color: var(--navy); letter-spacing: -.01em; }
.site-header .tagline { font-size: .78rem; font-weight: 600; letter-spacing: .03em; color: var(--teal-dark); margin-top: 1px; }

main { max-width: var(--maxw); margin: 0 auto; padding: 20px 16px 36px; }
main.has-bar { padding-bottom: calc(var(--bar-h) + 28px + env(safe-area-inset-bottom)); }

/* --- Messages / loading ------------------------------------------------------ */
.state {
  max-width: 460px; margin: 56px auto; text-align: center; color: var(--muted);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 24px;
}
.state strong { display: block; font-size: 1.3rem; font-weight: 800; color: var(--navy); margin-bottom: 8px; letter-spacing: -.015em; }
.state p { margin: 0; }
.state.loading { box-shadow: none; background: transparent; border: 0; }
.spinner { width: 38px; height: 38px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--teal); }
@media (prefers-reduced-motion: no-preference) { .spinner { animation: spin .8s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Shared bits ---------------------------------------------------------------- */
.badge {
  display: inline-block; background: var(--teal); color: #fff; font-size: .7rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px;
}
.addr { display: flex; align-items: flex-start; gap: 7px; color: var(--muted); }
.addr svg { width: 18px; height: 18px; margin-top: 2px; color: var(--teal); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 0 22px;
  border-radius: 14px; border: 0; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; color: #fff;
}
.btn svg { width: 21px; height: 21px; }
.btn.wa { flex: 1; background: var(--wa); box-shadow: 0 6px 16px rgba(20, 137, 74, .28); }
.btn.wa:hover { background: var(--wa-dark); }
.btn.call { background: var(--navy); }
.btn.call:hover { background: var(--navy-mid); }

/* --- Multi-listing page ----------------------------------------------------------- */
.banner {
  color: #fff; border-radius: var(--radius); padding: 28px 24px; margin-bottom: 22px; box-shadow: var(--shadow);
  background: radial-gradient(120% 140% at 100% 0%, rgba(0, 128, 143, .55) 0%, rgba(0, 128, 143, 0) 55%), linear-gradient(135deg, var(--navy-deep), var(--navy) 55%, var(--navy-mid));
}
.banner h1 { color: #fff; font-size: 1.55rem; font-weight: 800; }
.banner p { margin: 6px 0 0; color: rgba(255, 255, 255, .8); }

.cards { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  display: flex; flex-direction: column; text-decoration: none; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.card .thumb { position: relative; flex: none; aspect-ratio: 4 / 3; overflow: hidden; background: #dde5f2; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .thumb .none { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .8); font-size: .9rem; background: linear-gradient(135deg, var(--navy), var(--navy-mid)); }
.card .thumb .badge { position: absolute; top: 12px; left: 12px; }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h2 { font-size: 1.08rem; font-weight: 700; }
.card .price { color: var(--teal-dark); font-weight: 800; font-size: 1.2rem; }
.card .addr { font-size: .9rem; }
.card .more { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 4px; color: var(--navy); font-weight: 700; font-size: .92rem; }
.card .more svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform .18s ease, box-shadow .18s ease; }
  .card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(11, 17, 99, .16); }
  .card .more svg { transition: transform .18s ease; }
  .card:hover .more svg { transform: translateX(3px); }
}

/* --- Listing page ------------------------------------------------------------------- */
.back {
  display: inline-flex; align-items: center; gap: 4px; margin: 0 0 14px; padding: 8px 14px 8px 8px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); color: var(--navy); font-weight: 700; font-size: .92rem; text-decoration: none; white-space: nowrap;
}
.back svg { width: 18px; height: 18px; }

.listing { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.gallery { min-width: 0; }
.panels { display: grid; gap: 16px; min-width: 0; }
@media (min-width: 960px) {
  .listing { grid-template-columns: minmax(0, 1fr) 390px; grid-template-areas: "gallery summary" "panels summary"; gap: 24px 28px; align-items: start; }
  .gallery { grid-area: gallery; }
  .panels { grid-area: panels; }
  .summary-card { grid-area: summary; position: sticky; top: 20px; }
  main.listing-page.has-bar { padding-bottom: 44px; }
}

/* Carousel */
.hero { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--navy-deep); box-shadow: var(--shadow); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.slides::-webkit-scrollbar { display: none; }
.slides:focus-visible { outline-offset: -3px; }
.slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; aspect-ratio: 4 / 3; background: var(--navy-deep); }
@media (min-width: 640px) { .slide { aspect-ratio: 16 / 10; } }
.slide img, .slide video { width: 100%; height: 100%; display: block; object-fit: cover; background: var(--navy-deep); }
.slide img { cursor: zoom-in; }
.slide img.portrait, .slide video { object-fit: contain; }
.no-media { aspect-ratio: 4 / 3; display: grid; place-items: center; color: rgba(255, 255, 255, .75); text-align: center; padding: 24px; }

.arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center; cursor: pointer; color: var(--navy); background: rgba(255, 255, 255, .94);
  box-shadow: 0 4px 14px rgba(7, 11, 69, .35);
}
.arrow svg { width: 22px; height: 22px; stroke-width: 2.6; }
.arrow.prev { left: 12px; }
.arrow.next { right: 12px; }
.arrow:hover { background: #fff; color: var(--teal-dark); }
.arrow:active { transform: translateY(-50%) scale(.94); }
@media (prefers-reduced-motion: no-preference) { .arrow { transition: background .15s ease, color .15s ease, transform .15s ease; } }
@media (max-width: 639px) { .arrow { width: 42px; height: 42px; } .arrow.prev { left: 8px; } .arrow.next { right: 8px; } }

.counter {
  position: absolute; top: 12px; right: 12px; background: rgba(7, 11, 69, .72); color: #fff; font-size: .78rem; font-weight: 700;
  padding: 4px 11px; border-radius: 999px; pointer-events: none; letter-spacing: .02em;
}
.dots { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(7, 11, 69, .55); pointer-events: none; }
.dot { width: 7px; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .55); }
.dot.on { width: 20px; background: #fff; }
@media (prefers-reduced-motion: no-preference) { .dot { transition: width .2s ease, background .2s ease; } }
@media (min-width: 640px) { .dots { display: none; } }

.thumbs { display: none; gap: 10px; overflow-x: auto; padding: 14px 3px 6px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
@media (min-width: 640px) { .thumbs { display: flex; } }
.thumb {
  position: relative; flex: 0 0 104px; aspect-ratio: 4 / 3; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; background: var(--navy); opacity: .7;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .vid { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(7, 11, 69, .45); }
.thumb .vid svg { width: 26px; height: 26px; }
.thumb:hover { opacity: 1; }
.thumb[aria-current="true"] { border-color: var(--teal); opacity: 1; box-shadow: 0 0 0 2px var(--teal-soft); }
@media (prefers-reduced-motion: no-preference) { .thumb { transition: opacity .15s ease, border-color .15s ease; } }

/* Summary */
.summary-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 22px 24px; border-top: 4px solid var(--teal); }
.summary-card .badge { margin-bottom: 10px; }
.summary-card h1 { font-size: 1.55rem; font-weight: 800; }
.summary-card .price { font-size: 1.85rem; font-weight: 800; color: var(--teal-dark); margin-top: 10px; letter-spacing: -.02em; }
.summary-card .addr { margin-top: 10px; }
.summary-card .actions { display: none; }
@media (min-width: 960px) {
  .summary-card .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
  .summary-card .btn.call { flex: none; }
}

/* Panels */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 2px rgba(11, 17, 99, .04); }
.panel h2 { display: flex; align-items: center; gap: 10px; font-size: 1.08rem; font-weight: 800; margin-bottom: 14px; }
.panel h2::before { content: ""; width: 4px; height: 20px; border-radius: 2px; background: linear-gradient(var(--teal), var(--navy)); }
dl.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0; }
dl.details div { min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
dt { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
dd { margin: 3px 0 0; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chips li { display: inline-flex; align-items: center; gap: 6px; background: var(--teal-soft); color: var(--teal-dark); border-radius: 999px; padding: 7px 14px 7px 11px; font-weight: 600; font-size: .9rem; }
.chips li svg { width: 15px; height: 15px; stroke-width: 3; }
.description p { margin: 0 0 .8em; white-space: pre-line; color: #26325a; }
.description p:last-child { margin-bottom: 0; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- Contact bar (phones and tablets) ------------------------------------------------------ */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255, 255, 255, .98); border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 28px rgba(11, 17, 99, .12);
}
.bar .inner { max-width: var(--maxw); margin: 0 auto; display: flex; gap: 10px; }
.bar .btn.call { padding: 0; width: 54px; flex: none; }
@media (min-width: 960px) { .bar:not(.always) { display: none; } .bar.always .inner { max-width: 560px; } }

/* --- Full-screen photo viewer ----------------------------------------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(4, 7, 36, .96); display: grid; place-items: center; touch-action: pan-y; }
.lightbox img { max-width: 100vw; max-height: 100vh; max-height: 100dvh; object-fit: contain; }
.lightbox button {
  position: absolute; background: rgba(255, 255, 255, .16); color: #fff; border: 0; width: 50px; height: 50px;
  border-radius: 50%; display: grid; place-items: center; cursor: pointer;
}
.lightbox button:hover { background: rgba(255, 255, 255, .28); }
.lightbox button svg { width: 24px; height: 24px; }
.lightbox .close { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.lightbox .prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox .count { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: #fff; font-size: .92rem; font-weight: 600; }
