/* mobile-pages.css
   Phone-only layouts (max-width: 640px). Nothing in this file applies on desktop. */

/* Elements created for phones only stay hidden on larger screens */
.m-only { display: none !important; }

@media (max-width: 640px) {
  .m-only { display: revert !important; }

  /* ── Shared: header menu panel (all inner pages) ───────────────────── */
  #mobile-nav.mobile-nav,
  .mobile-nav {
    padding: 0 !important;
    gap: 0 !important;
    top: 68px !important;
    left: auto !important;
    right: 14px !important;
    width: min(280px, calc(100vw - 28px)) !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    background: #fff !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18) !important;
    border: 0 !important;
  }
  .mobile-nav-header { padding: 14px 18px !important; border-radius: 0 !important; margin: 0 !important; }
  .mobile-nav-content { padding: 4px 0 !important; }
  .mobile-nav-content > .nav-link,
  .mobile-nav-content .mobile-nav-link {
    padding: 13px 18px !important;
    margin: 0 !important;
    font-size: 0.95rem !important;
    border-radius: 0 !important;
  }
  .nav-mobile-header .top-bar-inner { height: 64px; }

  /* Inner pages: sensible top spacing under the fixed 64px header */
  body.page-about main { padding-top: 64px !important; }

  /* ── ABOUT ─────────────────────────────────────────────────────────── */
  .page-about .v2-about-hero { min-height: 0 !important; padding: 56px 0 48px; }
  .page-about .v2-hero-lineart { opacity: 0.45; width: 220%; }
  .page-about .v2-hero-content { padding: 0 22px !important; }
  .page-about .v2-hero-eyebrow { font-size: 0.7rem; margin-bottom: 14px; }
  .page-about .v2-hero-title { font-size: 2.05rem !important; line-height: 1.2; }

  .page-about .v2-story { padding: 48px 0 !important; }
  .page-about .v2-story-container { display: block !important; padding: 0 22px !important; }
  .page-about .v2-story-sidebar { margin-bottom: 12px; }
  .page-about .vertical-label { position: static; transform: none; font-size: 0.68rem; }
  .page-about .v2-story-headline { font-size: 1.55rem !important; margin-bottom: 22px !important; }
  .page-about .v2-story-paragraphs { column-count: 1 !important; }
  .page-about .v2-story-paragraphs p { font-size: 1rem !important; line-height: 1.75; margin-bottom: 16px; }

  .page-about .v2-framework { padding: 48px 0 8px !important; }
  .page-about .v2-framework-header { margin-bottom: 24px !important; padding: 0 22px !important; }
  .page-about .v2-framework-title { font-size: 2.1rem !important; }
  .page-about .v2-framework-sub { font-size: 0.95rem !important; }
  .page-about .v2-fw-row { border: 0 !important; }
  .page-about .v2-fw-inner {
    display: grid !important;
    grid-template-columns: 1fr 92px !important;
    gap: 14px !important;
    align-items: center !important;
    direction: ltr !important;
    margin: 0 16px 14px !important;
    padding: 22px 18px !important;
    background: var(--bg, #f5f0e6);
    border-radius: 20px;
  }
  .page-about .alt-row .v2-fw-inner { background: rgba(15, 96, 107, 0.06); }
  .page-about .v2-fw-text { max-width: none !important; }
  .page-about .fw-num { margin-bottom: 4px !important; font-size: 0.95rem !important; }
  .page-about .v2-fw-text h3 { font-size: 1.7rem !important; margin-bottom: 8px !important; }
  .page-about .v2-fw-text p { font-size: 0.95rem !important; line-height: 1.65 !important; margin: 0; }
  .page-about .v2-fw-art { height: 92px !important; width: 92px !important; padding: 0 !important; background: transparent !important; }
  .page-about .v2-fw-art svg { width: 92px !important; height: 92px !important; }

  .page-about main > section[style*="padding:100px"] { padding: 48px 0 !important; }
  .page-about main > section[style*="padding:100px"] .inner-max { padding: 0 16px !important; }
  .page-about main > section[style*="padding:100px"] h2 { margin-bottom: 24px !important; font-size: 1.6rem !important; }
  .page-about div[style*="padding:52px"] { padding: 26px 22px !important; border-radius: 20px !important; }
  .page-about div[style*="padding:52px"] p { font-size: 0.98rem !important; line-height: 1.75 !important; }

  .page-about .v2-manifesto { padding: 56px 0 !important; }
  .page-about .v2-manifesto-inner { padding: 0 22px !important; }
  .page-about .v2-manifesto h2 { font-size: 1.75rem !important; line-height: 1.25 !important; }
  .page-about .v2-manifesto p { font-size: 1rem !important; }
  .page-about .btn-manifesto { width: 100%; display: block; text-align: center; padding: 15px 20px !important; }

  /* ── EXPERTISE: topic accordion ────────────────────────────────────── */
  .m-exp-intro { padding: 84px 20px 6px; text-align: left; }
  .m-exp-intro h1 { font-family: var(--font-serif, 'DM Serif Display', serif); font-weight: 400; color: var(--teal); font-size: 2rem; margin: 0 0 6px; }
  .m-exp-intro p { color: #6b645c; font-size: 0.95rem; line-height: 1.55; margin: 0; }
  body.m-exp .concern-capsules-wrap { margin-top: 10px !important; }
  body.m-exp .concerns-container { padding: 6px 14px 40px !important; gap: 10px !important; display: flex; flex-direction: column; }
  body.m-exp .concern-section {
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 18px !important;
    overflow: hidden;
    scroll-margin-top: 140px;
  }
  body.m-exp .concern-title {
    margin: 0 !important;
    padding: 18px 54px 18px 20px !important;
    font-size: 1.35rem !important;
    line-height: 1.25 !important;
    cursor: pointer;
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }
  body.m-exp .concern-title::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2.5px solid currentColor;
    border-bottom: 2.5px solid currentColor;
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s;
    opacity: 0.8;
  }
  body.m-exp .concern-section.m-open .concern-title::after { transform: translateY(-30%) rotate(-135deg); }
  body.m-exp .concern-section:not(.m-open) .concern-signs,
  body.m-exp .concern-section:not(.m-open) .concern-note,
  body.m-exp .concern-section:not(.m-open) .concern-actions { display: none !important; }
  body.m-exp .concern-section.m-open .concern-signs { margin: 0 14px 14px !important; padding: 16px 18px !important; }
  body.m-exp .concern-section.m-open .concern-signs h4 { font-size: 1.05rem !important; margin-bottom: 8px !important; }
  body.m-exp .concern-section.m-open .concern-signs li { font-size: 0.93rem !important; margin-bottom: 8px !important; }
  body.m-exp .concern-section.m-open .concern-note { margin: 0 20px 16px !important; font-size: 1rem !important; }
  body.m-exp .concern-section.m-open .concern-actions { display: flex !important; gap: 10px; padding: 0 14px 18px; flex-wrap: nowrap; }
  body.m-exp .concern-section.m-open .concern-actions a { flex: 1 1 0; display: flex !important; align-items: center; justify-content: center; text-align: center; padding: 12px 10px !important; font-size: 0.85rem !important; margin: 0 !important; }

  /* ── TEAM: therapist switcher ──────────────────────────────────────── */
  body.m-team .team-hero { padding: 84px 20px 4px !important; }
  body.m-team .team-hero h1 { font-size: 1.9rem !important; margin-bottom: 6px !important; }
  body.m-team .team-hero p { font-size: 0.92rem !important; }
  .m-rail {
    position: sticky;
    top: 64px;
    z-index: 30;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 12px 12px 10px;
    background: rgba(245, 240, 230, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  .m-rail button {
    background: none;
    border: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font: inherit;
    color: #6b645c;
    -webkit-tap-highlight-color: transparent;
  }
  .m-rail .ring {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    padding: 3px;
    background: rgba(15, 96, 107, 0.15);
    transition: transform 0.2s, background 0.2s;
  }
  .m-rail img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 22%;
    border: 2px solid #fff;
    display: block;
  }
  .m-rail .nm { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.01em; }
  .m-rail button[aria-selected="true"] .ring { background: linear-gradient(135deg, #e6ad55, var(--peach), var(--teal)); transform: scale(1.06); }
  .m-rail button[aria-selected="true"] .nm { color: var(--teal); }
  .m-rail-hint { text-align: center; font-size: 0.72rem; color: #9a9389; margin: 8px 0 0; }

  body.m-team .team-container { padding: 14px 14px 48px !important; gap: 0 !important; }
  body.m-team .therapist-profile { display: none !important; }
  body.m-team .therapist-profile.m-active {
    display: block !important;
    animation: mFadeIn 0.28s ease;
    background: #fff;
    border-radius: 22px;
    padding: 14px !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  }
  body.m-team .therapist-profile .t-photo {
    width: 100% !important;
    height: 300px !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    object-position: 50% 25% !important;
    border-radius: 16px !important;
    box-shadow: none !important;
  }
  body.m-team .t-info { padding: 16px 6px 4px; }
  body.m-team .t-name { font-size: 1.75rem !important; margin-bottom: 2px !important; }
  body.m-team .t-title { font-size: 0.78rem !important; margin-bottom: 14px !important; }
  body.m-team .t-tags { gap: 6px !important; margin-bottom: 18px !important; }
  body.m-team .t-tags span { padding: 6px 11px !important; font-size: 0.78rem !important; }
  body.m-team .t-section h4 { font-size: 1.2rem !important; }
  body.m-team .t-section p { font-size: 0.95rem !important; line-height: 1.7 !important; }
  body.m-team .t-fee { font-size: 0.82rem !important; line-height: 1.5; }
  body.m-team .therapist-profile .btn-hero-book { width: 100%; text-align: center; }
  body.m-team .therapist-profile div[style*="margin-top: 40px"] { margin-top: 18px !important; }
  .m-swipe-nav { display: flex !important; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; }
  .m-swipe-nav button {
    flex: 1;
    border: 1.5px solid rgba(15, 96, 107, 0.25);
    background: #fff;
    color: var(--teal);
    border-radius: 100px;
    padding: 11px 10px;
    font-weight: 700;
    font-size: 0.82rem;
    font-family: inherit;
  }
  @keyframes mFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

  /* ── SELF-CARE ─────────────────────────────────────────────────────── */
  .sc-hero { padding: 92px 20px 34px !important; }
  .sc-hero h1 { font-size: 1.9rem !important; }
  .sc-hero p { font-size: 0.95rem !important; }
  .sc-container { padding-left: 0 !important; padding-right: 0 !important; display: block !important; width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
  .sc-container > * { min-width: 0 !important; max-width: 100% !important; }
  .sc-section-title, .sc-section-sub { padding-left: 20px; padding-right: 20px; }
  .sc-section-title { font-size: 1.6rem !important; }
  .sc-divider { margin-left: 20px !important; margin-right: 20px !important; }
  .blog-grid {
    display: flex !important;
    grid-template-columns: none !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px !important;
    padding: 4px 20px 14px !important;
    scrollbar-width: none;
    width: 100% !important;
    max-width: 100vw !important;
  }
  .blog-grid::-webkit-scrollbar { display: none; }
  .blog-card { flex: 0 0 78%; scroll-snap-align: start; margin: 0 !important; }
  .blog-card-img { height: 110px !important; font-size: 2.6rem !important; }
  .blog-card-body { padding: 16px !important; }
  .blog-title { font-size: 1.05rem !important; }
  .blog-excerpt { font-size: 0.85rem !important; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .m-swipe-hint { display: block !important; padding: 0 20px; margin: -2px 0 8px; font-size: 0.75rem; color: #9a9389; }
  .tools-grid { display: flex !important; flex-direction: column; gap: 10px !important; padding: 0 16px !important; }
  .tool-card {
    display: grid !important;
    grid-template-columns: 44px 1fr;
    grid-template-areas: "icon title" "icon desc" "btn btn";
    column-gap: 14px;
    row-gap: 4px;
    align-items: start;
    padding: 16px !important;
    margin: 0 !important;
  }
  .tool-icon { grid-area: icon; font-size: 1.9rem !important; margin: 0 !important; line-height: 1.2; }
  .tool-title { grid-area: title; margin: 0 !important; font-size: 1.02rem !important; }
  .tool-desc { grid-area: desc; margin: 0 0 8px !important; font-size: 0.85rem !important; }
  .tool-btn { grid-area: btn; justify-self: start; margin: 4px 0 0 58px !important; }
  .journal-section { margin: 0 16px !important; padding: 24px 18px !important; }

  /* ── BOOKING PAGES ─────────────────────────────────────────────────── */
  .booking-hero h1 { font-size: 1.8rem !important; }
  .therapist-grid { gap: 10px !important; }
  .t-select-card { padding: 12px 8px !important; }
  .t-select-card .t-sel-name { font-size: 0.9rem !important; line-height: 1.25; }
  .t-select-card .t-sel-spec { font-size: 0.72rem !important; }

  /* ── HOME: Our Experts spotlight ───────────────────────────────────── */
  .xp-spot { padding: 0 16px; }
  .xp-rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 14px; }
  .xp-rail button { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; color: #7a7268; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .xp-rail .ring { position: relative; width: 64px; height: 64px; border-radius: 50%; padding: 3px; background: rgba(15, 96, 107, 0.14); transition: transform 0.25s, background 0.25s; }
  .xp-rail img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 20%; border: 2px solid #fff; display: block; }
  .xp-rail .nm { font-size: 0.74rem; font-weight: 700; }
  .xp-rail button[aria-selected="true"] .ring { background: conic-gradient(from 200deg, #e6ad55, var(--peach), var(--teal), #e6ad55); transform: scale(1.08); }
  .xp-rail button[aria-selected="true"] .nm { color: var(--teal); }
  .xp-stage {
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    background: radial-gradient(120% 80% at 50% 0%, #1a7a86 0%, #0f606b 45%, #0a4850 100%);
    color: #fff;
    box-shadow: 0 18px 40px rgba(15, 96, 107, 0.28);
    touch-action: pan-y;
  }
  .xp-photo { position: relative; height: 250px; overflow: hidden; }
  .xp-photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 52%; }
  .xp-photo::after { content: ''; position: absolute; inset: auto 0 0; height: 70px; background: linear-gradient(to bottom, transparent, #0f606b); }
  .xp-badge { position: absolute; top: 14px; left: 14px; z-index: 2; background: rgba(255, 255, 255, 0.95); color: var(--teal); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; padding: 6px 11px; border-radius: 100px; }
  .xp-count { position: absolute; top: 14px; right: 14px; z-index: 2; background: rgba(0, 0, 0, 0.28); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 5px 10px; border-radius: 100px; }
  .xp-body { padding: 4px 20px 20px; position: relative; }
  .xp-name { font-family: var(--font-serif, 'DM Serif Display', serif); font-size: 1.75rem; line-height: 1.15; margin: 0; }
  .xp-core { font-size: 0.82rem; opacity: 0.85; margin: 4px 0 12px; line-height: 1.45; }
  .xp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
  .xp-tags span { font-size: 0.74rem; font-weight: 700; padding: 5px 10px; border-radius: 100px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.18); }
  .xp-tags span.more { background: transparent; border-style: dashed; }
  .xp-btns { display: flex; gap: 10px; }
  .xp-btns a { flex: 1; text-align: center; border-radius: 100px; padding: 12px 10px; font-weight: 800; font-size: 0.86rem; text-decoration: none; }
  .xp-btns .ghost { color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.5); }
  .xp-btns .solid { color: #1f2a2c; background: linear-gradient(135deg, #e6ad55, var(--peach)); }
  .xp-anim { animation: xpIn 0.35s ease; }
  @keyframes xpIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
  .xp-fade { animation: xpFade 0.4s ease; }
  @keyframes xpFade { from { opacity: 0; } to { opacity: 1; } }
  .xp-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
  .xp-dots i { width: 6px; height: 6px; border-radius: 6px; background: rgba(15, 96, 107, 0.25); transition: width 0.25s, background 0.25s; }
  .xp-dots i.on { width: 20px; background: var(--teal); }
}

@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  .xp-anim, .xp-fade, body.m-team .therapist-profile.m-active { animation: none !important; }
}

/* Calm Corner promo on Self-Care */
@media (max-width: 640px) {
  .r4-calm-promo { flex-wrap: wrap !important; padding: 18px !important; gap: 12px !important; margin: 0 16px 28px !important; }
  .r4-calm-promo > span:last-child { width: 100%; text-align: center; }
}
