/* --------------------------------------------------------------------------
   Layout — containers, grids, spacing
   ------------------------------------------------------------------------- */
.container, .section-inner, .values-inner,
.team-inner, .faq-inner, .editorial-section__inner {
  width: min(var(--ed-container), calc(100% - var(--ed-page-gutter) * 2));
  margin-inline: auto;
}
.site-main { min-height: 52vh; }

.site-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
  padding: var(--ed-section-y-tight) 0;
}
.site-content-grid.no-sidebar { display: block; }
.content-area { min-width: 0; }
.widget-area { border-left: 1px solid var(--ed-rule); padding-left: 1.5rem; }

/* Global horizontal rhythm */
.hero, .page-hero, .stats-bar,
.section-story, .section-values, .section-team,
.prog-section, .faq-section, .cta-section {
  padding-left: var(--ed-page-gutter);
  padding-right: var(--ed-page-gutter);
}

/* Section vertical rhythm */
.section-story, .section-values, .section-team,
.prog-section, .faq-section {
  padding-top: var(--ed-section-y);
  padding-bottom: var(--ed-section-y);
}

.stats-bar {
  padding-top: var(--ed-section-y-compact);
  padding-bottom: var(--ed-section-y-compact);
}
.cta-section {
  padding-top: var(--ed-section-y-tight);
  padding-bottom: var(--ed-section-y-tight);
}

/* Hero / page opener */
.hero {
  padding-top: var(--ed-hero-y);
  padding-bottom: clamp(2.8rem, 5vw, 4rem);
}
.page-hero {
  padding-top: var(--ed-page-hero-y);
  padding-bottom: clamp(3rem, 5vw, 4.2rem);
}
.hero-inner, .page-hero-inner {
  max-width: var(--ed-container);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(0.75rem, 1.5vw, 1.1rem);
}
.hero-inner { align-items: center; }

/* Header groups: label → title → lead */
.section-header, .values-header, .team-header,
.faq-header, .blog-section-header {
  display: flex;
  flex-direction: column;
  gap: var(--ed-header-group-gap);
  margin-bottom: var(--ed-header-after);
  position: relative;
}
.section-header { align-items: center; text-align: center; }
.section-header::before {
  content: '';
  display: block;
  width: 36px;
  height: 1px;
  background: var(--ed-rule-strong);
  margin: 0 auto 0.65rem;
}
.blog-section-header::before { margin-left: 0; }
.blog-section-header { align-items: flex-start; text-align: left; }

/* Section inner spacing */
.section-inner, .values-inner, .team-inner, .faq-inner {
  display: flex;
  flex-direction: column;
  gap: var(--ed-block-gap);
}

/* Grids */
.story-grid, .prog-grid {
  display: grid;
  gap: var(--ed-grid-gap-large);
}
.values-grid, .team-grid,
.hero-trust, .activity-tags,
.faq-list, .stats-grid {
  display: grid;
  gap: var(--ed-grid-gap);
}

.editorial-grid { display: grid; gap: var(--ed-grid-gap); }
.editorial-grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.editorial-grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.editorial-grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

/* Responsive grids */
.prog-grid { grid-template-columns: 1fr; }
.stats-grid { grid-template-columns: repeat(2, 1fr); }
.values-grid { grid-template-columns: 1fr; }

@media (min-width: 540px) {
  .values-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 700px) {
  .prog-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) {
  .story-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .values-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-trust { grid-template-columns: repeat(4, auto); justify-content: center; }
  .activity-tags { grid-template-columns: repeat(3, auto); justify-content: center; }
}

/* Mobile breakpoints */
@media (max-width: 959px) {
  .site-content-grid,
  .related-posts__grid,
  .footer-grid,
  .footer-widget-grid,
  .editorial-grid--2,
  .editorial-grid--3,
  .editorial-grid--4,
  .editorial-media-split,
  .editorial-stat-row { grid-template-columns: 1fr; }
  .widget-area { border-left: 0; padding-left: 0; margin-top: 3rem; }
  .hero-inner, .page-hero-inner { gap: 0.75rem; }
  .hero h1, .page-hero h1 { max-width: 11.5em; }
  .hero-lead, .page-hero p, .section-lead,
  .team-header p, .faq-header p { max-width: 100%; }
  .hero .btn-group {
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 22rem);
  }
  .hero .btn-group a, .cta-inner a { width: 100%; }
  .section-header, .values-header, .team-header,
  .faq-header, .blog-section-header {
    margin-bottom: var(--ed-header-after);
  }
}

@media (min-width: 700px) and (max-width: 959px) {
  .editorial-grid--3,
  .editorial-grid--4,
  .related-posts__grid,
  .footer-grid,
  .footer-widget-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editorial-media-split,
  .site-content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 699px) {
  .blog-section-header { display: block; }
  .blog-section-header .read-more { display: inline-flex; margin-top: .75rem; }
}

@media (max-width: 420px) {
  .badge-pill, .label-pill, .label-pill-bg, .age-badge-pill {
    padding-left: 0.82rem;
    padding-right: 0.82rem;
  }
  .section-title, .story-title, .prog-content h2,
  .faq-header h2, .cta-section h2 { max-width: 100%; }
}

/* Editorial section styles */
.editorial-section {
  padding: var(--ed-section-y) 0;
  border-bottom: 1px solid var(--ed-rule);
}
.editorial-section--dark {
  background: var(--ed-hero-bg);
  color: var(--ed-hero-ink);
  border-bottom: 0;
}
.editorial-section--alt { background: var(--ed-paper-alt); }
.editorial-section__header {
  max-width: 760px;
  margin: 0 auto var(--ed-block-gap);
  text-align: center;
}
.editorial-section__header--wide { max-width: 980px; }
.editorial-section--centered-hero { text-align: center; }
.editorial-media-split {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.editorial-placeholder {
  min-height: 260px;
  border: 1px solid var(--ed-rule);
  background: repeating-linear-gradient(135deg,#EEF7F2 0 10px,#E6F0F2 10px 20px);
  display: flex; align-items: center; justify-content: center;
  color: var(--ed-muted);
  font-size: .78rem; text-transform: uppercase; letter-spacing: .08em;
  border-radius: 6px; overflow-wrap: anywhere;
}
