/* Page shell to keep footer at bottom */
html, body { height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
#footer-placeholder { margin-top: auto; width: 100%; }
/* Main menu visible on homepage */
/* nav.main-menu { display: none !important; } */

/* Header base styles */
#site-header {
  position: relative;
  overflow: visible; /* avoid clipping the bottom of the image on large screens */
  background: transparent;
  margin-bottom: .25rem;
}
#site-header .responsive-header {
  display: block;
  width: 100%;
  height: auto;
}
/* No fade effect applied */

/* Modal for map preview */
.modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2000; }
.modal.hidden { display: none; }
.modal-content {
  background: var(--page-bg, #fff);
  width: min(100vw - 2rem, 1024px);
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.modal-close { align-self: flex-end; background: transparent; border: none; font-size: 1.8rem; line-height: 1; padding: .25rem .5rem; cursor: pointer; }
/* Ensure map has a sensible height within modal */
#map { height: 60vh; min-height: 340px; }
/* Filters area within modal */
#filter-bar { padding: 0.75rem; background: var(--page-bg, #fff); border-top: 1px solid rgba(0,0,0,0.06); }
.preview-actions { text-align: center; margin: 1.25rem 0 2rem; }

/* Store buttons under header */
.store-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin: .6rem auto 1.1rem; padding: 0 1rem; }
.store-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.9rem 1.2rem; border-radius: 12px; border: 1px solid rgba(0,0,0,0.15);
  background: #000; color: #fff; text-decoration: none; min-width: 260px;
  transition: transform .05s ease, box-shadow .15s ease; box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  min-height: 56px;
}
.store-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.18); }
.store-btn span.small { display:block; font-size: .8rem; line-height: 1; opacity: .85; }
.store-btn span.big { display:block; font-size: 1.2rem; line-height: 1.15; font-weight: 600; }
.store-btn.google { background: #000; }
.store-btn.apple { background: #000; }
@media (max-width: 420px) { .store-btn { min-width: 100%; } }

/* Tagline under header */
.tagline {
  text-align: center;
  color: #d9672f; /* match privacy h1 color */
  font-family: 'Fredoka', sans-serif; /* match privacy typography */
  font-weight: 700; /* h1-like weight */
  font-size: clamp(1.6rem, 3.8vw, 2.25rem); /* h1-like size, responsive */
  line-height: 1.2;
  margin: .75rem 1rem .5rem;
}

/* Make preview button secondary/ghost */
.preview-actions .cta-button { background: transparent; color: #4a2d16; border: 1px solid rgba(0,0,0,0.2); box-shadow: none; }
.preview-actions .cta-button:hover { background: rgba(0,0,0,0.05); }

/* Third CTA aligned with store badges */
.store-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 18px; border-radius: 12px; border: 1px solid #000; background: #000; color: #fff; text-decoration: none; font-weight: 600; box-shadow: 0 2px 10px rgba(0,0,0,0.12); }
.store-cta:hover { filter: brightness(1.1); }
.store-cta img { height: 22px; width: auto; display: block; }
@media (max-width: 420px) { .store-cta { height: 44px; } }

/* Keyboard focus styles for accessibility */
.store-badge:focus-visible, .store-cta:focus-visible { outline: 3px solid #f1603c; outline-offset: 3px; border-radius: 14px; }

/* Official store badges */
.store-badge { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.store-badge img { height: 52px; width: auto; display: block; }
/* Apple SVG tends to appear larger at same height; nudge slightly smaller for optical balance */
#btn-apple-store img { height: 50px; }
@media (max-width: 420px) {
  .store-badge img { height: 44px; }
  #btn-apple-store img { height: 42px; }
}

/* Generic section wrapper for centered content */
.section { max-width: 1160px; margin: 0 auto; padding: 0 1rem; }

/* v2 Recent reviews as 3-card grid */
#recent-reviews { margin: 0; }
#recent-reviews h3 {
  margin: 0 0 .6rem;
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  text-align: center;
  color: #d9672f; /* match About section heading color */
  font-weight: 700;
}
/* Vertical recent list (3 items) */
.recent-list { display: flex; flex-direction: column; gap: .25rem; padding: .25rem .25rem .5rem; }
.recent-item { padding: .25rem 0; }
.recent-item + .recent-item { border-top: 1px solid rgba(0,0,0,0.12); padding-top: .75rem; margin-top: .25rem; }
.recent-list .review-header { margin-bottom: .35rem; }
.recent-list .review-header strong { font-size: 1.05rem; }
.recent-list .review-ratings { justify-content: flex-start; gap: .6rem; }
.recent-list .review-text { margin-top: .45rem; font-size: .95rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 3; }
/* New compact horizontal card row */
.reviews-row {
  display: flex;
  flex-wrap: nowrap; /* stay horizontal */
  gap: 1rem;
  overflow-x: auto;
  padding: .25rem .25rem .5rem;
  scroll-snap-type: x proximity;
}
.reviews-row.cards-overlap .review-card:not(:first-child) { margin-left: -0.75rem; }
.reviews-row::-webkit-scrollbar { height: 8px; }
.reviews-row::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 8px; }
.reviews-row .review-card {
  background:#fff; border-radius:14px; box-shadow: 0 4px 14px rgba(0,0,0,0.12); border-left:6px solid #f1603c;
  min-width: 280px; max-width: 320px; flex: 0 0 auto; /* don't stretch, keep in a row */
  padding: .75rem .9rem; scroll-snap-align: start; display:flex; flex-direction:column;
}
/* Grid fallback to ensure horizontal flow even if another style overrides flex */
@supports (display: grid) {
  .reviews-row.use-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 320px);
    overflow-x: auto;
  }
}
.review-header { display:flex; align-items:center; justify-content: space-between; gap:.5rem; margin-bottom:.25rem; }
.review-header strong { font-size: 1rem; }
.review-map-link { border:none; background:transparent; cursor:pointer; padding:2px; }
.review-map-link img { height: 1.1em !important; vertical-align: middle; }
.review-ratings { display:flex; align-items:center; gap:.5rem; margin:.25rem 0; }
.review-ratings span { display:inline-flex; align-items:center; gap:.25rem; font-weight:600; }
/* Clamp review text to 2 lines for compact cards */
.review-card .review-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 2; }
/* Hide the old scrolling feed on v2 */
#recent-reviews .reviews-feed-scroll { display: none !important; }

/* Divider between sections */
.section-divider { height: 1px; background: linear-gradient(to right, transparent, rgba(0,0,0,0.1), transparent); margin: 1rem 0 1.25rem; border: 0; }
@media (min-width: 1024px) { .section-divider { background: linear-gradient(to right, transparent, rgba(0,0,0,0.08), transparent); } }

/* About section leverages existing panel styles for consistency */
.about-section .panel {
  padding: 1.5rem 1.5rem; /* increased padding for balance */
  /* Match tabs panel background */
  background: #fff7e6;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border-left: none; /* remove orange accent */
  position: relative;
  overflow: hidden; /* contain highlight */
}
.about-section .panel::after {
  /* remove soft highlight */
  content: none;
}
.about-section h2 {
  margin: 0 0 .6rem; /* align with panel padding */
  font-size: clamp(1.4rem, 3.4vw, 1.8rem);
  color: #d9672f; /* brand heading color */
  font-weight: 700;
  text-align: center; /* center heading */
  display: block;
  background: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  border: 0;
}
.about-section p { margin: 0.35rem 0; color: #4e2600; text-align: left; line-height: 1.6; }
.about-section p:first-of-type { font-size: 1.05rem; line-height: 1.6; }
.about-section .about-content p:last-child { text-align: center; margin-top: .75rem; }

/* Slightly soften CTA weight and size within About */
.about-section .brand-cta { font-weight: 600; padding: .45rem .85rem; }
.about-section .about-content { max-width: none; margin: 0; }

/* Branded inline link */
.brand-link {
  color: #d9672f;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.brand-link:hover { color: #f1603c; }

/* Branded CTA pill link */
.brand-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: .5rem .9rem;
  border-radius: 999px;
  border: 1px solid #d9672f;
  background: transparent;
  color: #d9672f;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
  transition: background .15s ease, color .15s ease, transform .05s ease;
}
.brand-cta:hover { background: #fbe2d3; color: #a84b1c; transform: translateY(-1px); }

/* Responsive spacing polish for boxes */
@media (max-width: 640px) {
  .about-section .panel { padding: 1.25rem; }
  .eh-panel .panel { padding: 1.25rem; }
  .eh-grid { gap: 1rem; margin: 1rem 0 1.5rem; }
}

/* Ecosystem Highlights Tabs */
.eh-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.25rem; align-items: stretch; margin: 1.25rem 0 2rem; }
@media (max-width: 980px) { .eh-grid { grid-template-columns: repeat(2, 1fr); } }
.eh-panel .panel { padding: 1.5rem 1.5rem; background: #fff7e6; border-radius: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); border: 1px solid rgba(0,0,0,0.08); height: 100%; }
.eh-panel h3 {
  text-align: center;
  font-size: clamp(1.2rem, 3vw, 1.45rem); /* a little larger */
  margin: .35rem 0 .7rem;
  color: #d9672f; /* same color as About Poo with a View */
  font-weight: 700;
}
.eh-panel .tab-illustration {
  /* Avoid stretching to full width in the flex row */
  width: auto;
  /* Larger default while staying responsive */
  max-width: clamp(200px, 42vw, 380px);
  height: auto;
  max-height: 280px;
  border-radius: 12px;
  display: block;
  margin: .5rem auto 1rem;
}

/* Desktop polish: playful rotate and slight overlap only on the Download panel */
@media (min-width: 821px) {
  #panel-download .tab-illustration {
    position: relative;
    z-index: 1; /* sit behind the text block */
    transform: rotate(-4deg);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  }
  /* Let the text overlap visually without changing layout centering */
  #panel-download .tab-illustration + div { position: relative; z-index: 2; transform: translateX(-10px); }
}

/* Mobile: slightly smaller and no overlap/rotation for clarity */
@media (max-width: 820px) {
  .eh-panel .tab-illustration { max-width: 300px; max-height: 220px; transform: none; }
  #panel-download .tab-illustration + div { transform: none; }
}
.eh-bullets { list-style: none; padding-left: 0; margin: .25rem 0 0; }
.eh-bullets li { margin: .4rem 0; }
/* Single review aesthetics */
.recent-single { text-align: center; }
.recent-single .review-text { text-align: center; }
.recent-single .review-ratings { gap: .75rem; }

/* Tabs (mobile only) */
.eh-tabs { display: none; }

@media (max-width: 820px) {
  /* Show tab bar on small screens */
  .eh-tabs {
    display: flex;
    gap: .5rem;
    justify-content: center;
    padding: 0 .75rem .75rem;
  }
  .eh-tab {
    appearance: none;
    border: 1px solid rgba(0,0,0,0.15);
    background: #fff;
    color: #333;
    padding: .5rem .75rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
  }
  .eh-tab[aria-selected="true"] {
    background: #f1603c;
    border-color: #f1603c;
    color: #fff;
  }

  /* Override earlier mobile carousel: show one panel at a time */
  .eh-grid {
    display: block !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
  }
  .eh-grid > .eh-panel { display: none; }
  .eh-grid > .eh-panel.active { display: block; }
  .eh-grid > .eh-panel[hidden] { display: none !important; }
}
