/* =====================================================================
   THE CALM PLANET — PHONE LAYOUT (Sep 2026)
   Everything here applies to phones only (max-width 640px).
   Desktop and tablet layouts are untouched.
   Goal: shorter pages, less scrolling, calmer spacing, same brand.
   ===================================================================== */
@media (max-width: 640px) {

  /* ---------- Global rhythm: tighter sections and headings ---------- */
  .section { padding: 46px 0; }
  .section.tight { padding: 34px 0; }
  .home-intro { padding-inline: 24px !important; } /* fix: intro text was touching the screen edges */
  h2 { font-size: 1.6rem; line-height: 1.22; }
  .eyebrow { margin-bottom: 12px; }
  .lead { font-size: 1.02rem; line-height: 1.6; }
  .page-hero { padding: 48px 0 44px !important; }
  .page-hero h1 { font-size: clamp(1.9rem, 8vw, 2.3rem); line-height: 1.15; }
  .btn-lg { font-size: 1rem; }

  /* ---------- Specialty cards (Home + Therapy): 2-column compact tiles ---------- */
  .benefits { grid-template-columns: 1fr 1fr; gap: 10px; }
  .bcard { padding: 18px 12px 16px; border-radius: 18px; }
  .bcard:hover { transform: none; }
  .bcard-ic { width: 38px; height: 38px; margin: 0 auto 8px; }
  .bcard-ic svg { width: 30px; height: 30px; }
  .bcard h3 { font-size: .98rem; line-height: 1.25; margin-bottom: 0; }
  .bcard p { display: none; }
  .benefit-featured { margin-top: 12px; padding: 20px 18px; gap: 8px; }
  .benefit-featured .bf-ic svg { width: 36px; height: 36px; }
  .benefit-featured .bf-text h3 { font-size: 1.15rem; }
  .benefit-featured .bf-text p { font-size: .94rem; }
  .benefit-featured .bf-arrow { display: none; }

  /* ---------- Home: "Two ways we support wellbeing" ---------- */
  .niche + .niche { margin-top: 18px; }
  .niche-side, .niche-photo { min-height: 190px !important; }
  .niche-text { padding: 26px 22px 28px; }
  .niche-text p { font-size: 1rem; margin-bottom: 20px; }
  .calm-band { padding: 58px 0; }
  .calm-quote { font-size: 1.3rem; }
  .closing p { font-size: 1.02rem; margin-bottom: 24px; }

  /* ---------- Workplace programs: compact icon rows instead of tall cards ---------- */
  .simple-list { grid-template-columns: 1fr !important; gap: 10px; }
  .sl-card { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: start; text-align: left; padding: 16px 16px 16px 14px; }
  .sl-card .sl-ic { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; margin: 2px 0 0; }
  .sl-card .sl-ic svg { width: 22px; height: 22px; }
  .sl-card h3 { font-size: 1.05rem; margin: 0 0 3px; }
  .sl-card p { font-size: .9rem; line-height: 1.5; }

  /* ---------- "How it works" steps: number beside text ---------- */
  .steps { grid-template-columns: 1fr !important; gap: 14px; max-width: 420px; }
  .step { display: grid; grid-template-columns: 42px 1fr; column-gap: 14px; text-align: left; align-items: start; }
  .step .step-n { grid-row: span 2; width: 40px; height: 40px; font-size: 1.1rem; margin: 0; }
  .step h3 { font-size: 1.05rem; margin: 6px 0 2px; }
  .step p { font-size: .92rem; }

  /* ---------- Workplace "In action" photos: one row of three ---------- */
  .cw-photos { grid-template-columns: repeat(3, 1fr) !important; gap: 8px; }
  .cw-photo { border-radius: 12px; }

  /* ---------- Therapy "What we help with" chips ---------- */
  .help-chips { gap: 8px; }
  .chip { padding: 8px 14px; font-size: .88rem; }
  .photo-band { padding: 62px 0; }
  .band-quote { font-size: 1.3rem; }

  /* ---------- Service pages: related links as a 2-column grid ---------- */
  .service-detail .related-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .service-detail .related-grid a { padding: 10px 8px !important; font-size: .86rem !important; line-height: 1.35 !important; display: flex; align-items: center; justify-content: center; }
  .service-detail .related-grid a:last-child:nth-child(odd) { grid-column: 1 / -1; }

  /* ---------- About ---------- */
  .ecard { padding: 26px 22px; }
  .af-photo { aspect-ratio: 16/10 !important; }

  /* ---------- Team: shorter cards, bios expand on tap ---------- */
  .team-grid { gap: 20px; }
  .member-photo { aspect-ratio: 5/4 !important; object-position: center 22%; }
  .member-body { padding: 22px 20px 24px; }
  .member-name { font-size: 1.35rem; }
  .member-cred { font-size: .78rem; }
  .bio-more[hidden] { display: none; }
  .bio-toggle { display: inline-flex; align-items: center; gap: 6px; margin: -6px 0 16px; padding: 8px 0; background: none; border: 0; color: var(--teal); font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; }
  .bio-toggle::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
  .bio-toggle[aria-expanded="true"]::after { transform: rotate(-135deg) translateY(-2px); }
  .bio-toggle:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

  /* ---------- Gallery: 2-column photo grid, captions shown in the lightbox ---------- */
  .gallery { columns: 2 !important; column-gap: 10px !important; }
  .gitem { margin-bottom: 10px !important; border-radius: 14px !important; }
  .gitem figcaption { display: none; }

  /* ---------- Blog: compact list (thumbnail beside title) ---------- */
  .post-grid { gap: 14px !important; }
  .post-card { display: grid !important; grid-template-columns: 108px 1fr; align-items: stretch; border-radius: 16px !important; }
  .post-card .thumb { width: 108px !important; height: 100% !important; min-height: 118px; aspect-ratio: auto !important; }
  .post-card .body { padding: 14px 16px 14px !important; }
  .post-card .post-tag { font-size: .6rem; padding: 3px 9px; margin-bottom: 7px; }
  .post-card h2 { font-size: 1.05rem !important; line-height: 1.28 !important; margin-bottom: 4px !important; }
  .post-card p { display: none; }
  .post-card .more { margin-top: 6px !important; font-size: .85rem !important; }

  /* ---------- Articles: comfortable reading size ---------- */
  .article-hero { padding-top: 40px !important; }
  .article-hero h1 { font-size: clamp(1.75rem, 7.4vw, 2.2rem); line-height: 1.18; }
  .article-figure { margin-top: 22px !important; padding: 0 16px !important; }
  .article-figure img { border-radius: 14px !important; aspect-ratio: 16/10 !important; }
  .article-body { font-size: 1.04rem !important; line-height: 1.68 !important; }
  .article-body h2 { font-size: 1.4rem !important; margin: 30px 0 10px !important; }
  .article-body h3 { font-size: 1.15rem; }

  /* ---------- Contact ---------- */
  .contact-grid { gap: 18px !important; }
  .info-card { padding: 22px 20px !important; margin-bottom: 14px !important; }

  /* ---------- Footer: tighter ---------- */
  .footer { padding: 48px 0 28px; }
  .footer-links { gap: 10px 20px; margin-bottom: 22px; }
}

/* Team bio toggle is a phone-only control. */
.bio-toggle { display: none; }
@media (max-width: 640px) {
  .bio-toggle { display: inline-flex; }
  .page-hero:has(.ph-text) { min-height: 62vh !important; }
}

/* Mobile polish: visual refinements only; content and desktop rules retained. */
@media (max-width: 640px) {
  body { font-size: 17px; }
  h1, h2, h3 { text-wrap: balance; }
  .section { padding-block: 48px; }
  .container { padding-inline: 22px; }
  .nav-inner { padding-block: 8px; }
  .nav-toggle { border: 1px solid var(--line); border-radius: 14px; background: var(--cream); }
  .nav-links { padding: 8px 22px 22px; border-radius: 0 0 22px 22px; box-shadow: 0 18px 30px -24px rgba(33,55,87,.45); max-height: calc(100dvh - 68px); }
  .nav-links a.active:not(.nav-cta) { color: var(--teal); font-weight: 700; }
  .btn { min-height: 48px; line-height: 1.45; }
  .page-hero .btn, .closing .btn, .niche-text .btn { width: 100%; }
  .page-hero h1 { text-wrap: balance; }
  .service-hub .page-hero { padding-block: 44px !important; }
  .service-hub .page-hero .lead { line-height: 1.7; }
  .service-hub .section > .container > .center .lead { text-align: left; line-height: 1.7; }
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .bcard { position: relative; padding: 20px 12px 18px; border: 1px solid rgba(91,133,181,.13); border-radius: 20px; box-shadow: 0 4px 14px -10px rgba(44,74,110,.2); }
  .bcard-ic { width: 44px; height: 44px; margin-bottom: 12px; border-radius: 50%; background: rgba(255,255,255,.7); }
  .bcard-ic svg { width: 29px; height: 29px; }
  .bcard h3 { font-size: 1.05rem; line-height: 1.3; }
  .bcard:active { border-color: var(--sky); background: #e4edf5; }
  .niche { border-radius: 22px; }
  .niche-text { padding: 26px 22px; }
  .niche-text .btn { padding-inline: 16px; font-size: .95rem; }
  .help-chips { gap: 9px; }
  .chip { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 14px; }
  .step { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
  .step h3 { line-height: 1.35; }
  .service-detail .related-grid a { min-height: 48px; }
  .article-body { overflow-wrap: break-word; }
  .footer-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 16px; }
  .footer-links a { min-height: 44px; display: flex; justify-content: center; align-items: center; font-size: .95rem; }
  .social-icons a { width: 44px; height: 44px; }
  a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
}
@media (max-width: 360px) {
  .container, .service-hub .container, .service-detail .container { padding-inline: 18px; }
  .bcard { padding-inline: 9px; }
  .bcard h3 { font-size: .98rem; }
  .nav .brand-name { font-size: 1.1rem; }
}

/* Final agreed mobile simplifications. */
@media (max-width: 640px) {
 .section.related, .article-related, .section:has(.help-chips) { display:none !important; }
 .contact-grid > .form-wrap { order:-1; }
 .footer .footer-links { display:none; }
}
