/* ============================================================
   Mobile compaction for the About page (about.html).

   Mirrors homepage mobile patterns: tighter section rhythm,
   swipe carousels with arrows + dots (via mobile-carousel-dots.js).
   Desktop layout is unchanged — all rules are @media (max-width: 768px).
   ============================================================ */

@media (max-width: 768px) {

  /* ---- Carousel shell (shared with homepage) ------------------------- */
  body.page-about .mobile-carousel-shell {
    position: relative;
    width: calc(100% + (2 * var(--mobile-carousel-inset, 16px)));
    max-width: calc(100% + (2 * var(--mobile-carousel-inset, 16px)));
    margin-inline: calc(-1 * var(--mobile-carousel-inset, 16px));
    overflow: hidden;
  }

  body.page-about .mobile-carousel-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--orange, #ea580c);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 8px rgba(15, 23, 42, 0.14);
    cursor: pointer;
    opacity: 0.82;
    transform: translateY(-50%);
    transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  }
  body.page-about .mobile-carousel-shell:has(.team-cards-host) .mobile-carousel-arrow {
    top: 72px;
  }
  body.page-about .mobile-carousel-shell:has(.timeline) .mobile-carousel-arrow {
    top: 78px;
  }
  body.page-about .mobile-carousel-shell:has(.awards-grid) .mobile-carousel-arrow {
    top: 96px;
  }
  body.page-about .mobile-carousel-arrow--prev { left: 8px; }
  body.page-about .mobile-carousel-arrow--next { right: 8px; }
  body.page-about .mobile-carousel-arrow:active:not(.is-disabled) {
    transform: translateY(-50%) scale(0.94);
    background: rgba(255, 255, 255, 0.9);
    opacity: 0.95;
  }
  body.page-about .mobile-carousel-arrow.is-disabled {
    opacity: 0;
    pointer-events: none;
  }
  body.page-about .mobile-carousel-arrow:focus-visible {
    outline: 2px solid var(--orange, #ea580c);
    outline-offset: 2px;
    opacity: 0.95;
  }
  body.page-about .mobile-carousel-shell:focus-within .mobile-carousel-arrow:not(.is-disabled),
  body.page-about .mobile-carousel-shell:hover .mobile-carousel-arrow:not(.is-disabled) {
    opacity: 0.92;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
  }

  body.page-about .mobile-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin: 10px 0 4px;
    padding: 0;
  }
  body.page-about .mobile-carousel-dot {
    appearance: none;
    border: none;
    padding: 0;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(30, 58, 95, 0.28);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  }
  body.page-about .mobile-carousel-dot.is-active {
    background: var(--orange, #ea580c);
    transform: scale(1.35);
  }
  body.page-about .mobile-carousel-dot:focus-visible {
    outline: 2px solid var(--orange, #ea580c);
    outline-offset: 2px;
  }

  /* ---- Swipe tracks -------------------------------------------------- */
  body.page-about .team-cards-host,
  body.page-about .timeline,
  body.page-about .awards-grid {
    --mobile-carousel-gap: 14px;
    display: flex;
    flex-wrap: nowrap;
    grid-template-columns: none;
    gap: var(--mobile-carousel-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 0 8px;
    box-sizing: border-box;
    scrollbar-width: none;
    list-style: none;
  }
  body.page-about .team-cards-host::-webkit-scrollbar,
  body.page-about .timeline::-webkit-scrollbar,
  body.page-about .awards-grid::-webkit-scrollbar {
    display: none;
  }

  body.page-about .team-cards-host > .team-card,
  body.page-about .timeline > li,
  body.page-about .awards-grid > .awards-card {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  /* Flatten nested grids so all instructor cards are slides */
  body.page-about .team-cards-host .team-grid--lead,
  body.page-about .team-cards-host .team-grid--associates {
    display: contents;
  }
  body.page-about .team-cards-host .team-tier-divider {
    display: none !important;
  }

  body.page-about #instructors .container-wide {
    --mobile-carousel-inset: 16px;
  }
  body.page-about #story .container--narrow,
  body.page-about #awards .container--narrow {
    --mobile-carousel-inset: 16px;
  }

  body.page-about #instructors,
  body.page-about #story,
  body.page-about #awards {
    overflow-x: clip;
    overflow-y: visible;
  }

  /* ---- Hero ---------------------------------------------------------- */
  body.page-about header.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    box-sizing: border-box;
    margin-top: 0;
    padding-top: calc(var(--site-nav-stack, 80px) + 22px) !important;
    padding-bottom: 20px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  body.page-about header.hero .section-label {
    margin-top: 10px;
    margin-bottom: 10px;
  }
  body.page-about header.hero h1 {
    font-size: clamp(1.48rem, 5vw, 1.88rem);
    line-height: 1.16;
    margin-bottom: 10px;
    -webkit-text-stroke: 0.4px rgba(15, 23, 42, 0.55);
    paint-order: stroke fill;
    text-shadow:
      0 1px 4px rgba(0, 0, 0, 0.5),
      1px 0 0 rgba(15, 23, 42, 0.3),
      -1px 0 0 rgba(15, 23, 42, 0.3);
  }
  body.page-about header.hero .hero-headline-line {
    display: block;
  }
  body.page-about header.hero .hero-sub--full {
    display: none;
  }
  body.page-about header.hero .hero-sub--mobile {
    display: block;
    max-width: 300px;
    font-size: 0.88rem;
    line-height: 1.4;
    margin-bottom: 12px;
  }
  body.page-about header.hero .hero-actions {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
  }
  body.page-about header.hero .hero-actions .btn {
    width: 100%;
    max-width: 300px;
    padding: 11px 16px;
    font-size: 0.88rem;
  }
  body.page-about header.hero address {
    display: none;
  }

  /* ---- Section rhythm ------------------------------------------------ */
  body.page-about #about-sections > section {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  body.page-about #about-sections > section.visual-break {
    padding: 0 !important;
  }
  body.page-about #about-sections > section .section-label {
    margin-bottom: 6px;
  }
  body.page-about #about-sections > section .section-title {
    margin-bottom: 6px;
    font-size: clamp(1.28rem, 4.8vw, 1.48rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
  }
  body.page-about #about-sections > section .about-headline-line {
    display: block;
  }
  body.page-about #about-sections > section .section-subtitle {
    margin-bottom: 6px !important;
    font-size: 0.86rem;
    line-height: 1.38;
  }
  body.page-about #about-sections > section .section-subtitle--full {
    display: none;
  }
  body.page-about #about-sections > section .section-subtitle--mobile {
    display: block;
  }

  /* ---- Instructors --------------------------------------------------- */
  body.page-about #instructors {
    padding-top: 20px !important;
  }
  body.page-about #instructors .container--narrow {
    text-align: center;
    padding-bottom: 0;
  }
  body.page-about #instructors .section-subtitle--mobile {
    display: none;
  }
  body.page-about .team-cards-host {
    margin-top: 4px;
    padding-inline: var(--mobile-carousel-inset, 16px);
    scroll-padding-inline: var(--mobile-carousel-inset, 16px);
  }
  body.page-about .team-cards-host .team-card {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    height: auto;
    padding: 12px 28px 14px;
    text-align: center;
    align-items: center;
    border-top: 4px solid var(--orange, #ea580c);
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.1);
  }
  body.page-about .team-cards-host .team-card .team-card__badge {
    display: none;
  }
  body.page-about .team-cards-host .team-card .team-photo-frame {
    width: 82px;
    height: 82px;
    margin: 0 auto 10px;
  }
  body.page-about .team-cards-host .team-card h3 {
    font-size: 1.05rem;
    min-height: 0;
    margin-bottom: 3px;
  }
  body.page-about .team-cards-host .team-card .role {
    order: 2;
    font-size: 0.68rem;
    margin-bottom: 7px;
    line-height: 1.3;
  }
  body.page-about .team-cards-host .team-card h3 {
    order: 1;
  }
  body.page-about .team-cards-host .team-card .known-for {
    order: 3;
    width: 100%;
    font-size: 0.79rem;
    min-height: 0;
    padding: 9px 10px;
    margin-bottom: 0;
    text-align: center;
  }
  body.page-about .team-cards-host .team-card > p:last-child {
    display: none;
  }

  /* ---- Visual break -------------------------------------------------- */
  body.page-about .visual-break figure {
    aspect-ratio: 16 / 9;
    max-height: 200px;
  }

  /* ---- Story / timeline ---------------------------------------------- */
  body.page-about #story .container--narrow {
    text-align: center;
  }
  body.page-about #story .timeline {
    margin-top: 6px;
    margin-left: 0;
    border-left: none;
    padding-left: 0;
    text-align: left;
  }
  body.page-about #story .timeline > li {
    position: relative;
    padding: 12px 28px 13px;
    background: var(--white, #fff);
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--orange, #ea580c);
  }
  body.page-about #story .timeline > li::before {
    display: none;
  }
  body.page-about #story .timeline > li time {
    font-size: 0.69rem;
    margin-bottom: 4px;
  }
  body.page-about #story .timeline > li h3 {
    font-size: 0.98rem;
    margin-bottom: 6px;
  }
  body.page-about #story .timeline > li > p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.82rem;
    line-height: 1.38;
  }
  body.page-about #story .timeline-archive-row {
    margin-top: 8px;
    flex-direction: column;
  }
  body.page-about #story .timeline-archive,
  body.page-about #story .timeline-archive--alt,
  body.page-about #story .timeline-archive--today {
    transform: none;
    max-width: 100%;
    margin-left: 0;
  }
  body.page-about #story .timeline-archive-row .timeline-archive:nth-child(n + 2) {
    display: none;
  }
  body.page-about #story .timeline-archive__eyebrow,
  body.page-about #story .timeline-archive__caption {
    display: none;
  }
  body.page-about #story .timeline-archive {
    padding: 6px;
  }
  body.page-about #story .timeline-archive__frame {
    aspect-ratio: 1 / 1;
  }
  body.page-about #story .timeline-archive__frame img {
    object-fit: contain;
    padding: 6px;
    background: #fbf6ea;
  }
  body.page-about #story .timeline-award-cta {
    font-size: 0.8rem;
    margin-top: 8px;
  }
  body.page-about #story .section-footer-link {
    display: flex;
    justify-content: center;
    margin-top: 8px;
    font-size: 0.88rem;
  }

  /* ---- Awards -------------------------------------------------------- */
  body.page-about #awards {
    background: var(--gray-50, #f9fafb);
  }
  body.page-about #awards .container--narrow {
    text-align: center;
  }
  body.page-about .awards-grid {
    margin-top: 4px;
    padding-inline: var(--mobile-carousel-inset, 16px);
    scroll-padding-inline: var(--mobile-carousel-inset, 16px);
  }
  body.page-about .awards-grid > .awards-card {
    overflow: hidden;
    border-top: 4px solid var(--orange, #ea580c);
    box-shadow: 0 4px 14px rgba(30, 58, 95, 0.1);
  }
  body.page-about .awards-grid > .awards-card .awards-card__body {
    padding: 8px 14px 10px;
    text-align: center;
  }
  body.page-about .awards-grid > .awards-card .awards-card__title {
    font-size: 0.95rem;
  }
  body.page-about .awards-grid > .awards-card .awards-card__note {
    display: none;
  }
  body.page-about .awards-grid > .awards-card .awards-card__media {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  body.page-about .awards-grid > .awards-card .awards-card__media img {
    object-fit: contain;
  }
  body.page-about .awards-grid > .awards-card--podcast .awards-card__media {
    aspect-ratio: 16 / 9;
    display: block;
  }
  body.page-about .awards-grid > .awards-card--podcast .awards-card__watch {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--orange, #ea580c);
    text-decoration: none;
  }
  body.page-about #awards .section-footer-link {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    font-size: 0.88rem;
  }

  body.page-about .mobile-carousel-dots {
    margin: 6px 0 0;
  }

  /* ---- Bottom CTA ---------------------------------------------------- */
  body.page-about .cta-section {
    padding-top: 22px !important;
    padding-bottom: 26px !important;
  }
  body.page-about .cta-section .section-title {
    font-size: clamp(1.45rem, 5.2vw, 1.65rem);
    color: var(--white, #fff);
  }
  body.page-about .cta-section .about-headline-line {
    display: block;
  }
  body.page-about .cta-section .cta-sub--full {
    display: none;
  }
  body.page-about .cta-section .cta-sub--mobile {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 12px;
  }
  body.page-about .cta-section .cta-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    gap: 10px;
  }
  body.page-about .cta-section .cta-row .btn {
    width: 100%;
    text-align: center;
    padding: 13px 20px;
  }
  body.page-about .cta-section .cta-phone {
    margin-top: 12px;
    font-size: 0.92rem;
  }
}

/* Desktop: hide mobile-only copy */
body.page-about .hero-sub--mobile,
body.page-about .section-subtitle--mobile,
body.page-about .cta-sub--mobile {
  display: none;
}
