



@media (max-width: 992px) {
  /* Sidebar: slide in from right */
  .sidebar {
    right: 0;
    left: auto;
    transform: translateX(100%);
    width: min(300px, 88vw);
    box-shadow: -8px 0 48px rgba(10, 42, 66, 0.16);
    border-right: none;
  }
  .sidebar.open          { transform: translateX(0); }
  .menu-toggle           { display: flex; }
  .sidebar-overlay.active{ display: block; }

  /* Layout: full width */
  .main-content,
  .detail-main {
    margin-left: 0;
    width: 100%;
  }

  /* Hero */
  .hero-content          { padding: 1.75rem 2.5rem 4.5rem 2.5rem; }
  .hero-headline         { font-size: 2.5rem; }
  .vm-banner             { grid-template-columns: 1fr; }

  /* Detail page hero heights */
  .page-split-main .article-hero-photo {
    height: clamp(240px, 50vw, 600px) !important;
  }
  .hero-photo-wrap,
  .hero-photo-wrap--plain {
    height: clamp(200px, 45vw, 500px);
  }

  /* Gallery arrows */
  #galleryPrev { left: -1rem; }
  #galleryNext { right: -1rem; }

  /* Book card */
  .book-card-new         { flex-direction: column !important; }
  .bk-cover-wrapper {
    width: 160px;
    height: 220px;
    min-height: unset;
    max-height: unset;
    margin: 0 auto;
  }
  .bk-content-col        { padding: 1.5rem; }
  .bk-title              { font-size: 1.6rem; }

  /* Program grids → single column */
  .program-split-card,
  .program-story-grid,
  .program-card-grid,
  .program-timeline-grid,
  .program-route-grid,
  .program-duo-cta    { grid-template-columns: 1fr; }

  /* People grids */
  .advisors-grid          { grid-template-columns: repeat(3, 1fr); }
  .featured-members-grid  { grid-template-columns: repeat(2, 1fr); }
  .pp-stats               { grid-template-columns: repeat(2, 1fr); }

  /* Detail pages: modest side padding */
  .page-split-content    { padding: 1.5rem 1.25rem 3rem !important; }

  /* Footer */
  footer.site-footer     { padding: 48px 32px 0; }
}



@media (max-width: 767px) {
  .px-section {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .section-pad {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  .vm-mission,
  .vm-vision             { padding: 1.5rem; }
  .vm-mission-text       { font-size: 0.95rem; }
  .advisors-grid         { grid-template-columns: repeat(2, 1fr); }
  .gallery-scroll-box .gallery-scroll-inner .gallery-scroll-row .gallery-item {
    width: 180px;
    height: 180px;
  }
  .form-card             { padding: 1.5rem; }
  footer.site-footer     { padding: 40px 24px 0; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .bk-cover-col {
    flex: unset !important;
    align-self: auto;
    padding: 1.5rem;
    justify-content: center;
  }
  .bk-cover-wrapper {
    width: 160px;
    height: 220px;
    min-height: unset;
    max-height: unset;
    margin: 0 auto;
  }
  /* Standalone photo card: restore 4/3 on mobile */
  :not(.photo-card-grid) > .photo-card img,
  :not(.photo-card-grid) > .photo-card .photo-overlay { aspect-ratio: 4 / 3; }

  .article-hero-photo    { height: clamp(200px, 55vw, 480px); min-height: 200px; }
  .page-split-main .article-hero-photo {
    height: clamp(200px, 55vw, 480px) !important;
  }
  .hero-photo-wrap,
  .hero-photo-wrap--plain { height: clamp(180px, 50vw, 440px); }
  .featured-members      { padding: 2rem 1.25rem 3rem; }
  .featured-members-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}



@media (max-width: 576px) {
  /* Hero */
  .hero-content          { padding: 1rem 1.25rem 4rem 1.25rem; }
  .hero-headline         { font-size: clamp(1.5rem, 7vw, 2rem); letter-spacing: -0.5px; }
  .hero-sub              { font-size: 0.95rem; }
  .hero-caption          { font-size: 0.85rem; margin-bottom: 1.5rem; }
  .hero-badge            { font-size: 0.62rem; }
  #heroPrev              { left: 0.4rem; }
  #heroNext              { right: 0.4rem; }
  .hero-arrow            { width: 32px; height: 32px; font-size: 1rem; }

  /* Detail page heroes */
  .page-split-main .article-hero-photo {
    height: clamp(180px, 56.25vw, 380px) !important;
  }
  .hero-photo-wrap,
  .hero-photo-wrap--plain { height: clamp(160px, 52vw, 340px); }
  .article-hero-photo    { height: clamp(160px, 52vw, 340px); min-height: 160px; }

  /* Detail page padding */
  .page-split-content    { padding: 0.75rem 1rem 1.5rem !important; }

  /* Program pages: strip sides so cards go full-bleed */
  body.page-program .page-split-content {
    padding: 0.75rem 0 1.5rem !important;
  }

  /* Restore side padding to non-card elements above full-bleed cards */
  body.page-program .page-split-content > .page-meta-row,
  body.page-program .page-split-content > .article-title,
  body.page-program .page-split-content > .article-divider {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* article-body on program pages: no side padding (cards are full-bleed) */
  body.page-program .page-split-content > .article-body {
    padding-left: 0;
    padding-right: 0;
  }

  /* Program cards: flush to screen edges */
  body.page-program .program-intro-card,
  body.page-program .program-band,
  body.page-program .program-table-card,
  body.page-program .program-cta-card,
  body.page-program .program-mini-card,
  body.page-program .program-day-card,
  body.page-program .program-route-card,
  body.page-program .program-story-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 1rem 1.25rem;
  }
  body.page-program .program-day-card {
    border-left: 3px solid var(--label-color);
  }

  /* project-stats: 2×2 grid on mobile */
  .project-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    flex-wrap: unset;
  }
  .stat-item             { border-right: 1px solid var(--border-solid); border-bottom: 1px solid var(--border-solid); }
  .stat-item:nth-child(2n)            { border-right: none; }
  .stat-item:nth-last-child(-n + 2)   { border-bottom: none; }

  .program-story-grid,
  .program-card-grid     { grid-template-columns: 1fr !important; }

  /* Itinerary */
  .program-day-top       { flex-direction: column; }
  .program-day-badge     { min-width: 0; width: 64px; }

  /* Tables */
  .budget-table,
  .timeline-table        { font-size: 0.78rem; }
  .budget-table th,
  .timeline-table th     { font-size: 0.62rem; }

  /* Homepage sections */
  .section-title         { font-size: 1.6rem; }
  .side-img-wrap         { aspect-ratio: 3/2; }
  .objective-card        { padding: 1.25rem 1rem; }
  .objective-icon        { width: 40px; height: 40px; font-size: 1.1rem; }
  .advisors-grid         { grid-template-columns: 1fr; }

  /* Gallery */
  .gallery-scroll-box .gallery-scroll-inner .gallery-scroll-row .gallery-item {
    width: 150px;
    height: 150px;
  }
  #galleryPrev           { left: -0.5rem; }
  #galleryNext           { right: -0.5rem; }

  /* Contact / form */
  .contact-info-list     { gap: 0.85rem; }
  .form-card             { padding: 1.25rem; }
  .btn-submit            { width: 100%; justify-content: center; }

  /* Footer */
  footer.site-footer     { padding: 36px 16px 0; }

  /* Book */
  .bk-cover-wrapper      { width: 130px; height: 185px; }
  .bk-content-col        { padding: 1.25rem; }
  .bk-title              { font-size: 1.4rem; }
  .bk-btn-preorder,
  .bk-btn-learn          { width: 100%; justify-content: center; }

  /* Buttons */
  
  .btn-primary-hero,
  .btn-outline-hero      { padding: 0.75rem 1.25rem; font-size: 0.82rem; }

  /* Inline lightbox */
  .lightbox-stage        { padding: 0.5rem 2.5rem; }
  .lightbox-nav          { width: 36px; height: 36px; font-size: 1.2rem; }
  .lightbox-prev         { left: 0.25rem; }
  .lightbox-next         { right: 0.25rem; }
  .lightbox-thumb        { width: 48px; height: 48px; }
}



@media (max-width: 480px) {
  body.page-member .hero-photo-wrap--plain,
  body.page-member .hero-photo-wrap {
    height: clamp(160px, 60vw, 340px);
  }
}



@media (max-width: 420px) {
  .advisors-grid          { grid-template-columns: 1fr; }
  .featured-members-grid  { grid-template-columns: repeat(2, 1fr); }
  .hero-headline          { font-size: 1.4rem; }
  .hero-content           { padding: 0.75rem 1rem 3.5rem 1rem; }
}



@media (max-width: 768px) {
  body.page-member .hero-photo-wrap--plain,
  body.page-member .hero-photo-wrap {
    height: clamp(180px, 55vw, 420px);
  }
}
/* 480px rule is listed in the 480px block above */



/* Tablet: stack featured above, side grid 2-col below */
@media (max-width: 900px) {
  .founders-kickstarter {
    grid-template-columns: 1fr;
  }
  .founder-card.fk-featured {
    height: auto;
  }
  .founder-card.fk-featured .founder-card-img {
    height: 280px;
    flex: unset;
  }
  .fk-side-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: unset;
  }
}

/* Mobile: everything single column */
@media (max-width: 560px) {
  .founders-kickstarter {
    grid-template-columns: 1fr;
  }
  .fk-side-grid {
    grid-template-columns: 1fr;
  }
  .founder-card.fk-side .founder-card-img,
  .founder-card.fk-side .founder-card-img-placeholder {
    height: 200px;
  }
}