/* ================================================================
   Responsive Breakpoints
   Base styles (desktop-first) live in main.css
   ================================================================ */

/* ── Large desktop (1200px+) ── default in main.css ── */

/* ── Medium desktop / laptop (< 1024px) ── */
@media (max-width: 1024px) {
  .pillars__grid  { grid-template-columns: repeat(3, 1fr); }
  .why-grid       { grid-template-columns: repeat(2, 1fr); }
  .footer__grid   { grid-template-columns: 1fr 1fr; }
  .footer__col--map { grid-column: 1 / -1; }
  .courses-grid   { grid-template-columns: 1fr 1fr; }
  .subject-grid   { grid-template-columns: repeat(2, 1fr); }
  .video-grid     { grid-template-columns: repeat(2, 1fr); }
  .masonry        { columns: 2; }
}

/* ── Tablet (< 768px) ── */
@media (max-width: 768px) {
  :root {
    --space-2xl: 4rem;
    --space-xl:  3rem;
  }

  /* ── Topbar ── */
  .topbar__contact a:nth-child(2) { display: none; }

  /* ── Navbar ── */
  .navbar__burger { display: flex; }
  .navbar__menu {
    position: fixed;
    top: 0; right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: var(--color-surface);
    flex-direction: column;
    align-items: stretch;
    padding: 5rem var(--space-md) var(--space-md);
    gap: 0;
    box-shadow: -4px 0 32px rgba(0,0,0,0.2);
    transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
    z-index: 999;
  }
  .navbar__menu.open { right: 0; }
  .navbar__list { flex-direction: column; align-items: stretch; gap: 0; }
  .navbar__link { padding: 0.75rem var(--space-sm); border-radius: 0; border-bottom: 1px solid var(--color-border); font-size: 1rem; }
  .navbar__dropdown { position: static; }
  .navbar__submenu {
    position: static;
    box-shadow: none;
    opacity: 1; visibility: visible; transform: none;
    padding: 0; border-radius: 0;
    background: rgba(123,28,46,0.04);
    display: none;
  }
  .navbar__dropdown.open .navbar__submenu { display: block; }
  .navbar__submenu li a { padding: 0.6rem var(--space-md); border-bottom: 1px solid var(--color-border); font-size: 0.9rem; }
  .navbar__cta { margin: var(--space-sm); }
  .navbar__cta .btn { width: 100%; text-align: center; justify-content: center; }

  /* ── Hero ── */
  .hero { height: 65vh; min-height: 420px; }
  .hero__content {
    text-align: center;
    padding: 0 var(--space-md);
    max-width: 100%;
    align-items: center;
  }
  .hero__label { font-size: 0.78rem; letter-spacing: 0.12em; }
  .hero__title { font-size: clamp(1.6rem, 5.5vw, 2.4rem); }
  .hero__sub   { font-size: 0.95rem; max-width: 100%; }
  .hero__content .btn { align-self: center; }

  /* ── Page Hero (inner pages) ── */
  .page-hero h1    { font-size: clamp(1.5rem, 5vw, 2rem); }
  .breadcrumb      { font-size: 0.85rem; }

  /* ── Typography ── */
  .section-title    { font-size: clamp(1.4rem, 4.5vw, 1.8rem); }
  .section-subtitle { font-size: 0.95rem; }
  .section-label    { font-size: 0.7rem; }

  /* ── Stats ── */
  .stats__grid  { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
  .stat__number { font-size: 2.2rem; }
  .stat         { padding: var(--space-sm) var(--space-md); }

  /* ── Pillars ── */
  .pillars__grid { grid-template-columns: repeat(2, 1fr); }

  /* ── About snippet ── */
  .about-snippet__grid { grid-template-columns: 1fr; }
  .about-snippet__frame { display: none; }

  /* ── Why ── */
  .why-grid { grid-template-columns: 1fr; }

  /* ── Vision/Mission ── */
  .vm-grid { grid-template-columns: 1fr; }

  /* ── Courses ── */
  .courses-grid { grid-template-columns: 1fr; }

  /* ── School Message ── */
  .school-message__grid { grid-template-columns: 1fr; }
  .school-message__grid--reverse > *:first-child { order: 0; }
  .school-message__grid--reverse > *:last-child  { order: 1; }

  /* ── Contact ── */
  .contact-grid { grid-template-columns: 1fr; }

  /* ── Faculty Table — horizontal scroll ── */
  .faculty-table        { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; font-size: 0.8rem; }
  .faculty-table th,
  .faculty-table td     { padding: 0.5rem 0.6rem; }

  /* ── Achievement timeline ── */
  .timeline { padding-left: 0; }
  .timeline__item { flex-direction: column; gap: var(--space-sm); }
  .timeline__year { width: auto; font-size: 1rem; }

  /* ── Beyond ── */
  .beyond-grid { grid-template-columns: repeat(2, 1fr); }

  /* ── Rules ── */
  .rules-grid { grid-template-columns: 1fr; }

  /* ── App cards (removed but kept for safety) ── */
  .app-grid { grid-template-columns: 1fr; }

  /* ── Subject grid ── */
  .subject-grid { grid-template-columns: 1fr; }

  /* ── Video grid ── */
  .video-grid { grid-template-columns: 1fr; }

  /* ── Masonry gallery ── */
  .masonry { columns: 2; gap: 0.75rem; }

  /* ── Gallery tabs ── */
  .gallery-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
    justify-content: flex-start;
  }
  .gallery-tabs::-webkit-scrollbar { display: none; }
  .gallery-tab { flex-shrink: 0; }

  /* ── CTA Banner ── */
  .cta-banner h2       { font-size: 1.5rem; }
  .cta-banner          { padding: var(--space-lg) 0; }
  .cta-banner__btns    { flex-direction: column; align-items: center; gap: var(--space-sm); }
  .cta-banner .btn     { width: 100%; max-width: 280px; justify-content: center; }

  /* ── Footer ── */
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-lg); }

  /* ── Form ── */
  .form-row          { grid-template-columns: 1fr; }
  .form-progress     { gap: var(--space-sm); }
  .form-step-label   { font-size: 0.72rem; }

  /* ── Accordion ── */
  .accordion summary { font-size: 0.95rem; padding: 0.9rem 1rem; }

  /* ── Sankalp Bot ── */
  .sbot-window { width: calc(100vw - 24px); right: 12px; bottom: 88px; }
  .sbot-btn    { right: 16px; bottom: 20px; width: 56px; height: 56px; font-size: 1.3rem; }

  /* ── Alumni Carousel ── */
  .alumni-slide { grid-template-columns: 1fr; }
  .alumni-slide__photo-wrap { aspect-ratio: 1 / 1; min-height: 0; }
  .alumni-slide__photo { object-position: center top; }
  .alumni-slide__content { padding: var(--space-lg) var(--space-md); }
  .alumni-slide__quote { font-size: 1.2rem; }
  .alumni-slide__body { max-height: none; overflow-y: visible; padding-right: 0; }
  .alumni-arrow { width: 40px; height: 40px; font-size: 1rem; }
  .alumni-arrow--prev { left: 8px; }
  .alumni-arrow--next { right: 8px; }
  .alumni-tab { font-size: 0.82rem; padding: 0.4rem 0.9rem; }
}

/* ── Mobile (< 480px) ── */
@media (max-width: 480px) {
  :root {
    --space-xl:  2.5rem;
    --space-2xl: 3rem;
  }

  /* ── Hero ── */
  .hero         { height: 58vh; min-height: 380px; }
  .hero__title  { font-size: clamp(1.4rem, 6vw, 1.9rem); }
  .hero__sub    { font-size: 0.875rem; line-height: 1.5; }
  .hero__arrow  { width: 36px; height: 36px; font-size: 0.9rem; }
  .hero__dot    { width: 8px; height: 8px; }

  /* ── Page hero ── */
  .page-hero h1 { font-size: 1.4rem; }
  .page-hero    { padding: var(--space-lg) 0; min-height: 0; }

  /* ── Section typography ── */
  .section-title    { font-size: 1.3rem; line-height: 1.3; }
  .section-subtitle { font-size: 0.9rem; }

  /* ── Navbar ── */
  .navbar__inner  { height: 60px; }
  .navbar__logo   { height: 42px; }
  .navbar__name   { font-size: 0.85rem; }

  /* ── Topbar ── */
  .topbar         { padding: 0.3rem 0; }
  .topbar__contact { flex-direction: column; gap: 0.15rem; font-size: 0.75rem; }

  /* ── Stats ── */
  .stats__grid  { grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
  .stat__number { font-size: 1.8rem; }
  .stat__label  { font-size: 0.75rem; }

  /* ── Pillars ── */
  .pillars__grid { grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
  .pillar-card   { padding: var(--space-sm); }
  .pillar-card__icon { font-size: 1.8rem; }
  .pillar-card__title { font-size: 0.9rem; }

  /* ── Buttons ── */
  .btn { padding: 0.65rem 1.25rem; font-size: 0.875rem; }

  /* ── Masonry ── */
  .masonry { columns: 1; }

  /* ── Gallery ── */
  .gallery-tab { padding: 0.5rem 0.9rem; font-size: 0.8rem; }

  /* ── Beyond ── */
  .beyond-grid { grid-template-columns: 1fr; }

  /* ── Courses ── */
  .courses-grid { grid-template-columns: 1fr; }

  /* ── CTA Banner ── */
  .cta-banner h2 { font-size: 1.25rem; }

  /* ── Footer ── */
  .footer__school-name { font-size: 1rem; }
  .footer__tagline     { font-size: 0.8rem; }
  .footer__address p   { font-size: 0.85rem; }
  .footer__heading     { font-size: 0.95rem; }

  /* ── Why us stats block ── */
  [style*="repeat(auto-fit"] { grid-template-columns: 1fr !important; }

  /* ── Sankalp Bot ── */
  .sbot-btn    { right: 12px; bottom: 12px; width: 52px; height: 52px; font-size: 1.2rem; }
  .sbot-window { max-height: 380px; }
  .sbot-header__name   { font-size: 0.95rem; }
  .sbot-msg            { font-size: 0.825rem; }
}

/* ── Extra small (< 360px) ── */
@media (max-width: 360px) {
  .hero__title   { font-size: 1.25rem; }
  .section-title { font-size: 1.15rem; }
  .stats__grid   { grid-template-columns: 1fr 1fr; }
  .stat__number  { font-size: 1.6rem; }
  .pillars__grid { grid-template-columns: 1fr 1fr; }
  .navbar__name  { display: none; }
}

/* ── Print ── */
@media print {
  .navbar, .footer, .back-to-top, .topbar,
  .sbot-btn, .sbot-window { display: none !important; }
  body { font-size: 12pt; }
  a::after { content: " (" attr(href) ")"; }
}
