/* =========================
   Vinebound – Global Styles (cleaned)
   Order: tokens → base → layout → components → pages → utilities → responsive
   ========================= */

/* ---------- TOKENS ---------- */
:root{
  --text:#191919;
  --muted:#666;
  --accent:#739D75;
  --accent-d:#5d7f5f;
  --accent-m:#9DD7A1;
  --gold:#E3BA62;
  --radius:12px;
  --radius-lg:14px;
  --shadow-1:0 2px 12px rgba(0,0,0,.10);
  --shadow-2:0 4px 24px rgba(0,0,0,.16);
--page-max: 1120px;
  --page-pad: 10px;
  --page-gap-lg: clamp(20px,3vw,32px);
  --page-gap-xl: clamp(28px,4vw,48px);
    --page-gap-md: clamp(16px,2.5vw,24px);
  /* Filters */
  --filters-w:260px;
  --filters-btn-h:48px;
  --filters-dur: .32s;
  --filters-ease: cubic-bezier(.2,.8,.2,1);

  /* Hero sizing */
  --hero-logo-desktop:140px;
  --hero-logo-mobile:104px;
  --hero-text-pr-desktop:180px;  /* reserve space for logo */
  --hero-text-pr-mobile:120px;

  /* Blog */
  --post-measure:70ch;
  --hero-subheading-mobile:18ch; /* ~2 lines on mobile */
}

/* ---------- BASE ---------- */
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height:1.6;
  color:var(--text);
  background:#fff;
  position:relative;
}

html, body{
  max-width: 100%;
  overflow-x: hidden;
}

a{ color:var(--accent); text-decoration:underline; text-underline-offset:2px; transition:color .18s; }
a:hover{ color:var(--accent-d); }

/* Typography */
.site-hero-text h1,.page-title,.main-title{
  font-family:'Playfair Display', serif;
  font-weight:700;
  letter-spacing:.2px;
  font-size:clamp(66px,5vw,100px);
  line-height:2; /* overridden in hero */
}
h2,.section-title{
  font-family:'Playfair Display', serif;
  font-weight:700;
  font-size:clamp(24px,3.5vw,38px);
  line-height:1.2;
  color:var(--text);
}

/* Make any h3 that contains a link appear in black */
h3 a,
h3 > a {
  color: #191919 !important;
}

h3 a:hover,
h3 a:focus,
h3 > a:hover,
h3 > a:focus {
  color: var(--accent-d) !important; /* Optional: dark green on hover */
  text-decoration: underline;
}

h3,.card-title,.vineyard-name{
  font-family:'Playfair Display', serif;
  font-weight:600;
  font-size:clamp(18px,2.8vw,26px);
  line-height:1.3;
  color:var(--text);
}
.vineyard-longdesc, main p, main ul, main li{
  font-family:'Lora', serif;
  font-size:1.05rem;
  line-height:1.7;
}

/* ---------- LAYOUT: HERO & NAV ---------- */
.site-hero{
  position:relative;
  background:#fff;          /* image carries background */
  color:#191919;            /* dark text */
  overflow:hidden;
  min-height:120px;         /* ~half the old height */
}
.site-hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(231,217,210,.8); /* #E7D9D2 veil */
  z-index:1;
  pointer-events:none;
}
.site-hero-bg{
  position:absolute; inset:0;
  background:url('/assets/images/header.jpg') center/cover no-repeat;
  opacity:1; z-index:0; pointer-events:none;
}
.site-nav{
  width:100%; background:none; margin:0; padding:0 32px 0 0;
  position:relative; z-index:2;
}
.nav-row{ display:flex; justify-content:space-between; align-items:center; padding:0 22px; width:100%; }
.burger{ order:0; display:none; flex-direction:column; gap:4px; background:none; border:none; cursor:pointer; padding:8px; }
.burger span{ display:block; width:28px; height:4px; background:#fff; border-radius:2px; }
.nav-links{ order:1; display:flex; gap:28px; list-style:none; margin:0; padding:0; position:relative; z-index:2; }
.nav-links li a{
  color:#fff; font-weight:500; font-size:1.13em; text-decoration:none;
  padding:4px 0; transition:border .18s, color .18s; border-bottom:2px solid transparent;
}
.nav-links li a:hover,.nav-links li a:focus{ border-bottom:2px solid #fff; color:var(--gold); }
.site-hero-text a{
  color:#fff; text-decoration:none;
  transition:border .18s, color .18s; border-bottom:2px solid transparent;
}
.site-hero-text a:hover,.title-link a:focus{ border-bottom:2px solid #fff; color:var(--gold); }

.logo-link{
  order:2; margin-left:16px; margin-right:24px;
  display:flex; align-items:center; justify-content:flex-end; height:100%;
  position:relative; z-index:2;
}
/* Base .site-logo kept minimal; hero rules below control its size */
.site-logo{ display:block; object-fit:contain; border:none; background:transparent; box-shadow:none; }

/* Hero text block */
.site-hero-text{
  position:relative; z-index:2;
  padding:32px 0 28px 0;
  text-align:left;
  margin-left:24px;
  /* single source of truth for width: keep the calc, remove duplicate */
  max-width:700px;
  padding-right:var(--hero-text-pr-desktop);
}
.site-hero-text h1{ line-height:1.1; margin:0 0 4px; } /* tighten hero title */
.site-hero-text .subheading{
  font-family:Inter, system-ui, sans-serif;
  font-size:1.19em; color:#eee; margin-top:.3em; font-weight:300;
  text-shadow:0 3px 16px rgba(0,0,0,.12);
  line-height:1.25; overflow-wrap:anywhere; word-break:normal;
}

/* Hero-specific logo placement & sizing */
.site-hero .site-nav{ position:static; }
.site-hero .site-nav, .site-hero .nav-row{ height:100%; } /* center against hero height */
.site-hero .logo-link{
  position:absolute; right:40px; top:44%; transform:translateY(-50%);
  margin:0; z-index:4; align-items:center;
}
.site-hero .site-logo{ width:var(--hero-logo-desktop); height:var(--hero-logo-desktop); }
.site-hero .logo-link>img, .site-hero .logo-link>svg{ width:var(--hero-logo-desktop); height:var(--hero-logo-desktop); }

/* === New split header bands (scoped to header only) === */
.site-hero .hero-band{ position:relative; z-index:2; }

/* Top: burger / centred title / logo */
.site-hero .hero-band--top{
  display:grid;
  grid-template-columns: 1fr auto 1fr;   /* left: subheading, center: title, right: logo */
  align-items:center;
  padding:6px 14px 4px;                  /* tighter to shorten header */
  column-gap: 16px;
}
.site-hero .hero-title{
  grid-column:2;
  margin:0;
  text-align:center;
  font-family:'Space Grotesk', Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight:700;
  letter-spacing:.3px;
  line-height:1.1;
  font-size:clamp(28px,3.8vw,48px);
}
.site-hero .hero-title a{
  color:#191919;
  text-decoration:none;
  font: inherit; /* inherit Space Grotesk from the H1 */
}
.site-hero .logo-link{ grid-column:3; justify-self:end; position:relative; z-index:4; }
.site-hero .site-logo{ width:var(--hero-logo-desktop); height:var(--hero-logo-desktop); object-fit:contain; display:block; }

/* Divider */
.site-hero .hero-divider{
  position:relative; z-index:2; border:0; height:1px; background:rgba(0,0,0,.18);
  margin:6px 0 8px;
}

/* Bottom: centred nav + optional mobile subheading */
.site-hero .hero-band--bottom{
  display:flex; flex-direction:column; align-items:center; gap:4px;
  padding:6px 0 10px;
}
.site-hero .hero-nav{ display:flex; justify-content:center; }
.site-hero .hero-nav .nav-links{
  display:flex; gap:28px; list-style:none; margin:0; padding:0; justify-content:center;
}
.site-hero .hero-nav .nav-links li a{
  color:#191919; font-weight:600; font-size:1.05rem; text-decoration:none;
  padding:2px 0; border-bottom:2px solid transparent; transition:color .18s, border-color .18s;
}
.site-hero .hero-nav .nav-links li a:hover,
.site-hero .hero-nav .nav-links li a:focus{
  color:#000; border-bottom-color:#000;
}

/* Ensure burger bars are dark only in header */

/* Mobile tweaks just for the header */
@media (max-width:600px){
  .site-hero{ min-height:110px; }
  .site-hero .site-logo{ width:var(--hero-logo-mobile); height:var(--hero-logo-mobile); }
}

/* === Header-only refinements (Both / Desktop / Mobile) === */
 
/* BOTH: Use Space Grotesk for header UI */
.site-hero .hero-nav .nav-links li a{
  font-family:'Space Grotesk', Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* BOTH: make top band shorter + logo smaller so header is shallower */
.site-hero .hero-band--top{ padding:6px 14px 4px; }

/* Reset any legacy absolute positioning from the old header */
.site-hero .hero-band--top .logo-link{
  position: static !important;
  right: auto; top: auto; transform: none;
  justify-self: end;
  align-self: center;
  margin: 0;
  z-index: 4;
}

/* Smaller logo (desktop & mobile) — header only */
.site-hero .site-logo{
  width: 70px;
  height:70px;
}
@media (max-width:600px){
  .site-hero .site-logo{
    width:40px;
    height:40px;
  }
}

/* DESKTOP: subheading on the left in the top band */
.site-hero .hero-band--top .hero-subheading--desktop{
  grid-column: 1;
  justify-self: start;
  align-self: center;
  display: none;                 /* default hidden; enabled via media query below */
  color: #191919;                /* stronger contrast on the veiled photo */
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.35;
  max-width: 40ch;               /* allow a bit more width */
  margin-left: 8px;              /* breathe away from edge */
  text-shadow: 0 1px 0 rgba(255,255,255,.65); /* subtle lift over image */
  position: relative;
  z-index: 3;                    /* ensure above overlay/bands */
  opacity: 1;
  visibility: visible;
}
@media (min-width:801px){
  .site-hero .hero-band--top .hero-subheading--desktop{ display:block !important; }
  .site-hero .burger{ display:none !important; }
}

/* MOBILE: keep the mobile subheading below the divider only on small screens */
.site-hero .hero-subheading--mobile{ display:none; }
@media (max-width:700px){
  .site-hero .hero-subheading--mobile{ display:block; }
}

/* MOBILE: logo snug to the right */
@media (max-width:600px){
  .site-hero .logo-link{
    justify-self:end;
    margin-right:8px;
  }
}

/* BOTH: burger bars should be dark in the header */
.site-hero .burger span{ background:#191919; }

/* MOBILE: burger menu behaviour (supports .is-open and .open for JS) */
@media (max-width:768px){
  .site-hero .hero-nav .nav-links{
    display:none;
    flex-direction:column;
    gap:14px;
    padding:10px 0 6px;
  }
  .site-hero .hero-nav .nav-links.is-open,
  .site-hero .hero-nav .nav-links.open{
    display:flex;
  }
}

/* ---------- MAP & FILTERS ---------- */

/* --- Mapbox controls: protect from global button styles --- */
.mapboxgl-ctrl,
.mapboxgl-ctrl * {
  box-sizing: border-box;
}

.mapboxgl-ctrl-group {
  background: #fff;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 4px;
  overflow: hidden;
}

/* Restore buttons so global button styles don’t break icons */
.mapboxgl-ctrl-group button {
  all: unset;                 /* wipe global button rules */
  display: inline-block;
  width: 30px;
  height: 30px;
  cursor: pointer;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: 50% 50%;
}

.mapboxgl-ctrl-group button + button {
  border-top: 1px solid rgba(0,0,0,.08);
}

/* Keep the controls clickable above overlays */
.mapboxgl-ctrl-bottom-right,
.mapboxgl-ctrl-top-right,
.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-top-left {
  z-index: 5;
}

/* Optional: tidy the geolocate pulse & popup spacing */
.mapboxgl-ctrl-geolocate { outline: none; }
.mapboxgl-popup-content { padding: 10px 12px; }

.mapboxgl-popup-content .popup-tags-grid{
  font-size:12px;       /* was 13px */
  gap:3px 10px;         /* slightly tighter */
}
.mapboxgl-popup-content .popup-tag{ white-space:nowrap; }
.mapboxgl-popup-content .popup-icon{
  width:14px;
  height:14px;          /* smaller icons */
  vertical-align:-2px;  /* align with text baseline */
}

/* === Vineyard page map (single-map fix) === */
.vineyard-map-section{
  padding: 0 20px 24px;          /* a little breathing room */
}

.vineyard-map-container{
  max-width: var(--page-max);
  margin: 0 auto;
}

#vineyard-map{
  position: relative;            /* keep Mapbox controls overlayed */
  width: 100%;
  height: 420px;                 /* explicit height = no weird stacking */
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

/* Tweak height per viewport */
@media (max-width: 700px){
  #vineyard-map{ height: 340px; }
}
@media (min-width: 1100px){
  #vineyard-map{ height: 480px; }
}

/* Ensure canvas inherits rounding (nice edges) */
#vineyard-map .mapboxgl-canvas{
  border-radius: inherit;
  display: block;                /* belt‑and‑braces: no baseline gaps */
}
#map{ width:100%; height:calc(100vh - 320px); position:relative; }

#toggle-filters{
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1300;
  width: var(--filters-w);
  height: var(--filters-btn-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 12px 12px 0 0;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: opacity .18s;
  box-sizing: border-box;       /* ensure width includes padding/border */
}
#filters-panel{
  position: absolute;
  left: 10px;
  top: calc(10px + var(--filters-btn-h) - 1px);
  z-index: 1200;
  width: var(--filters-w);
  box-sizing: border-box;            /* keep same visual width as the button */
  background: #e6f4ea;
  border: 1px solid transparent;
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow: var(--shadow-1);
  padding: 16px 16px 18px;

  display: flex;
  flex-direction: column;

  /* animation: vertical expand/collapse */
  max-height: 0;                     /* collapsed */
  opacity: 0;
  overflow: hidden;                  /* no horizontal scroll when closed */
  visibility: hidden;
  pointer-events: none;
  will-change: max-height, opacity;
  transition:
    max-height var(--filters-dur) var(--filters-ease),
    opacity   calc(var(--filters-dur) - .06s) ease,
    visibility 0s var(--filters-dur);
}
#filters-panel.open{
  max-height: 75vh;                  /* expanded height */
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    max-height var(--filters-dur) var(--filters-ease),
    opacity   calc(var(--filters-dur) - .06s) ease,
    visibility 0s 0s; /* show immediately on open */
}
#filters-panel.closing{
  max-height: 0;                 /* animate upward (collapse) */
  opacity: 0;
  visibility: visible;           /* keep visible so the animation is seen */
  pointer-events: none;
  transition:
    max-height var(--filters-dur) var(--filters-ease),
    opacity   calc(var(--filters-dur) - .06s) ease,
    visibility 0s var(--filters-dur); /* hide after the collapse ends */
}
#panel-header{ display:flex; justify-content:flex-end; }
#close-filters{ background:none; font-size:24px; color:#333; border:none; cursor:pointer; padding:0 5px; line-height:1; display:block; }

#filters{
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;               /* prevent horizontal scroll */
  -webkit-overflow-scrolling: touch;
}
#search-container{ width:100%; }
#search-input{
  width:100%; padding:6px 10px; font-size:14px; border:1px solid #ccc; border-radius:4px; margin-bottom:6px;
}
 #search-results{
  position:relative; background:#fff; border:1px solid #ccc; border-radius:4px;
  max-height:160px; overflow-y:auto; box-shadow:0 2px 6px rgba(0,0,0,.1);
  font-size:14px; display:none; margin-top:-4px; margin-bottom:8px; width:100%;
}
#search-results.show{ display:block; }
#search-results div{ padding:8px 12px; cursor:pointer; border-bottom:1px solid #eee; }
#search-results div:hover{ background:#f5f5f5; }
#search-results div:last-child{ border-bottom:none; }

#filters-panel,
#filters-panel *{
  max-width: 100%;
}

#reset-filters{
  background:var(--accent-m); color:#fff; border:1px solid var(--accent);
  padding:6px 10px; border-radius:6px; cursor:pointer; margin-bottom:8px;
}
#reset-filters:hover{ filter:brightness(.97); }

/* Map popup */
.mapboxgl-popup-content{
  width:252px;          /* was 290px (~20% smaller) */
  max-width:85vw;       /* scale more nicely on mobile */
  word-wrap:break-word;
  font-size:12px;       /* was 14px */
  border-radius:var(--radius);
  box-shadow:var(--shadow-1);
}
.popup-tags-grid{ display:grid; grid-template-columns:1fr 1fr; gap:4px 12px; margin:8px 0; font-size:13px; line-height:1.3; }
.popup-tag{ white-space:nowrap; }

/* ---------- SOCIAL / INTRO / SIGNUP / FOOTER ---------- */
#intro{
  background: transparent;      /* move panel styling to inner so corners are visible */
  border: 0;
  padding: 40px 20px;
  text-align: center;
}

/* Rounded panel inside the intro section */
#intro .container.prose{
  background: var(--frame-bg);
  border: 1px solid var(--frame-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; /* rounded top, square bottom */
  box-shadow: var(--shadow-1);
  padding: 24px 20px;           /* inner breathing room */
  margin: 0 auto;               /* ensure it centres within the section */
  max-width: var(--page-max);   /* align with page width */
}
#socials{ margin-top:32px; text-align:center; }
#socials .social-links{ display:flex; justify-content:flex-start; gap:20px; }
#socials .social-links a img{ width:24px; height:24px; filter:grayscale(100%) brightness(0%) opacity(.85); }
#disclaimer{
  padding:0; /* unify spacing with .footer-container */
  background:transparent; /* inherit grey from .footer-bar */
  border-top:none; /* single top border comes from .footer-bar */
  font-size:13px; line-height:1.5; color:#555; text-align:left; /* left-align copy */
}
#signup .ml-form-embedContent>p:first-of-type{ display:none !important; }

/* Footer wrappers (support both old .footer-bar and new .site-footer__bar) */
.footer-bar, .site-footer__bar { background:#f5f5f5; border-top:1px solid #ddd; }
/* Footer inner container: grid for two columns (left: disclaimer, right: signup) */
.footer-container, .site-footer__grid{
  max-width:1200px; margin:0 auto; padding:2rem 1rem;
  display:grid; grid-template-columns:1fr minmax(320px, 420px);
  gap:2rem; align-items:start;
}
.site-footer__left{ color:#555; }
.site-footer__left i{ display:block; color:#555; font-size:13px; line-height:1.6; }
.site-footer__right{ text-align:right; }

/* === Footer: links + socials (desktop-first) === */
footer a{ color:#191919; text-decoration:underline; text-underline-offset:2px; }
footer a:hover{ color:var(--accent-d); }

/* Compact list of utility links (Privacy, Disclaimer, Contact) */
.footer-nav{ margin: 2px 0 10px; }
.footer-links{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;     /* vertical stack on desktop */
  align-items: flex-start;    /* left-align */
  gap: 8px;                   /* tidy spacing between items */
}
.footer-links li{ margin:0; padding:0; }
/* neutralise separators on desktop */
.footer-links li + li:before{
  content: none !important;
}

/* Social line under links */
/* Footer: ensure left alignment of the follow line and icons on desktop */
.footer-social {
  text-align: left !important;
}
.footer-social p {
  margin: 0 0 6px;
  text-align: left !important;
}
.footer-social{ margin-top:10px; font-size:.95rem; color:#555; }
.footer-social .social-links{ display:flex; gap:14px; align-items:center; justify-content:flex-start; }
.footer-social .social-links a{ text-decoration:none; }
.footer-social .social-links img{ width:22px; height:22px; filter:grayscale(100%) brightness(0%) opacity(.9); }
.footer-social .social-links img:hover{ filter:none; }

/* Make the signup column stick to the right on wide screens */
.site-footer__right{ justify-self:end; }

/* MailerLite embed: blend into footer bar (no card UI) */
footer .ml-embedded,
footer .ml-form-embedContainer,
footer .ml-form-embedWrapper,
footer .ml-form-embedBody,
footer .ml-form-embedContent{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  padding:0 !important;
  margin:0 !important;
}
footer .ml-form-embedContent h4,
footer .ml-form-embedContent p{ margin:0 0 12px; }

@media (max-width:820px){
  .site-footer__grid{ grid-template-columns:1fr; }
  /* Move the signup (right column) to the top on mobile */
  .site-footer__right{ order:-1; text-align:left; }
  .footer-container{ grid-template-columns:1fr; }
  .footer-links li{ margin:0; }
  .footer-links li + li:before{ content:none; }
  /* Keep the follow line immediately beneath the links, left-aligned */
  .footer-social{ text-align:left; margin-top:10px; }
  .footer-social .social-links{ justify-content:flex-start; }
}

/* In the footer, prevent per-section card styling */
footer .footer-container > section, footer .site-footer__grid > section, footer .site-footer__grid > div{
  background:transparent; border:0; box-shadow:none;
}

/* Keep the form fields looking like inputs (don’t override them) */
#signup .ml-form-embedContent form{ margin: 0; }

/* ---------- CONTENT PAGES ---------- */
/* ---------- AREA GUIDES: shared hero (region / county / location) ---------- */
.area-hero{
  display:grid;
  gap:24px;
  margin: var(--page-gap-md) 0 28px; /* top breathing room under header */
}
@media (min-width:900px){
  .area-hero{ grid-template-columns:600px 1fr; align-items:start; }
}

.area-hero__media img{
  width:100%;
  height:auto;
  aspect-ratio:3 / 2;        /* 3:2 on all screens */
  object-fit:cover;
  border-radius: var(--radius-lg);
  display:block;
  box-shadow: var(--shadow-1);
}

.area-hero__summary h1{ margin:0 0 12px; }

/* Minimal prose defaults for CSV/HTML-rendered text blocks */
.prose p{ margin:0 0 1em; }
.prose ul{ margin:0 0 1em; padding-left: 1.2em; }
.prose li{ margin: 0 0 .5em; }
main{
  background:transparent; color:#333; padding:0px 20px; margin:0 auto; line-height:1.6; max-width:1120px;
}
main h1{ font-family:'Playfair Display', serif; font-size:1.5em; font-weight:700; margin-bottom:.5em; color:#191919; }
main h2{ font-family:'Lora', serif; font-size:1.6em; font-weight:600; margin-top:-.3em; color:#191919; }
main p, main ul, main li{ font-family:'Lora', serif; font-size:1em; }
main ul{ padding-left:20px; }
main ul li{ margin-bottom:.5em; }
main hr{ margin:3em 0; border:0; height:1px; background:#eee; }

/* Utility sections & containers */
.section{ padding:40px 20px; }
.section--tight{ padding:24px 20px; }
.section--center{ text-align:center; }
.container{ max-width:1120px; margin:0 auto; }

/* ---------- COMPONENTS: IMAGES ---------- */
.standard-photo{
  max-width:340px; width:100%; height:auto; border-radius:var(--radius);
  margin:28px auto 24px; display:block; box-shadow:var(--shadow-1);
}

/* ---------- VINEYARD DIRECTORY ---------- */
#vineyard-directory-list{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr));
  gap:32px; margin:32px 0;
}
.vineyard-card{
  background:#fff; border-radius:var(--radius-lg); box-shadow:var(--shadow-1);
  padding:20px; text-align:center; transition:box-shadow .18s;
}
.vineyard-card:hover{ box-shadow:var(--shadow-2); }
.vineyard-card h2{ font-size:1.3em; margin:10px 0 0 0; }
.directory-photo{ width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:var(--radius); margin-bottom:10px; display:block; }
.vineyard-icons span{ margin-right:12px; font-size:0em; }
.vineyard-county{ font-size:1.05em; color:#57505c; font-weight:500; margin:0 0 8px; }


/* Directory filters (grid) */
#directory-filters{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:12px 24px; margin:24px auto 10px; padding:14px; 
  background:#f9f9f9; border-radius:var(--radius);
  max-width:1600px; align-items:start; justify-items:start; text-align:left;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
#directory-filters-wrap, #directory-filter-form{ display:contents; }
#directory-filters label{ display:flex; align-items:center; gap:10px; margin:0; font-size:.95rem; line-height:1.3; }
/* Ensure checkboxes and icons are always visible in directory filters */
#directory-filter-form .feature-filter input[type="checkbox"],
#directory-filters label input[type="checkbox"]{
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  width: 16px;
  height: 16px;
  margin: 0 6px 0 0;
  flex: 0 0 auto;
  display: inline-block !important;
  opacity: 1 !important;
  visibility: visible !important;
  accent-color: var(--accent);
}
#directory-filter-form .feature-filter img.icon,
#directory-filters label img.icon{
  display: inline-block !important;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  flex: 0 0 auto;
  opacity: 1 !important;
  visibility: visible !important;
}
/* Icons always visible/sized */
#directory-filters label img.icon, #directory-filters label .icon, #directory-filters label svg,
#filters label img.icon, #filters label .icon, #filters label svg{ width:18px; height:18px; flex:0 0 auto; margin-right:6px; }
/* Guard against hidden text */
#directory-filters label .label-text, #filters label .label-text, #directory-filters label span, #filters label span{ display:inline !important; opacity:1 !important; visibility:visible !important; }

/* County dropdown */
#directory-filters .county-dropdown{ grid-column:1 / -1; justify-self:center; width:max-content; position:relative; }
#county-dropdown-list{
  position:absolute; top:calc(100% + 8px); left:50%; transform:translateX(-50%); display:none;
  background:#fff; border:1.5px solid #ddd; border-radius:12px; box-shadow:0 10px 24px rgba(0,0,0,.15);
  padding:12px 14px; width:min(320px, 90vw); max-height:300px; overflow-y:auto; z-index:3000;
}
#county-dropdown-list.open{ display:block; }
#county-dropdown-list .county-option{ padding:8px 10px; border-radius:8px; cursor:pointer; font-weight:600; }
#county-dropdown-list .county-option:hover{ background:#f3f6f4; }

/* Filter buttons */
#county-dropdown-toggle{
  padding:8px 18px; border:none; border-radius:8px; background:var(--accent-d); color:#fff; cursor:pointer;
  min-width:180px; text-align:center; font-size:1.08em; font-weight:600;
}
#county-dropdown-toggle:hover{ filter:brightness(.95); }

/* Directory filters: hide the mobile-only toggle button by default */
#toggle-more-filters{ display:none; }

/* === Directory Filters: Mobile "show more" collapse === */
@media (max-width: 759.98px){
  /* Keep the outer container styling; ensure it doesn't overflow horizontally */
  #directory-filters{
    position: relative;
    overflow: visible; /* let the button sit comfortably */
  }

  /* The wrapper is a grid parent on desktop; on mobile we need it to stack */
  #directory-filter-form{
    display: block; /* override display:contents from wrapper so children flow inside */
  }

  /* ❶ Fallback: if markup did NOT wrap extras in #more-filter-options, hide after five */
  #directory-filter-form > .feature-filter:nth-of-type(n+6){
    display: none;
  }
  /* When JS adds an expanded flag on the form, reveal all labels */
  #directory-filter-form[aria-expanded="true"],
  #directory-filter-form.expanded{
    /* no-op here; we just need a hook to re-show the hidden labels */
  }
  #directory-filter-form[aria-expanded="true"] > .feature-filter,
  #directory-filter-form.expanded > .feature-filter{
    display: flex !important;
  }

  /* ❷ Preferred: animated wrapper for items 6+ when present */
  #more-filter-options{
    max-height: 0;                  /* collapsed */
    opacity: 0;
    visibility: hidden;
    overflow: hidden;               /* hide extra rows */
    will-change: max-height, opacity, visibility;
    transition:
      max-height var(--filters-dur) var(--filters-ease),
      opacity   calc(var(--filters-dur) - .06s) ease,
      visibility 0s var(--filters-dur);
  }
  /* Expanded state toggled by JS (adds .open) */
  #more-filter-options.open{
    max-height: 1200px;             /* generous enough for all options */
    opacity: 1;
    visibility: visible;
    transition:
      max-height var(--filters-dur) var(--filters-ease),
      opacity   calc(var(--filters-dur) - .06s) ease,
      visibility 0s 0s;             /* show immediately on open */
  }
  /* When the extra section is open, ensure all parts of each label render */
  #more-filter-options.open .feature-filter{
    display: flex !important;
  }
  #more-filter-options.open .feature-filter input[type="checkbox"],
  #more-filter-options.open .feature-filter img.icon{
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Toggle button placed below the form (full width, compact) */
  #toggle-more-filters{
    display: block !important;
    width: 100%;
    margin-top: 8px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    height: 42px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: var(--shadow-1);
  }
  #toggle-more-filters:active{ transform: translateY(1px); }
  #toggle-more-filters[aria-expanded="true"]{ background: var(--accent-d); }

  /* Ensure each label rows nicely and never causes horizontal scroll */
  #directory-filter-form .feature-filter{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    min-width: 0;
    word-break: break-word;
  }
}

/* Directory filters: make sure desktop always shows all options */
@media (min-width: 760px){
  /* Desktop-only: always show the toggle as hidden and lay out all options */
  #toggle-more-filters{ display: none !important; }

  /* On desktop, the form should flatten into the grid so labels flow naturally */
  #directory-filter-form{ display: contents !important; }

  /* If #more-filter-options exists, neutralize any collapse logic entirely */
  #more-filter-options{
    display: contents !important;     /* act like it's not there */
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
  }

  /* Ensure every filter label renders inline with checkbox + icon + text */
  #directory-filter-form > .feature-filter{
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
  }

  /* Keep the overall grid tidy on large screens */
  #directory-filters{
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: start;
    overflow: visible; /* no clipping on desktop */
  }
}


/* ---------- VINEYARD DETAIL ---------- */
.vineyard-layout{
  display: grid;
  grid-template-columns: minmax(380px, 1.1fr) minmax(320px, .9fr);
  gap: 32px;
  align-items: start;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}
.vineyard-photos{ display:grid; grid-template-columns:repeat(auto-fit, minmax(220px,1fr)); grid-auto-rows:220px; gap:8px; }
 .vineyard-photos img{ width:100%; height:100%; aspect-ratio:4/3; object-fit:cover; border-radius:var(--radius); }
/* Show only the first 4 inline thumbnails; keep the rest hidden for the lightbox */
.vineyard-photos .vineyard-photo-thumb{ display:block; }
.vineyard-photos .vineyard-photo-thumb:nth-of-type(n+5){ display:none; }
.vineyard-info{ display:flex; flex-direction:column; }
.vineyard-name{ font-size:2em; margin:0 0 8px; }
.vineyard-shortdesc{ font-size:1.1em; color:#555; margin:0 0 14px; }
.vineyard-photos-col {
  display: flex;
  flex-direction: column;
}

.vineyard-gallery-note {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted, #666);
  line-height: 1.3;
}


/* Website & Location rows: unified layout and icon sizing */
.vineyard-website,
.vineyard-location{
  font-size:1em;
  color:#777;
  display:flex;
  align-items:center;
  gap:8px;
  line-height:1.3;
  margin:4px 0;
}

.vineyard-website img.inline-icon,
.vineyard-location img.inline-icon{
  width:18px;
  height:18px;
  flex-shrink:0;
}
/* Train travel row: match website/location styling */
.vineyard-train-travel{
  font-size:1em;
  color:#777;
  display:flex;
  align-items:center;
  gap:8px;
  line-height:1.3;
  margin:4px 0;
}
.vineyard-train-travel img.inline-icon{ width:18px; height:18px; flex-shrink:0; }

/* Inline directions link next to address */
.directions-link{
  margin-left:8px;
  font-size:.95em;
  text-decoration:underline;
  color:var(--accent);
}
.directions-link:hover{ color:var(--accent-d); }

/* Editorial review box */
.vineyard-editorial{
  background:#e6f4ea;              /* light green */
  border:1px solid #cfe6d2;
  border-radius:var(--radius-lg);
  padding:16px 18px;
  margin:10px 0 16px;
}
.vineyard-editorial .section-title{ margin:0 0 8px; }
.vineyard-editorial .editorial-body p{ margin:.4em 0; }
.vineyard-website a{
  color:var(--accent);
  text-decoration:underline;
  overflow-wrap:anywhere; /* prevent long URLs breaking layout */
}

/* Vinebound Verdict: 3-line clamp + toggle */
.editorial-body--clamp{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  line-clamp:3;           /* add this */
  overflow:hidden;
  position:relative;
}

/* subtle fade at bottom when clamped (matches light-green panel) */
.editorial-body--clamp::after{
  content:"";
  position:absolute; left:0; right:0; bottom:0; height:2.4em;
  background:linear-gradient(to bottom, rgba(230,244,234,0), rgba(230,244,234,1));
  pointer-events:none;
}

/* When expanded, remove clamp */
.vineyard-editorial.is-open .editorial-body{
  display:block;
  -webkit-line-clamp:unset;
    line-clamp:unset;       /* add this */
  -webkit-box-orient:unset;
  overflow:visible;
}
.vineyard-editorial.is-open .editorial-body::after{ display:none; }

/* Toggle button */
.editorial-toggle{
  margin-top:8px;
  background:none;
  border:0;
  color:var(--accent-d);
  font-weight:600;
  cursor:pointer;
  padding:0;
  text-decoration:underline;
}
.editorial-toggle:hover{ color:var(--accent); }
.vineyard-divider{ border:none; border-top:1px solid #eee; margin:18px 0; }

.vineyard-features{
  display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px 12px; margin-top:16px;
}
.vineyard-features .feature-item{ display:flex; align-items:center; gap:6px; font-size:.85em; line-height:1; }
.vineyard-features .feature-item img{ width:16px; height:16px; }

/* Nearby */
.vineyard-nearby-list{ display:flex; overflow-x:auto; gap:20px; padding:10px 0; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch; }
.nearby-card{
  flex:0 0 240px; scroll-snap-align:start; border-radius:var(--radius); box-shadow:var(--shadow-1);
  text-align:center; padding:14px; background:#fff;
}
.nearby-card img{ width:100%; height:140px; object-fit:cover; border-radius:10px; margin-bottom:10px; }
.nearby-card h2{ font-size:1em; margin:.2em 0; }
.nearby-card p{ font-size:.85em; margin:2px 0; color:#666; }
.nearby-card .vineyard-icons{ display:flex; justify-content:center; gap:6px; margin-top:6px; flex-wrap:wrap; }
.nearby-card .vineyard-icons span{ font-size:.0em; display:flex; align-items:center; gap:4px; }
.nearby-card .vineyard-icons img{ width:14px; height:14px; }

.vineyard-nearby {
  margin-bottom: 24px; /* creates breathing room before the map */
}

/* Card link hovers (single source of truth) */
.vineyard-card a h2, .nearby-card a h2{ color:black; text-decoration:none !important; }
.vineyard-card a:hover h2, .nearby-card a:hover h2{
  color:var(--accent-d); text-decoration:underline !important; text-decoration-color:var(--gold) !important;
}

/* ---------- GRAPEVINE (list + post) ---------- */
.grape-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(260px,1fr)); gap:24px; margin-top:20px; }
.grape-card{ background:#fff; border:1px solid #eee; border-radius:12px; box-shadow:0 2px 12px rgba(0,0,0,.06); padding:16px; }
.grape-cover img{ width:100%; height:180px; object-fit:cover; border-radius:10px; display:block; }
.grape-title{ margin:.7rem 0 .25rem; font-size:1.25rem; }
.grape-title a{ color:#191919; text-decoration:none; }
.grape-title a:hover{ color:var(--gold); text-decoration:underline; }
.grape-meta{ color:#666; font-size:.95rem; margin:.2rem 0 .6rem; }

/* Post detail header spacing */
.section.section--center .main-title{ line-height:1.15; margin:0 0 .3em; }
.section.section--center .vineyard-shortdesc{ margin:.2em 0 0; color:#666; }

/* Ensure centered sections actually center their headings/meta */
.section.section--center .main-title,
.section.section--center .vineyard-shortdesc {
  text-align:center;
}

/* Post hero image constrained to article width (robust + class if added) */
.section + .section .container > img,
.post-hero{
  width:auto; max-width:var(--post-measure); display:block; margin:0 auto 16px;
  border-radius:12px; box-shadow:var(--shadow-1);
}

/* Grey prose frame like other pages */
.section + .section .container .prose{
  background:transparent; border:0; border-radius:0; padding:0;
}


/* When only one featured vineyard card exists, centre the grid item and cap widths */
.guide-vineyards-grid--single{
  grid-template-columns: 1fr;     /* prevent the single item from stretching full width */
  justify-items: center;          /* center the lone card horizontally */
  align-items: start;
}
.guide-vineyards-grid--single .vineyard-card{
  width: min(420px, 100%);        /* cap card width */
  max-width: 420px;
  margin: 0 auto;
  padding: 16px;                   /* keep padding sensible at narrow widths */
}
.guide-vineyards-grid--single .directory-photo{
  max-height: 240px;              /* keep the image from feeling like a hero */
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ===== Guides index: two columns for theme blocks on desktop only ===== */
@media (min-width: 980px) {
  /* Target the .guide-lists container that holds .guide-theme-block */
  .guides-hub .guide-lists,
  .guide-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    align-items: start;
  }

  /* Make each theme block fill its grid cell */
  .guide-theme-block {
    width: 100%;
    margin: 0;
  }
}

/* Reduce space between heading and text */
.prose h3 {margin-bottom: 1em;
  margin-top: 0.1em; /* instead of 1em+ */
} 
.prose--center{
  text-align: center;
}

/* Align the back-link with the article column */
.section + .section .container > p:last-child{
  max-width:var(--post-measure); margin:24px auto 0;
}

/* Slightly reduce gap between header and article section */
.section.section--center{ padding-bottom:16px; }

/* ---------- ACCESSIBILITY & MISC ---------- */
:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; border-radius:8px; }
@media (prefers-reduced-motion:reduce){ *{ transition:none !important; animation:none !important; } }

/* Cookie banner */
.cookie-banner{
  position:fixed; bottom:18px; left:0; right:0; margin:0 auto; width:fit-content; max-width:94vw; z-index:3000;
  background:#222; color:#fff; padding:16px 24px; border-radius:var(--radius); box-shadow:0 4px 20px rgba(0,0,0,.18);
  display:flex; align-items:center; gap:16px; font-size:1em;
}
.cookie-banner button{
  background:var(--accent); color:#fff; border:none; border-radius:999px; padding:8px 20px;
  font-weight:600; font-size:1em; cursor:pointer; transition:opacity .16s;
}
.cookie-banner button:hover{ opacity:.9; }
.cookie-banner a{ color:#E3BA62; text-decoration:underline; }
.cookie-banner-buttons{ display:flex; align-items:center; gap:8px; }
@media (max-width:600px){
  .cookie-banner-buttons{ flex-direction:column; align-items:stretch; gap:8px; margin-top:12px; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width:900px){
  .site-nav{ flex-direction:column; align-items:flex-start; padding:0 12px; }
  .nav-row{ padding:0 8px; }
  .nav-links{ gap:16px; font-size:1em; }
  .site-hero-text{ margin-left:12px; padding:22px 0 18px; }
}
@media (max-width:768px){
  .nav-row{ padding:0 10px; }
  .burger{ display:flex; order:0; }
  .nav-row .nav-links{
    position:absolute; top:52px; left:0; right:0; background:#23211e; border-radius:9px;
    flex-direction:column; align-items:flex-start; padding:18px 22px; gap:14px; min-width:130px; display:none; z-index:20;
  }
  .nav-row .nav-links.open{ display:flex; }
  .nav-row .logo-link{ order:2; margin-left:16px; margin-right:24px; justify-content:flex-end; }
  .site-hero-text{ margin-left:8px; padding:18px 0 10px; }
}
@media (max-width: 700px){
  .standard-photo{ max-width:98vw; margin-left:0; margin-right:0; }

 /* Make the "page intro" truly centred on mobile */
  .page-intro__inner{
    margin-left:auto !important;
    margin-right:auto !important;
    padding-left: var(--page-pad) !important;
    padding-right: var(--page-pad) !important;
    text-align:center !important;
  }
  .page-intro__inner h1{
    text-align:center !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }
  /* Guides: make list cards use the same 1:3 layout as featured cards (mobile only) */

  .guide-vineyards-grid .vineyard-card,
  .guide-vineyard-list .vineyard-card{
    display:grid;
    grid-template-columns: 1fr 3fr;
    gap:3px;
    align-items:stretch;
    padding:8px;
  }

  .guide-vineyards-grid .vineyard-card .directory-photo,
  .guide-vineyard-list .vineyard-card .directory-photo{
    grid-column:1;
    grid-row:1 / span 2;
    width:100%;
    height:100px;
    object-fit:cover;
    border-radius: var(--radius);
    margin:0;
  }

  .guide-vineyards-grid .vineyard-card h2,
  .guide-vineyard-list .vineyard-card h2{
    margin:0;
    font-size: clamp(13px, 1.5vw, 18px);
  }

  .guide-vineyards-grid .vineyard-card p,
  .guide-vineyard-list .vineyard-card p{
    margin:.25rem 0 0;
    font-size:.85rem;
    line-height:1.5;
  }


.card-modal{
    position:fixed; inset:0; z-index:4200;
    display:flex; align-items:center; justify-content:center;
    background: rgba(255,255,255,.78);           /* match .lightbox */
    backdrop-filter: blur(2px);
    opacity:0; pointer-events:none;
    transition: opacity .55s ease;
  }
  .card-modal.open{ opacity:1; pointer-events:auto; }

  .card-modal__panel{
    max-width: 92vw; max-height: 84vh; overflow:auto;
    background:#fff; color:#191919;
    border-radius: var(--radius);
    box-shadow: var(--shadow-2);
    padding: 14px 16px 16px;
    transform: translateY(8px) scale(.97);
    opacity:0;
    clip-path: inset(0 0 100% 0);               /* unravel up, like lightbox */
    transition:
      transform .7s cubic-bezier(.2,.8,.2,1),
      opacity   .7s cubic-bezier(.2,.8,.2,1),
      clip-path .7s cubic-bezier(.2,.8,.2,1);
  }
  .card-modal.open .card-modal__panel{
    transform: translateY(0) scale(1);
    opacity:1;
    clip-path: inset(0 0 0 0);
  }

  .card-modal__title{
    margin:0 0 6px;
    font-weight:700;
    font-size:1.05rem;
    line-height:1.2;
  }
  .card-modal__body{
    font-size:.95rem; line-height:1.55; color:#555;
    white-space: pre-line;                      /* preserve line breaks */
  }

  .card-modal__close{
    position:absolute; top:10px; right:10px;
    width:36px; height:36px; border:0; border-radius:999px;
    display:grid; place-items:center; cursor:pointer;
    background: rgba(0,0,0,.18); color:#fff; font-size:22px; line-height:1;
    box-shadow: 0 2px 10px rgba(0,0,0,.35);
  }
  .card-modal__close:hover{ background: rgba(0,0,0,.28); }

  /* Stretch lede copy to full page width on guides */
  .container--page .lede,
  .guide-intro.lede{
    max-width:none !important;
    width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
    text-align:left;              /* feels better for long lines on mobile */
  }


  /* Stack info ABOVE photos */
  .vineyard-layout{
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "info"
      "photos";
    gap: 16px;
  }
  .vineyard-info{ grid-area: info; }
  .vineyard-photos, .vineyard-photos-col{ grid-area: photos; }

  /* Base: two thumbs per row */
  .vineyard-photos{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 140px;
    gap: 8px;
  }

  /* Exactly 1 image → full width, taller */
  .vineyard-photos:has(.vineyard-photo-thumb:nth-of-type(1):last-of-type){
    grid-template-columns: 1fr;
    grid-auto-rows: 180px;
  }

  /* Exactly 2 images → halves (already default) */
  .vineyard-photos:has(.vineyard-photo-thumb:nth-of-type(2):last-of-type){
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 140px;
  }

  /* 3 or 4 images visible → quarters */
  .vineyard-photos:has(.vineyard-photo-thumb:nth-of-type(3):last-of-type),
  .vineyard-photos:has(.vineyard-photo-thumb:nth-of-type(4):last-of-type),
  .vineyard-photos:has(.vineyard-photo-thumb:nth-of-type(4)){
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 90px;
  }

  .vineyard-photos img{
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius: var(--radius);
  }
}
/* end mobile (max-width:700px) */

/* Desktop resets to prevent mobile layout leaking upward */
@media (min-width: 701px){
  /* Restore two-column layout (photos left, info right) */
  .vineyard-layout{
    grid-template-columns: minmax(380px, 1.1fr) minmax(320px, .9fr);
    grid-template-areas: none;
    gap: 32px;
  }

  /* Ensure columns map as normal on desktop */
  .vineyard-info{ grid-area: auto; }
  .vineyard-photos, .vineyard-photos-col{ grid-area: auto; }

  /* Restore desktop grid for thumbnails */
  .vineyard-photos{
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    grid-auto-rows: 220px;
    gap: 8px;
  }
  .vineyard-photos img{ height: 100%; object-fit: cover; }

  .vineyard-photos-col{ grid-column: 1 / 2; grid-row: 1; }
  .vineyard-info{ grid-column: 2 / 3; grid-row: 1; align-self: start; }

  /* Keep the thumbnails tidy in the left column on desktop */
  .vineyard-photos{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 200px;
  }
}
@media (max-width:600px){
  .site-hero{ min-height:120px; }
  /* header logo positioning/sizing handled by new header rules; keep it snug to the right */
  .site-hero .logo-link{ right:auto; top:auto; transform:none; justify-self:end; margin-right:8px; position:static; }
  /* ensure mobile logo size is the smaller value */
  .site-hero .logo-link>img.site-logo,
  .site-hero .logo-link>svg.site-logo,
  .site-hero .logo-link>png.site-logo{ width:50px; height:50px; }
  .site-hero-text{ padding-right:var(--hero-text-pr-mobile); }
  .site-hero-text .subheading{
    font-size:1.05em; line-height:1.25; max-width:var(--hero-subheading-mobile); hyphens:auto;
  }
  .site-hero-text h1{ font-size:1.6em; }
}
/* === Directory Buttons (Reset + Load More) === */
/* Load More + Reset buttons */
.btn,
.load-more-btn {
  background-color: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn:hover,
.load-more-btn:hover {
  background-color: var(--accent-d);
}

.btn:disabled,
.load-more-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}
.load-more-btn:hover:not(:disabled) {
  background-color: var(--accent-d); /* darker hover: # */
}

.load-more-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Guide pages: centre & space the "Load more" button under the grid */
.guide-load-more{
  text-align:center;
  margin-top:28px;     /* sit a little lower than the cards */
}
#load-more-guide-vineyards{
  display:inline-block; /* enables horizontal centring inside .guide-load-more */
}


/* ---------- COMPONENT: VINEYARD LIGHTBOX ---------- */
.vineyard-photo-thumb{ cursor: zoom-in; }

/* Keep element in DOM so we can animate open/close */
#lightbox, .lightbox{
  position: fixed; inset: 0; z-index: 4000;
  display: flex; /* always flex; control visibility via opacity/pointer-events */
  align-items: center; justify-content: center;
  background: rgba(255,255,255,.78);  /* translucent backdrop */
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity .55s ease; /* slower backdrop fade */
}

/* Optional hard hide if someone applies [hidden] */
#lightbox[hidden], .lightbox[hidden]{ display: none !important; }

/* Visible state */
#lightbox.open, .lightbox.open{ opacity: 1; pointer-events: auto; }

/* Image entrance: vertical unravel via clip-path + gentle lift */
#lightbox .lightbox-image, .lightbox .lightbox-image{
  max-width: 90vw; max-height: 90vh; object-fit: contain;
  border-radius: var(--radius); box-shadow: var(--shadow-2);
  background: #111; /* avoids flash while loading */
  transform: translateY(8px) scale(.97);
  opacity: 0;
  /* Start fully clipped at bottom, then reveal upward */
  clip-path: inset(0 0 100% 0);
  will-change: transform, opacity, clip-path;
  transition:
    transform .7s cubic-bezier(.2,.8,.2,1),
    opacity   .7s cubic-bezier(.2,.8,.2,1),
    clip-path .7s cubic-bezier(.2,.8,.2,1);
}
#lightbox.open .lightbox-image, .lightbox.open .lightbox-image{
  transform: translateY(0) scale(1);
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

/* Controls */
#lightbox .lightbox-prev, #lightbox .lightbox-next,
.lightbox .lightbox-prev, .lightbox .lightbox-next{
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 999px;
  display: grid; place-items: center; cursor: pointer;
  border: 0; background: rgba(0,0,0,.18); color: #fff; font-size: 26px; line-height: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
#lightbox .lightbox-prev, .lightbox .lightbox-prev{ left: 20px; }
#lightbox .lightbox-next, .lightbox .lightbox-next{ right: 20px; }
#lightbox .lightbox-prev:hover, #lightbox .lightbox-next:hover,
.lightbox .lightbox-prev:hover, .lightbox .lightbox-next:hover{ background: rgba(0,0,0,.28); }

#lightbox .lightbox-close, .lightbox .lightbox-close{
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(0,0,0,.18); color: #fff; font-size: 26px; line-height: 1;
  border: 0; box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
#lightbox .lightbox-close:hover, .lightbox .lightbox-close:hover{ background: rgba(0,0,0,.28); }

/* Lock background when open */
body.has-lightbox{ overflow: hidden; }

@media (max-width: 600px){
  #lightbox .lightbox-prev, #lightbox .lightbox-next,
  .lightbox .lightbox-prev, .lightbox .lightbox-next{ width: 40px; height: 40px; font-size: 22px; }
  #lightbox .lightbox-prev, .lightbox .lightbox-prev{ left: 10px; }
  #lightbox .lightbox-next, .lightbox .lightbox-next{ right: 10px; }
  #lightbox .lightbox-close, .lightbox .lightbox-close{ width: 36px; height: 36px; font-size: 22px; top: 10px; right: 10px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  #lightbox, .lightbox{ transition: none !important; }
  #lightbox .lightbox-image, .lightbox .lightbox-image{ transition: none !important; clip-path: none !important; }
}


/* --- Header logo size override (keep compact) --- */
.site-hero .hero-band--top .logo-link>img.site-logo,
.site-hero .hero-band--top .logo-link>svg.site-logo,
.site-hero .hero-band--top .logo-link>png.site-logo
{ width:70px; height:70px; }
@media (max-width:600px){
  .site-hero .hero-band--top .logo-link>img.site-logo,
  .site-hero .hero-band--top .logo-link>svg.site-logo,
  .site-hero .hero-band--top .logo-link>png.site-logo{ width:50px; height:50px; }
}
/* --- Force Space Grotesk on header title (beats legacy rules) --- */
.site-hero .hero-title,
.site-hero .hero-title a{
  font-family:'Space Grotesk', Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-weight:700 !important;
}
/* === Header fixes: desktop tagline & burger visibility === */
@media (min-width: 900px){
  /* Hide burger on desktop and ensure 3-col grid */
  .site-hero .burger{ display: none !important; }
  .site-hero .hero-band--top{
    display:grid;
    grid-template-columns: 1fr auto 1fr; /* left: tagline, centre: H1, right: logo */
    column-gap: 16px;
  }
  /* Force the desktop tagline to render in the left cell */
  .site-hero .hero-band--top .hero-subheading--desktop{
    display: block !important;
    grid-column: 1;
    justify-self: start;
    align-self: end;
    color: #191919;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.35;
    max-width: 40ch;
    text-shadow: 0 1px 0 rgba(255,255,255,.65);
    z-index: 3;
  }
}

/* Mobile: add breathing room under the menu when it opens */
@media (max-width: 768px){
  .site-hero .hero-nav .nav-links.is-open + .hero-subheading--mobile,
  .site-hero .hero-nav .nav-links.open + .hero-subheading--mobile,
  .site-hero:has(.burger[aria-expanded="true"]) .hero-subheading--mobile{
    margin-top: 8px;
  }
}

/* === Mobile dropdown panel (outside header) === */

/* Base panel: hidden by default, animates open by changing max-height/opacity */
.mobile-nav-panel{
  position: fixed;               /* sits over the header and main */
  top: 0; left: 0; right: 0;
  z-index: 5000;                 /* above header/logo */
  background: rgba(231,217,210,0.98); /* #E7D9D2 */
  border-bottom: 1px solid rgba(0,0,0,.15);
  overflow: hidden;
  pointer-events: none;
  max-height: 0;                 /* collapsed */
  opacity: 0;                    /* fade in */
  transform-origin: 20px 0;      /* feels like from burger area */
  clip-path: inset(0 0 100% 0);  /* unravel down */
  /* mirror open/close timing so it doesn't "snap" on close */
  transition:
    clip-path .40s cubic-bezier(.2,.8,.2,1),
    max-height .40s cubic-bezier(.2,.8,.2,1),
    opacity   .40s cubic-bezier(.2,.8,.2,1);
  will-change: clip-path, max-height, opacity;
  padding: 0 16px;               /* vertical padding comes with open state */
  font-family: inherit;
}

/* The content inside the panel */
.mobile-nav .mobile-nav-links{
  list-style: none;
  padding: 72px 0 10px;          /* leave space for header area underneath */
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mobile-nav .mobile-nav-links a{
  color: #191919;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 4px 2px;
}
.mobile-nav .mobile-nav-links a:hover{ text-decoration: underline; }

.mobile-nav-panel .mobile-subheading{
  padding: 6px 0 16px;
  color: #191919;
  font-size: .96rem;
  line-height: 1.35;
  max-width: 40ch;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
}

/* Only show this panel on small screens; hide the header nav there */
@media (max-width: 768px){
  .site-hero .hero-nav{ display: none !important; }   /* hide header nav on mobile */
  .mobile-nav-panel{ display: block; }

  /* OPEN STATES — any of these open the fixed panel */
  header.site-hero:has(.hero-nav .nav-links.open) + .mobile-nav-panel,
  header.site-hero:has(.hero-nav .nav-links.is-open) + .mobile-nav-panel,
  header.site-hero:has(.burger[aria-expanded="true"]) + .mobile-nav-panel,
  .mobile-nav-panel.is-open{
    max-height: 75vh;             /* allow to spill over header into page */
    opacity: 1;
    clip-path: inset(0 0 0 0);
    pointer-events: auto;
  }
}

/* On larger screens, keep the panel collapsed/hidden entirely */
@media (min-width: 769px){
  .mobile-nav-panel{ display: none !important; }
}

/* Minimise button (top-right of mobile panel) */
 .mobile-nav-close{
  position: absolute;
  top: 8px; left: 8px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: transparent !important;
  color: #191919;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  font-size: 24px; line-height: 1;
  cursor: pointer;
}
.mobile-nav-close:hover{ opacity: .8; }
.mobile-nav-close:active{ transform: translateY(1px); }
.mobile-nav-close:focus-visible{ outline: 2px solid #191919; outline-offset: 2px; }

/* Give the list a touch more top padding so it clears the button comfortably */
.mobile-nav .mobile-nav-links{ padding-top: 56px; }
/* --- Mobile panel: prevent horizontal scroll & force safe wrapping --- */
@media (max-width: 768px){
  .mobile-nav-panel{
    overflow-x: hidden;          /* no horizontal scroll inside the panel */
    width: 100%;                 /* avoid 100vw scrollbar edge cases */
  }
  .mobile-nav .mobile-nav-links{
    width: 100%;
    max-width: 100%;
  }
  .mobile-nav-panel .mobile-subheading{
    max-width: 100%;
    overflow-wrap: anywhere;     /* wrap long words/phrases safely */
    word-break: normal;
    hyphens: auto;
  }
}
/* --- Mobile panel overflow hardening --- */
@media (max-width: 768px){
  /* Ensure no horizontal scroll when the panel is open */
  body.has-mobile-panel{ overflow-x: hidden; }

  /* Safety: nothing inside the panel should exceed viewport width */
  .mobile-nav-panel, .mobile-nav-panel *{
    max-width: 100%;
  }
  .mobile-nav-panel .mobile-subheading{
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
/* =========================
   CONSISTENCY UTILITIES: page frame, spacing, containers
   ========================= */
:root{
  --page-max: 1120px;                 /* unified content width */
  --page-pad: 5px;                   /* horizontal page padding */
  --page-gap-lg: clamp(20px,3vw,32px);
  --page-gap-xl: clamp(28px,4vw,48px);
  --frame-bg: #f6f6f6;                /* soft grey panel */
  --frame-border: #e6e6e6;
    --measure-narrow: 820px;
}

.container--narrow{
  max-width: var(--measure-narrow);
  margin-left: auto;
  margin-right: auto;
}

/* Reusable page intro frame (sits directly under header) */
.page-intro{
  background: transparent;           /* panel styling moves to inner for rounded corners */
  border: 0;
}
.page-intro__inner{
  max-width: 820px;                 /* use a fixed text column width */
  width: 100%;
  margin-left: auto;                /* center the block */
  margin-right: auto;
  padding: var(--page-gap-xl) var(--page-pad) var(--page-gap-lg);
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  text-align: center;               /* center the intro copy */
}

.page-intro__inner > *{
  margin-left: auto;
  margin-right: auto;
}
.page-intro h1{
  margin: 0 0 .3em;
  line-height: 1.15;
}
.page-intro p.lede{
  color:#57505c;
}


.lede {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 1.5em;
}

/* Guide intro under featured cards: stretch to card width and left-align */
.guide-intro.lede{
  max-width: none !important;
  width: 100%;
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

/* Optional alternative frame tone */

.panel--beige{
  background:#F5EEEA;
  border-color:#E7D9D2;
}
/* When used on page intro, style the inner panel */
.page-intro.panel--beige .page-intro__inner{
  background:transparent;
  border:0;
  border-radius:0;
}



/* Tokenised container helper (opt-in) */
.container--page{
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

/* === Mobile dropdown panel: round bottom corners === */
.mobile-nav-panel{
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

body::before{
  content:"";
  position: fixed;          /* fills the viewport even while scrolling */
  top:0; bottom:0;
  left:50%; transform:translateX(-50%);
  width: min(calc(var(--page-max) + 120px), 92vw); /* tweak +120px to taste */
  background: var(--frame-bg);                     /* your existing soft grey */
  z-index: -1;                                     /* sit behind all content */
  pointer-events: none;
}
.section--std:first-of-type{
  padding-top: var(--page-gap-md); /* smaller than default */
}
@media (max-width: 768px){
  body::before{
    width: 100vw;           /* mobile edge-to-edge grey */
  }
}

/* Vineyard Guides*/
.guides-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px,1fr));
  gap:24px;
}
.guide-card{
  display:block;
  background:#fff;
  border:1px solid #e8e8e8;
  border-radius:12px;
  box-shadow:0 2px 10px rgba(0,0,0,.06);
  padding:14px;
  text-decoration:none;
  color:#191919;
  transition:box-shadow .18s, transform .12s;
}
.guide-card:hover{
  box-shadow:0 6px 18px rgba(0,0,0,.12);
  transform:translateY(-1px);
}
.guide-card img{
  width:100%; height:160px; object-fit:cover; border-radius:8px; margin-bottom:10px;
}
.guide-vineyards-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px; /* was 24px */
}
.guide-vineyard-list{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
/* Tighter guide cards + guarantee 3-up on wide screens */
.guide-vineyards-grid .vineyard-card,
.guide-vineyard-list .vineyard-card{
  padding: 16px;
}
.guide-vineyards-grid .directory-photo,
.guide-vineyard-list .directory-photo{
  margin-bottom: 8px;            /* was 10px */
  aspect-ratio: 3 / 2;           /* a touch shorter for tighter rows */
}
.guide-vineyards-grid .vineyard-card h2, .guide-vineyard-list .vineyard-card h2{
  margin-top: 8px;               /* was 10px */
}

/* On sufficiently wide viewports, lock to exactly 3 columns */
@media (min-width: 980px){
  .guide-vineyards-grid{
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Keep guide card text dark on hover/focus; don't adopt global link colour */
.guide-card,
.guide-card:visited{
  color:#191919;
  text-decoration:none;
}
.guide-card:hover,
.guide-card:focus{
  color:#191919;
  text-decoration:none;
}
.guide-card h3,
.guide-card p{
  color:#191919;
}

/* --- Vineyard cards inside Guides: clamp the blurb to 2 lines with ellipsis --- */
.vineyard-shortdesc--small {
  font-size: 0.75em;
  line-height: 1.45;
}

.clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;   /* show 4 lines */
  line-clamp: 4;
  overflow: hidden;
  text-overflow: ellipsis;  /* adds … on supported engines */
  word-break: break-word;
}

a.vineyard-card {
  text-decoration: none;     /* remove underline from everything by default */
  color: #191919;            /* keep link text black (not green) */
}
a.vineyard-card:hover,
a.vineyard-card:focus {
  color: #191919;            /* prevent global link hover colour */
}

a.vineyard-card h2 {
  text-decoration: underline;
  text-decoration-color: #191919;
  text-decoration-thickness: from-font;
}
a.vineyard-card:hover h2,
a.vineyard-card:focus h2 {
  text-decoration: underline;
  text-decoration-color: #191919; /* stay black on hover */
}


/* --- Featured Vineyards (on Guide pages) ------------------------------ */
/* Wrapper: only affects featured list at the top of Guide pages */
.guide-featured-list{
  display: grid;
  grid-auto-rows: auto;
  gap: 16px;                           /* spacing between cards */
  margin: 8px 0 22px;
}

/* Full-width card with left image / right text (unique to featured) */
.featured-card{
  display: grid;
  grid-template-columns: 1fr 3fr;      /* ~25% image / 75% text on mobile */
  gap: 12px;
  align-items: start;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  padding: 12px;
  text-decoration: none;               /* no underlines across whole card */
  color: #191919;
  overflow: hidden;
}

/* Make sure featured links don’t pick up global link colour/underline */
.featured-card a{
  color: #191919;
  text-decoration: none;
}
.featured-card a:hover{
  color: var(--accent-d);
  text-decoration: none;
}

/* Desktop: image a bit larger (~33%) */
@media (min-width: 980px){
  .featured-card{
    grid-template-columns: 1fr 2fr;    /* ~33% / 67% */
    gap: 18px;
    padding: 14px;
  }
}

/* Media (left image) */
.featured-card__media{
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  align-self: start;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;             /* fixed, slimmer card height on desktop */
}
.featured-card__img{
  width: 100%;
  height: 100%;
  object-fit: cover;         /* keep image static when card expands */
  display: block;
}

/* Content (right side) */
.featured-card__content{
  display: grid;
  grid-template-rows: auto auto auto;   /* title / description / toggle */
  align-content: start;
  gap: 6px;
}
.featured-card__title{
  margin: 0;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.2;
  font-weight: 700;                    /* bold title */
}
.featured-card__title a{
  color: #191919;
  text-decoration: underline;          /* only title underlined */
  text-decoration-color: #191919;
  text-underline-offset: 2px;
}
.featured-card__title a:hover{
  color: var(--accent-d);
  text-decoration-color: var(--accent-d);
}

/* Description: show several lines; expand via existing .editorial-toggle JS */

.featured-card__desc.editorial-body{
  background: transparent;
  padding: 0;
  color: #555;
  font-size: 0.85rem;
  line-height: 1.55;
  white-space: pre-line;              /* preserve CSV line breaks */
}
.featured-card__desc.editorial-body--clamp{
  -webkit-line-clamp: 6;               /* more room than the small cards */
  line-clamp: 6;
}
.featured-card__desc.editorial-body--clamp::after{
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
}

/* Preserve CSV line breaks in small vineyard cards too */
.guide-vineyards-grid .vineyard-card .vineyard-shortdesc,
.guide-vineyard-list .vineyard-card .vineyard-shortdesc{
  white-space: pre-line;
}

@media (max-width: 700px){
  .featured-card{ grid-template-columns: 1fr 3fr; gap: 10px; padding: 12px; }
  .featured-card__media{ height: 100px; }
  .featured-card__desc.editorial-body--clamp{
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

/* “Read more” toggle alignment */
.featured-card .editorial-toggle{
  justify-self: start;
  margin-top: 2px;
}

/* Single featured card: keep it from feeling like a page hero */
.guide-featured-list:has(.featured-card:nth-child(1):last-child){
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Related guides (reading-list style, no cards) --- */
.related-guides{
  margin-top: 28px;
}
.related-guides__title{
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 26px);
  margin: 0 0 10px;
}
.related-guides__list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
.related-guides__item{
  margin: 0;
  padding: 0;
}
.related-guides__link{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 2px;
  text-decoration: none;
  color: #191919;
  border-bottom: 1px solid #eee;
}
.related-guides__link:hover .related-guides__name{
  text-decoration: underline;
  text-decoration-color: #191919;
}
.related-guides__thumb{
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 auto;
  background: #f3f3f3;
  box-shadow: var(--shadow-1);
}
.related-guides__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.related-guides__text{
  display: grid;
  gap: 2px;
  min-width: 0; /* allow ellipsis */
}
.related-guides__name{
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
.related-guides__intro{
  color: #666;
  font-size: 0.92rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;   /* one-line teaser */
  line-clamp: 1;
  overflow: hidden;
}
.related-guides__chev{
  font-size: 20px;
  opacity: .5;
  padding-left: 6px;
}
@media (min-width: 900px){
  .related-guides__thumb{ width: 64px; height: 64px; border-radius: 10px; }
  .related-guides__intro{
    -webkit-line-clamp: 2; /* show 2 lines on wider screens */
    line-clamp: 2;
  }
  .related-guides__list{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px; /* a touch more breathing room between columns */
    row-gap: 10px;
  }
  .related-guides__name{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* at most two lines on desktop */
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
/* Guide pages: prevent horizontal scroll on small screens */
@media (max-width: 768px){
  .container--page{ overflow-x: hidden; }
  .guide-featured-list{ overflow-x: hidden; }
}
/* === Guides: keep intro copy as wide as the featured cards (single source) === */
.container--page .guide-intro{
  max-width: none !important;  /* full container width */
  width: 100%;
  display: block;
  margin: 8px 0 24px;          /* space from featured cards above */
}



/* === Guides: body intro should match featured cards width === */
.guide-body-intro .container--narrow{
  max-width: var(--page-max); /* override the narrow container to span the page width */
}
.guide-body-intro .lede{
  max-width: none;    /* do not clamp text measure */
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  text-align: left;   /* keep copy left-aligned under the cards */
}
/* =========================
   GUIDES INDEX: Featured strip + vertical lists
   ========================= */

/* --- Featured guides (index page) --- */
/* Supports: .guides-featured, .guides-featured-strip, .guides-featured-cards */
.guides-featured,
.guides-featured-strip,
.guides-featured-cards{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2-up on mobile */
  gap: 14px;
  align-items: stretch;
}
@media (min-width: 980px){
  .guides-featured,
  .guides-featured-strip,
  .guides-featured-cards{
    grid-template-columns: repeat(3, 1fr);        /* 3-up desktop */
  }
}

/* Make these cards visually smaller than normal guide cards */
.guides-featured .guide-card,
.guides-featured-strip .guide-card,
.guides-featured-cards .guide-card,
.guides-featured .guide-featured-card,
.guides-featured-strip .guide-featured-card,
.guides-featured-cards .guide-featured-card{
  padding: 10px;
  border-radius: 10px;
}
.guides-featured .guide-card img,
.guides-featured-strip .guide-card img,
.guides-featured-cards .guide-card img,
.guides-featured .guide-featured-card img,
.guides-featured-strip .guide-featured-card img,
.guides-featured-cards .guide-featured-card img{
  width: 100%;
  height: 120px;              /* smaller thumbnail */
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.guides-featured .guide-card h3,
.guides-featured-strip .guide-card h3,
.guides-featured-cards .guide-card h3,
.guides-featured .guide-featured-card h3,
.guides-featured-strip .guide-featured-card h3,
.guides-featured-cards .guide-featured-card h3{
  font-size: 1rem;            /* compact titles so 3-up fits nicely */
  line-height: 1.25;
  margin: 6px 0 0;
}

/* --- Guides lists (index page) ---
   Expect markup like:
   <section class="guides-index">
     <div class="guide-group">
       <h3 class="guide-group__title"><a>Best … in UK</a></h3>
       <ul class="guide-group__list"> <li><a>Devon</a></li> … </ul>
     </div>
   </section>
*/
.guides-index{ 
  --guide-list-gap: 18px; 
}
.guide-group{ 
  margin: 10px 0 18px; 
}
.guide-group__title{ 
  margin: 0 0 6px; 
  font-size: clamp(18px, 2.2vw, 22px); 
}
.guide-group__title a{ 
  color: #191919; 
  text-decoration: none; 
}
.guide-group__title a:hover{ text-decoration: underline; }

/* Vertical list that flows into columns on wide screens */
.guide-group__list{
  list-style: none;
  padding: 0;
  margin: 0;
  column-gap: var(--guide-list-gap);
}
.guide-group__list li{ break-inside: avoid; margin: 0 0 6px; }
.guide-group__list a{ color:#191919; text-decoration: none; }
.guide-group__list a:hover{ text-decoration: underline; }

/* Column counts by viewport */
@media (min-width: 1100px){
  .guide-group__list{ column-count: 5; }
}
@media (min-width: 760px) and (max-width: 1099.98px){
  .guide-group__list{ column-count: 3; }
}
@media (max-width: 759.98px){
  .guide-group__list{ column-count: 2; }
}

/* Ensure long county names wrap cleanly and never cause horizontal scroll */
.guide-group__list a{ 
  white-space: normal; 
  overflow-wrap: anywhere; 
} 
  /* === Guides (MOBILE ONLY) final overrides === */
@media (max-width: 700px){

  /* 1) Page intro truly centred */
  .page-intro__inner{
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: var(--page-pad) !important;
    padding-right: var(--page-pad) !important;
    text-align: center !important;
  }
  .page-intro__inner h1{
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* 2) Lede spans full width under the featured cards */
  .guide-body-intro > .container--page.container--narrow{
    max-width: 100% !important;
    width: 100% !important;
    padding-left: var(--page-pad) !important;
    padding-right: var(--page-pad) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .guide-body-intro > .container--page.container--narrow > .lede{
    max-width: none !important;
    width: 100% !important;
    text-align: left !important; /* reads better for long copy on mobile */
  }

  /* 3) Make guide list cards match the featured-card layout */
  /* Your list card is an &lt;a class="vineyard-card"&gt;… */
  .guide-vineyard-list a.vineyard-card{
    display: grid !important;
    grid-template-columns: 1fr 3fr;
    gap: 10px;
    align-items: stretch;
    padding: 6px;                   /* match featured-card padding */
    border-radius: var(--radius-lg);
    background: #fff;
  }
  .guide-vineyard-list a.vineyard-card .directory-photo{
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
    margin: 0 !important;
  }

  .guide-vineyard-list a.vineyard-card h2{ grid-column:2; grid-row:1; }
  .guide-vineyard-list a.vineyard-card p { grid-column:2; grid-row:2; }

  .guide-vineyard-list a.vineyard-card h2{
    grid-column: 2;
    margin: 0;
    font-size: clamp(13px, 1.5vw, 18px);
    line-height: 1.2;
  }
  .guide-vineyard-list a.vineyard-card p{
    grid-column: 2;
    margin: .25rem 0 0;
    font-size: .85rem;
    line-height: 1.5;
  }
}
/* ==== Fix: Mobile page-intro centering overflow (border-box) ==== */
@media (max-width: 700px){
  .page-intro__inner{
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: var(--page-pad) !important;
    padding-right: var(--page-pad) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* --- Mobile fixes for guide intro centering --- */
@media (max-width: 700px) {
  /* Make the outer intro wrapper neutral */
  .page-intro.frame--flush-bottom {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* The actual intro block: enforce symmetrical gutters */
  .page-intro__inner {
    max-width: 60ch;               /* or whatever your narrow width is */
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important; /* match your site gutter */
    padding-right: 20px !important;
    box-sizing: border-box;
  }

  /* The lede wrapper also needs balanced gutters */
  .guide-body-intro .container--page.container--narrow {
    padding-left: 4px !important;
    padding-right: 4px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
  }

  /* Let the lede text truly span the available width */
  .guide-body-intro .lede {
    max-width: none;
    width: 100%;
  }
}



/* === FINAL OVERRIDE: Guides lede full-width on mobile === */
@media (max-width: 700px){
  /* Expand the container that wraps the lede under guide-body-intro */
  body .guide-body-intro > .container--page.container--narrow{
    max-width: none !important;
    width: 100% !important;
    padding-left: var(--page-pad) !important;
    padding-right: var(--page-pad) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }
  /* Make the lede paragraph itself full-width */
  body .guide-body-intro > .container--page.container--narrow > .lede{
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: left !important;
    display: block !important;
  }
}
/* === Hard override: Guide lede full-width on mobile (beats legacy rules) === */
@media (max-width:700px){
  body .guide-body-intro > .container--page.container--narrow{
    max-width: none !important;
    width: 100% !important;
    padding-left: var(--page-pad) !important;
    padding-right: var(--page-pad) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }
  body .guide-body-intro > .container--page.container--narrow > .lede{
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: left !important;
    display: block !important;
  }
}

/* Safety: hide injected card modal unless explicitly opened */
.card-modal:not(.open) {
  display: none !important;
}
/* Ensure close button is never visible unless modal is open */
.card-modal:not(.open) .card-modal__close {
  display: none !important;
}
/* Footer safety: never overflow small screens */
.site-footer__bar, .footer-bar{ overflow-x:hidden; }