/**
 * Exist Green — Visit Us page styles
 *
 * Scoped to the `.eg-visit-page` wrapper used by
 * templates/visit-us-page.html. Enqueued conditionally in
 * existgreen-custom.php on the Visit Us page.
 *
 * Aligns with the shared homepage + about page design system:
 *   - Brand green #2c5e54 (text + small accents only, never fills)
 *   - Sage #a5ccbc / mint #bfe2dc (borders, pills, button gradients)
 *   - Soft sage band #e8f0ed (section backgrounds)
 *   - Card white #fff on sage backgrounds
 *   - 6px card/button radius, 12px larger panels
 *   - Brandon Grotesque inherited from theme (no font overrides)
 *   - Body type 1rem (16px), line-height 1.6
 *   - Hierarchy through color + weight, not size
 */


/* ============================================================
   ROOT + TYPE
   ============================================================ */
.eg-visit-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
  color: #3a4a43;
  font-size: 1rem;
  line-height: 1.6;
  box-sizing: border-box;
}

.eg-visit-page *,
.eg-visit-page *::before,
.eg-visit-page *::after {
  box-sizing: inherit;
}

.eg-visit-page p {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #3a4a43;
}

.eg-visit-page p:last-child {
  margin-bottom: 0;
}

.eg-visit-page a {
  color: #2c5e54;
  text-decoration: none;
  border-bottom: 1px solid rgba(44, 94, 84, 0.35);
  transition: border-color 0.15s ease;
}

.eg-visit-page a:hover {
  border-bottom-color: #2c5e54;
}

/* ---- Headings — restrained scale, color + weight for hierarchy ---- */
.eg-visit-title {
  font-size: clamp(1.75rem, 3.2vw, 2.1rem);
  color: #2c5e54;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 0.4rem;
  text-align: center;
}

.eg-visit-tagline {
  font-size: 1.05rem;
  line-height: 1.55;
  color: #5a6b65;
  font-style: italic;
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2rem;
  padding: 0 0.5rem;
}

.eg-visit-page h2 {
  font-size: 1.25rem;
  color: #2c5e54;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  margin: 2.25rem 0 1rem;
  text-align: center;
  display: block;
}

/* Optional centered underline on H2s, matching .eg-section__header--center */
.eg-visit-page h2 {
  position: relative;
  padding-bottom: 0.4rem;
}

.eg-visit-page h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: #a5ccbc;
  border-radius: 999px;
  margin: 0.4rem auto 0;
}

.eg-visit-page h3 {
  font-size: 1.125rem;
  color: #2c5e54;
  font-weight: 700;
  line-height: 1.3;
  margin: 1.5rem 0 0.5rem;
}


/* ============================================================
   HERO BLOCK (photo + address/hours/CTA two-column)
   ============================================================ */
.eg-visit-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: center;
  background: #e8f0ed;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 0 0 2.5rem;
}

.eg-visit-hero__img {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.08);
  max-height: 360px;
}

.eg-visit-hero__img img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  max-height: 360px;
}

.eg-visit-hero__facts {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.eg-visit-hero__address {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2c5e54;
  margin: 0;
}

.eg-visit-hero__city {
  font-size: 1rem;
  color: #3a4a43;
  margin: 0 0 1rem;
}

.eg-visit-hero__hours-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5a6b65;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.eg-visit-hero__hours {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  font-size: 0.96rem;
  color: #3a4a43;
  max-width: 320px;
}

.eg-visit-hero__hours li {
  padding: 0.25rem 0;
  border-bottom: 1px dotted rgba(44, 94, 84, 0.18);
}

.eg-visit-hero__hours li:last-child {
  border-bottom: none;
}

.eg-visit-hero__hours li.closed {
  color: #5a6b65;
  font-style: italic;
}

.eg-visit-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.4rem 0 1rem;
}

.eg-visit-hero__footnote {
  font-size: 0.78rem;
  color: #5a6b65;
  letter-spacing: 0.02em;
  margin: 0;
}


/* ============================================================
   BUTTONS (mint gradient, 6px radius, matching .eg-btn family)
   ============================================================ */
.eg-visit-btn,
.eg-visit-btn:link,
.eg-visit-btn:visited,
a.eg-visit-btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #2c5e54 !important;
  background: linear-gradient(135deg, #d8ede7 0%, #bfe2dc 60%, #a5ccbc 100%);
  border: 1px solid #a5ccbc;
  border-radius: 6px;
  text-decoration: none !important;
  transition: transform 150ms ease, box-shadow 150ms ease;
  line-height: 1.25;
}

.eg-visit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(44, 94, 84, 0.15);
  color: #1f3a33 !important;
}

.eg-visit-btn--ghost,
.eg-visit-btn--ghost:link,
.eg-visit-btn--ghost:visited,
a.eg-visit-btn--ghost {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #2c5e54 !important;
  background: #f5f9f6;
  border: 1px solid #a5ccbc;
  border-radius: 6px;
  text-decoration: none !important;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
  line-height: 1.25;
}

.eg-visit-btn--ghost:hover {
  background: #e8f5f3;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(44, 94, 84, 0.12);
  color: #1f3a33 !important;
}


/* ============================================================
   STEPS — "What to expect on your first visit"
   Same visual pattern as homepage .eg-steps (card with sage left
   border accent + numbered heading).
   ============================================================ */
.eg-visit-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1.5rem;
  margin: 1rem 0 2.5rem;
}

.eg-visit-step {
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e3ece8;
  padding: 1.25rem 1.3rem 1.1rem;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.05);
}

/* Ombre progression across the 4 first-visit cards: soft blue-gray
   (step 1) → fuller sage (step 4). Matches the refill/reuse-library
   step card treatment so the sequence reads as one visual flow. */
.eg-visit-steps .eg-visit-step:nth-child(1) {
  background: linear-gradient(180deg, #eaf3f5 0%, #dfebef 100%);
  border-color: #c4d4d7;
}
.eg-visit-steps .eg-visit-step:nth-child(2) {
  background: linear-gradient(180deg, #dfeceb 0%, #cde1dc 100%);
  border-color: #adc5bf;
}
.eg-visit-steps .eg-visit-step:nth-child(3) {
  background: linear-gradient(180deg, #d4e4dc 0%, #bdd4c8 100%);
  border-color: #9bbbac;
}
.eg-visit-steps .eg-visit-step:nth-child(4) {
  background: linear-gradient(180deg, #c9dcc9 0%, #adc8b1 100%);
  border-color: #8aab95;
}

/* Staggered reveal — each card fades in a beat after the previous one
   once it scrolls into view. Relies on shared .eg-reveal system from
   homepage-reveal.js (already enqueued on this page). */
.eg-visit-steps .eg-visit-step.eg-reveal {
  transition-delay: 0ms;
}
.eg-visit-steps .eg-visit-step:nth-child(2).eg-reveal {
  transition-delay: 90ms;
}
.eg-visit-steps .eg-visit-step:nth-child(3).eg-reveal {
  transition-delay: 180ms;
}
.eg-visit-steps .eg-visit-step:nth-child(4).eg-reveal {
  transition-delay: 270ms;
}

.eg-visit-step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
  color: #2c5e54;
  line-height: 1.25;
  font-weight: 700;
}

.eg-visit-step p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #3a4a43;
}


/* ============================================================
   GRID — "A couple of things you only get in person"
   ============================================================ */
.eg-visit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1.5rem;
  margin: 1rem 0 2.5rem;
}

.eg-visit-card {
  background: #f5f9f6;
  border-left: 3px solid #a5ccbc;
  border-radius: 6px;
  padding: 1.25rem 1.4rem;
}

.eg-visit-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: #2c5e54;
  font-weight: 700;
  line-height: 1.3;
}

.eg-visit-card p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.6;
  color: #3a4a43;
}


/* ============================================================
   SHOPPING LIST BLOCK
   ============================================================ */
.eg-visit-shoplist {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: center;
  background: #e8f0ed;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0 2.5rem;
}

.eg-visit-shoplist__copy p {
  margin: 0 0 0.75rem;
}

.eg-visit-shoplist__copy p:last-child {
  margin-bottom: 0;
}

.eg-visit-shoplist__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 0.82rem;
  color: #5a6b65;
  margin-top: 0.9rem !important;
  line-height: 1.4;
}

.eg-visit-shoplist__legend span {
  display: inline-block;
}

.eg-visit-shoplist__cta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
}

.eg-visit-shoplist__cta .eg-visit-btn,
.eg-visit-shoplist__cta .eg-visit-btn--ghost {
  width: 100%;
  text-align: center;
}


/* ============================================================
   GETTING HERE — map + subsections
   ============================================================ */
.eg-visit-getting-here {
  margin: 2rem 0;
}

.eg-visit-map {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.08);
  margin: 0.5rem 0 0.75rem;
  aspect-ratio: 16 / 9;
  max-height: 420px;
}

.eg-visit-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.eg-visit-map-link {
  text-align: right;
  font-size: 0.9rem;
  margin: 0 0 1.5rem !important;
}

.eg-visit-orbt,
.eg-visit-a11y {
  background: #f5f9f6;
  border-left: 3px solid #a5ccbc;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 0.75rem 0 1.25rem;
}

.eg-visit-orbt p,
.eg-visit-a11y p {
  margin: 0 0 0.6rem;
  font-size: 0.96rem;
}

.eg-visit-orbt p:last-child,
.eg-visit-a11y p:last-child {
  margin-bottom: 0;
}

.eg-visit-orbt__note {
  font-size: 0.88rem;
  color: #5a6b65;
  font-style: italic;
}

/* ---- Getting here: refined map + arrival card grid ---- */
.eg-visit-arrive {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 1.75rem;
  align-items: start;
  margin: 0.75rem 0 1rem;
}

.eg-visit-arrive__map {
  position: sticky;
  /* Use shared anchor offset so the map clears the top bar + sticky header
     on every state the site already handles (desktop, mobile, admin bar —
     the WP admin bar is handled by body margin, not added here). */
  top: var(--eg-anchor-offset, 132px);
}

.eg-visit-arrive__map .eg-visit-map {
  margin: 0 0 0.5rem;
  aspect-ratio: 4 / 5;
  max-height: 540px;
}

.eg-visit-arrive__map .eg-visit-map-link {
  margin: 0 !important;
  text-align: right;
}

.eg-visit-arrive__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.eg-visit-arrive-card {
  background: #f5f9f6;
  border-left: 3px solid #a5ccbc;
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
}

.eg-visit-arrive-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
  color: #2c5e54;
  font-weight: 700;
  line-height: 1.3;
}

.eg-visit-arrive-card p {
  margin: 0 0 0.6rem;
  font-size: 0.96rem;
  line-height: 1.55;
}

.eg-visit-arrive-card p:last-child {
  margin-bottom: 0;
}

.eg-visit-arrive-card__note {
  font-size: 0.88rem;
  color: #5a6b65;
  font-style: italic;
}

/* ---- Say hello: balanced two-column on large screens ---- */
.eg-visit-sayhello {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.25rem;
  align-items: start;
  margin: 1rem 0 1.25rem;
}

.eg-visit-sayhello__intro p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
}

.eg-visit-sayhello__contact .eg-visit-contact {
  margin: 0 0 1rem;
}

.eg-visit-sayhello__contact .eg-visit-social {
  justify-content: flex-start;
  margin: 0.5rem 0 0;
}

/* ---- Small earthies note above signoff ---- */
.eg-visit-earthies-note {
  text-align: center;
  font-size: 0.88rem;
  color: #5a6b65;
  font-style: italic;
  max-width: 620px;
  margin: 1.75rem auto 0 !important;
  line-height: 1.55;
}


/* ============================================================
   CONTACT LIST
   ============================================================ */
.eg-visit-contact {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.45rem;
}

.eg-visit-contact li {
  padding: 0.35rem 0;
  border-bottom: 1px dotted rgba(44, 94, 84, 0.18);
  font-size: 0.98rem;
  color: #3a4a43;
}

.eg-visit-contact li:last-child {
  border-bottom: none;
}

.eg-visit-contact li strong {
  color: #2c5e54;
  font-weight: 700;
  margin-right: 0.35rem;
}


/* ============================================================
   SOCIAL ICONS
   ============================================================ */
.eg-visit-social {
  display: flex;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.eg-visit-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f5f9f6;
  border: 1px solid #a5ccbc;
  color: #2c5e54;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
  /* Override the inherited underline border-bottom from link styles */
  border-bottom: 1px solid #a5ccbc;
}

.eg-visit-social a:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(44, 94, 84, 0.15);
  background: #e8f5f3;
  border-color: #a5ccbc;
}

.eg-visit-social svg {
  width: 20px;
  height: 20px;
  display: block;
  color: inherit;
}


/* ============================================================
   SIGNOFF
   ============================================================ */
.eg-visit-signoff {
  text-align: center;
  font-size: 1rem;
  color: #2c5e54;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 2rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid #e3ece8;
}


/* ============================================================
   eg-reveal — inherited fade-in support (homepage-reveal.js is
   already enqueued on visit-us via the shared gate in
   existgreen-custom.php). Styles live in customizer-styles.css,
   nothing to add here.
   ============================================================ */


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .eg-visit-page {
    padding: 0.75rem 1rem 2rem;
  }

  .eg-visit-title {
    font-size: clamp(1.55rem, 5vw, 1.85rem);
  }

  .eg-visit-tagline {
    font-size: 0.98rem;
    margin-bottom: 1.5rem;
  }

  .eg-visit-page h2 {
    font-size: 1.15rem;
    margin: 1.75rem 0 0.85rem;
  }

  .eg-visit-page h3 {
    font-size: 1.02rem;
    margin-top: 1.25rem;
  }

  /* Hero: stack, content first, photo below */
  .eg-visit-hero {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.25rem;
  }

  .eg-visit-hero__img {
    order: 2;
    max-width: 100%;
    max-height: 260px;
  }

  .eg-visit-hero__img img {
    aspect-ratio: 16 / 10;
    max-height: 260px;
  }

  .eg-visit-hero__facts {
    order: 1;
  }

  /* Steps: stack to single column on tablet/mobile for readability */
  .eg-visit-steps {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  /* Grid: also single column */
  .eg-visit-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  /* Shopping list: stack, CTA full-width below copy */
  .eg-visit-shoplist {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.25rem;
  }

  .eg-visit-shoplist__cta {
    flex-direction: row;
    align-items: stretch;
    flex-wrap: wrap;
  }

  .eg-visit-shoplist__cta .eg-visit-btn,
  .eg-visit-shoplist__cta .eg-visit-btn--ghost {
    flex: 1 1 45%;
  }

  /* Map aspect shorter on mobile */
  .eg-visit-map {
    aspect-ratio: 4 / 3;
    max-height: 340px;
  }

  .eg-visit-map-link {
    text-align: center;
  }

  /* Getting here: stack map above card grid on mobile/tablet */
  .eg-visit-arrive {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .eg-visit-arrive__map {
    position: static;
  }

  .eg-visit-arrive__map .eg-visit-map {
    aspect-ratio: 4 / 3;
    max-height: 340px;
  }

  .eg-visit-arrive__map .eg-visit-map-link {
    text-align: center;
  }

  /* Say hello: stack columns on mobile */
  .eg-visit-sayhello {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .eg-visit-sayhello__contact .eg-visit-social {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .eg-visit-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .eg-visit-hero__actions .eg-visit-btn,
  .eg-visit-hero__actions .eg-visit-btn--ghost {
    text-align: center;
  }

  .eg-visit-contact li {
    font-size: 0.92rem;
  }

  .eg-visit-shoplist__legend {
    font-size: 0.78rem;
  }
}
