/* Mobile-only overrides
   Loaded after `styles.css` and `hero.css` so it can safely override them.
   Desktop layouts are not affected because everything is inside media queries.
*/

/* Respect reduced-motion preferences (mobile + desktop-safe). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 768px) {
  /* Mobile scrolling tends to feel better without snap + heavy effects. */
  html {
    scroll-snap-type: none;
  }

  /* Prevent accidental horizontal scroll from transforms/100vw elements. */
  body {
    overflow-x: hidden;
  }

  /* Slightly tighter default gutters on small screens. */
  .container,
  .nav-container {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Footer: center-align content on mobile. */
  .footer,
  .footer .container,
  .footer-content,
  .footer-section {
    text-align: center;
  }

  .footer-content {
    justify-items: center;
  }

  .footer-section ul {
    padding-left: 0;
  }

  .footer .social-links {
    align-items: center;
  }

  /* Episodes: horizontal swipe on mobile (desktop unchanged). */
  #episodes .episodes-list {
    flex-direction: row;
    gap: 18px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    scroll-snap-type: x mandatory;

    /* Make the row feel edge-to-edge while keeping the page gutter. */
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;

    /* Small breathing room so shadows/snaps don’t feel clipped. */
    padding-bottom: 8px;
    scroll-padding-left: 20px;
    scroll-padding-right: 20px;
  }

  #episodes .episodes-list::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
  }

  #episodes .episode-row {
    flex: 0 0 86%;
    min-width: 86%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  /* The decorative line is built for full-width rows; hide it for swipe cards. */
  #episodes .episode-decorative-line {
    display: none;
  }

  /* News & Stories: horizontal carousel on mobile (avoids grid overflow, matches episodes). */
  .news-preview-section .news-preview-grid {
    display: flex;
    flex-direction: row;
    gap: 18px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    max-width: none;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 8px;
    scroll-padding-left: 20px;
    scroll-padding-right: 20px;
  }

  .news-preview-section .news-preview-grid::-webkit-scrollbar {
    display: none;
  }

  .news-preview-section .news-preview-card {
    flex: 0 0 86%;
    min-width: 86%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: 0;
  }

  .news-preview-section .news-preview-card:hover {
    transform: none;
  }

  /* Prevent card content from overflowing the carousel item. */
  .news-preview-section .news-preview-card .news-preview-title,
  .news-preview-section .news-preview-card .news-preview-meta {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }

  .news-preview-section .news-preview-card .news-preview-image {
    min-width: 0;
  }

  /* The 3i Show / podcast page: episodes carousel on mobile (swipe, scroll-snap). */
  .podcast-section .podcast-carousel {
    display: flex;
    flex-direction: row;
    gap: 18px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    margin-left: -15px;
    margin-right: -15px;
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 12px;
    scroll-padding-left: 15px;
    scroll-padding-right: 15px;
  }

  .podcast-section .podcast-carousel::-webkit-scrollbar {
    display: none;
  }

  /* Mobile card: stacked layout – full image on top, title + excerpt below (no hover). */
  .podcast-section .podcast-item {
    flex: 0 0 86%;
    min-width: 86%;
    width: 86%;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  }

  /* Reserve top area for full image (16:9); card background shows here. */
  .podcast-section .podcast-item::before {
    content: "";
    display: block;
    padding-top: 56.25%;
    flex-shrink: 0;
    border-radius: 12px 12px 0 0;
  }

  /* Hide gradient overlay on mobile so image is fully visible. */
  .podcast-section .podcast-item::after {
    display: none;
  }

  .podcast-section .podcast-item:hover,
  .podcast-section .podcast-item.active {
    width: 86%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }

  /* Text block below image: always visible, no hover. */
  .podcast-section .podcast-item-desc {
    position: static;
    transform: none;
    -webkit-transform: none;
    flex: 1 1 auto;
    min-height: 0;
    padding: 14px 16px 16px;
    background: #1a1a1a;
    color: #e5e5e5;
    border-radius: 0 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .podcast-section .podcast-item:hover .podcast-item-desc,
  .podcast-section .podcast-item.active .podcast-item-desc {
    transform: none;
    -webkit-transform: none;
  }

  .podcast-section .podcast-item-desc h3 {
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
    color: #fff;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .podcast-section .podcast-item:hover .podcast-item-desc h3,
  .podcast-section .podcast-item.active .podcast-item-desc h3 {
    font-size: 15px;
  }

  .podcast-section .podcast-item-desc p {
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
    opacity: 1;
    transform: none;
    -webkit-transform: none;
    color: rgba(229, 229, 229, 0.9);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .podcast-section .podcast-item:hover .podcast-item-desc p,
  .podcast-section .podcast-item.active .podcast-item-desc p {
    opacity: 1;
    transform: none;
  }

  /* Episode modal: full-bleed on mobile, easier to close. */
  .episode-modal {
    padding: 0;
    align-items: flex-end;
  }

  .episode-modal-content {
    max-width: none;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    width: 100%;
  }

  .episode-modal-close {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .episode-modal-body {
    padding: 20px 20px 28px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  .episode-modal-title {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .episode-modal-description {
    font-size: 14px;
    margin-bottom: 18px;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .episode-modal-watch-btn {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
    font-size: 15px;
  }

  /* The custom scrollbar is great on desktop; hide it on mobile. */
  .custom-scrollbar {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Intro decorative scroll line overlays content on mobile; disable it. */
  .intro-decorative-bottom {
    display: none !important;
  }

  /* Avoid "100vh" issues with mobile browser chrome. */
  /* Note: the homepage hero video gets its own sizing below. */
  .hero:not(.hero--video),
  .intro-section,
  .subscribe-section,
  .news-preview-section {
    /* Fallback is existing 100vh from base CSS; this improves mobile browser UI handling. */
    min-height: 100svh;
  }

  /* Subscribe section: show a single vertical image on mobile */
  .subscribe-parallax {
    grid-template-columns: 1fr;
    inset: -18% 0;
  }

  .subscribe-parallax__panel--2,
  .subscribe-parallax__panel--3 {
    display: none;
  }

  .subscribe-parallax__panel--1 {
    background-image: url('../assets/subscribe/mobile.jpg');
    background-position: 50% 25%;
  }

  /* Homepage hero video:
     Make the hero itself 16:9 on mobile so there’s no huge letterboxed empty space. */
  .hero--video {
    min-height: 0 !important;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  /* Homepage hero video: hide "SCROLL" label + arrow on mobile. */
  .hero--video .hero-scroll {
    display: none !important;
  }

  .hero--video .hero-background {
    background: #000;
  }

  .hero--video .hero-video {
    /* Container matches the video ratio, so this won’t crop. */
    object-fit: cover;
    object-position: center;
    /* JS sets an inline transform for parallax; override it on mobile. */
    transform: translate3d(0, 0, 0) scale(1) !important;
  }

  /* When the nav is open on mobile, keep the background from scrolling. */
  body.navOpen {
    overflow: hidden;
  }

  /* When the nav is open on mobile, hide the oversized "STEFAN / DE ALWIS" header text. */
  body.navOpen .hero-brand {
    display: none !important;
  }

  /* Allow the menu itself to scroll if it overflows. */
  body.navOpen .main-nav {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Ensure fixed UI isn’t too close to safe areas. */
  .openNav {
    z-index: 110;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
  }

  .hero-header {
    padding: 24px 20px;
  }

  /* Reduce bottom arrow prominence on small screens. */
  .arrow {
    bottom: 24px;
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 480px) {
  #episodes .episode-row {
    flex-basis: 88%;
    min-width: 88%;
  }

  .news-preview-section .news-preview-card {
    flex-basis: 88%;
    min-width: 88%;
  }

  /* Remove hard minimums that can force overflow on very small screens. */
  .intro-image {
    min-width: 0 !important;
    transform: none !important;
  }

  .about-cutout {
    min-width: 0 !important;
  }

  /* Keep long headline/title blocks from overflowing. */
  .hero-title,
  .hero-title.layers::before,
  .hero-title.layers::after {
    letter-spacing: 1px;
    white-space: normal;
  }

  /* Timeline: prefer small-viewport units when available. */
  .timeline_item,
  .timeline-track > .timeline_item {
    /* Fallback for browsers without `svw` support. */
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    flex-basis: 100vw !important;

    width: 100svw !important;
    min-width: 100svw !important;
    max-width: 100svw !important;
    flex-basis: 100svw !important;
  }

  /* Slightly smaller nav text on very small devices. */
  .main-nav ul li a {
    font-size: clamp(18px, 5.2vw, 24px);
  }
}

/* =====================================================
   PARTNERS PAGE - Mobile Styles
   ===================================================== */

@media (max-width: 768px) {
  /* Hero adjustments (V2) */
  .partners-heroV2 {
    padding: 110px 0 70px;
  }

  .partners-heroV2-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .partners-heroV2-title {
    font-size: clamp(44px, 12vw, 74px);
  }

  .partners-heroV2-subtitle {
    font-size: 16px;
  }

  .partners-btn {
    width: 100%;
  }

  .partners-heroV2-actions {
    gap: 10px;
  }

  /* no scroll indicator in hero */

  /* Value Props - 2 column on tablet, 1 column on phone */
  .partners-value-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .partners-value-card {
    padding: 28px 20px;
  }

  .partners-value-icon {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }

  .partners-value-card h3 {
    font-size: 20px;
  }

  .partners-value-card p {
    font-size: 14px;
  }

  /* Resources - stack cards */
  .partners-resources-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .partners-resource-card {
    flex-direction: column;
    text-align: center;
    padding: 28px 20px;
  }

  .partners-resource-icon {
    margin: 0 auto 16px;
  }

  .partners-resource-actions {
    justify-content: center;
  }

  /* Logos - 2-3 columns */
  .partners-logos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .partners-logo-item img {
    max-width: 100px;
    max-height: 45px;
  }

  /* FAQ */
  .partners-faq-question span {
    font-size: 16px;
  }

  .partners-faq-answer p {
    font-size: 14px;
  }

  /* Bottom CTA */
  .partners-bottom-cta {
    padding: 80px 0;
  }

  .partners-cta-title {
    font-size: clamp(32px, 8vw, 44px);
  }

  .partners-cta-button {
    padding: 14px 40px;
    font-size: 14px;
  }

  /* PDF Modal - full screen on mobile */
  .pdf-modal {
    padding: 0;
  }

  .pdf-modal-content {
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .pdf-modal-header {
    padding: 12px 16px;
  }

  .pdf-modal-header h3 {
    font-size: 16px;
  }

  .pdf-modal-footer {
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 10px;
  }

  .pdf-modal-footer .partners-resource-btn {
    flex: 1;
    justify-content: center;
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  /* Value Props - single column on small phones */
  .partners-value-grid {
    grid-template-columns: 1fr;
  }

  /* Logos - 2 columns maintained */
  .partners-logos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .partners-logo-item {
    padding: 12px;
  }

  .partners-logo-item img {
    max-width: 80px;
    max-height: 40px;
  }

  /* Section spacing */
  .partners-value-props,
  .partners-resources,
  .partners-faq {
    padding: 60px 0;
  }

  .partners-logos {
    padding: 50px 0;
  }

  .partners-section-title {
    font-size: clamp(28px, 7vw, 36px);
  }

  .partners-section-subtitle {
    font-size: 14px;
    margin-bottom: 32px;
  }
}

/* =====================================================
   ABOUT PAGE - Mobile Styles
   All rules scoped to body.page-about so desktop and other pages are untouched.
   ===================================================== */

@media (max-width: 768px) {
  body.page-about #about-hero {
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 9;
    /* Same fade at bottom as desktop for seamless transition to content below */
    -webkit-mask-image: linear-gradient(
      to bottom,
      black 0%,
      black 55%,
      transparent 100%
    );
    mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-position: center;
    mask-position: center;
  }

  body.page-about #about-hero .hero-footer,
  body.page-about #about-hero .hero-scroll {
    display: none !important;
  }

  body.page-about .about-content {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  body.page-about .about-intro {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
    padding-top: 32px;
  }

  body.page-about .about-intro-left h1 {
    font-size: clamp(36px, 10vw, 56px);
    margin-bottom: 0;
    /* Override GSAP parallax on mobile */
    transform: none !important;
  }

  body.page-about .about-intro-right {
    padding-bottom: 32px;
  }

  body.page-about .about-intro-right p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    transform: none !important;
  }

  body.page-about .about-video-section {
    margin: 32px 0;
  }

  body.page-about .video-placeholder {
    padding-top: 56.25%;
  }

  body.page-about .about-section-2 {
    grid-template-columns: 1fr;
    gap: 32px;
    margin: 48px 0;
  }

  body.page-about .about-section-2-left,
  body.page-about .about-section-2-right {
    order: unset;
  }

  body.page-about .about-section-2-left {
    transform: none !important;
  }

  body.page-about .about-section-2-left h2 {
    font-size: clamp(22px, 5vw, 28px);
    text-align: center;
  }

  body.page-about .about-section-2-right p {
    text-align: center;
  }

  body.page-about .about-intro-section.tile-down {
    margin-top: 48px;
    margin-bottom: 48px;
  }

  body.page-about .about-bartlett-container {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Show full image on mobile; bottom fades to transparent */
  body.page-about .about-bartlett-image {
    max-height: none;
    min-height: 0;
    overflow: visible;
    align-items: center;
    -webkit-mask-image: linear-gradient(
      to bottom,
      black 0%,
      black 50%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to bottom,
      black 0%,
      black 50%,
      transparent 100%
    );
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-position: center;
    mask-position: center;
  }

  body.page-about .about-bartlett-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center center;
    display: block;
  }

  body.page-about .about-bartlett-content {
    padding: 32px 20px 48px;
  }

  body.page-about .about-bartlett-content p {
    font-size: clamp(14px, 4vw, 17px);
    margin-bottom: 1.25rem;
    text-align: center;
  }

  body.page-about .about-stefan-block {
    margin: 60px auto;
    padding: 0 0 24px;
  }

  body.page-about .about-stefan-block__title {
    font-size: clamp(28px, 6vw, 36px);
    margin-bottom: 24px;
    text-align: center;
  }

  body.page-about .about-stefan-block__title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  body.page-about .about-stefan-block__text {
    font-size: clamp(16px, 4vw, 18px);
    margin-bottom: 24px;
    text-align: center;
  }

  body.page-about .about-cta-section {
    padding: 40px 0;
  }

  body.page-about .about-cta-section .container {
    text-align: center;
  }

  body.page-about .about-cta-text {
    font-size: clamp(18px, 4vw, 22px);
    margin-bottom: 20px;
  }

  body.page-about .about-cta-button,
  body.page-about .about-cta-button--secondary {
    display: inline-block;
    width: 100%;
    max-width: 280px;
    text-align: center;
    padding: 14px 24px;
    font-size: 16px;
  }

  body.page-about .section-timeline-heading .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  body.page-about .timeline-main_heading-wrapper h2 {
    font-size: clamp(32px, 8vw, 40px);
    text-align: center;
  }

  body.page-about .timeline-main_heading-wrapper .paragraph-large {
    text-align: center;
  }

  /* =====================================================
     TIMELINE - Mobile layout fixes (about page)
     Full-width bottom band for year + text, smaller type
     ===================================================== */
  .section-timeline {
    width: 100%;
    max-width: 100%;
    height: 100svh;
    min-height: -webkit-fill-available;
  }

  .timeline-horizontal-section {
    height: 100svh;
    min-height: -webkit-fill-available;
  }

  .timeline-horizontal-section::after {
    width: 60px;
  }

  .section-timeline .timeline_item,
  .section-timeline .timeline-track > .timeline_item {
    width: 100svw !important;
    min-width: 100svw !important;
    max-width: 100svw !important;
    flex-basis: 100svw !important;
    height: 100svh !important;
    min-height: -webkit-fill-available;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    grid-template-columns: 1fr !important;
    /* Row 2 = year (min 48px), Row 3 = paragraph (min 88px so short text always shows) */
    grid-template-rows: 1fr minmax(48px, auto) minmax(88px, auto) !important;
    align-items: stretch;
    overflow: visible !important;
  }

  .timeline-track {
    height: 100svh;
  }

  /* Mobile: year above paragraph, no dark background; ensure content above bg/overlay */
  .section-timeline .timeline_left,
  .section-timeline .timeline_right {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 24px;
    padding-right: 24px;
    background: none;
    align-items: flex-start;
    justify-content: flex-start;
    box-sizing: border-box;
    overflow: visible !important;
    position: relative;
    z-index: 3;
  }

  .section-timeline .timeline_left {
    grid-column: 1 !important;
    grid-row: 2 !important;
    grid-area: 2 / 1 / 3 / 2 !important;
    text-align: left;
    padding-top: 16px;
    padding-bottom: 12px;
    min-height: 48px;
    flex-shrink: 0;
  }

  .section-timeline .timeline_right {
    grid-column: 1 !important;
    grid-row: 3 !important;
    grid-area: 3 / 1 / 4 / 2 !important;
    min-width: 0;
    min-height: 88px !important;
    overflow: visible !important;
    overflow-wrap: break-word;
    padding-top: 0;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    align-items: flex-start;
    display: flex !important;
    flex-shrink: 0 !important;
  }

  /* Prevent text wrapper from shrinking – was min-height: 0 which collapsed short text */
  .section-timeline .timeline_right .margin-bottom-medium {
    width: 100% !important;
    min-height: auto !important;
    flex: 1 1 auto !important;
    flex-shrink: 0 !important;
  }

  .section-timeline .timeline_centre {
    display: none !important;
  }

  /* Year: always visible, above the paragraph */
  .section-timeline .timeline_left .timeline_date-text {
    display: block !important;
    visibility: visible !important;
    font-size: clamp(28px, 8vw, 38px) !important;
    margin-bottom: 0;
    line-height: 1.1;
    font-weight: 600;
    color: #fdbb2b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.5);
  }

  /* Paragraph text: always visible, never collapse (short or long) */
  .section-timeline .timeline_text {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: clamp(14px, 3.5vw, 16px) !important;
    line-height: 1.4;
    min-height: 1.5em !important;
    min-width: 0;
    color: #fdbb2b !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(0, 0, 0, 0.5);
    white-space: normal !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .timeline-progress-bar {
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  /* Timeline slides with 2 pictures: stack vertically on mobile */
  .timeline_bg-wedding-container,
  .timeline_bg-millfield-container {
    flex-direction: column;
    width: 85%;
    height: 85%;
    gap: 12px;
  }

  .timeline_bg-wedding-image,
  .timeline_bg-millfield-image {
    width: 100%;
    flex: 1 1 0;
    min-height: 0;
    object-fit: cover;
    object-position: center;
  }

  /* Bean Bag Bliss: keep 2 images side by side, overlay scales down on small screens */
  .timeline_bg-beanbagbliss-container {
    flex-direction: row;
    width: 100%;
    height: 100%;
    gap: 0;
  }

  .timeline_bg-beanbagbliss-image {
    width: 50%;
    flex: 1 1 0;
    min-height: 0;
    object-fit: cover;
    object-position: center;
  }

  .timeline_bg-beanbagbliss-overlay-image {
    max-width: 48%;
    max-height: 22%;
  }
}

/* Timeline: landscape mobile – content at bottom, smaller text */
@media (max-width: 768px) and (orientation: landscape) {
  .section-timeline .timeline_item,
  .section-timeline .timeline-track > .timeline_item {
    grid-template-rows: 1fr minmax(0, 20vh) minmax(0, 28vh) !important;
    align-items: end;
  }

  .section-timeline .timeline_left,
  .section-timeline .timeline_right {
    padding-top: 12px;
    padding-bottom: 16px;
  }

  .section-timeline .timeline_left {
    padding-bottom: 8px;
  }

  .section-timeline .timeline_right {
    padding-top: 8px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .section-timeline .timeline_date-text {
    font-size: clamp(24px, 6vw, 32px);
    line-height: 1.1;
  }

  .section-timeline .timeline_text {
    font-size: clamp(13px, 3.2vw, 15px);
    line-height: 1.35;
  }
}

@media (max-width: 480px) {
  body.page-about .about-intro-left h1 {
    font-size: clamp(32px, 12vw, 44px);
  }

  /* Full image already handled in 768px rule; no extra max-height on small phones */
  body.page-about .about-bartlett-image {
    max-height: none;
  }

  body.page-about .about-stefan-block {
    margin: 40px auto;
  }

  body.page-about .about-stefan-block__title {
    font-size: clamp(24px, 7vw, 30px);
  }
}

