/* ==========================================================
   MOULYA GURUKUL — responsive.css  (final)
   ========================================================== */

/* ---- 1024px ---- */
@media (max-width: 1024px) {
  .container {
    padding: 0 28px;
  }

  .hero-overlay {
    background: linear-gradient(to right,
        rgba(1, 123, 133, 0.97) 0%,
        rgba(1, 123, 133, 0.9) 42%,
        rgba(1, 123, 133, 0.55) 65%,
        transparent 80%);
  }

  .programs-section::before {
    opacity: 0.7;
    background-size: 45%;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-col:first-child {
    grid-column: span 2;
  }

  .bm-bars-left span:nth-child(1) {
    width: 100px;
  }

  .bm-bars-left span:nth-child(2) {
    width: 68px;
  }

  .bm-bars-left span:nth-child(3) {
    width: 42px;
  }

  .bm-bars-right span:nth-child(1) {
    width: 100px;
  }

  .bm-bars-right span:nth-child(2) {
    width: 68px;
  }

  .bm-bars-right span:nth-child(3) {
    width: 42px;
  }
}

/* ---- 768px ---- */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  /* ---- HEADER ---- */
  .hamburger {
    display: flex;
  }

  /* Use opacity+visibility instead of translateX so nav never
     creates an off-screen element that causes horizontal scroll */
  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: #effdff;
    padding: 16px 20px 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
    z-index: 999;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }

  .main-nav.open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .main-nav ul li a {
    padding: 13px 16px;
    font-size: 0.95rem;
    display: block;
    border-radius: 8px;
  }

  .main-nav ul li a.nav-apply {
    text-align: center;
    margin-top: 8px;
  }

  /* ---- MARQUEE ---- */
  .marquee-bar {
    height: 36px;
  }

  .marquee-track span {
    font-size: 0.8rem;
  }

  /* ---- HERO ---- */
  .hero-section {
    min-height: 800px;
    align-items: flex-start;
  }

  /* Remove teal overlay on mobile */
  .hero-overlay {
    display: none;
  }

  /* Top-aligned content, adjusted padding */
  .hero-content {
    max-width: 100%;
    text-align: center;
    padding: 60px 30px 36px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-headline {
    font-size: 1.75rem;
    text-align: center;
  }

  .hero-sub {
    font-size: 0.9rem;
    max-width: 100%;
    text-align: center;
    margin-bottom: 24px;
  }

  .btn-hero {
    display: inline-block;
  }

  /* ---- FORM ---- */
  .form-section {
    padding-top: 40px;
  }

  .form-inner {
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
  }

  .form-kid-wrap {
    max-height: 320px;
  }

  .form-kid-wrap img {
    max-height: 300px;
  }

  .form-card-wrap {
    padding: 0 0 40px;
    width: 100%;
    box-sizing: border-box;
  }

  .form-card {
    width: 100%;
    box-sizing: border-box;
  }

  .form-card-body {
    padding: 14px 14px 18px;
  }

  .form-group input,
  .form-group select {
    font-size: 0.9rem;
    padding: 13px 14px;
  }

  /* ---- COUNTERS ---- */
  .counters-section {
    padding: 60px 0 40px;
    min-height: 700px;
    background-image: url("../assets/images/counters/counter-mobile-bg.webp") !important;
    display: flex;
    align-items: flex-start;
  }

  .counters-inner {
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
  }

  .counters-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    max-width: 100%;
  }

  .counter-box {
    width: 100%;
    grid-column: span 3;
  }

  /* first 2 take half each */
  .counter-box:nth-child(n+3) {
    grid-column: span 3;
  }

  /* next 3 take 1/3rd each */
  .counter-box .val {
    font-size: 1.4rem;
  }

  .counter-box .lbl {
    font-size: 0.75rem;
  }

  /* ---- PHILOSOPHY ---- */
  .philosophy-inner {
    padding: 60px 0;
  }

  .philosophy-inner p {
    font-size: 0.95rem;
  }

  /* ---- ACHIEVEMENTS ---- */
  .achievements-section {
    padding: 56px 0;
  }

  .ach-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* ---- CURRICULUM ---- */
  .curriculum-section {
    padding: 56px 0;
  }

  .curric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 100%;
  }

  .curric-card {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  /* ---- PROGRAMS ---- */
  .programs-section {
    padding: 10px 0 40px;
    min-height: 800px;
    background: url("../assets/images/academic-program/academic-bg-mobile.webp") no-repeat center / cover !important;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Remove both desktop ::before bg AND the mobile illustration image */
  .programs-section::before {
    display: none;
  }

  .programs-inner {
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
  }

  .programs-left {
    display: none;
  }

  /* hide the illustration entirely on mobile */
  .programs-content {
    padding-top: 20px;
  }

  .programs-content h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--green);
  }

  /* ---- CAMPUS ---- */
  .campus-section {
    padding: 56px 0;
  }

  /* ---- BENCHMARK ---- */
  .benchmark-section {
    padding: 56px 0;
  }

  .bm-bars-left,
  .bm-bars-right {
    display: none;
  }

  .bm-grid {
    max-width: 440px;
    width: 100%;
  }

  .bm-box {
    min-height: 140px;
    padding: 24px 16px;
  }

  .bm-box h4 {
    font-size: 1rem;
  }

  /* ---- ADMISSION ---- */
  .admission-section {
    padding: 56px 0;
  }

  .adm-timeline {
    flex-direction: column;
    padding-top: 0;
    gap: 32px;
  }

  .adm-timeline::before {
    top: 0;
    left: 11px;
    width: 2px;
    height: 100%;
    border-top: none;
    border-left: 2px dashed var(--green);
  }

  .adm-step {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 16px;
  }

  .adm-marker {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .adm-info h4 {
    font-size: 0.85rem;
  }

  .adm-info p {
    max-width: 100%;
    font-size: 0.8rem;
  }

  /* ---- DOCS BANNER ---- */
  .docs-inner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  /* ---- GALLERY ---- */
  .gallery-section {
    padding: 56px 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  /* ---- TESTIMONIALS ---- */
  .testimonials-section {
    padding: 56px 0;
  }

  /* Enable per-card carousel on mobile */
  .testi-carousel {
    overflow: hidden;
  }

  .testi-track {
    display: flex;
    grid-template-columns: unset;
    gap: 0;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .testi-slide {
    min-width: 100%;
    flex-shrink: 0;
    padding: 0 24px;
    /* increased side margin */
    box-sizing: border-box;
  }

  .testi-card {
    margin: 0 auto;
    width: 100%;
    max-width: 340px;
  }

  /* Show dots on mobile */
  .testi-dots {
    display: flex;
  }

  /* ---- FAQ ---- */
  .faq-section {
    padding: 56px 0;
  }

  .faq-item {
    border-radius: 10px;
  }

  .faq-q {
    border-radius: 10px;
    font-size: 0.88rem;
    padding: 13px 18px;
  }

  .faq-item.open .faq-q {
    border-radius: 10px 10px 0 0;
  }

  .faq-a-inner {
    border-radius: 0 0 10px 10px;
  }

  /* ---- FOOTER ---- */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-col:first-child {
    grid-column: span 1;
  }

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

  /* ---- BACK TOP ---- */
  .back-top {
    bottom: 20px;
    right: 16px;
    width: 42px;
    height: 42px;
  }
}

/* ---- 480px ---- */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-headline {
    font-size: 1.6rem;
  }

  .hero-sub {
    font-size: 0.88rem;
  }

  .counter-box .val {
    font-size: 1.5rem;
  }

  .campus-pill {
    font-size: 0.78rem;
    padding: 11px 20px;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .curric-grid {
    max-width: 100%;
  }

  .bm-grid {
    max-width: 340px;
  }

  .bm-box {
    padding: 24px 14px;
  }

  .bm-box h4 {
    font-size: 0.95rem;
  }

  .docs-inner {
    gap: 16px;
  }
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .marquee-track {
    animation: none;
  }
}