/* (c) 2026 The Lowry Group at Coldwell Banker Realty. All rights reserved. Proprietary — unauthorized copying, reuse, or redistribution prohibited. */
/* ==========================================================================
   THE LOWRY GROUP — COMPONENTS
   Header/nav, footer, cards, FAQ accordion, forms, lightbox.
   ========================================================================== */

/* ---------------------------------------------------------------------- */
/* SITE HEADER                                                             */
/* ---------------------------------------------------------------------- */

/* Slim utility bar above the main nav — hides once the user scrolls */
.topbar {
  position: relative;
  z-index: 101;
  background: var(--black);
  border-bottom: 1px solid var(--hairline);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-on-black-muted);
  overflow: hidden;
  max-height: 40px;
  transition: max-height var(--speed-med) var(--ease), opacity var(--speed-med) var(--ease), border-color var(--speed-med) var(--ease);
}
.topbar.is-hidden { max-height: 0; opacity: 0; border-color: transparent; }

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.55em;
  padding-bottom: 0.55em;
}

.topbar-contact { display: flex; gap: var(--space-md); }
.topbar-contact a { white-space: nowrap; }
.topbar-contact a:hover { color: var(--gold); }
.topbar-tagline { text-transform: uppercase; color: var(--gold-dim); }

@media (max-width: 720px) {
  .topbar-tagline { display: none; }
}

@media (max-width: 480px) {
  /* At phone widths, two nowrap phone numbers plus a full email address no
     longer fit on one line — without white-space:nowrap the browser was
     breaking mid-number (e.g. "(941)" on its own line). Dropping the email
     from the top bar (it's still in the footer and on the Contact page)
     keeps both phone numbers on a single, fully-legible line. */
  .topbar-contact a[href^="mailto:"] { display: none; }
  .topbar-contact { gap: var(--space-sm); }
}

.site-header {
  position: fixed;
  top: 40px; left: 0; right: 0;
  z-index: 100;
  padding: var(--space-sm) 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.85) 0%, rgba(10,10,10,0) 100%);
  transition: background var(--speed-med) var(--ease), padding var(--speed-med) var(--ease), box-shadow var(--speed-med) var(--ease), top var(--speed-med) var(--ease);
}

.site-header.is-scrolled {
  top: 0;
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(10px);
  padding: 0.65rem 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  border-bottom: 1px solid var(--hairline);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  font-size: 1.35rem;
  color: var(--ivory);
}

.brand .brand-name { display: flex; flex-direction: column; line-height: 1.1; font-size: 1.2em; margin-left: 0.6rem; }
.brand .brand-name small {
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  color: var(--gold);
  text-transform: uppercase;
  margin-top: 3px;
}

/* ---- Brand + broker lockup --------------------------------------------
   Florida real estate advertising rules require a team's brokerage
   (Coldwell Banker Realty) to be displayed at the same size as the team's
   own brand wherever that brand appears. Both logos below share the
   `.lockup-logo` class so they always render at an identical height —
   change that one rule to resize both together, never one alone. */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: nowrap;
}

.lockup-logo {
  height: 58px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.brand-divider {
  width: 1px;
  height: 48px;
  background: var(--hairline);
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .lockup-logo { height: 46px; }
  .brand-divider { height: 38px; }
}

@media (max-width: 560px) {
  .lockup-logo { height: 36px; }
  .brand-divider { height: 30px; }
}

/* ---- Large standalone brand moment (e.g. below the homepage hero) -----
   Same idea as .brand-lockup above but sized for a big, centered feature
   placement. Both logos still share one height rule so they always match. */
.brand-moment {
  padding: var(--space-xl) 0;
  text-align: center;
}
.brand-lockup-large {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}
.lockup-logo-large {
  height: 192px;
  width: auto;
  display: block;
}
.brand-divider-large {
  width: 1px;
  height: 148px;
  background: var(--hairline);
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .lockup-logo-large { height: 128px; }
  /* At this width the two logos wrap onto separate lines (flex-wrap on
     .brand-lockup-large); with the divider still in the flow it lands next
     to the first logo instead of between them, leaving the second logo
     looking off-center underneath. Simplest fix: drop the divider on
     mobile and let both logos center independently, stacked. */
  .brand-divider-large { display: none; }
}

.main-nav > ul {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.main-nav > ul > li { position: relative; }

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-on-black-muted);
  padding-bottom: 6px;
  transition: color var(--speed-fast) var(--ease);
}

/* animated gold underline sweep on hover/active, instead of a flat border */
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--speed-med) var(--ease);
}

.main-nav a:hover,
.main-nav a.is-active { color: var(--gold); }
.main-nav a:hover::after,
.main-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

.nav-cta { margin-left: var(--space-sm); }

/* ---- "Explore" dropdown / mini mega-menu ------------------------------ */

/* Pure CSS triangle instead of a unicode glyph — glyphs like &#9662; render
   with inconsistent vertical metrics across fonts/OSes and were throwing
   the "Explore" label's baseline off compared to its plain-text siblings. */
.has-dropdown > a .caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.55em;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4.5px solid currentColor;
  transition: transform var(--speed-fast) var(--ease);
}
.has-dropdown:hover > a .caret,
.has-dropdown.is-open > a .caret { transform: rotate(180deg); }

/*
  The panel sits FLUSH against the nav link (top: 100%, no gap) and reveals
  with a top-anchored scale instead of a vertical slide. Earlier this had a
  22px positional gap between the link and the panel — moving the mouse
  from one to the other crossed empty (unhovered) space, so :hover on the
  parent broke and the menu closed before you could reach it. Flush
  positioning removes that dead zone entirely.
*/
.dropdown-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 500px;
  background: var(--charcoal);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card);
  padding: 1.6rem 1.75rem;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transform-origin: top center;
  transform: translateX(-50%) scaleY(0.94);
  transition: opacity var(--speed-med) var(--ease), transform var(--speed-med) var(--ease);
}

.has-dropdown:hover .dropdown-panel,
.has-dropdown.is-open .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scaleY(1);
}

/* Grouped columns with small section headers */
.dd-col { display: flex; flex-direction: column; }
.dd-head {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--gold);
  margin: 0 0 0.55rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--hairline);
}

.dropdown-panel a {
  padding: 0;
  text-transform: none;
  letter-spacing: 0.01em;
}
.dropdown-panel a::after { display: none; }

/* Horizontal rows: icon + text (tighter, aligned) */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0;
}
.dropdown-item .dropdown-icon {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-size: 0.8rem;
  transition: border-color var(--speed-fast) var(--ease), color var(--speed-fast) var(--ease);
}
.dropdown-item:hover .dropdown-icon { border-color: var(--gold); color: var(--gold-light); }
.dd-text { display: flex; flex-direction: column; line-height: 1.2; }
.dropdown-item strong { font-family: var(--font-display); font-size: 0.95rem; color: var(--ivory); font-weight: 500; }
.dd-text > span { color: var(--text-on-black-muted); font-size: 0.72rem; line-height: 1.35; margin-top: 0.12em; }
.dropdown-item:hover strong { color: var(--gold); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gold-dim);
  border-radius: 2px;
  padding: 0.5em 0.7em;
  color: var(--gold);
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; z-index: 102; position: relative; }

  .main-nav {
    position: fixed;
    inset: 0;
    /* ~90% opaque instead of solid black, so the page underneath stays
       faintly visible behind the open menu. A gentle backdrop blur (added on
       .is-open below) keeps the large nav text fully legible over whatever
       content shows through. */
    background: radial-gradient(circle at 85% 8%, rgba(201,164,92,0.08), transparent 45%), rgba(10, 10, 10, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--speed-med) var(--ease);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Sit above the fixed header's own stacking level so the overlay always
       covers the page, independent of the header. */
    z-index: 99;
  }
  .main-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  /* THE HAMBURGER-ONLY-WORKS-AT-THE-TOP BUG:
     Once the page is scrolled, the header switches to its .is-scrolled state,
     which applied backdrop-filter: blur(10px). On iOS a backdrop-filter turns
     the header into the containing block for its fixed-position descendant
     (the mobile menu overlay) AND breaks touch hit-testing on the toggle
     button inside it — so the hamburger stopped responding anywhere except
     the very top of the page, where .is-scrolled isn't applied yet. The solid
     rgba(10,10,10,0.94) background already reads as fully opaque on a phone,
     so dropping just the blur on mobile costs nothing visually and makes the
     toggle work at any scroll position. */
  .site-header.is-scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* height:100% (rather than min-height) meant that opening the "Explore"
     submenu — which adds three icon+title+description rows — could grow
     the menu taller than the viewport with no way to scroll to whatever
     got pushed off the top/bottom, since the list was pinned to exactly
     100% tall. min-height keeps the same vertically-centered look when the
     menu is short, but lets it grow (and scroll, via .main-nav's overflow)
     once expanded content is taller than the screen. */
  .main-nav > ul {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 100%;
    gap: var(--space-md);
    padding: var(--space-2xl) var(--container-pad) var(--space-2xl);
  }

  .main-nav > ul > li {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity var(--speed-med) var(--ease), transform var(--speed-med) var(--ease);
  }
  .main-nav.is-open > ul > li {
    opacity: 1;
    transform: translateY(0);
  }
  /* staggered entrance for each link */
  .main-nav > ul > li:nth-child(1) { transition-delay: 0.05s; }
  .main-nav > ul > li:nth-child(2) { transition-delay: 0.1s; }
  .main-nav > ul > li:nth-child(3) { transition-delay: 0.15s; }
  .main-nav > ul > li:nth-child(4) { transition-delay: 0.2s; }
  .main-nav > ul > li:nth-child(5) { transition-delay: 0.25s; }
  .main-nav > ul > li:nth-child(6) { transition-delay: 0.3s; }

  .main-nav a { font-size: 1.9rem; font-family: var(--font-display); letter-spacing: 0.01em; }
  .nav-cta { margin-left: 0; margin-top: var(--space-sm); }

  .has-dropdown .dropdown-panel {
    position: static;
    transform: none;
    width: 100%;
    grid-template-columns: 1fr;
    opacity: 1;
    pointer-events: auto;
    display: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: var(--space-sm) 0 0 var(--space-sm);
  }
  /* Matches the exact selector (and specificity) of the base desktop rule
     ".has-dropdown.is-open .dropdown-panel { transform: translateX(-50%)
     scaleY(1); }" — that rule has three classes' worth of specificity,
     which beat the plain ".has-dropdown .dropdown-panel { transform: none;
     }" reset above (only two classes), regardless of source order. The
     practical effect: opening Explore on mobile still applied the desktop
     translateX(-50%), shifting the whole panel half its own width off the
     left edge of the screen — which is why titles/icons were invisible and
     only the tail end of each description peeked in from the right. */
  .has-dropdown.is-open .dropdown-panel { display: grid; transform: none; }
  .dropdown-item strong { font-size: 1.1rem; }
}

/* ---------------------------------------------------------------------- */
/* HERO                                                                    */
/* ---------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: var(--ivory);
  overflow: hidden;
}

/* Looping background video (home hero). Sits behind the gradient scrim and
   the content. The .hero's own background-image (the poster still) shows
   underneath as an instant fallback before the video paints, if the video
   fails to load, or when a visitor prefers reduced motion (see below). */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10,10,10,0.35) 0%, rgba(10,10,10,0.35) 40%, rgba(10,10,10,0.92) 100%);
}

/* Respect users who ask the OS to minimize motion: hide the video and let
   the poster still (the hero's background-image) stand in. */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-bottom: var(--space-2xl);
  width: 100%;
}

.hero.hero-short { min-height: 58vh; align-items: center; }
.hero.hero-short .hero-inner { padding-bottom: var(--space-lg); padding-top: calc(var(--space-2xl) + 2rem); }

.hero h1 { max-width: 820px; }
.hero .lede { color: var(--ivory); opacity: 0.85; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* ---------------------------------------------------------------------- */
/* PROPERTY CARDS                                                          */
/* ---------------------------------------------------------------------- */
.property-card {
  position: relative;
  background: var(--charcoal);
  border: 1px solid var(--hairline);
  overflow: hidden;
  transition: transform var(--speed-med) var(--ease), border-color var(--speed-med) var(--ease);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.property-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-dim);
}

.property-card .thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  flex-shrink: 0;
}

.property-card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--speed-slow) var(--ease);
}

.property-card:hover .thumb img { transform: scale(1.06); }

.property-card .status-tag {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(10,10,10,0.75);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.4em 0.9em;
}

/* "New Listing" badge — auto-shown for a set number of days after a
   listing is added (see js/listings.js). Sits opposite the status tag so
   the two never collide. */
.property-card .new-tag {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(178,30,30,0.92);
  border: 1px solid #e33;
  color: #fff;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.4em 0.9em;
}

.property-card .info { padding: var(--space-md); display: flex; flex-direction: column; flex: 1; }

.property-card .price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 0.2em;
}

.property-card .address {
  font-size: 0.95rem;
  color: var(--text-on-black);
  margin-bottom: var(--space-sm);
}

.property-card .stats {
  display: flex;
  gap: var(--space-md);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--text-on-black-muted);
  border-top: 1px solid var(--hairline);
  padding-top: var(--space-sm);
  margin-top: auto;
}

.property-card .stats span strong { color: var(--ivory); font-weight: 600; }

/* "Closed Transactions" tiles — same look and hover motion as a regular
   listing card, but not a link (see js/listings.js for why). */
.closed-transaction-card { cursor: default; }

/* ---------------------------------------------------------------------- */
/* PILLARS (Buy / Sell / Invest)                                          */
/* ---------------------------------------------------------------------- */
.pillar {
  padding: var(--space-lg) var(--space-md);
  border: 1px solid var(--hairline);
  background: var(--charcoal);
  height: 100%;
}

.pillar .pillar-index {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--gold-dim);
  letter-spacing: 0.2em;
  margin-bottom: var(--space-sm);
}

.pillar h3 { color: var(--gold); text-transform: uppercase; font-size: 1.05rem; letter-spacing: 0.08em;}
.pillar p { color: var(--text-on-black-muted); margin-bottom: var(--space-md); }

/* ---------------------------------------------------------------------- */
/* TEAM CARDS                                                              */
/* ---------------------------------------------------------------------- */
.team-card { text-align: center; }
.team-card .photo {
  aspect-ratio: 4/5;
  overflow: hidden;
  margin-bottom: var(--space-sm);
  border: 1px solid var(--hairline);
}
.team-card .photo img { width: 100%; height: 100%; object-fit: cover; }
/* Jonathan's source photo has almost no headroom above his hair (unlike
   Sarah's/Jackie's, which have plenty) — the default center crop above
   cuts into it, so this anchors his crop to the very top of the frame
   instead, keeping his whole head in frame. */
.team-card .photo img.photo-top { object-position: center top; }
.team-card h3 { margin-bottom: 0.2em; }
.team-card .role { color: var(--gold); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.6em; }
.team-card .phone { color: var(--text-on-black-muted); font-size: 0.9rem; }

/* ---- "Read Bio" toggle --------------------------------------------------
   Desktop/tablet: the bio is always shown under the headshot, no toggle.
   Mobile only (see max-width:720px override below): collapsed behind a
   "More about {Name}" toggle, same open/close mechanic as the FAQ
   accordion (class toggle + max-height transition). ---------------------- */
.bio-toggle {
  display: none;
  align-items: center;
  gap: 0.5em;
  background: none;
  border: none;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 0.9em;
  cursor: pointer;
  transition: color var(--speed-fast) var(--ease);
}
.bio-toggle:hover { color: var(--gold-light); }
.bio-toggle .icon { position: relative; width: 12px; height: 12px; flex-shrink: 0; }
.bio-toggle .icon::before, .bio-toggle .icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.bio-toggle .icon::before { width: 12px; height: 1px; }
.bio-toggle .icon::after { width: 1px; height: 12px; transition: transform var(--speed-fast) var(--ease), opacity var(--speed-fast) var(--ease); }
.team-card.is-open .bio-toggle .icon::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }

.team-bio {
  max-height: none;
  overflow: visible;
  text-align: left;
}
.team-bio-inner {
  padding-top: var(--space-sm);
  max-width: 320px;
  margin: 0 auto;
}
.team-bio-inner p {
  color: var(--text-on-black-muted);
  font-size: 0.86rem;
  line-height: 1.7;
  margin-bottom: 0.9em;
}
.team-bio-inner p:last-child { margin-bottom: 0; }

/* Mobile: collapse the bio behind the toggle button */
@media (max-width: 720px) {
  .bio-toggle { display: inline-flex; }
  .team-bio {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--speed-med) var(--ease);
  }
  .team-card.is-open .team-bio { max-height: 900px; }
}

/* ---------------------------------------------------------------------- */
/* TESTIMONIALS                                                            */
/* ---------------------------------------------------------------------- */
.testimonial {
  background: var(--charcoal);
  border: 1px solid var(--hairline);
  padding: var(--space-lg);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.testimonial .quote-mark {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--gold-dim);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.testimonial p { color: var(--text-on-black-muted); flex: 1; }
.testimonial .author {
  margin-top: var(--space-sm);
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 0.95rem;
}

/* ---- Testimonial carousel ------------------------------------------------
   Manual-only: one card visible at a time, advanced only by an arrow or dot
   click. No autoplay timer, so nobody's ever rushed through a quote. ------ */
.testimonial-carousel {
  position: relative;
  max-width: 700px;
  margin: var(--space-xl) auto 0;
}

.testimonial-track {
  position: relative;
  transition: height var(--speed-med) var(--ease);
}

.testimonial-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--speed-slow) var(--ease);
}

.testimonial-slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
}

.testimonial-slide .testimonial { height: 100%; }

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  background: var(--black);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: border-color var(--speed-fast) var(--ease), color var(--speed-fast) var(--ease);
}
.carousel-arrow:hover { border-color: var(--gold); color: var(--gold-light); }
.carousel-arrow svg { width: 16px; height: 16px; }
.carousel-arrow.prev { left: -66px; }
.carousel-arrow.next { right: -66px; }

@media (max-width: 960px) {
  .carousel-arrow.prev { left: -8px; }
  .carousel-arrow.next { right: -8px; }
}
@media (max-width: 640px) {
  /* Arrows used to be hidden entirely below this width, leaving only the
     8px dots as the sole (and not very discoverable) way to navigate on
     phones. Shrinking and flush-mounting them at the card edge keeps them
     visible and tappable without overlapping outside the container. */
  .carousel-arrow { width: 38px; height: 38px; }
  .carousel-arrow.prev { left: 0; }
  .carousel-arrow.next { right: 0; }
  .carousel-arrow svg { width: 14px; height: 14px; }
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.7em;
  margin-top: var(--space-lg);
}
.carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hairline);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background var(--speed-fast) var(--ease), transform var(--speed-fast) var(--ease);
}
.carousel-dots .dot:hover { background: var(--gold-dim); }
.carousel-dots .dot.is-active { background: var(--gold); transform: scale(1.3); }

/* ---------------------------------------------------------------------- */
/* FAQ ACCORDION                                                           */
/* ---------------------------------------------------------------------- */
.faq-item {
  border-bottom: 1px solid var(--hairline);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background: none;
  border: none;
  color: inherit;
  text-align: left;
  padding: var(--space-md) 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.faq-question .icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  position: relative;
}
.faq-question .icon::before, .faq-question .icon::after {
  content: "";
  position: absolute;
  background: var(--gold);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.faq-question .icon::before { width: 14px; height: 1px; }
.faq-question .icon::after { width: 1px; height: 14px; transition: transform var(--speed-fast) var(--ease); }
.faq-item.is-open .faq-question .icon::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--speed-med) var(--ease);
  color: var(--text-on-black-muted);
}
.faq-item.is-open .faq-answer { max-height: 400px; }
.faq-answer-inner { padding-bottom: var(--space-md); max-width: 720px; }

.section-light .faq-answer { color: var(--text-muted); }
.section-light .faq-question .icon::before,
.section-light .faq-question .icon::after { background: var(--gold-dim); }

/* ---------------------------------------------------------------------- */
/* CTA BAND                                                                */
/* ---------------------------------------------------------------------- */
.cta-band {
  position: relative;
  background: var(--charcoal);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: var(--space-2xl) 0;
  text-align: center;
}
.cta-band h2 { color: var(--ivory); }
.cta-band .lede { margin-left: auto; margin-right: auto; }
.cta-band .contact-line {
  margin-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-on-black-muted);
  letter-spacing: 0.03em;
}
.cta-band .contact-line a:hover { color: var(--gold); }

/* ---------------------------------------------------------------------- */
/* FOOTER                                                                  */
/* ---------------------------------------------------------------------- */
.site-footer {
  background: var(--black);
  padding: var(--space-xl) 0 var(--space-md);
  border-top: 1px solid var(--hairline);
  font-size: 0.9rem;
  color: var(--text-on-black-muted);
}

.footer-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  margin-bottom: var(--space-xl);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-grid h4 {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  font-family: var(--font-body);
  margin-bottom: var(--space-sm);
}

.footer-grid li { margin-bottom: 0.6em; }
.footer-grid a:hover { color: var(--gold); }

.social-links {
  display: flex;
  gap: 0.7em;
  margin-top: var(--space-md);
}
.social-icon {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  color: var(--text-on-black-muted);
  flex: 0 0 auto;
  transition: color var(--speed-fast) var(--ease), border-color var(--speed-fast) var(--ease);
}
.social-icon svg { width: 15px; height: 15px; }
.social-icon:hover { color: var(--gold); border-color: var(--gold-dim); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--hairline);
  font-size: 0.78rem;
}

/* ---------------------------------------------------------------------- */
/* FORMS                                                                   */
/* ---------------------------------------------------------------------- */
.form-field { margin-bottom: var(--space-md); }

.form-field label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6em;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--charcoal);
  border: 1px solid var(--hairline);
  color: var(--text-on-black);
  padding: 0.9em 1em;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border-radius: 2px;
  transition: border-color var(--speed-fast) var(--ease);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form-field textarea { min-height: 140px; resize: vertical; }

.form-note { font-size: 0.8rem; color: var(--text-on-black-muted); margin-top: var(--space-sm); }
.form-success {
  display: none;
  padding: var(--space-md);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.9rem;
  margin-top: var(--space-md);
}
.form-success.is-visible { display: block; }

/* ---- Post-submit confirmation toast ------------------------------------
   Shown when contact-handler.php redirects back with ?sent=1 / ?sent=0.
   See the toast logic in js/main.js. */
.toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  background: var(--charcoal);
  border: 1px solid var(--gold);
  color: var(--text-on-black);
  padding: 1em 1.1em;
  border-radius: 3px;
  box-shadow: 0 14px 32px rgba(0,0,0,0.4);
  display: flex;
  align-items: flex-start;
  gap: 0.7em;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity var(--speed-med) var(--ease), transform var(--speed-med) var(--ease);
  pointer-events: auto;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast strong { color: var(--gold); display: block; margin-bottom: 0.2em; font-family: var(--font-display); }
.toast.toast-error { border-color: #b5544a; }
.toast.toast-error strong { color: #e0958c; }
.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-on-black-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.toast-close:hover { color: var(--gold); }

/* ---------------------------------------------------------------------- */
/* GALLERY / LIGHTBOX                                                     */
/* ---------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-xs);
}

.gallery-grid button {
  padding: 0; border: none; background: none;
  aspect-ratio: 4/3; overflow: hidden;
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--speed-med) var(--ease); }
.gallery-grid button:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(6,6,6,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 82vh; max-width: 92vw; object-fit: contain; border: 1px solid var(--hairline); }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: none; border: 1px solid var(--gold-dim); color: var(--gold);
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.lightbox-close { top: var(--space-md); right: var(--space-md); }
.lightbox-prev { left: var(--space-md); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: var(--space-md); top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { border-color: var(--gold); background: var(--charcoal); }

/* ---------------------------------------------------------------------- */
/* THE GRAND TOUR — cinematic filmstrip gallery + full-screen viewer      */
/* ---------------------------------------------------------------------- */

/* ---- Category tabs (only rendered when 2+ categories are tagged) ---- */
.tour-tabs {
  display: flex;
  gap: var(--space-md);
  padding: 0 var(--container-pad);
  margin-bottom: var(--space-md);
  overflow-x: auto;
  scrollbar-width: none;
  /* Fades the right edge so a horizontally-scrollable tab row (e.g. the
     Grand Tour gallery categories) reads as scrollable at a glance, rather
     than looking like it simply ends off-screen with no other hint. */
  mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%);
}
.tour-tabs::-webkit-scrollbar { display: none; }
.tour-tab {
  background: none;
  border: none;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-on-black-muted);
  padding: 0.4em 0 0.6em;
  position: relative;
  cursor: pointer;
  transition: color var(--speed-fast) var(--ease);
}
.tour-tab::after {
  content: '';
  position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--gold);
  transition: right var(--speed-med) var(--ease);
}
.tour-tab:hover { color: var(--text-on-black); }
.tour-tab.is-active { color: var(--gold); }
.tour-tab.is-active::after { right: 0; }

/* The Media page only ever has a small handful of tabs, but their labels
   are long ("Lakewood Ranch & Sarasota Lifestyle") — on a phone that meant
   horizontal scrolling with no visible cue that there was anything to
   scroll to. Since there are so few of them, wrapping to a second line is
   simpler and more discoverable than scrolling. (The Grand Tour gallery's
   tabs, which can run to 6-8 short single-word categories, keep the
   horizontal scroll behavior above — wrapping that many would look busy.) */
@media (max-width: 640px) {
  #mediaTabs {
    flex-wrap: wrap;
    overflow-x: visible;
    justify-content: center;
    row-gap: 0.6em;
    mask-image: none;
    -webkit-mask-image: none;
  }
  #mediaTabs .tour-tab { white-space: normal; text-align: center; }
}

/* ---- Filmstrip ---- */
.tour-wrap { position: relative; }

.tour-viewport { position: relative; }

.tour-track {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 var(--container-pad);
  cursor: grab;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tour-track::-webkit-scrollbar { display: none; }
.tour-track.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }

.tour-slide {
  flex: 0 0 auto;
  width: min(78vw, 920px);
  height: 74vh;
  scroll-snap-align: center;
  overflow: hidden;
  position: relative;
  background: var(--charcoal);
}
.tour-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--speed-slow) var(--ease);
}
.tour-slide:hover img { transform: scale(1.03); }

.tour-slide-cat {
  position: absolute; left: var(--space-sm); bottom: var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-on-black);
  background: rgba(10, 10, 10, 0.55);
  padding: 0.5em 0.9em;
  border: 1px solid var(--gold-dim);
}

.tour-counter {
  position: absolute;
  top: var(--space-sm);
  right: calc(var(--container-pad) + 0.5em);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  background: rgba(10, 10, 10, 0.5);
  padding: 0.3em 0.8em;
  pointer-events: none;
  z-index: 2;
}

.tour-progress {
  height: 1px;
  background: var(--hairline);
  margin: var(--space-sm) var(--container-pad) 0;
  position: relative;
}
.tour-progress span {
  position: absolute; left: 0; top: 0; height: 100%;
  background: var(--gold);
  width: 0%;
}

.tour-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border: none; background: none;
  color: var(--text-on-black);
  font-size: 1.7rem;
  opacity: 0;
  transition: opacity var(--speed-fast) var(--ease), color var(--speed-fast) var(--ease);
  z-index: 2;
}
.tour-viewport:hover .tour-arrow { opacity: 0.7; }
.tour-arrow:hover { opacity: 1 !important; color: var(--gold); }
.tour-arrow-prev { left: calc(var(--container-pad) - 1.4em); }
.tour-arrow-next { right: calc(var(--container-pad) - 1.4em); }

@media (max-width: 720px) {
  .tour-slide { width: 88vw; height: 56vh; }
  .tour-arrow { display: none; }
  .tour-counter { top: var(--space-xs); right: calc(var(--container-pad) + 0.2em); }
}

/* ---- Full-screen crossfade viewer ---- */
.tour-viewer {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(6, 6, 6, 0.97);
  display: none;
  align-items: center;
  justify-content: center;
}
.tour-viewer.is-open { display: flex; }

/* Soft blurred fill behind the photo so non-widescreen shots (older MLS/3:2
   photography mixed with newer 16:9 shoots) never show hard black bars —
   same idea as Spotify/Apple Music's blurred album-art backdrop. */
.tour-viewer-backdrop {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(50px) brightness(0.4) saturate(1.15);
  transform: scale(1.15);
  z-index: 0;
}

.tour-viewer-stage {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.tour-viewer-img {
  position: absolute;
  max-height: 88vh; max-width: 90vw;
  object-fit: contain;
  opacity: 0;
  transition: opacity var(--speed-med) var(--ease);
}
.tour-viewer-img.is-active { opacity: 1; }

.tour-viewer-close {
  position: absolute; top: var(--space-md); right: var(--container-pad);
  background: none; border: none;
  color: var(--text-on-black);
  font-size: 1.7rem;
  z-index: 2;
  transition: color var(--speed-fast) var(--ease);
}
.tour-viewer-close:hover { color: var(--gold); }

.tour-viewer-counter {
  position: absolute; top: var(--space-md); left: var(--container-pad);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  color: var(--gold);
  font-size: 0.9rem;
  z-index: 2;
}

.tour-viewer-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-on-black);
  font-size: 2.2rem;
  opacity: 0.5;
  transition: opacity var(--speed-fast) var(--ease), color var(--speed-fast) var(--ease);
  z-index: 2;
  padding: var(--space-sm);
}
.tour-viewer-arrow:hover { opacity: 1; color: var(--gold); }
.tour-viewer-prev { left: var(--space-sm); }
.tour-viewer-next { right: var(--space-sm); }

.tour-viewer-progress {
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: var(--hairline);
}
.tour-viewer-progress span {
  position: absolute; left: 0; top: 0; height: 100%;
  background: var(--gold);
  width: 0%;
}

@media (max-width: 720px) {
  .tour-viewer-arrow { font-size: 1.6rem; padding: var(--space-xs); }
  .tour-viewer-close { top: var(--space-sm); right: var(--space-sm); }
  .tour-viewer-counter { top: var(--space-sm); left: var(--space-sm); }
}

/* ---------------------------------------------------------------------- */
/* MISC BADGES / DIVIDERS                                                 */
/* ---------------------------------------------------------------------- */
.badge {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35em 0.9em;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--gold); color: var(--black); padding: 1em;
  z-index: 1000;
}
.skip-link:focus { left: var(--space-sm); top: var(--space-sm); }

/* Discreet release version by the copyright line (see CHANGELOG.md) */
.site-version { color: var(--gold-dim); font-size: 0.72rem; letter-spacing: 0.06em; margin-left: 0.55em; opacity: 0.75; }

/* Very small trademark mark for the "Find Your Sarasota" service mark */
.tm { font-size: 0.5em; vertical-align: super; letter-spacing: 0; font-weight: 400; }
