/* Mobile performance: less paint, fewer animations, content-visibility */

@media (max-width: 960px) {
  /* Cheaper shadows / blur */
  .pub-shell,
  .pub-shell * {
    -webkit-tap-highlight-color: transparent;
  }
  .pub-tcard,
  .pub-ilinks,
  .committee-card,
  .ed-card,
  .ed-infra-card,
  .ed-why-card,
  .pub-speech-card,
  .tmt-nb,
  .tmt-slider {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06) !important;
  }
  .pub-theme-fab-btn,
  .pub-ai-fab,
  .pub-whatsapp {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18) !important;
    backdrop-filter: none !important;
  }

  /* Below-fold sections: skip layout/paint until near viewport */
  .ed-section,
  .pub-teacher-wrap,
  .pub-committee-wrap,
  .pub-gal-wrap,
  .pub-blog-wrap,
  .pub-faq-wrap,
  .pub-testi-wrap,
  .pub-why-wrap,
  .pub-infra-wrap,
  .stats-section,
  .teachers-section,
  .gallery-section,
  .tmt-site section,
  .edufy-site .ed-section {
    content-visibility: auto;
    contain-intrinsic-size: 1px 480px;
  }

  /* Ticker / marquee: slower = fewer frames felt as jank */
  .mud-ticker-text,
  .mud-notice-track,
  .ed-marquee-track,
  .tmt-ticker-track {
    animation-duration: 48s !important;
  }

  /* Avoid sticky repaints where possible */
  .pub-nav {
    will-change: auto;
  }

  /* Images */
  .pub-shell img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 600px) {
  .mud-ticker-text,
  .mud-notice-track,
  .ed-marquee-track {
    animation-duration: 60s !important;
  }
  /* Soften gradients for GPU */
  .ed-hero,
  .ed-slide.active,
  .hero-carousel {
    background-attachment: scroll !important;
  }
}

/* Accessibility + battery */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .mud-ticker-text,
  .mud-notice-track,
  .ed-marquee-track,
  .tmt-ticker-track {
    animation: none !important;
    transform: none !important;
    padding-left: 0 !important;
  }
}
