/* Responsive Design for Sunny Kids Academy */

/* Mobile First Approach */

/* Small Devices (Phones) - Up to 576px */
@media (max-width: 576px) {
  /* Typography Adjustments */
  h1 {
    font-size: 2.5rem;
    text-shadow: 1px 1px 0 var(--accent-yellow);
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  h4 {
    font-size: 1.1rem;
  }

  p {
    font-size: 1rem;
    line-height: 1.6;
  }

  /* Header and Navigation */
  .header {
    padding: 10px 0;
  }

  .header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-link {
    display: block;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 5px;
    text-align: left;
  }

  .hamburger {
    display: block;
    position: absolute;
    top: 15px;
    right: 70px; /* Space for theme toggle */
  }

  .theme-toggle {
    position: absolute;
    top: 10px;
    right: 20px;
    margin-left: 0;
  }

  /* Hero Section */
  .hero {
    padding-top: 100px;
    min-height: 80vh;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  .stat-box {
    width: 100%;
    max-width: 200px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  /* Section Headers */
  .section-header {
    margin-bottom: 30px;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-subtitle {
    font-size: 1.1rem;
  }

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

  .classroom-scene {
    height: 250px;
  }

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

  /* Admissions Section */
  .admissions-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .process-steps {
    gap: 20px;
  }

  .step {
    flex-direction: column;
    align-items: flex-start;
  }

  .step-number {
    margin-bottom: 10px;
  }

  .admission-details {
    grid-template-columns: 1fr;
    gap: 15px;
  }

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

  .gallery-item {
    height: auto;
  }

  .gallery-image-real {
    height: 200px;
  }

  /* About Photo */
  .about-photo {
    height: 260px;
  }

  /* FAQ Section */
  .faq-grid {
    gap: 12px;
  }

  .faq-question {
    font-size: 0.95rem;
    padding: 16px 18px;
  }

  /* Contact Section */
  .contact-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-item i {
    margin-bottom: 10px;
  }

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

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

  .newsletter-input {
    flex-direction: column;
    gap: 10px;
  }

  /* Forms */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Scroll to Top Button */
  .scroll-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

/* Medium Devices (Tablets) - 577px to 992px */
@media (min-width: 577px) and (max-width: 992px) {
  /* Typography */
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.2rem;
  }

  /* Container */
  .container {
    max-width: 750px;
    padding: 0 15px;
  }

  /* Header */
  .header .container {
    flex-direction: row;
    align-items: center;
  }

  .nav-menu {
    display: flex !important;
    position: static;
    background: transparent;
    padding: 0;
    box-shadow: none;
    margin-bottom: 0;
  }

  .hamburger {
    display: none;
  }

  /* Hero */
  .hero-stats {
    gap: 30px;
  }

  .stat-box {
    min-width: 100px;
  }

  /* About */
  .about-content {
    grid-template-columns: 1.5fr 1fr;
  }

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

  /* Admissions */
  .admissions-content {
    grid-template-columns: 1.5fr 1fr;
  }

  .admission-details {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

/* Large Devices (Desktops) - 993px and above */
@media (min-width: 993px) {
  /* Container */
  .container {
    max-width: 1200px;
    padding: 0 20px;
  }

  /* Header */
  .header .container {
    max-width: 1200px;
  }

  /* Hero */
  .hero-stats {
    gap: 40px;
  }

  .stat-box {
    min-width: 120px;
  }

  /* About */
  .about-content {
    grid-template-columns: 2fr 1fr;
  }

  .features {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .admission-details {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Extra Large Devices - 1400px and above */
@media (min-width: 1400px) {
  /* Container */
  .container {
    max-width: 1400px;
  }

  /* Hero */
  .hero-title {
    font-size: 5rem;
  }

  .hero-subtitle {
    font-size: 1.8rem;
  }

  /* About */
  .classroom-scene {
    height: 350px;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }

  .header,
  .scroll-top,
  .hamburger {
    display: none !important;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  section {
    page-break-inside: avoid;
    margin-bottom: 20px;
  }

  .btn,
  .gallery-item,
  .feature-card {
    box-shadow: none !important;
    background: white !important;
    border: 1px solid #333 !important;
  }

  a {
    color: black !important;
    text-decoration: none !important;
  }

  h1,
  h2,
  h3,
  h4 {
    color: black !important;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  }

  .btn {
    border: 2px solid black;
  }

  .stat-box,
  .feature-card,
  .detail-box {
    border: 3px solid black;
  }

  .gallery-item {
    border: 2px solid black;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .floating-elements {
    display: none;
  }

  .hero-title {
    animation: none;
  }
}

/* Removed legacy prefers-color-scheme media query as it is now handled by [data-theme] in style.css */

/* Landscape Orientation for Mobile */
@media (max-width: 576px) and (orientation: landscape) {
  .hero {
    min-height: 60vh;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-stats {
    flex-direction: row;
    justify-content: space-around;
  }

  .stat-box {
    width: 20%;
    min-width: 80px;
  }
}

/* Portrait Orientation for Mobile */
@media (max-width: 576px) and (orientation: portrait) {
  .hero {
    min-height: 70vh;
  }

  .hero-stats {
    flex-direction: column;
    gap: 15px;
  }

  .stat-box {
    width: 100%;
    max-width: 250px;
  }
}
