﻿/* ============================================
   Mount Safa School - Responsive Styles
   ============================================ */

/* ============================================
   Tablet Styles (max-width: 992px)
   ============================================ */
@media (max-width: 992px) {
  /* Typography */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  /* Hero Slider */
  .hero-slider {
    height: 500px;
  }
  
  .hero-slider__title {
    font-size: 2.5rem;
  }
  
  .hero-slider__subtitle {
  font-size: 1.25rem;
  }
  
  /* ============================================
     MOBILE NAVIGATION - ENHANCED
     ============================================ */
  
  /* Show hamburger button */
  .nav__toggle {
    display: block !important;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color, #1a5f3f);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
    transition: all 0.3s ease;
  }
  
  .nav__toggle:hover {
    color: var(--secondary-color, #d4af37);
  }
  
  .nav__toggle--active {
    color: var(--secondary-color, #d4af37);
  }
  
  /* Mobile menu styles */
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background-color: var(--white, #ffffff);
    flex-direction: column;
    padding: 80px 2rem 2rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1001;
    overflow-y: auto;
  }
  
  .nav__menu--active {
    right: 0;
  }
  
  /* Overlay when menu is open */
  body.nav-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* Prevent body scroll when menu is open */
  body.nav-open {
    overflow: hidden;
  }
  
  /* Menu items */
  .nav__item {
    width: 100%;
    border-bottom: 1px solid var(--light-gray, #e0e0e0);
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
  }
  
  .nav__item:last-child {
    border-bottom: none;
  }
  
  /* Nav link - takes most of the space, clicking navigates */
  .nav__link {
    flex: 1;
    display: block;
    padding: 1rem 0;
    font-size: 1rem;
    color: var(--text-color, #333);
    transition: all 0.3s ease;
    text-decoration: none;
  }
  
  .nav__link:hover {
    color: var(--primary-color, #1a5f3f);
  }

  .nav__link--active {
    color: var(--primary-color, #1a5f3f);
    font-weight: 600;
  }
  
  .nav__link::after {
  display: none;
  }
  
  /* Dropdown button - SEPARATE from link, only toggles submenu */
  .nav__dropdown-icon {
    background: var(--light-gray, #f5f5f5);
    border: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
margin-left: auto;
    color: var(--primary-color, #1a5f3f);
  }
  
  .nav__dropdown-icon:hover {
    background: var(--primary-color, #1a5f3f);
 color: white;
  }
  
  .nav__dropdown-icon:active {
    transform: scale(0.95);
}
  
  .nav__dropdown-icon i {
    transition: transform 0.3s ease;
    font-size: 0.875rem;
  }
  
  .nav__item--open .nav__dropdown-icon {
    background: var(--primary-color, #1a5f3f);
    color: white;
  }
  
  .nav__item--open .nav__dropdown-icon i {
    transform: rotate(180deg);
  }
  
  /* Submenu styles for mobile */
  .nav__submenu {
    position: static !important;
    display: none !important;
    width: 100%;
    background: var(--light-gray, #f5f5f5);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0 !important;
    padding: 0.5rem 0;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color, #1a5f3f);
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
  
  .nav__item--open .nav__submenu {
    display: block !important;
    animation: slideDown 0.3s ease;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      max-height: 0;
    }
  to {
      opacity: 1;
 max-height: 500px;
    }
  }
  
  .nav__submenu-item {
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    list-style: none;
    display: block !important;
  }
  
  .nav__submenu-item:last-child {
    border-bottom: none;
  }
  
  .nav__submenu-link {
    display: block !important;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text-primary, #333) !important;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 1.5rem;
    text-decoration: none;
  }
  
  /* Add bullet point for submenu items */
  .nav__submenu-link::before {
    left: 0.75rem;
    color: var(--primary-color, #1a5f3f);
    font-size: 1.2rem;
    line-height: 1;
  }
  
  .nav__submenu-link:hover {
    background: rgba(26, 95, 63, 0.15);
    color: var(--primary-color, #1a5f3f) !important;
    padding-left: 2rem;
  }
  
  .nav__submenu-link--active {
    color: var(--primary-color, #1a5f3f) !important;
font-weight: 600;
    background: rgba(26, 95, 63, 0.1);
  }
  
  .nav__submenu-link--active::before {
    font-weight: bold;
  }
  
  /* Force hide desktop dropdown hover on mobile */
  .nav__item--has-dropdown:hover .nav__submenu {
    display: none !important;
  }
  
  /* Only show when nav__item--open class is present */
  .nav__item--has-dropdown.nav__item--open .nav__submenu {
    display: block !important;
  }
  
  /* Welcome Section */
  .welcome__content {
    grid-template-columns: 1fr;
  }
  
  /* Quick Links */
  .quick-links__grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  /* Stats */
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* News */
  .news__grid {
    grid-template-columns: repeat(auto-fit, minmin(250px, 1fr));
  }
  
  /* Footer */
  .footer__main {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Timeline */
  .timeline::before {
    left: 30px;
  }
  
  .timeline__item {
    flex-direction: row !important;
    padding-left: 60px;
  }
  
  .timeline__content {
    width: 100%;
  }
  
  .timeline__dot {
    left: 30px;
  }
  
  /* Contact */
  .contact__content {
    grid-template-columns: 1fr;
  }
  
  /* About Hero */
  .about-hero__title {
    font-size: 2.5rem;
  }
}

/* ============================================
   Mobile Styles (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
  /* Global */
  :root {
    --spacing-xl: 3rem;
  --spacing-lg: 2rem;
  }
  
  /* Typography */
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  /* Header */
  .header__top-content {
    flex-direction: column;
    text-align: center;
  }
  
  .header__contact {
    flex-direction: column;
    gap: var(--spacing-xs);
  }
  
  .header__logo-img {
  height: 50px;
  }
  
  .header__logo-title {
    font-size: 1.25rem;
  }
  
  .header__logo-subtitle {
    font-size: 0.75rem;
  }
  
  /* Hero Slider */
  .hero-slider {
 height: 400px;
  }
  
.hero-slider__title {
    font-size: 2rem;
  }
  
  .hero-slider__subtitle {
    font-size: 1rem;
  }
  
  .hero-slider__buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-slider__arrow {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
  
  .hero-slider__arrow--prev {
    left: var(--spacing-sm);
  }
  
  .hero-slider__arrow--next {
    right: var(--spacing-sm);
  }
  
  /* Section Title */
  .section-title__heading {
    font-size: 2rem;
  }
  
  .section-title__subtitle {
    font-size: 1rem;
  }
  
  /* Quick Links */
  .quick-links__grid {
    grid-template-columns: 1fr;
  }
  
  /* Stats */
  .stats__grid {
    grid-template-columns: 1fr;
  }
  
  .stats__number {
    font-size: 2.5rem;
  }
  
  /* News */
  .news__grid {
    grid-template-columns: 1fr;
  }
  
  /* Footer */
  .footer__main {
    grid-template-columns: 1fr;
  }
  
  /* Leadership */
  .leadership__grid {
    grid-template-columns: 1fr;
  }
  
  /* Curriculum */
  .curriculum__grid {
    grid-template-columns: 1fr;
  }
  
  /* Admissions */
  .admissions__process {
    grid-template-columns: 1fr;
  }

  /* About Hero */
  .about-hero__title {
    font-size: 2rem;
  }
  
  .about-hero__subtitle {
    font-size: 1rem;
  }
}

/* ============================================
   Small Mobile Styles (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
  /* Global */
  :root {
  --spacing-xl: 2rem;
    --spacing-lg: 1.5rem;
    --spacing-md: 1rem;
  }
  
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  /* Typography */
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }
  
/* Buttons */
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  /* Hero Slider */
  .hero-slider {
    height: 350px;
  }
  
  .hero-slider__title {
    font-size: 1.5rem;
  }
  
  .hero-slider__subtitle {
    font-size: 0.9rem;
  }
  
  .hero-slider__content {
    padding: 0 var(--spacing-sm);
  }
  
  /* Section Title */
  .section-title__heading {
    font-size: 1.5rem;
  }
  
  .section-title__heading::after {
    width: 60px;
  }
  
  /* Quick Links */
  .quick-links__icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .quick-links__title {
    font-size: 1.1rem;
  }
  
  /* Stats */
  .stats__icon {
    font-size: 2rem;
  }
  
  .stats__number {
    font-size: 2rem;
  }
  
  .stats__label {
    font-size: 0.9rem;
  }
  
  /* Timeline */
  .timeline::before {
    left: 20px;
  }
  
  .timeline__item {
    padding-left: 50px;
  }
  
  .timeline__dot {
    left: 20px;
 width: 16px;
    height: 16px;
  }
  
  .timeline__year {
    font-size: 1.25rem;
  }
  
  /* Leadership */
  .leadership__image {
    height: 250px;
  }
  
  .leadership__name {
    font-size: 1.25rem;
  }
  
  /* Contact Map */
  .contact__map {
    height: 300px;
  }
  
  /* Mobile menu - smaller width on very small screens */
  .nav__menu {
    width: 280px;
  }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .header__top,
  .nav,
  .hero-slider__controls,
  .hero-slider__arrow,
  .footer__social,
  .btn {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
  
  h1 { font-size: 24pt; }
  h2 { font-size: 20pt; }
  h3 { font-size: 16pt; }
  
  a {
    text-decoration: underline;
  }
  
  .section {
    page-break-inside: avoid;
  }
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000000;
    --secondary-color: #ffff00;
    --text-primary: #000000;
    --text-secondary: #000000;
  }
  
.btn {
    border: 2px solid currentColor;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  /* Optional: Add dark mode styles if needed */
  /* Currently not implemented to maintain brand consistency */
}