/* ===== WHEN TO START PRESCHOOL — INTENT PAGE STYLES ===== */

/* --- Section Containers --- */
.sp-section {
  padding: 80px 24px;
}
.sp-inner {
  max-width: var(--sp-max);
  margin: 0 auto;
}
.sp-bg-sage { background: var(--sp-program-whisper); }
.sp-bg-white { background: var(--sp-white); }

/* --- Typography --- */
.sp-h1 {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.18;
  color: var(--sp-heading);
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.sp-h2 {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--sp-heading);
  text-align: center;
  margin-bottom: 16px;
}
.sp-h3 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--sp-heading);
  margin-bottom: 12px;
}
.sp-intro {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
  color: var(--sp-gray);
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  line-height: 1.7;
}
.sp-intro a {
  color: var(--sp-program-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(61,107,98,0.3);
}
.sp-intro a:hover {
  border-color: var(--sp-program);
}

/* --- Buttons --- */
.sp-btn-gold {
  display: inline-block;
  background: var(--sp-gold);
  color: #fff;
  padding: 14px 32px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(196,152,38,0.25);
}
.sp-btn-gold:visited,
.sp-btn-gold:active {
  color: #fff;
}
.sp-btn-gold:hover {
  background: var(--sp-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(196,152,38,0.3);
}
.sp-prose .sp-btn-gold,
.sp-prose .sp-btn-gold:visited,
.sp-prose .sp-btn-gold:active,
.sp-mid-cta .sp-btn-gold,
.sp-mid-cta .sp-btn-gold:visited,
.sp-mid-cta .sp-btn-gold:active {
  color: #fff;
  border-bottom: none;
  text-decoration: none;
}

/* --- Hero Section --- */
.sp-hero {
  background: var(--sp-program-wash);
  padding: 80px 24px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.sp-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -60px;
  width: 0;
  height: 0;
  border-left: 180px solid transparent;
  border-right: 180px solid transparent;
  border-bottom: 320px solid rgba(61,107,98,0.08);
  transform: rotate(15deg);
}
.sp-hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 0;
  height: 0;
  border-left: 140px solid transparent;
  border-right: 140px solid transparent;
  border-bottom: 250px solid rgba(61,107,98,0.06);
  transform: rotate(-10deg);
}
.sp-hero-inner {
  max-width: var(--sp-max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.sp-hero-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--sp-gray);
  max-width: 660px;
  margin: 0 auto 32px;
  font-style: italic;
}
.sp-hero-para {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--sp-text);
  max-width: 720px;
  margin: 0 auto 8px;
  text-align: left;
}
.sp-hero-para a {
  color: var(--sp-program-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(61,107,98,0.3);
}
.sp-hero-para a:hover {
  border-color: var(--sp-program);
}
.sp-hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-top: 36px;
  flex-wrap: wrap;
}
.sp-hero-secondary {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--sp-program-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(61,107,98,0.4);
  transition: border-color 0.2s;
}
.sp-hero-secondary:hover {
  border-color: var(--sp-program);
}
.sp-hero-secondary-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--sp-gray);
}
.sp-hero-divider {
  color: var(--sp-gray);
  opacity: 0.4;
}
.sp-hero-trust {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--sp-gray);
}

/* --- Triangle Section Divider --- */
.sp-triangle-divider {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  padding: 16px 0;
  margin: 0;
  background: transparent;
  position: relative;
  z-index: 2;
}
.sp-triangle-divider .sp-tri {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 22px solid;
}
.sp-triangle-divider .sp-tri-1 { border-bottom-color: var(--sp-tri-pink); border-left-width: 14px; border-right-width: 14px; border-bottom-width: 20px; }
.sp-triangle-divider .sp-tri-2 { border-bottom-color: var(--sp-tri-orange); border-left-width: 16px; border-right-width: 16px; border-bottom-width: 24px; }
.sp-triangle-divider .sp-tri-3 { border-bottom-color: var(--sp-tri-yellow); border-left-width: 18px; border-right-width: 18px; border-bottom-width: 26px; }
.sp-triangle-divider .sp-tri-4 { border-bottom-color: var(--sp-tri-green); border-left-width: 16px; border-right-width: 16px; border-bottom-width: 24px; }
.sp-triangle-divider .sp-tri-5 { border-bottom-color: var(--sp-tri-blue); border-left-width: 14px; border-right-width: 14px; border-bottom-width: 20px; }

/* --- Jump Navigation Pills --- */
.sp-cat-nav-section {
  background: var(--sp-white);
  padding: 28px 24px;
  border-bottom: 1px solid rgba(61,107,98,0.1);
  position: sticky;
  top: 64px;
  z-index: 50;
}
.sp-cat-nav-inner {
  max-width: var(--sp-max);
  margin: 0 auto;
  text-align: center;
}
.sp-cat-nav-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sp-gray);
  margin-bottom: 12px;
}
.sp-cat-nav {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.sp-cat-link {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 40px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--sp-program-dark);
  background: var(--sp-program-light);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.sp-cat-link:hover {
  background: var(--sp-program);
  color: #fff;
  box-shadow: 0 2px 8px rgba(61,107,98,0.2);
}

/* --- Prose Content Sections --- */
.sp-prose {
  max-width: 720px;
  margin: 0 auto;
}
.sp-prose p {
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--sp-text);
}
.sp-prose p + p {
  margin-top: 20px;
}
.sp-prose .sp-h2 {
  text-align: left;
  margin-bottom: 24px;
}
.sp-prose a {
  color: var(--sp-program-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(61,107,98,0.3);
}
.sp-prose a:hover {
  border-color: var(--sp-program);
}

/* --- Checklist Cards --- */
.sp-checklist-card {
  max-width: 720px;
  margin: 32px auto 0;
  background: var(--sp-white);
  border: 1px solid var(--sp-program-border);
  border-radius: 16px;
  padding: 36px 40px;
  box-shadow: 0 2px 12px rgba(61,107,98,0.06);
}
.sp-bg-white .sp-checklist-card {
  background: var(--sp-program-whisper);
  border-color: rgba(61,107,98,0.12);
}
.sp-checklist-card .sp-h3 {
  font-size: 18px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  color: var(--sp-gray);
  margin-bottom: 24px;
}
.sp-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sp-checklist li {
  position: relative;
  padding-left: 38px;
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--sp-text);
}
.sp-check-icon {
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--sp-program-light);
  border: 2px solid var(--sp-program);
}
.sp-check-icon::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 7px;
  width: 6px;
  height: 10px;
  border: solid var(--sp-program);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* --- Options Table --- */
.sp-options-table-wrap {
  max-width: 800px;
  margin: 40px auto 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sp-options-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
}
.sp-options-table thead th {
  background: var(--sp-program);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 20px;
  text-align: left;
  white-space: nowrap;
}
.sp-options-table thead th:first-child {
  border-radius: 10px 0 0 0;
}
.sp-options-table thead th:last-child {
  border-radius: 0 10px 0 0;
}
.sp-options-table tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--sp-program-border);
  color: var(--sp-text);
  line-height: 1.5;
}
.sp-options-table tbody tr:last-child td {
  border-bottom: none;
}
.sp-options-table tbody tr:nth-child(even) {
  background: var(--sp-program-whisper);
}
.sp-options-table tbody tr:hover {
  background: rgba(61,107,98,0.06);
}
.sp-options-table a {
  color: var(--sp-program-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(61,107,98,0.3);
}
.sp-options-table a:hover {
  border-color: var(--sp-program);
}

/* --- Mid-Page CTA --- */
.sp-mid-cta {
  margin-top: 40px;
  padding: 40px 32px;
  background: var(--sp-program-whisper);
  border-radius: 16px;
  text-align: center;
  border: 1px solid var(--sp-program-border);
}
.sp-bg-sage .sp-mid-cta {
  background: var(--sp-white);
}
.sp-mid-cta p {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--sp-heading);
  margin-bottom: 20px;
}
.sp-mid-cta .sp-btn-gold {
  margin-bottom: 12px;
}
.sp-mid-cta-alt {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--sp-gray);
  margin-top: 12px;
}
.sp-mid-cta-alt a {
  color: var(--sp-program-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(61,107,98,0.3);
}
.sp-mid-cta-alt a:hover {
  border-color: var(--sp-program);
}

/* --- FAQ Accordion --- */
.sp-faq-list {
  max-width: 780px;
  margin: 40px auto 0;
}
.sp-faq-item {
  border-bottom: 1px solid var(--sp-program-border);
}
.sp-faq-item:first-child {
  border-top: 1px solid var(--sp-program-border);
}
.sp-faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--sp-heading);
  line-height: 1.5;
  transition: color 0.2s;
}
.sp-faq-item summary:hover {
  color: var(--sp-program-dark);
}
.sp-faq-item summary::-webkit-details-marker { display: none; }
.sp-faq-item summary::marker { display: none; content: ''; }
.sp-faq-chevron {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-left: 16px;
  color: var(--sp-program);
  transition: transform 0.3s ease;
}
.sp-faq-item[open] .sp-faq-chevron {
  transform: rotate(180deg);
  color: var(--sp-program-dark);
}
.sp-faq-answer {
  padding: 0 0 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--sp-text);
}
.sp-faq-answer p {
  margin: 0;
}
.sp-faq-answer p + p {
  margin-top: 16px;
}
.sp-faq-answer a {
  color: var(--sp-program-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(61,107,98,0.3);
}
.sp-faq-answer a:hover {
  border-color: var(--sp-program);
}

/* --- Bottom CTA Section --- */
.sp-bottom-cta-section {
  text-align: center;
}
.sp-bottom-cta .sp-h2 {
  text-align: center;
}
.sp-bottom-cta-phone {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--sp-gray);
  margin-top: 20px;
}
.sp-bottom-cta-phone a {
  color: var(--sp-program-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(61,107,98,0.3);
}
.sp-bottom-cta-phone a:hover {
  border-color: var(--sp-program);
}

/* --- Animations --- */
@keyframes spFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.sp-hero .sp-h1 { animation: spFadeUp 0.7s ease both; }
.sp-hero .sp-hero-sub { animation: spFadeUp 0.7s ease 0.1s both; }
.sp-hero .sp-hero-para { animation: spFadeUp 0.7s ease 0.15s both; }
.sp-hero .sp-hero-ctas { animation: spFadeUp 0.7s ease 0.2s both; }
.sp-hero .sp-hero-trust { animation: spFadeUp 0.7s ease 0.3s both; }


/* ===== TABLET LAYOUT (768px - 1024px) ===== */
@media (max-width: 1024px) {
  .sp-hero-secondary,
  .sp-faq-answer a,
  .sp-prose a,
  .sp-mid-cta-alt a,
  .sp-bottom-cta-phone a,
  .sp-intro a,
  .sp-options-table a {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(61,107,98,0.4);
  }
}

/* ===== MOBILE LAYOUT (phones: under 768px) ===== */
@media (max-width: 767px) {
  .sp-section { padding: 48px 20px; }
  .sp-hero { padding: 48px 20px 40px; }
  .sp-h1 { font-size: 28px; }
  .sp-h2 { font-size: 28px; }
  .sp-h3 { font-size: 21px; }
  .sp-prose .sp-h2 { text-align: left; }
  .sp-prose p { font-size: 16px; }
  .sp-hero-ctas { flex-direction: column; align-items: center; gap: 12px; }
  .sp-hero-trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    justify-items: center;
  }
  .sp-hero-trust span:nth-child(even) { display: none; }
  .sp-hero-inner .sp-h1 { order: 1; }
  .sp-hero-inner .sp-hero-sub { order: 2; }
  .sp-hero-inner .sp-hero-para { order: 3; }
  .sp-hero-inner .sp-hero-ctas { order: 4; }
  .sp-hero-inner .sp-hero-secondary-links { order: 5; }
  .sp-hero-inner .sp-hero-trust { order: 6; }
  .sp-hero-secondary-links { display: none; }

  /* Hero triangles: scale down */
  .sp-hero::before {
    top: -20px;
    right: -30px;
    border-left-width: 100px;
    border-right-width: 100px;
    border-bottom-width: 180px;
  }
  .sp-hero::after {
    bottom: -40px;
    left: -20px;
    border-left-width: 80px;
    border-right-width: 80px;
    border-bottom-width: 140px;
  }

  /* Jump nav: horizontal scroll on mobile with fade indicators */
  .sp-cat-nav-section {
    padding: 20px 16px;
    position: sticky;
    top: 64px;
    z-index: 50;
  }
  .sp-cat-nav-inner { position: relative; }
  .sp-cat-nav-inner::before,
  .sp-cat-nav-inner::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 44px;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.25s;
  }
  .sp-cat-nav-inner::before {
    left: 0;
    background: linear-gradient(to right, var(--sp-white) 20%, transparent);
  }
  .sp-cat-nav-inner::after {
    right: 0;
    background: linear-gradient(to left, var(--sp-white) 20%, transparent);
  }
  .nav-at-start .sp-cat-nav-inner::before { opacity: 0; }
  .nav-at-end .sp-cat-nav-inner::after { opacity: 0; }
  .sp-cat-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 4px;
  }
  .sp-cat-nav::-webkit-scrollbar { display: none; }
  .sp-cat-link { font-size: 13px; padding: 6px 12px; }

  /* Checklist cards */
  .sp-checklist-card { padding: 24px 20px; }
  .sp-checklist li { font-size: 16px; padding-left: 34px; }
  .sp-check-icon { width: 22px; height: 22px; }
  .sp-check-icon::after { top: 3px; left: 6px; width: 5px; height: 9px; }

  /* Table: smaller text */
  .sp-options-table { font-size: 14px; }
  .sp-options-table thead th { padding: 12px 14px; font-size: 12px; }
  .sp-options-table tbody td { padding: 12px 14px; }

  /* Mid-page CTA */
  .sp-mid-cta { padding: 32px 20px; }

  /* FAQ */
  .sp-faq-item summary { font-size: 16px; padding: 18px 0; }
  .sp-faq-answer { font-size: 15px; }

  /* Triangle divider */
  .sp-triangle-divider .sp-tri { transform: scale(0.8); }
}

/* ===== SMALL PHONES (under 380px) ===== */
@media (max-width: 379px) {
  .sp-h1 { font-size: 24px; }
  .sp-h2 { font-size: 24px; }
  .sp-checklist li { font-size: 15px; }
  .sp-cat-link { font-size: 12px; padding: 5px 10px; }
  .sp-options-table { font-size: 13px; }
  .sp-options-table thead th { padding: 10px 10px; }
  .sp-options-table tbody td { padding: 10px 10px; }
}
