/**
 * ICAST 2026 — Full responsive overrides (all devices)
 */

:root {
  --container-max: 1140px;
  --page-gutter: clamp(1rem, 3vw, 2rem);
}

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: clip;
  min-width: 0;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

.container,
.container-narrow,
.header-bar,
.poster-container {
  width: min(var(--container-max), calc(100% - var(--page-gutter)));
  margin-left: auto;
  margin-right: auto;
}

.section {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
}

.section-desc,
.lead,
.hero-partner-name,
.hero-uni-name,
.track-card__title,
.timeline-content h4 {
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero-badges {
  justify-content: flex-start;
}

.reg-table {
  min-width: 520px;
}

.reg-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.publisher-item {
  flex-wrap: wrap;
  gap: 0.35rem;
}

.site-header {
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
}

.hero-banner__inner {
  padding: 0 clamp(0.25rem, 2vw, 1rem);
}

/* ─── Large tablet / small laptop ─── */
@media (max-width: 1100px) {
  .registration-grid {
    grid-template-columns: 1fr 1fr;
  }

  .registration-grid .reg-includes {
    grid-column: 1 / -1;
  }
}

/* ─── Tablet ─── */
@media (max-width: 768px) {
  .leadership-highlights {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-university,
  .hero-partner {
    justify-items: center;
    text-align: center;
  }

  .hero-uni-details,
  .hero-partner-details {
    text-align: center;
  }

  .hero-organizer {
    text-align: center;
  }

  .hero-badges {
    justify-content: center;
  }

  .venue-grid {
    grid-template-columns: 1fr;
  }

  .venue-map {
    margin-top: 0.5rem;
  }

  .tracks-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .tracks-cta .btn {
    width: 100%;
  }

  .chair-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .chair-photo-wrap {
    max-width: 140px;
    margin: 0 auto;
  }

  .registration-grid {
    grid-template-columns: 1fr;
  }

  .registration-grid .reg-includes {
    grid-column: auto;
  }
}

/* ─── Mobile ─── */
@media (max-width: 640px) {
  :root {
    --page-gutter: 1.2rem;
  }

  .header-bar {
    width: calc(100% - var(--page-gutter));
  }

  .header-brand {
    gap: 0.45rem;
  }

  .header-logos {
    gap: 0.3rem;
  }

  .header-logo--imaps {
    height: 36px;
    width: 36px;
  }

  .header-logo--inemi {
    height: 40px;
  }

  .header-title {
    font-size: 1.1rem;
    letter-spacing: 0.05em;
  }

  .programme-legend {
    gap: 0.4rem 0.75rem;
    justify-content: flex-start;
  }

  .programme-legend__item {
    font-size: 0.74rem;
  }

  .agenda-item__title {
    font-size: 1.02rem;
  }

  .nav-link {
    min-height: 44px;
    font-size: 0.95rem;
  }

  .hero-banner {
    padding: clamp(2rem, 6vw, 3rem) 0.75rem clamp(1.75rem, 5vw, 2.5rem);
  }

  .hero-banner__title {
    font-size: clamp(1.45rem, 5.5vw, 1.85rem);
  }

  .hero-banner__tagline {
    font-size: clamp(0.95rem, 3.8vw, 1.1rem);
  }

  .home-details {
    margin-top: -0.75rem;
  }

  .content-box {
    padding: clamp(0.85rem, 3vw, 1.1rem);
  }

  .hero-logo-frame {
    width: 100px;
    height: 100px;
    min-width: 100px;
    min-height: 100px;
  }

  .hero-institution-logo--iitm {
    width: 70px;
    height: 70px;
  }

  .hero-institution-logo:not(.hero-institution-logo--iitm) {
    width: 78px;
    height: 78px;
  }

  .hero-meta-item {
    padding: 0.7rem;
  }

  .hero-meta-item strong {
    font-size: 0.92rem;
  }

  .date-card {
    padding: 0.7rem;
  }

  .poster-container {
    width: calc(100% - var(--page-gutter));
  }

  .pdf-viewer__toolbar {
    padding: 0.7rem 0.85rem;
  }

  .pdf-viewer__frame {
    height: min(70vh, 640px);
  }

  .track-card__head,
  .track-card__body {
    padding: 0.85rem;
  }

  .track-card__title {
    font-size: 1.02rem;
  }

  .track-card__themes {
    font-size: 0.9rem;
    padding-left: 1.15rem;
  }

  .leadership-grid {
    gap: 0.85rem;
  }

  .leader-photo-wrap {
    height: 280px;
    min-height: 280px;
  }

  .leader-photo {
    width: 180px;
    height: 235px;
  }

  .leader-body {
    padding: 0.85rem;
  }

  .leadership-intro {
    padding: 1rem 1.1rem;
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .schedule-tabs {
    display: grid;
    width: 100%;
    border-radius: var(--radius-sm);
  }

  .schedule-tab {
    width: 100%;
    text-align: center;
    min-height: 44px;
  }

  .timeline-item .time {
    font-size: 0.9rem;
    padding: 0.7rem;
  }

  .timeline-content {
    padding: 0.7rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form,
  .contact-wrapper > div {
    padding: 0.85rem;
  }

  .footer-top {
    gap: 0.85rem;
  }

  .footer-bottom {
    text-align: center;
  }

  .footer-bottom__legal {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .btn,
  .btn-lg {
    min-height: 44px;
  }
}

/* ─── Small phones ─── */
@media (max-width: 400px) {
  .header-logo--imaps {
    height: 30px;
    width: 30px;
  }

  .header-logo--inemi {
    height: 34px;
  }

  .header-title {
    font-size: 1rem;
  }

  .hero-banner__subtitle {
    font-size: 0.92rem;
  }

  .badge {
    font-size: 0.76rem;
    padding: 0.32rem 0.55rem;
  }

  .countdown-item span {
    font-size: 1.05rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .stat-num {
    font-size: 1.1rem;
  }
}

/* ─── Medium desktop nav fit ─── */
@media (min-width: 993px) and (max-width: 1180px) {
  .nav-link {
    font-size: 0.78rem;
    padding: 0.38rem 0.5rem;
  }

  .header-logo--imaps {
    height: 38px;
    width: 38px;
  }

  .header-logo--inemi {
    height: 42px;
  }

  .header-title {
    font-size: 1.2rem;
  }
}

/* ─── Large screens ─── */
@media (min-width: 1200px) {
  :root {
    --container-max: 1140px;
  }
}

@media (min-width: 1440px) {
  .poster-container {
    width: min(1200px, calc(100% - var(--page-gutter)));
  }
}
