/* Global responsive fixes shared across root + school pages */
* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

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

/* Keep fixed headers from crowding content on smaller viewports */
@media (max-width: 1024px) {
  .mainHeader,
  .main-header {
    padding: 8px 16px !important;
    height: auto !important;
  }

  .logoSec img,
  .logo img {
    max-height: 45px !important;
    width: auto;
  }

  .page-header {
    padding: 100px 16px 36px !important;
  }

  .page-header h1 {
    font-size: clamp(1.6rem, 6vw, 2.6rem) !important;
    letter-spacing: 1px !important;
    line-height: 1.2;
  }

  .content-section,
  .gallery-container,
  .facility-grid,
  .academics,
  .about-section,
  .working-hours-section,
  .school-outfit-section,
  .reel-testimonials,
  .footer {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .footer-container {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}

/* Mobile-first stacking for common multi-column blocks */
@media (max-width: 768px) {
  .facility-grid,
  .reels-wrapper,
  .footer-container,
  .collage-grid {
    grid-template-columns: 1fr !important;
  }

  .mainDiv .mainSec h1,
  .coverDiv .mainDiv .mainSec > h1 {
    font-size: clamp(1.4rem, 6vw, 2rem) !important;
    line-height: 1.25;
  }

  .mainDiv .mainSec p,
  .coverDiv .mainDiv .mainSec > p {
    font-size: 1rem !important;
    line-height: 1.5;
  }

  .event-card,
  .inspiring-container,
  section[style*="display: flex"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .mainHeader .navItems a,
  .main-header .main-nav a,
  .navItems a {
    font-size: 0.98rem !important;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .page-header {
    padding-top: 90px !important;
  }

  .page-header h1 {
    font-size: clamp(1.35rem, 7vw, 1.9rem) !important;
  }

  .gallery-container,
  .facility-grid {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}
