/* ============================================================
   AGE GUIDES HUB — /age-guides
   White/light page (brand lavender + gold accents on white).
   Scoped under body.page-age-guides; all classes "ag-" namespaced
   to avoid collisions with dark-theme site CSS.
   ============================================================ */

body.page-age-guides {
  background: #ffffff;
  color: #333;
}

.ag-skip { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; background: #9d5ea6; color: #fff; padding: 10px 20px; border-radius: 0 0 8px 0; font-size: 14px; font-weight: 500; z-index: 9999; }
.ag-skip:focus { left: 0; top: 0; width: auto; height: auto; overflow: visible; }

/* ── Hero ── */
.ag-hero { background: #f8f7fc; padding: 90px 24px 56px; text-align: center; }
.ag-breadcrumb { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 12px; color: #905194; list-style: none; padding: 0; margin: 0 0 24px; }
.ag-breadcrumb a { color: #905194; text-decoration: none; }
.ag-breadcrumb a:hover { color: #9d5ea6; }
.ag-breadcrumb .ag-bc-sep { color: #c8bfe7; }
.ag-breadcrumb .ag-bc-current { color: #333; }

.ag-hero h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 2.6rem);
  line-height: 1.2;
  color: #1a1a2e;
  max-width: 760px;
  margin: 0 auto 16px;
}
.ag-hero-sub {
  font-size: 1.125rem;
  color: #333;
  max-width: 560px;
  margin: 0 auto 20px;
}
.ag-hero-intro {
  font-size: 1rem;
  color: #333;
  max-width: 840px;
  margin: 0 auto 14px;
  line-height: 1.65;
}
.ag-hero-intro:last-of-type { margin-bottom: 0; }
.ag-hero-intro strong { color: #1a1a2e; }
.ag-hero-intro a { color: #905194; text-decoration: underline; text-decoration-color: rgba(139,124,186,0.4); text-underline-offset: 2px; }
.ag-hero-intro a:hover { text-decoration-color: rgba(139,124,186,0.9); }

/* ── Filter tabs ── */
.ag-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 40px auto 32px;
  max-width: 1200px;
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ag-tabs::-webkit-scrollbar { display: none; }
.ag-tab {
  flex: 0 0 auto;
  background: #f0edf9;
  color: #9d5ea6;
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  white-space: nowrap;
  cursor: pointer;
  min-height: 40px;
  transition: background 0.2s, color 0.2s;
}
.ag-tab:hover { background: #e4dff5; }
.ag-tab.active { background: #9d5ea6; color: #ffffff; }
.ag-tab:focus-visible { outline: 2px solid #9d5ea6; outline-offset: 2px; }

/* ── Card grid ── */
.ag-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
@media (min-width: 640px) { .ag-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .ag-grid { grid-template-columns: repeat(4, 1fr); } }

.ag-card {
  background: #ffffff;
  border: 1.5px solid #e8e4f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(139,124,186,0.10);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.ag-card:hover,
.ag-card:focus-visible {
  box-shadow: 0 6px 24px rgba(139,124,186,0.18);
  border-color: #c8bfe7;
  transform: translateY(-2px);
}
.ag-card:focus-visible { outline: 2px solid #9d5ea6; outline-offset: 2px; }

.ag-card-img {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #f0edf9;
}
.ag-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ag-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px 20px;
}

.ag-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,255,255,0.94);
  color: #9d5ea6;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  box-shadow: 0 1px 6px rgba(26,26,46,0.12);
}
.ag-card-body h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: #1a1a2e;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ag-card-body p {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: #333;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ag-card-link {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  color: #9d5ea6;
  margin-top: auto;
}

/* ── Mid-page CTA ── */
.ag-cta {
  background: #f8f7fc;
  padding: 56px 24px;
  text-align: center;
}
.ag-cta-eyebrow {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9d5ea6;
  margin: 0 0 12px;
}
.ag-cta h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  color: #1a1a2e;
  max-width: 640px;
  margin: 0 auto 14px;
  line-height: 1.3;
}
.ag-cta p {
  font-size: 1rem;
  color: #333;
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.6;
}
.ag-cta-btn {
  display: inline-block;
  background: #9d5ea6;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 14px 32px;
  border-radius: 24px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  min-height: 48px;
  box-shadow: 0 8px 24px rgba(139,124,186,0.28);
}
.ag-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(139,124,186,0.4); }
.ag-cta-trust { display: block; margin-top: 16px; font-size: 0.8125rem; color: #905194; }

/* ── FAQ ── */
.ag-faq { background: #ffffff; padding: 64px 24px; }
.ag-faq-inner { max-width: 720px; margin: 0 auto; }
.ag-faq h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  color: #1a1a2e;
  margin: 0 0 28px;
  text-align: center;
}
.ag-faq-item { border-bottom: 1px solid #e8e4f0; padding: 20px 0; }
.ag-faq-item:first-child { border-top: 1px solid #e8e4f0; }
.ag-faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: #1a1a2e;
  padding: 4px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}
.ag-faq-q-mark { color: #9d5ea6; font-size: 1.1rem; flex-shrink: 0; transition: transform 0.2s; }
.ag-faq-item[open] .ag-faq-q-mark { transform: rotate(45deg); }
.ag-faq-a { font-size: 0.9375rem; color: #333; line-height: 1.65; margin: 10px 0 0; }
.ag-faq-disclaimer { font-size: 0.8125rem; color: #905194; text-align: center; margin: 28px 0 0; line-height: 1.6; }

/* ── Browse-every-age link cloud ── */
.ag-browse { background: #f8f7fc; padding: 48px 24px 64px; }
.ag-browse-inner { max-width: 1000px; margin: 0 auto; text-align: center; }
.ag-browse h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #905194;
  margin: 0 0 20px;
}
.ag-browse-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 6px; list-style: none; padding: 0; margin: 0; }
.ag-browse-list a {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #9d5ea6;
  text-decoration: none;
  padding: 6px 4px;
  min-height: 32px;
  line-height: 20px;
}
.ag-browse-list a:hover { text-decoration: underline; }
.ag-browse-list .ag-sep { color: #c8bfe7; }

@media (prefers-reduced-motion: reduce) {
  .ag-card, .ag-cta-btn, .ag-tab, .ag-faq-q-mark { transition: none !important; }
  .ag-card:hover, .ag-cta-btn:hover { transform: none !important; }
}
