/* Blackmon Tutoring — mobile & tablet responsiveness fixes.
   Loaded last on every page so these rules override the per-page desktop styles. */

/* ================================================================
   Shared components (most pages)
   ================================================================ */

/* Long words never push past the screen edge */
h1, h2, h3, h4 { overflow-wrap: break-word; }

@media (max-width: 640px) {
  /* Consultation / application form: one field per row */
  .form-row { grid-template-columns: 1fr !important; gap: 14px; }
  .faq-card { padding: 28px 20px; border-radius: 18px; }
  .faq-card h3 { font-size: 23px; }

  /* Page hero headings: scale down from desktop 44–48px */
  [class*="-hero"]:not(.article-hero):not(.pp-hero):not(.tc-hero) h1 {
    font-size: clamp(30px, 8.6vw, 36px);
    line-height: 1.18;
    letter-spacing: -0.4px;
  }

  /* Hero and "is this a fit?" call-to-action buttons: full width, stacked */
  [class*="-hero"] .hero-actions { flex-direction: column; align-items: stretch; width: 100%; }
  [class*="-hero"] .hero-actions > a,
  [class*="-hero"] .hero-actions > button { width: 100%; justify-content: center; text-align: center; }
  [class*="-fit-actions"] { width: 100%; align-items: stretch; }
  [class*="-fit-actions"] > a,
  [class*="-fit-actions"] > button { width: 100%; justify-content: center; text-align: center; }

  /* Desktop section spacing (88–100px) is too tall on phones */
  .ab-page section, .bc-page section, .bi-page section, .ccb-page section, .cc-page section,
  .st-page section, .tx-page section {
    padding-top: 60px; padding-bottom: 60px;
  }
  .ab-faq, .bc-faq, .bi-faq, .ccb-faq, .cc-faq, .st-faq, .tx-faq, .loc-faq {
    padding-top: 64px; padding-bottom: 64px;
  }
}

/* Tailwind preflight strips bullets from content lists */
.pp-body ul, .tc-body ul, .article-takeaways ul { list-style: disc; padding-left: 20px; }
.pp-body li::marker, .tc-body li::marker, .article-takeaways li::marker { color: #3e8dc4; }

/* ================================================================
   Home page
   ================================================================ */
@media (max-width: 479px) {
  #howItWorksList { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
  /* Video fan: the side cards were half off-screen; show only the centre card */
  #reviews .flex.items-start.justify-center > div:not(:nth-child(3)) { display: none; }
}

/* ================================================================
   About, careers and child-care pages
   ================================================================ */
@media (max-width: 600px) {
  .values-grid { grid-template-columns: 1fr; gap: 20px; }
  .ab-founder-photo { height: 360px; }
}
@media (max-width: 1100px) {
  .bi-team-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .bi-team-grid { gap: 12px; }
  .bi-team-grid > div { height: 170px; }
}
.ccb-page .section-head, .cc-page .section-head { margin-bottom: 28px; }

/* Breadcrumb eyebrows: keep the trail as one flowing line, not columns */
@media (max-width: 600px) {
  .bb-page .bb-hero .eyebrow, .ic-page .ic-hero .eyebrow {
    display: inline-block; line-height: 1.6; font-size: 12.5px; letter-spacing: 0.5px;
  }
  .bb-page .bb-hero .eyebrow .dot, .ic-page .ic-hero .eyebrow .dot {
    display: inline-block; vertical-align: middle; margin-right: 8px;
  }
}

/* Timeline cards were the same colour as their section and looked borderless */
.bg-light .ca-card, .bg-light .es-card, .bg-light .hs-card, .bg-light .ms-card {
  background: #fff; border: 1px solid var(--border, #dce3ef);
}
@media (max-width: 600px) {
  .bg-light .grid-3 { gap: 16px; }
}

/* FAQ page: category title already draws a line; drop the list's second one */
.fq-category .faq-list { border-top: 0; margin-top: 0; }

/* ================================================================
   Contact page
   ================================================================ */
@media (max-width: 600px) {
  .reach-card { padding: 24px 18px; }
  .info-row { flex-wrap: wrap; }
  .info-row .info-main { flex: 1 1 calc(100% - 60px); }
  .info-row .info-actions { flex-basis: 100%; padding-left: 60px; }
}
@media (max-width: 480px) {
  .area-chip { padding: 11px 10px; font-size: 13px; gap: 4px; }
  .area-chip .chip-label { white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

/* ================================================================
   Locations: hub, state/city template (state.css) and Texas pages
   ================================================================ */
@media (max-width: 640px) {
  .state-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .state-card { padding: 18px 16px; }
  .state-card h4 { font-size: 16px; }

  .st-program-grid { gap: 12px; }
  .st-program-card { padding: 24px 12px 20px; }
  .st-program-card h4 { font-size: 15.5px; }
  .st-program-card p { font-size: 13px; overflow-wrap: break-word; hyphens: auto; }

  .st-stats-row { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .st-stat-block .st-stat-value { font-size: 24px; }
  .st-stat-block .st-stat-label { font-size: 12.5px; }

  .st-cities-card { padding: 26px 20px; }
  .st-cities-card li::after { display: none !important; }
  .st-cities-card ul { gap: 8px 18px; }
  .st-guide-item { padding: 22px 20px; }

  .tx-city-card { height: 170px; }
  .tx-city-grid { gap: 16px; }
  .tx-other-cities li::after { display: none !important; }
  .tx-other-cities { padding: 24px 18px; }
}
@media (max-width: 480px) {
  /* Quick facts: one fact per row so long values ("Massachusetts") fit */
  .st-quickfacts .inner { grid-template-columns: 1fr; row-gap: 18px; }
  .st-fact { border-left: none; border-top: 1px solid var(--border, #dce3ef); padding: 16px 0 0; }
  .st-fact:first-child { border-top: none; padding-top: 0; }
  .st-fact .st-fact-value { font-size: 22px; }

  /* Texas quick facts: 2 × 2 instead of a tall single column */
  .tx-quickfacts .inner { grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .tx-fact, .tx-fact:first-child { padding: 0 8px; border-top: none; }
  .tx-fact .tx-fact-value { font-size: 20px; }

  /* Texas program cards: compact icon + text rows */
  .tx-program-card {
    padding: 20px 18px; display: grid; grid-template-columns: 48px 1fr;
    column-gap: 14px; text-align: left; align-items: center;
  }
  .tx-program-icon { width: 48px; height: 48px; margin: 0; grid-row: span 2; }
}

/* ================================================================
   Pricing
   ================================================================ */
@media (max-width: 640px) {
  .included-grid { gap: 12px; }
  .included-card { padding: 20px 14px; }
  .included-card h4 { font-size: 15px; }
  .included-card p { font-size: 13px; }

  /* Bundle table: all five columns fit without hidden horizontal scroll */
  .bundles-table { min-width: 0; }
  .bundles-table th, .bundles-table td { padding: 12px 6px; font-size: 13px; }
  .bundles-table th { font-size: 11px; letter-spacing: 0; }
  .bundles-table td:first-child, .bundles-table th:first-child { padding-left: 14px; }
}

/* ================================================================
   Results
   ================================================================ */
@media (max-width: 640px) {
  .gains-card .gains-list { padding: 8px 18px 20px; }
  .gains-card .gains-sub { padding: 16px 18px 0; }
  .gains-card .gains-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "plan delta" "score delta";
    row-gap: 4px; padding: 12px 0;
  }
  .gains-card .gains-plan { grid-area: plan; font-size: 16px; }
  .gains-card .gains-score { grid-area: score; justify-content: start; font-size: 16px; }
  .gains-card .gains-delta { grid-area: delta; justify-self: end; font-size: 14px; padding: 5px 12px; }

  .results-hero .hero-stats, .go-next-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .results-page .stat-block .stat-value { font-size: 22px; }
  .results-page .stat-block .stat-label { font-size: 12.5px; }

  .results-page .eyebrow { font-size: 12px; letter-spacing: 0.6px; padding: 6px 12px; }
  .results-page .filter-pill { padding: 9px 14px; font-size: 13px; }

  .case-score-strip { margin: 0 16px; padding: 18px 16px; gap: 10px; }
  .case-score .case-score-value { font-size: 18px; }
  .case-score .case-score-label { font-size: 13px; }
  .case-score-strip .arrow-circle { width: 38px; height: 38px; flex-shrink: 0; }
}

/* ================================================================
   Privacy policy & terms: body padding was being overridden to 0
   ================================================================ */
.pp-page .pp-body, .tc-page .tc-body { padding: 48px 24px 72px; }
@media (max-width: 600px) {
  .pp-page .pp-body, .tc-page .tc-body { padding: 32px 24px 56px; }
}

/* ================================================================
   Subject template (10 pages)
   ================================================================ */
.pill-tag { display: inline-block; line-height: 36px; }
.levels-progress-fill { background: #5babe0; }
@media (max-width: 600px) {
  .quiz-card .quiz-question { padding-right: 56px; }
  .level-cards { gap: 16px; scroll-snap-type: x mandatory; }
  .level-card { flex: 0 0 85%; scroll-snap-align: start; }
  .testimonial-fan .fan-1, .testimonial-fan .fan-5 { display: none; }
  .testimonial-fan .fan-2 { transform: rotate(-4.7deg) translateX(-118px) scale(.82); }
  .testimonial-fan .fan-4 { transform: rotate(5deg) translateX(118px) scale(.82); }
  .location-chip { padding: 0 14px; font-size: 15px; }
  .location-chip:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ================================================================
   Summer & winter camp
   ================================================================ */
@media (max-width: 1100px) {
  .camp-page .video-nav { display: none; }
  .camp-page .video-title { right: 70px; font-size: 16px; line-height: 1.25; }
}
@media (max-width: 480px) {
  .camp-page .eyebrow { font-size: 12px; letter-spacing: 0.5px; padding: 6px 12px; gap: 6px; max-width: 100%; text-align: left; }
  .activity-masonry { gap: 12px; }
  .activity-masonry .tall { grid-column: 1 / -1; height: 240px; }
  .activity-masonry .stack { gap: 12px; }
  .activity-masonry .stack > div { height: 150px; }
  .icebreaker-copy { padding: 28px 22px; }
}

/* ================================================================
   Testimonials & why Blackmon
   ================================================================ */
@media (max-width: 480px) {
  .ts-page .eyebrow { font-size: 12px; letter-spacing: 0.5px; padding: 6px 12px; }
  .ts-page .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .ts-card--dark h4 { font-size: 22px; }
}
@media (max-width: 1100px) {
  .wb-started-photo { height: auto; aspect-ratio: 4 / 5; max-height: 420px; }
}

/* ================================================================
   Test prep template (7 pages)
   ================================================================ */
.score-projection { justify-content: space-around; }
.score-projection .score-block .label { display: block; margin-top: 2px; }
@media (max-width: 640px) {
  .exam-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .exam-card { padding: 16px 14px; }
  .exam-card.is-featured { grid-column: span 2; }
  .result-row { padding: 20px; }
  .result-gain { text-align: left; }
}

/* ================================================================
   Blog index & articles (40 posts)
   ================================================================ */
.post-card .post-photo img { object-position: center 25%; }
.article-byline { display: block; }
@media (max-width: 600px) {
  .blog-page .filter-pills, .blog-filters .filter-pills {
    flex-wrap: nowrap; overflow-x: auto; margin: 0 -24px; padding: 0 24px 4px; scrollbar-width: none;
  }
  .blog-page .filter-pills::-webkit-scrollbar, .blog-filters .filter-pills::-webkit-scrollbar { display: none; }
  .blog-page .filter-pill, .blog-filters .filter-pill { flex-shrink: 0; }
  .search-box { width: 100%; min-width: 0; }
  .post-card .post-photo { height: 200px; }
  .article-takeaways { padding: 20px; }
}
@media (max-width: 480px) {
  .article-table { min-width: 0; font-size: 13.5px; }
  .article-table th, .article-table td { padding: 10px 12px; }
}

/* Home: "From first assessment to test day" heading kept a desktop size on phones */
@media (max-width: 640px) {
  #how-title { font-size: 30px; line-height: 1.22; letter-spacing: -0.4px; }
}

/* Section headings: desktop 32–36px serif headings wrapped to 3–4 lines on phones */
@media (max-width: 640px) {
  .ab-page h2, .bc-page h2, .bi-page h2, .ccb-page h2, .blog-page h2, .cc-page h2, .ca-page h2,
  .col-page h2, .contact-page h2, .bb-page h2, .es-page h2, .fq-page h2, .hs-page h2, .ic-page h2,
  .st-page h2, .loc-page h2, .tx-page h2, .ms-page h2, .pr-page h2, .results-page h2, .subject-page h2,
  .ty-page h2, .camp-page h2, .testprep-page h2, .ts-page h2, .wb-page h2,
  .st-overview-copy h2, .tx-overview-copy h2, .progress-columns h2, .cta-copy h2,
  .subject-diagnostic h2, .camp-cta-band h2, .testprep-cta h2,
  h2.text-4xl {
    font-size: 28px;
    line-height: 1.22;
    letter-spacing: -0.3px;
  }
  /* Contact: the odd last chip ("Worldwide (Virtual)") takes the full row instead of truncating */
  .area-chip-grid > .area-chip.is-active { grid-column: 1 / -1; }
}
