/* ============================================================
   SRI CHANAKYA E.M SCHOOL — Responsive Breakpoints
   ============================================================ */

/* ---------- XL: 1280px+ ---------- */
@media (min-width: 1280px) {
  .container {
    max-width: 1200px;
  }
}

/* ---------- Large Desktop: up to 1279px ---------- */
@media (max-width: 1279px) {
  .hero-inner {
    gap: 40px;
  }
}

/* ---------- Tablet/Small Desktop: up to 1024px ---------- */
@media (max-width: 1024px) {
  :root {
    --navbar-height: 70px;
    --section-padding: 70px 0;
  }

  /* Navbar mobile */
  .hamburger {
    display: flex;
  }

  .nav-cta-btn {
    display: none;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    flex-direction: column;
    background: var(--white);
    padding: 100px 30px 40px;
    gap: 4px;
    box-shadow: -4px 0 30px rgba(0,0,0,0.1);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9050;
    overflow-y: auto;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-overlay {
    display: block;
  }

  .nav-links a {
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  .nav-links a:hover {
    background: var(--royal-50);
  }

  .nav-links a::after {
    display: none;
  }

  /* Hero */
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 0 120px;
  }

  .hero-badge-label {
    margin-left: auto;
    margin-right: auto;
  }

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

  .hero-trust-bar {
    margin: 0 auto;
  }

  .hero-images {
    max-width: 520px;
    margin: 0 auto;
  }

  .hero-deco-circle-yellow {
    width: 90px;
    height: 90px;
    top: -15px;
    right: -15px;
  }

  .hero-deco-circle-blue {
    width: 60px;
    height: 60px;
  }

  /* Stats band */
  .stats-band-circles {
    padding: 0 4%;
  }

  .stat-bubble-1 .stat-bubble-inner,
  .stat-bubble-2 .stat-bubble-inner,
  .stat-bubble-3 .stat-bubble-inner,
  .stat-bubble-4 .stat-bubble-inner {
    width: 115px;
    height: 115px;
  }

  .stat-bubble .stat-number { font-size: 1.8rem; }
  .stat-bubble-1 .stat-number { font-size: 1.6rem; }
  .stat-bubble-2 .stat-number { font-size: 2rem; }

  .stat-bubble-1,
  .stat-bubble-2,
  .stat-bubble-3,
  .stat-bubble-4 {
    margin-top: 0;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image-wrapper {
    max-width: 500px;
    margin: 0 auto;
  }

  /* Programs */
  .programs-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  /* Features */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Life gallery */
  .life-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .life-gallery-wide {
    grid-column: span 2;
  }

  /* Story blocks */
  .story-block {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .story-block.reverse {
    direction: ltr;
  }

  /* Values */
  .values-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  /* Founders */
  .founders-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  /* Timeline */
  .timeline {
    flex-direction: column;
    gap: 30px;
    padding: 0;
  }

  .timeline::before {
    top: 0;
    bottom: 0;
    left: 28px;
    right: auto;
    width: 3px;
    height: auto;
  }

  .timeline-step {
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 20px;
  }

  .timeline-step .step-number {
    margin: 0;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }

  /* Contact */
  .contact-cards {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto 40px;
  }

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

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* ---------- Tablet: up to 768px ---------- */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }

  /* Loader responsive */
  .loader-float-icon {
    width: 24px !important;
    height: 24px !important;
  }
  .loader-home .loader-ghost,
  .loader-home .loader-reveal {
    font-size: 1.8rem !important;
  }
  .loader-home .loader-bar {
    width: 220px;
  }
  .loader-percent {
    font-size: 0.75rem;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .container {
    padding: 0 20px;
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding-top: calc(var(--navbar-height) + 20px);
  }

  .hero-inner {
    padding: 30px 0 100px;
  }

  .hero-image-grid {
    gap: 12px;
  }

  .hero-img-2 {
    margin-top: 20px;
  }
  .hero-img-3 {
    margin-top: -20px;
  }

  .hero-curved-lines {
    display: none;
  }

  /* Stats band */
  .stats-band { margin-top: -30px; }
  .stats-band-svg { min-height: 250px; }
  .stat-bubble-1 .stat-bubble-inner,
  .stat-bubble-2 .stat-bubble-inner,
  .stat-bubble-3 .stat-bubble-inner,
  .stat-bubble-4 .stat-bubble-inner {
    width: 100px;
    height: 100px;
  }
  .stat-bubble .stat-number { font-size: 1.5rem; }
  .stat-bubble-1 .stat-number,
  .stat-bubble-2 .stat-number,
  .stat-bubble-3 .stat-number,
  .stat-bubble-4 .stat-number { font-size: 1.5rem; }
  .stat-bubble .stat-label { font-size: 0.6rem; }

  /* About features mini */
  .about-features-mini {
    grid-template-columns: 1fr;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  /* Life gallery */
  .life-gallery {
    grid-template-columns: 1fr;
  }

  .life-gallery-wide {
    grid-column: span 1;
  }

  .life-curve-top svg,
  .life-curve-bottom svg {
    height: 60px;
  }

  /* Testimonials */
  .testimonial-card {
    padding: 30px 20px;
  }

  .testimonial-text {
    font-size: 1rem;
  }

  /* CTA */
  .cta-inner {
    padding: 50px 0;
  }

  /* Page hero */
  .page-hero {
    padding: 130px 0 60px;
  }

  /* Tabs */
  .tab-buttons {
    gap: 6px;
  }

  .tab-btn {
    padding: 10px 20px;
    font-size: 0.8rem;
  }

  /* Eligibility table scroll */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .eligibility-table {
    min-width: 500px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

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

  .footer-links a:hover {
    padding-left: 0;
  }

  .footer-contact-item {
    justify-content: center;
  }

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

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

  .footer-brand img {
    margin: 0 auto 16px;
  }

  /* Programs curves */
  .programs-curve-top svg,
  .programs-curve-bottom svg {
    height: 50px;
  }

  .hero-curve-separator svg {
    height: 70px;
  }
}

/* ---------- Mobile: up to 480px ---------- */
@media (max-width: 480px) {
  :root {
    --navbar-height: 64px;
    --section-padding: 50px 0;
  }

  /* Loader responsive */
  .loader-home .loader-ghost,
  .loader-home .loader-reveal {
    font-size: 1.4rem !important;
  }
  .loader-home .loader-bar {
    width: 180px;
  }

  .container {
    padding: 0 16px;
  }

  /* Navbar */
  .navbar-brand img {
    width: 42px;
    height: 42px;
  }

  .school-name {
    font-size: 0.95rem;
  }

  .school-tagline {
    display: none;
  }

  .nav-links {
    width: 280px;
  }

  /* Hero */
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-trust-bar {
    width: 100%;
    justify-content: center;
    gap: 16px;
    padding: 14px 16px;
  }

  .trust-number {
    font-size: 1.1rem;
  }

  .hero-images {
    max-width: 100%;
  }

  .hero-deco-circle-yellow,
  .hero-deco-circle-blue {
    display: none;
  }

  /* Stats band */
  .stats-band { margin-top: -15px; }
  .stats-band-svg { min-height: 180px; }
  .stats-band-circles { padding: 0 2%; }
  .stat-bubble-1 .stat-bubble-inner,
  .stat-bubble-2 .stat-bubble-inner,
  .stat-bubble-3 .stat-bubble-inner,
  .stat-bubble-4 .stat-bubble-inner {
    width: 70px;
    height: 70px;
  }
  .stat-bubble .stat-number,
  .stat-bubble-1 .stat-number,
  .stat-bubble-2 .stat-number,
  .stat-bubble-3 .stat-number,
  .stat-bubble-4 .stat-number { font-size: 1rem; }
  .stat-bubble .stat-label { font-size: 0.45rem; letter-spacing: 0; }
  .stat-bubble .stat-label { font-size: 0.5rem; letter-spacing: 0; }

  /* Programs */
  .programs-grid {
    max-width: 100%;
  }

  /* Buttons */
  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  /* Video */
  .video-wrapper {
    border-radius: var(--radius-md);
  }

  /* Floating buttons */
  .whatsapp-btn {
    width: 50px;
    height: 50px;
    bottom: 85px;
    right: 16px;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    right: 16px;
    bottom: 20px;
  }

  /* Filter buttons scroll */
  .filter-buttons {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-buttons::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* Lightbox */
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
  }

  .lightbox-close {
    width: 38px;
    height: 38px;
    top: 12px;
    right: 12px;
  }

  /* Admissions form */
  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  /* Map */
  .map-wrapper {
    height: 280px;
  }

  /* Hero curves */
  .hero-curve-separator svg {
    height: 50px;
  }
}

/* ---------- Form grid helper ---------- */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ---------- Reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale,
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
