/* =========================================================
   RESPONSIVE STYLES
========================================================= */

/* =========================================================
   TABLET - 1024px and below
========================================================= */
@media (max-width: 1024px) {
  .logo-item {
    flex: 0 0 33.333%; /* 3 items on tablet */
  }

  /* ----- HERO SLIDER / BANNER ----- */
  .hero {
    height: 60vh; /* Tablet pe medium height */
  }

  .hero-arrow {
    font-size: 24px;
    padding: 8px 12px;
  }

  .hero-arrow.prev {
    left: 15px;
  }

  .hero-arrow.next {
    right: 15px;
  }
}

/* =========================================================
   MOBILE - 768px and below
========================================================= */
@media (max-width: 768px) {

  /* ----- BURGER MENU ----- */
  .burger {
    display: flex;
  }

  /* ----- MOBILE NAVIGATION ----- */
  .main-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: #fff;
    transition: left 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
  }

  .main-nav.open {
    left: 0;
  }

  /* Close Button (X) - Top Right */
  .menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    color: #333;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .menu-close:hover {
    color: #000;
  }

  /* Menu List */
  .main-nav ul {
    list-style: none;
    padding: 80px 0 40px 0;
    margin: 0;
    display: block;
  }

  .main-nav ul li {
    border-bottom: 1px solid #e5e5e5;
  }

  /* Menu Links */
  .main-nav ul li a {
    display: block;
    padding: 18px 30px;
    font-size: 15px;
    font-weight: 400;
    color: #333;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s ease;
  }

  .main-nav ul li a:hover {
    background: #f9f9f9;
  }

  /* Menu Link with Dropdown Arrow */
  .menu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
  }

  .menu-link a {
    flex: 1;
    padding: 18px 30px;
  }

  /* Dropdown Toggle Button (Arrow) */
  .submenu-toggle {
    background: none;
    border: none;
    border-left: 1px solid #e5e5e5;
    padding: 18px 30px;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
  }

  .submenu-toggle:hover {
    background: #f9f9f9;
  }

  /* Arrow Icon (Chevron Down) */
  .submenu-toggle::before {
    content: "›";
    display: inline-block;
    transform: rotate(90deg);
    transition: transform 0.3s ease;
    font-size: 20px;
  }

  /* Rotate arrow when submenu is open */
  .has-submenu.open .submenu-toggle::before {
    transform: rotate(-90deg);
  }

  /* Submenu (Hidden by default) */
  .submenu {
    display: none !important;
    background: #f7f7f7;
    padding: 0;
    list-style: none;
    position: static;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: auto;
  }

  /* Show submenu when parent has .open class */
  .has-submenu.open > .submenu {
    display: block !important;
  }

  .submenu li {
    border-bottom: 1px solid #e5e5e5;
  }

  .submenu li:last-child {
    border-bottom: none;
  }

  .submenu li a {
    padding: 15px 30px 15px 50px;
    font-size: 14px;
    color: #555;
    text-transform: none;
    letter-spacing: 0.3px;
  }

  .submenu li a:hover {
    background: #efefef;
  }

  /* ----- HEADER ICONS ----- */
  .header-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .header-icons {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .cart-icon {
    order: 1;
  }

  .burger {
    order: 2;
  }

  /* ----- GRID LAYOUTS ----- */
  .about-grid,
  .stats-grid,
  .work-grid,
  .cta-grid,
  .footer-grid,
  .media-grid {
    grid-template-columns: 1fr;
  }

  .insta-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ----- HERO SLIDER / BANNER ----- */
  .hero {
    height: 50vh; /* Mobile pe height kam */
  }

  .hero-arrow {
    font-size: 20px;
    padding: 8px 12px;
  }

  .hero-arrow.prev {
    left: 10px;
  }

  .hero-arrow.next {
    right: 10px;
  }

  /* ----- CONTRIBUTORS SLIDER ----- */
  .slider-wrapper {
    padding: 0 10px;
  }

  .testimonial-container {
    padding: 0 20px;
  }

  .testimonial-text {
    font-size: 14px;
  }

  /* ----- PARTNERS SLIDER ----- */
  .partners {
    padding: 40px 0;
  }

  .partners-slider-wrapper {
    gap: 5px;
  }

  .partner-arrow {
    font-size: 20px;
    padding: 8px;
  }
}

/* =========================================================
   SMALL MOBILE - 600px and below
========================================================= */
@media (max-width: 600px) {
  .logo-item {
    flex: 0 0 50%; /* 2 items on mobile */
  }

  /* ----- HERO SLIDER / BANNER ----- */
  .hero {
    height: 40vh; /* Very small screens pe aur kam height */
  }

  .hero-arrow {
    font-size: 18px;
    padding: 6px 10px;
  }

  .hero-arrow.prev {
    left: 5px;
  }

  .hero-arrow.next {
    right: 5px;
  }
}




/* --- Desktop & Tablet Adjustments --- */
@media screen and (max-width: 1024px) {
    .grid-text {
        padding: 40px;
    }
    .main-title {
        font-size: 1.8rem;
    }
}

/* --- Mobile View (Main Breakpoint) --- */
@media screen and (max-width: 768px) {
    /* Stack blocks vertically */
    .grid-row, 
    .grid-row.reverse {
        flex-direction: column !important;
    }

    .grid-text, .grid-img {
        width: 100%;
        min-width: 100%;
        flex: none;
    }

    .grid-img {
        height: 300px; /* Mobile height */
    }

    .grid-text {
        padding: 40px 20px;
        text-align: center;
    }

    /* Tags adjustments */
    .tag {
        width: 95%;
        font-size: 13px;
        padding: 12px;
    }

    /* Slider specific mobile tweaks */
    .testimonial-desc {
        font-size: 14px;
        padding: 0 15px;
    }
    
    .slider-arrow {
        display: none; /* Mobile par swipe/auto-play kaafi hai */
    }
}

/* --- Small Mobile --- */
@media screen and (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    .main-title {
        font-size: 1.2rem;
    }
}

/* --- Mobile Responsive CSS --- */
@media screen and (max-width: 768px) {
    .info-block, 
    .info-block.reverse {
        flex-direction: column !important; /* Mobile par vertical stacking */
    }

    .info-content, 
    .info-image {
        flex: 0 0 100%; /* Mobile par full width */
        max-width: 100%;
    }

    .info-image {
        height: 300px; /* Mobile par image ki fixed height */
    }

    .info-content {
        padding: 40px 20px;
        text-align: center; /* Mobile par text center achha lagta hai */
    }
}
/* --- Responsive CSS --- */
@media (max-width: 768px) {
    .info-block { flex-direction: column; }
    .info-content, .info-image { flex: 0 0 100%; padding: 30px 20px; }
    .grid-2 { grid-template-columns: 1fr; }
    .hero-overlay h1 { font-size: 1.8rem; }
    .section-padding { padding: 40px 0; }
}

@media screen and (max-width: 768px) {
    .school-flex-block {
        flex-direction: column;
    }
    
    .school-img, .school-content-box {
        flex: 0 0 100%;
    }
    
    .school-content-box {
        padding: 30px 20px;
        text-align: center;
    }

    .school-stats {
        flex-direction: column;
    }

    .stat-box {
        padding: 40px 20px;
    }

    .school-main-title {
        font-size: 22px;
        padding: 0 10px;
    }

    .slider-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
    }
    .slider-arrow.left { left: -10px; }
    .slider-arrow.right { right: -10px; }
}

/* Responsive Queries */
@media screen and (max-width: 992px) {
    .ourstory-text-side {
        padding: 40px;
    }
}

@media screen and (max-width: 768px) {
    .ourstory-flex-wrapper {
        flex-direction: column; /* Stack image on top, text below */
    }

    .ourstory-image-side, 
    .ourstory-text-side {
        flex: 0 0 100%;
        width: 100%;
    }

    .ourstory-image-side {
        height: 350px; /* Mobile par image ki height fix ki */
    }

    .ourstory-text-side {
        padding: 40px 20px;
        text-align: center;
    }

    .ourstory-heading {
        font-size: 24px;
    }

    .ourstory-support-banner {
        padding: 50px 15px;
    }
}

@media screen and (max-width: 480px) {
    .ourstory-image-side {
        height: 250px;
    }
    
    .ourstory-text-side p, 
    .ourstory-narrow-content p {
        font-size: 13.5px;
    }
}

/* Tablet and Mobile adjustments */
@media screen and (max-width: 992px) {
    .ourdream-content {
        padding: 30px;
    }
    .ourdream-content h2 {
        font-size: 20px;
    }
}

@media screen and (max-width: 768px) {
    .ourdream-row {
        flex-direction: column; /* Stack image on top, text below */
    }

    .ourdream-img, 
    .ourdream-content {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .ourdream-img {
        height: 300px; /* Mobile par image ki height fix ki */
    }

    .ourdream-content {
        padding: 30px 20px;
        text-align: center;
    }

    .ourdream-header h1 {
        font-size: 22px;
    }

    .ourdream-content h2 {
        font-size: 19px;
    }
}

@media screen and (max-width: 480px) {
    .ourdream-img {
        height: 220px;
    }
    .ourdream-header {
        padding: 30px 10px;
    }
    .ourdream-content p {
        font-size: 13px;
    }
}

@media screen and (max-width: 1024px) {
    .emp-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .emp-main-title { font-size: 22px; }
    
    .emp-grid-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .emp-card-img { height: 200px; }

    .emp-nav-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
    }
    
    .emp-nav-btn.prev { left: -10px; }
    .emp-nav-btn.next { right: -10px; }
    
    .quote { font-size: 14px; padding: 0 40px; }
}

@media screen and (max-width: 480px) {
    .emp-header { padding: 0 15px; }
    .emp-intro { font-size: 13px; }
}

@media screen and (max-width: 992px) {
    .ourschool-contact-flex {
        flex-direction: column;
    }

    .ourschool-contact-info, 
    .ourschool-contact-form-wrapper {
        flex: 0 0 100%;
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .ourschool-contact-section {
        padding: 50px 0;
    }

    .ourschool-contact-form-wrapper {
        padding: 25px 20px;
    }

    .ourschool-main-title {
        font-size: 24px;
    }
}
@media screen and (max-width: 992px) {
    .ourschool-testimonial-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    .ourschool-testi-card.wide {
        grid-column: span 1; /* Tablet par span hata dein */
    }
}

@media screen and (max-width: 768px) {
    .ourschool-main-title {
        font-size: 24px;
    }
    .ourschool-header {
        padding: 40px 20px;
    }
    .ourschool-testimonial-grid {
        grid-template-columns: 1fr; /* Mobile par single column */
    }
    .ourschool-testi-card {
        padding: 20px;
    }
}
@media screen and (max-width: 768px) {
    .ourschool-media-grid {
        grid-template-columns: 1fr; /* Mobile par stack */
    }
    .media-img-container { height: 200px; }
    .popup-content { width: 95%; }
}
@media screen and (max-width: 768px) {
    .ourstory-timeline-container::after {
        left: 30px;
    }

    .journey-year {
        left: 30px;
        width: 45px;
        height: 45px;
        font-size: 14px;
    }

    .journey-content {
        width: calc(100% - 60px);
        left: 60px !important; /* Force all to right side */
        margin-bottom: 30px;
    }

    .journey-image img {
        height: 200px;
    }

    .ourstory-main-title {
        font-size: 24px;
    }
}
@media screen and (max-width: 768px) {
    .shop-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .product-img {
        height: 220px;
    }
    
    .product-details h3 {
        font-size: 16px;
    }
    
    .shop-filters {
        justify-content: flex-start;
        padding-left: 10px;
    }
}

@media screen and (max-width: 480px) {
    .shop-product-grid {
        grid-template-columns: 1fr; /* Mobile par single product stack */
    }
}

/* Smooth Transition for Filtering */
.product-card {
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

@media screen and (max-width: 768px) {
    /* Mobile par filters ko scrollable banane ke liye */
    .shop-filters {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-btn {
        flex: 0 0 auto; /* Buttons ko shrink hone se rokega */
    }
}