/* ============================================================
   Blue Ridge Homes — design tokens + responsive styles
   Mobile-first. Edit tokens here to restyle the whole site.
   ============================================================ */

:root {
  --paper:    #FBFAF7;
  --card:     #FFFFFF;
  --ink:      #1A1D1B;
  --muted:    #6B7A73;
  --pine:     #1F3A32;   /* primary */
  --pine-700: #16302A;
  --honey:    #C77D3A;   /* accent — used only for calls to action */
  --honey-700:#A9642A;
  --line:     #E4E1D8;

  --radius: 12px;
  --maxw: 1120px;
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
p  { margin: 0 0 1rem; }
a  { color: var(--pine); }

img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer;
  padding: .7rem 1.25rem; border-radius: 999px; border: 1.5px solid var(--pine);
  background: transparent; color: var(--pine); text-decoration: none;
  transition: background .15s ease, color .15s ease, transform .05s ease;
}
.btn:hover { background: var(--pine); color: #fff; }
.btn:active { transform: scale(.98); }
.btn--cta { background: var(--honey); border-color: var(--honey); color: #fff; }
.btn--cta:hover { background: var(--honey-700); border-color: var(--honey-700); }
.btn--block { display: block; width: 100%; text-align: center; }
.btn--sm { padding: .5rem 1rem; font-size: .9rem; }
/* A button that reads as a text link (e.g. "remove", "Clear dates"). */
.linklike {
  background: none; border: none; padding: 0; font: inherit; cursor: pointer;
  color: var(--pine); font-weight: 600; text-decoration: underline;
}
.linklike:hover { color: var(--pine-700); }

/* ---------- Booking modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(26,29,27,.55);
  display: grid; place-items: start center;
  padding: 2rem 1rem; overflow-y: auto;
}
/* The `display: grid` above would otherwise override the `hidden`
   attribute's display:none, leaving the overlay covering the page. */
.modal-overlay[hidden] { display: none; }
.modal-panel {
  background: var(--paper); border-radius: var(--radius);
  width: 100%; max-width: 900px; padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
@media (max-width: 560px) { .modal-panel { padding: 1.1rem; } }

/* ---------- Booking page ---------- */
.book-wrap { max-width: var(--maxw); }
.book-title { margin: 0; font-size: clamp(1.4rem, 4vw, 2rem); }
.book-step { background: #EAF1EE; color: var(--pine); border-radius: 8px; padding: .5rem .75rem; font-size: .9rem; }
.book-warn { background: #FDECEC; color: #B3261E; border: 1px solid #F3C4C4; border-radius: 8px; padding: .75rem .9rem; font-weight: 600; font-size: .92rem; }
.book-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.book-close {
  display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem;
  border-radius: 50%; border: 1.5px solid var(--line); color: var(--muted);
  text-decoration: none; font-size: 1rem; flex: none;
}
.book-close:hover { background: var(--pine); color: #fff; border-color: var(--pine); }
.book-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin-top: 1rem; }
/* Two equal cards side by side — the calendar and the price summary read as a
   matched pair, same width and stretched to the same height. */
@media (min-width: 860px) { .book-grid { grid-template-columns: 1fr 1fr; align-items: stretch; } }
/* Calendar card — same surface, border and padding as the price card so the
   two panels are visually identical in size and style. */
.book-cal,
.book-summary {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
}
/* Centre the calendar within its card so it doesn't hug one edge. */
.book-cal { display: flex; flex-direction: column; }
.book-cal .cal--book { margin-top: auto; margin-bottom: auto; }
.quote-lines { border-top: 1px solid var(--line); padding-top: .75rem; }
.quote-row { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; padding: .3rem 0; }
.quote-row.quote-free { color: var(--pine); font-weight: 600; }
.quote-row.quote-total { border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .6rem; font-weight: 700; font-size: 1.1rem; }
.promo-box { margin-top: .75rem; }
.promo-entry { display: flex; gap: .5rem; }
.promo-entry input { flex: 1; font: inherit; padding: .5rem .6rem; border: 1.5px solid var(--line); border-radius: 8px; text-transform: uppercase; }
.promo-applied { font-size: .9rem; color: var(--pine); font-weight: 600; }
.promo-blocked { color: var(--honey-700); font-weight: 500; }
.promo-msg { color: #B3261E; font-size: .82rem; margin: .4rem 0 0; }
.book-done { max-width: 560px; margin: 2rem auto; text-align: center; }
.book-done .btn { margin-top: 1rem; }

/* Guest details span the full width below the calendar + price, so the
   fields have room instead of being squeezed into a narrow column. */
.book-form-zone {
  max-width: 640px; margin: 1.75rem auto 0;
  border-top: 1px solid var(--line); padding-top: 1.5rem;
}

/* Range selection on the booking calendar. The check-in / check-out days are
   solid pine; the nights between are a light green band that connects them,
   so the stay reads as one continuous range (the way Airbnb/Vrbo show it). */
.cal-day.is-free[data-k] { cursor: pointer; }
/* Immediate feedback the instant a date is tapped (matters most on touch). */
.cal-day.is-free[data-k]:active { background: var(--pine-700); color: #fff; }
.cal-day.is-inrange { background: #E3EDE8; border-radius: 0; }
.cal-day.is-inrange .cal-price { color: var(--pine); }
.cal-day.is-selected {
  background: var(--pine); color: #fff; font-weight: 700;
}
.cal-day.is-selected .cal-price { color: #fff; opacity: .85; }
.cal-day.is-selected:hover { background: var(--pine-700); }
/* Square the inner edge so the endpoint blends into the range band. */
.cal-day.is-selected.is-start { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cal-day.is-selected.is-end { border-top-left-radius: 0; border-bottom-left-radius: 0; }

/* ---------- Last-minute deal ---------- */
.deal-banner {
  display: block; text-align: center; text-decoration: none;
  background: var(--honey); color: #fff; font-weight: 600; font-size: .95rem;
  padding: .7rem 1.25rem;
}
.deal-banner:hover { background: var(--honey-700); color: #fff; }
.deal-badge {
  position: absolute; top: .6rem; left: .6rem;
  background: var(--honey); color: #fff; font-size: .72rem; font-weight: 700;
  padding: .28rem .6rem; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* ---------- Map popup (area-guide places) ---------- */
.map-modal-panel { max-width: 720px; }
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-embed iframe { display: block; width: 100%; height: 420px; border: 0; }
@media (max-width: 560px) { .map-embed iframe { height: 320px; } }
/* Push the links to the bottom of the card so they line up across the row. */
.act-links { display: flex; flex-wrap: nowrap; gap: .35rem 1.25rem; align-items: center; white-space: nowrap; margin-top: auto; padding-top: .5rem; }
/* Trim the empty space below the links on these cards (not the home cards). */
.card .body:has(.act-links) { padding-bottom: .6rem; }
/* Match the "Maps" button's weight to the "Website" link (not bold). */
.act-links a, .act-links .linklike { font-weight: 500; }
/* Card blurb: cap at 2 lines so cards line up and links stay tidy. */
.act-blurb {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
}
.dist-from { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .95rem; }
.dist-from select { font: inherit; padding: .4rem .6rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--card); }
/* A whole nearby-favorites card that opens a map when clicked. */
.card--map { cursor: pointer; }
.card--map:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.card-map-hint { margin-top: .4rem; color: var(--honey-700); font-weight: 600; font-size: .82rem; }

/* ---------- Graphical promo banners (home + property pages) ---------- */
.site-banners { display: grid; gap: 1rem; margin: 1rem 0; }
.site-banners:empty { margin: 0; }
/* On the home page, match the width of the About / Get in touch cards, with
   equal breathing room above and below. */
#siteBanners { max-width: 720px; margin: 2.25rem 0; }
#siteBanners:empty { margin: 0; }
.site-banner-link { display: block; text-decoration: none; color: inherit; }
.site-banner { border-radius: var(--radius); overflow: hidden; }
.site-banner--image img { display: block; width: 100%; height: auto; }
.site-banner--styled {
  display: flex; align-items: center; justify-content: space-between;
  gap: .85rem 1.5rem; flex-wrap: wrap; padding: 1.25rem 1.75rem;
}
.site-banner-text { display: flex; flex-direction: column; gap: .15rem; }
.site-banner-text strong { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; line-height: 1.15; }
.site-banner-text span { font-size: .95rem; opacity: .92; }
.site-banner-cta {
  display: inline-block; border: 1.5px solid currentColor; border-radius: 999px;
  padding: .5rem 1.15rem; font-weight: 600; font-size: .9rem; white-space: nowrap;
}
a.site-banner-link:hover .site-banner-cta { opacity: .82; }
a.site-banner-link:hover .site-banner--image img { filter: brightness(.97); }
.card .photo { position: relative; }
.deal-inline {
  display: inline-block; background: #FFF3E6; color: var(--honey-700);
  font-weight: 600; font-size: .9rem; padding: .4rem .8rem; border-radius: 8px;
  margin: 0 0 .5rem;
}
.stay-deal {
  background: #EAF1EE; color: var(--pine); font-weight: 600; font-size: .9rem;
  padding: .5rem .75rem; border-radius: 8px; margin: .75rem 0 0;
}
.stay-deal .note { font-weight: 400; }

/* ---------- About your host (text + optional photo) ---------- */
.about-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: center; max-width: 640px; }
.about-photo {
  border-radius: var(--radius); background: var(--line);
  background-size: cover; background-position: center;
  aspect-ratio: 1; width: 160px; max-width: 100%;
}
.about-text h2 { margin-bottom: .75rem; }
/* Once a photo is present, go side by side on wider screens. */
.about-grid.has-photo { max-width: 760px; }
@media (min-width: 640px) {
  .about-grid.has-photo { grid-template-columns: 180px 1fr; gap: 2rem; align-items: start; }
}

/* ---------- Contact form ---------- */
/* Bordered card wrapper for the homepage About + Get in touch blocks, so each
   reads as its own panel inline on the page (left-aligned to the content edge). */
.home-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 1.75rem 2rem; max-width: 720px;
}
.home-card .about-grid { max-width: none; }
@media (max-width: 560px) { .home-card { padding: 1.25rem 1.25rem; } }

/* Keep the contact form a readable width but anchored to the site's left
   content edge, not centred in the page — and give it the same bordered card. */
.contact-col {
  max-width: 720px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 1.75rem 2rem;
}
@media (max-width: 560px) { .contact-col { padding: 1.25rem 1.25rem; } }
.contact-form { margin-top: 1.5rem; }
.hidden-field { position: absolute; left: -9999px; }
.form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 1rem; }
@media (min-width: 520px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.contact-form .field { margin: 0; }
.contact-form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card);
  padding: .6rem .75rem; border: 1.5px solid var(--line); border-radius: 8px;
}
.contact-form textarea { resize: vertical; line-height: 1.5; }
/* Higher specificity than the generic `.field input` rule so inputs,
   selects and textareas share the exact same padding/height and line up. */
.contact-form .field input,
.contact-form .field select,
.contact-form .field textarea {
  padding: .6rem .75rem; border-radius: 8px; box-shadow: none;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { outline: none; border-color: var(--pine); }

/* ---------- Booking form (inside the booking modal) ----------
   A more finished treatment than the plain contact form: soft-tinted fields,
   refined labels, hover feedback and a clear pine focus ring, so the details
   step feels like part of a polished checkout rather than a raw form. */
.book-form-zone .book-form-title {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600;
  margin: 0 0 .25rem;
}
.book-form-zone .book-form-sub {
  color: var(--muted); font-size: .88rem; margin: 0 0 1.25rem;
}
.book-form .field label {
  font-size: .78rem; font-weight: 600; letter-spacing: .01em;
  color: var(--muted); text-transform: none;
}
.book-form .field input,
.book-form .field select,
.book-form .field textarea {
  padding: .7rem .85rem; border-radius: 10px;
  border: 1.5px solid var(--line); background: #FBFAF7;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.book-form .field input::placeholder,
.book-form .field textarea::placeholder { color: #A9A498; }
.book-form .field input:hover,
.book-form .field select:hover,
.book-form .field textarea:hover { border-color: #CFCABD; }
.book-form .field input:focus,
.book-form .field select:focus,
.book-form .field textarea:focus {
  border-color: var(--pine); background: var(--card);
  box-shadow: 0 0 0 3px rgba(31,58,50,.12);
}
/* A field flagged invalid on submit reads red until the guest fixes it. */
.book-form .field input:user-invalid,
.book-form .field select:user-invalid {
  border-color: #C0492F; box-shadow: 0 0 0 3px rgba(192,73,47,.12);
}

/* ---------- Header / nav (mobile-first, collapses to a menu) ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; padding: .35rem 1.25rem; flex-wrap: wrap; }
/* On phones, give the brand + hamburger extra breathing room from the edges. */
@media (max-width: 640px) { .site-header .nav { padding-left: 1.5rem; padding-right: 1.5rem; } }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--pine); text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--honey); }
.nav-toggle { display: inline-flex; background: none; border: 0; cursor: pointer; padding: .4rem; color: var(--ink); }
.nav-links {
  display: none; position: absolute; top: 64px; left: 0; right: 0;
  flex-direction: column; gap: .25rem; padding: .75rem 1.25rem 1.25rem;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.nav-links.open { display: flex; }
.nav-links a { color: var(--ink); text-decoration: none; padding: .6rem 0; font-weight: 500; }
/* Nav "buttons" (Guest login, Admin) read as plain links, not pill buttons. */
.nav-links .btn {
  border: none; background: none; padding: .6rem 0; border-radius: 0;
  color: var(--pine); font-weight: 500;
}
.nav-links .btn:hover { background: none; color: var(--honey); }

@media (min-width: 820px) {
  .nav-toggle { display: none; }
  .nav-links { display: flex; position: static; flex-direction: row; align-items: center; gap: 1.5rem; padding: 0; background: none; border: 0; }
  .nav-links a { padding: 0; }
  .nav-links .btn { margin-top: 0; padding: 0; }
}

/* Simple headers (gallery, portal, book) have only a couple of links and no
   hamburger. Keep their nav a static inline row at EVERY width, so it never
   falls into the absolute mobile-dropdown styling and overlaps the page. */
.nav-links--simple {
  position: static; flex-direction: row; flex-wrap: wrap; align-items: center;
  gap: 1rem 1.25rem; padding: 0; background: none; border: 0;
}
.nav-links--simple a { padding: 0; }
.nav-links--simple .btn { margin-top: 0; padding: 0; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 8vw, 5.5rem) 0 clamp(0.6rem, 2vw, 1.35rem); }
/* Tighten only the hero → homes gap; other sections keep their spacing.
   Drop the homes bottom padding so the promo banner's own margin sets an even
   gap above and below it. */
#homes { padding-top: clamp(0.6rem, 2vw, 1.25rem); padding-bottom: 0; }
/* About your host: 95% less vertical space above and below. */
/* Equal breathing room above and below the About card. The homes section's
   bottom padding is 0 and the contact section's top padding is 0 (below), so
   this section's own top/bottom padding sets both gaps to the same size. */
#about { padding-top: clamp(1.5rem, 4vw, 2.25rem); padding-bottom: clamp(1.5rem, 4vw, 2.25rem); }
#contact { padding-top: 0; }
.hero .eyebrow { color: var(--honey); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; margin-bottom: .75rem; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* ---------- Property grid ---------- */
.section { padding: clamp(2rem, 6vw, 3.5rem) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.grid {
  display: grid; gap: 1.25rem;
  /* auto-FILL, not auto-fit: auto-fit collapses the unused tracks, which
     makes a single property stretch across the whole page. auto-fill keeps
     the columns, so one card stays card-sized. */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(31,58,50,.10); }
.card .photo { display: block; aspect-ratio: 3 / 2; background: var(--pine); background-size: cover; background-position: center; cursor: pointer; }
.card .body { padding: 1rem 1.1rem 1.25rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card .rate { color: var(--honey); font-weight: 700; }
.card h3 { font-size: 1.2rem; margin: 0; }
.card .meta { color: var(--muted); font-size: .92rem; }
.card .btn { margin-top: auto; }
.badge { align-self: flex-start; font-size: .75rem; font-weight: 600; color: var(--pine); background: #EAF1EE; padding: .2rem .6rem; border-radius: 999px; margin-bottom: 4px; }
/* Live availability: amber when tonight is taken, so "booked" reads clearly
   apart from the green "available" state. */
.badge--booked { color: var(--honey-700); background: #F7ECDF; }

/* ---------- Logged-in status in the nav ---------- */
.nav-user {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .82rem; font-weight: 600; color: var(--muted);
  max-width: 100%;
}
.nav-user .dot-online {
  width: .5rem; height: .5rem; border-radius: 50%;
  background: #3BA55D; flex: none;
  box-shadow: 0 0 0 2px rgba(59,165,93,.2);
}
.nav-user-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.nav-signout { font-size: .85rem; font-weight: 600; color: var(--muted); text-decoration: underline; }
.nav-signout:hover { color: var(--ink); }

/* ---------- Property description (Read more) ---------- */
.prop-desc { position: relative; }
.prop-desc-text { transition: max-height .2s ease; }
/* Tight paragraph spacing so the clamp cuts on real text, not a blank gap
   between paragraphs (which made the fade look absent). */
.prop-desc-text p { margin: 0 0 .5rem; }
.prop-desc-text p:last-child { margin-bottom: 0; }
.prop-desc-text.clamped { max-height: 5.6em; overflow: hidden; position: relative; }
/* Gradient overlay fading the cut-off text into the page background. */
.prop-desc-text.clamped::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.8em;
  background: linear-gradient(to bottom, rgba(251,250,247,0) 0%, #FBFAF7 92%);
  pointer-events: none;
}
.prop-desc-toggle { margin-top: .6rem; font-weight: 600; }

/* ---------- Amenities ---------- */
.amen-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.amen-popular {
  display: grid; grid-template-columns: 1fr; gap: .75rem 1.5rem; margin-top: 1rem;
}
@media (min-width: 480px) { .amen-popular { grid-template-columns: 1fr 1fr; } }
.amen-item { display: flex; align-items: center; gap: .7rem; font-size: .98rem; }
.amen-item svg { color: var(--pine); flex: none; }
.amen-seeall { margin-top: 1rem; }

/* Amenities modal content */
.amen-all { display: grid; gap: 1.75rem; margin-top: 1rem; }
.amen-cat h3 { font-size: 1.05rem; border-bottom: 1px solid var(--line); padding-bottom: .4rem; margin: 0 0 .75rem; }
.amen-row { padding: .35rem 0; }
.amen-name { display: flex; align-items: center; gap: .6rem; font-size: .98rem; }
.amen-name svg { color: var(--pine); flex: none; }
.amen-detail { color: var(--muted); font-size: .88rem; margin: .15rem 0 0 1.9rem; }

/* ---------- House rules ---------- */
.house-rules-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 1.5rem 1.75rem;
}
.rules-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem 2.5rem; margin-top: 1rem; }
@media (min-width: 640px) { .rules-grid { grid-template-columns: 1fr 1fr; } }
.rule-times { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-bottom: .25rem; }
.rule-time { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; }
.rule-time svg { color: var(--pine); flex: none; }
.rule-item { display: flex; gap: .7rem; align-items: flex-start; }
.rule-item svg { color: var(--pine); flex: none; margin-top: .1rem; }
.rule-item strong { display: block; font-size: 1.05rem; margin-bottom: .1rem; }
.rule-status { display: block; color: var(--ink); font-size: .92rem; }
.rule-detail { display: block; color: var(--muted); font-size: .88rem; margin-top: .15rem; }

/* ---------- Area map ---------- */
.area-map { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; max-width: 34rem; margin-top: 1rem; }

/* Map + weather side by side on wide screens; stacked on mobile. */
.area-weather-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; align-items: stretch; margin-top: 1rem; }
.area-weather-grid .area-map { max-width: none; margin-top: 0; }
@media (min-width: 760px) {
  .area-weather-grid { grid-template-columns: minmax(0, 34rem) minmax(13rem, 17rem); }
}

/* Weather widget — a gradient "sky" header + a light forecast strip. */
.weather-widget {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--card); display: flex; flex-direction: column;
}
.wx-top { padding: .95rem 1.15rem 1.05rem; color: #fff; }
.wx-top--sunny  { background: linear-gradient(150deg, #4C93DD, #7FB4EA); }
.wx-top--night  { background: linear-gradient(150deg, #1f2f4d, #34486d); }
.wx-top--cloudy { background: linear-gradient(150deg, #6E7E93, #97A6B9); }
.wx-top--rain   { background: linear-gradient(150deg, #47586F, #6E7F97); }
.wx-top--snow   { background: linear-gradient(150deg, #7C93B4, #AEC0D8); }
.wx-top--storm  { background: linear-gradient(150deg, #383d55, #575072); }
.wx-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.wx-title { font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.wx-loc { font-size: .8rem; opacity: .85; }
.wx-now { display: flex; align-items: center; gap: .5rem; margin-top: .45rem; }
.wx-icon svg { display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,.18)); }
.wx-now-t { display: flex; flex-direction: column; line-height: 1.05; }
.wx-temp { font-family: var(--font-display); font-size: 2.15rem; font-weight: 600; }
.wx-cond { font-size: .85rem; opacity: .92; }
.wx-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding: .8rem 1rem .4rem; }
.wx-day { display: flex; flex-direction: column; align-items: center; gap: .1rem; font-size: .8rem; text-align: center; }
.wx-dname { color: var(--muted); font-weight: 600; }
.wx-dicon svg { display: block; }
.wx-dtemp { font-weight: 600; font-variant-numeric: tabular-nums; }
.wx-dtemp em { color: var(--muted); font-style: normal; font-weight: 500; }
.wx-credit { padding: 0 1rem .55rem; font-size: .66rem; color: var(--muted); text-align: right; }
.area-map-embed { position: relative; }
.area-map-embed iframe { width: 100%; height: 260px; border: 0; display: block; }
/* Transparent overlay so a click opens the modal instead of panning the
   inline map. Shows an "Expand map" chip. */
.area-map-overlay {
  position: absolute; inset: 0; border: 0; background: transparent; cursor: pointer;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 1rem;
}
.area-map-overlay span {
  background: rgba(26,29,27,.78); color: #fff; font-weight: 600; font-size: .85rem;
  padding: .4rem .8rem; border-radius: 999px; opacity: .92;
}
.area-map-overlay:hover span { opacity: 1; }
.area-map-foot { padding: .8rem 1rem; display: flex; flex-direction: column; gap: .2rem; }
.area-map-foot a { font-weight: 600; }

.map-modal-body { border-radius: var(--radius); overflow: hidden; }
.map-modal-body iframe { width: 100%; height: min(70vh, 520px); border: 0; display: block; }

/* ---------- All-photos grid modal (Vrbo-style) ---------- */
.photo-grid-modal { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 1rem; }
@media (min-width: 640px) { .photo-grid-modal { grid-template-columns: 1fr 1fr; } }
.pg-item { margin: 0; }
.pg-photo {
  width: 100%; aspect-ratio: 3 / 2; border: none; padding: 0;
  border-radius: var(--radius); background: var(--line) center / cover no-repeat;
  cursor: zoom-in; display: block;
}
.pg-item figcaption { margin-top: .45rem; font-size: .92rem; color: var(--ink); }

/* ---------- Photo lightbox ---------- */
/* Gallery photos are buttons so they tap reliably (incl. iOS) and enlarge. */
.gallery-photo {
  appearance: none; -webkit-appearance: none; border: none; padding: 0;
  cursor: zoom-in; position: relative; width: 100%;
  background-size: cover; background-position: center; background-color: var(--pine);
}
.gallery-photo::after {
  content: "⤢"; position: absolute; top: .5rem; right: .5rem;
  width: 1.7rem; height: 1.7rem; display: grid; place-items: center;
  background: rgba(26,29,27,.55); color: #fff; border-radius: 8px;
  font-size: .9rem; opacity: 0; transition: opacity .15s ease;
}
.gallery-photo:hover::after, .gallery-photo:focus-visible::after { opacity: 1; }
.more-badge {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(26,29,27,.5); color: #fff; font-weight: 700; font-size: 1.3rem;
  border-radius: inherit;
}

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(20,22,20,.92);
  display: grid; place-items: center; padding: 3rem 1rem;
}
.lightbox[hidden] { display: none; }
.lb-img { max-width: 100%; max-height: 100%; border-radius: 6px; object-fit: contain; }
.lb-btn {
  position: absolute; background: rgba(255,255,255,.12); color: #fff; border: none;
  cursor: pointer; display: grid; place-items: center; border-radius: 999px;
}
.lb-btn:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 1rem; right: 1rem; width: 2.6rem; height: 2.6rem; font-size: 1.2rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; font-size: 1.8rem; }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-count { position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%); color: #fff; font-size: .9rem; opacity: .85; }
@media (max-width: 560px) {
  .lb-prev, .lb-next { width: 2.5rem; height: 2.5rem; font-size: 1.4rem; }
  .lb-prev { left: .4rem; } .lb-next { right: .4rem; }
}

/* ---------- Property detail ---------- */
.gallery { display: grid; gap: .5rem; grid-template-columns: 1fr; margin-bottom: 1.5rem; }
.gallery .main { aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--pine); background-size: cover; background-position: center; }
/* Side photos need their own sizing at every width. Without this they
   collapse to zero height below 820px and vanish on phones. */
.gallery .side { display: grid; gap: .5rem; grid-template-columns: 1fr 1fr; }
.gallery .side .photo {
  aspect-ratio: 4 / 3; border-radius: var(--radius);
  background: var(--pine-700); background-size: cover; background-position: center;
}
/* ---------- Availability calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.cal-nav {
  font: inherit; font-size: 1.3rem; line-height: 1; color: var(--pine);
  background: transparent; border: 1.5px solid var(--line); border-radius: 999px;
  width: 2.2rem; height: 2.2rem; cursor: pointer; flex: none;
}
.cal-nav:hover:not(:disabled) { background: var(--pine); color: #fff; border-color: var(--pine); }
.cal-nav:disabled { opacity: .35; cursor: default; }

.cal-legend { display: flex; gap: 1.1rem; font-size: .82rem; color: var(--muted); flex-wrap: wrap; justify-content: center; }
.cal-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.dot { width: 1.1rem; height: 1.1rem; border-radius: 50%; display: inline-block; position: relative; }
.dot--free { border: 1px solid var(--line); }
.dot--booked { border: 1px solid var(--line); background: #F2F0EA; }
/* The same strikethrough the blocked days use, so the legend reads as a
   miniature of the thing it explains. */
.dot--booked::after {
  content: ""; position: absolute; left: 1px; right: 1px; top: 50%;
  border-top: 1.5px solid var(--muted); transform: translateY(-50%);
}

/* Borderless grid — numbers sit on the page, the way Vrbo and Airbnb do it.
   Boxes around every day make a calendar feel like a spreadsheet. */
.cal-months { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
/* Single-month view (availability): keep it one column at any width. */
.cal-months--one { grid-template-columns: 1fr !important; }
/* Constrain the whole availability calendar (arrows + card) to one width so
   the ‹ › arrows sit directly above the calendar card, not at the far edges. */
/* Match the booking box width so the two panels are the same size. */
.cal.cal--avail { max-width: 25rem; }
.cal--avail .cal-day { font-size: .78rem; }
.cal--avail .cal-price { font-size: .58rem; }
/* The availability calendar is view-only — no clickable hover state
   (dates are chosen in the booking modal, not here). */
.cal--avail .cal-day { cursor: default; }
.cal--avail .cal-day.is-free:hover { background: transparent; }
.cal--avail .cal-day.is-free:hover .cal-price { color: var(--muted); }

/* Booking modal calendar: one large, legible month instead of two cramped
   ones. Fill the whole card width so there's no dead space around it — the
   cells grow with it, making dates and nightly prices even easier to read. */
.cal.cal--book { max-width: none; width: 100%; margin-inline: 0; }
.cal--book .cal-head { margin-bottom: .85rem; }
.cal--book .cal-head .cal-month-name {
  margin: 0; font-size: 1.05rem;
}
.cal--book .cal-month--bare {
  border: none; background: transparent; padding: 0;
}
.cal--book .cal-day { font-size: 1rem; border-radius: 10px; gap: 2px; }
.cal--book .cal-dow { font-size: .68rem; padding-bottom: .55rem; }
.cal--book .cal-price { font-size: .66rem; font-weight: 600; }
.cal--book .cal-legend--foot { margin-top: 1rem; padding-top: .9rem; justify-content: center; }
/* Nav arrows live in the card header so the card top aligns with the
   booking box top. The card fills the full height so bottoms line up too. */
.cal-card { display: flex; flex-direction: column; height: 100%; }
.cal-monthnav { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.cal-monthnav .cal-month-name { margin: 0; }
.cal-monthnav .cal-nav {
  font: inherit; font-size: 1.2rem; line-height: 1; color: var(--pine);
  background: transparent; border: 1.5px solid var(--line); border-radius: 999px;
  width: 2rem; height: 2rem; cursor: pointer; flex: none;
}
.cal-monthnav .cal-nav:hover:not(:disabled) { background: var(--pine); color: #fff; }
.cal-monthnav .cal-nav:disabled { opacity: .35; cursor: default; }
.cal-legend--foot { margin-top: auto; padding-top: .9rem; flex-wrap: wrap; }

/* Each month sits in its own card so the two read as separate units. */
.cal-month {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: .9rem .8rem 1rem;
}
.cal-month-name {
  font-family: var(--font-display); font-weight: 600; font-size: .92rem;
  margin-bottom: .7rem; text-align: center;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }

.cal-dow {
  text-align: center; font-size: .64rem; font-weight: 600; letter-spacing: .04em;
  color: var(--muted); padding-bottom: .4rem;
}
/* The whole day cell is the highlight target — a rounded block containing
   the number and (if priced) the nightly price. This reads far better with
   two lines than a tight circle around just the number. */
.cal-day {
  aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  font-size: .74rem; font-variant-numeric: tabular-nums;
  border-radius: 9px; transition: background .12s ease, color .12s ease;
  /* Reset so clickable <button> days look identical to the div days. */
  appearance: none; -webkit-appearance: none; border: none;
  background: transparent; color: inherit; font-family: inherit;
  padding: 0; width: 100%; touch-action: manipulation;
}
.cal-day span { display: block; line-height: 1.05; }
.cal-price { display: block; font-size: .58rem; color: var(--muted); }
.cal-day.is-empty { visibility: hidden; }

.cal-day.is-free { color: var(--ink); }
.cal-day.is-free:hover { background: #EAF1EE; }
.cal-day.is-free:hover .cal-price { color: var(--pine); }

/* Booked: faded + struck through, no filled block. Available days keep the
   strong dark number, so bookable vs booked reads at a glance by contrast. */
.cal-day.is-booked { color: #B7B2A6; }
.cal-day.is-booked span {
  text-decoration: line-through;
  text-decoration-color: #C9C4B8;
  text-decoration-thickness: 2px;
}

.cal-day.is-past { color: #CFCCC3; }
.cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--honey); font-weight: 700; }

.cal-foot { font-size: .78rem; margin: 1.25rem 0 0; text-align: center; }

/* Stop the calendar stretching the full page width on desktop — a month
   grid spread over 1100px reads as a spreadsheet, not a calendar. */
.cal { max-width: 34rem; }

@media (min-width: 620px) {
  .cal-months { grid-template-columns: 1fr 1fr; gap: 1rem; }
}

.detail-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
.detail-body { max-width: 760px; }
/* Availability calendar with the booking box to its right on wide screens. */
.avail-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; margin-top: 1rem; }
.spec-row { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; margin: 0 0 1.5rem; }
.spec-chip { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; font-size: 1.02rem; }
.spec-chip svg { color: var(--ink); flex: none; }
.spec-list { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem 1rem; }
.spec-list li { font-size: .95rem; }
.spec-list b { display: block; color: var(--muted); font-weight: 500; font-size: .8rem; }
.book-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.book-box .price { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); }
.book-box .btn { margin-top: .75rem; }

@media (min-width: 820px) {
  .gallery { grid-template-columns: 2fr 1fr; }
  /* On wide screens the two side photos stack instead, and take their
     height from the main photo beside them rather than a fixed ratio. */
  .gallery .side { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .gallery .side .photo { aspect-ratio: auto; }
  .detail-grid { grid-template-columns: 1.6fr 1fr; align-items: start; }
  /* Two equal-width panels: calendar left, booking box right, same size and
     stretched to equal height so their tops and bottoms line up. */
  .avail-grid { grid-template-columns: repeat(2, minmax(0, 25rem)); justify-content: start; gap: 2rem; align-items: stretch; }
  .book-box { position: sticky; top: 88px; }
}

/* ---------- Portal ---------- */
.portal-shell { min-height: 70vh; display: grid; place-items: center; padding: 2.5rem 0; }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.auth-card h1 { font-size: 1.6rem; }
.field { display: block; margin: 1rem 0; }
.field label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: .35rem; }
.field input {
  width: 100%; font: inherit; padding: .7rem .8rem; border: 1.5px solid var(--line);
  border-radius: 10px; background: #fff;
}
.field input:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px rgba(31,58,50,.12); }
.note { font-size: .88rem; color: var(--muted); }
.portal-panel { width: 100%; max-width: 720px; }
.panel-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin-bottom: 1rem; }
.panel-card h2 { font-size: 1.15rem; }
.doc-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.doc-row:first-of-type { border-top: 0; }
.status { font-size: .82rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; }
.status--signed { color: #1e6e4f; background: #E4F2EA; }
.status--pending { color: var(--honey-700); background: #FBEEDF; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2rem 0; color: var(--muted); font-size: .9rem; }
.site-footer a { color: var(--muted); }

/* ---------- Accessibility niceties ---------- */
:focus-visible { outline: 2px solid var(--honey); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
