/* =====================================================================
   SHAZIA ACADEMY — MOBILE / TABLET RESPONSIVE FIXES
   =====================================================================
   Yeh file style.css KE BAAD load hoti hai (dekhein includes/header.php).
   Maqsad: jo b screen size ho (mobile, tablet, small laptop), poori
   website usi hisaab se adjust ho jaye — menu, cards, buttons, forms,
   sab kuch.

   Agar aage kabhi mobile view mein koi cheez theek karni ho to sirf
   isi file ko edit karein, style.css ko touch karne ki zaroorat nahi.
   ===================================================================== */


/* ---------------------------------------------------------------------
   0) GLOBAL SAFETY — koi bhi element side se overflow na kare
--------------------------------------------------------------------- */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
img, video, iframe, table {
    max-width: 100%;
}


/* =======================================================================
   1) HAMBURGER MENU BUTTON (mobile/tablet par hi dikhega)
   ======================================================================= */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}
/* Jab menu khula ho to hamburger ko "X" jaisa shape day dete hain */
.site-header.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.site-header.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}
.site-header.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* =======================================================================
   2) MOBILE MENU PANEL (jo hamburger click par khulta hai)
   ======================================================================= */
.mobile-nav-panel {
    display: none; /* default hidden — sirf nav-open class lagne par khulay ga */
    flex-direction: column;
    background: #050033;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 10px 20px 20px;
}
.site-header.nav-open .mobile-nav-panel {
    display: flex;
}
.mobile-nav-link {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-decoration: none;
}
.mobile-nav-link.active {
    color: #ea8c08;
}
.mobile-nav-link:last-child {
    border-bottom: none;
}


/* =======================================================================
   3) HEADER LAYOUT — TABLET (max-width: 992px)
   Sirf nav links (Home/About/...) ko hamburger menu mein bhej dete
   hain. Register button aur profile icon hamesha top bar mein
   nazar aate rahenge (jaisa boss ne chaha).
   ======================================================================= */
@media (max-width: 992px) {
    .header-inner { flex-wrap: nowrap; }
    .main-nav { display: none; }
    .nav-toggle { display: flex; }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    /* Register dropdown card chhoti screen par overflow na ho */
    .register-dropdown-menu {
        max-width: 90vw;
    }
}


/* =======================================================================
   4) HEADER LAYOUT — MOBILE PHONE (max-width: 600px)
   ======================================================================= */
@media (max-width: 600px) {
    .site-header.new-header { padding: 12px 0; }
    .logo img { height: 38px !important; }
    .header-right-actions { gap: 8px !important; }
    .my-profile-btn { width: 34px !important; height: 34px !important; }

    /* Register button ko chhota kar dete hain taake profile icon
       aur hamburger ke saath ek row mein aaraam se fit ho jaye */
    .btn-register-toggle {
        padding: 8px 14px !important;
        font-size: 13px !important;
    }
    .header-actions { gap: 8px !important; }
}

@media (max-width: 360px) {
    .btn-register-toggle {
        padding: 7px 10px !important;
        font-size: 12px !important;
    }
}


/* =======================================================================
   5) GENERAL CONTAINER / SPACING — sab pages ke liye
   ======================================================================= */
@media (max-width: 768px) {
    .container { padding: 0 16px; }

    section { padding-top: 50px !important; padding-bottom: 50px !important; }

    .section-title { font-size: 1.6rem !important; }
    .section-subtitle { font-size: 0.95rem; }

    h1 { font-size: 1.9rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.2rem !important; }
}

@media (max-width: 480px) {
    .container { padding: 0 14px; }
    h1 { font-size: 1.6rem !important; }
}


/* =======================================================================
   6) HERO SECTION — buttons full width & center ho jayein
   ======================================================================= */
@media (max-width: 600px) {
    .trust-bar-container { align-items: center; text-align: center; }
    .trust-bar-band { padding: 20px 0; }

    .hero-inner { text-align: center; }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 14px;
    }
    .hero-buttons a,
    .hero-buttons button,
    .btn-pill-solid,
    .btn-pill-outline {
        width: 100%;
        text-align: center;
        display: block;
    }
    .hero-gradient h1,
    .hero-content h1 { font-size: 1.8rem !important; }
    .hero-gradient p,
    .hero-content p { max-width: 100%; padding-right: 0; }
}


/* =======================================================================
   7) CARDS / GRIDS — safety net (jo grids abhi tak stack nahi hoti)
   NOTE: .stats-grid is line mein se hata di gayi hai — uska apna
   dedicated fix section 12 mein hai (taake conflict na ho).
   ======================================================================= */
@media (max-width: 768px) {
    .services-grid,
    .services-grid-layout,
    .sz-ft-grid,
    .lib-grid,
    .jobs-grid,
    .locations-list,
    .field-grid,
    .checkbox-grid {
        grid-template-columns: 1fr !important;
    }

    .srv-card,
    .sz-ft-card,
    .lib-card,
    .job-card,
    .custom-testi-card {
        width: 100% !important;
        flex: 0 0 100% !important;
    }

    .contact-container,
    .contact-inner,
    .about-inner,
    .locations-inner {
        flex-direction: column;
    }

    .contact-left-col,
    .contact-right-col,
    .contact-image,
    .contact-form {
        min-width: 100%;
    }
}


/* =======================================================================
   8) BUTTONS — chhoti screen par tap-friendly rahein
   ======================================================================= */
@media (max-width: 480px) {
    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-navy,
    .contact-submit-btn,
    .auth-submit-btn,
    .btn-register-toggle {
        width: 100%;
        padding: 14px 18px;
        font-size: 0.95rem;
    }
}


/* =======================================================================
   9) TABLES — agar kahin table ho to side scroll mil jaye, tootay na
   ======================================================================= */
@media (max-width: 768px) {
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}


/* =======================================================================
   10) FOOTER — mobile par center aligned, columns ek ke neechay ek
   ======================================================================= */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 30px;
    }
    .footer-social { justify-content: center; }
}


/* =======================================================================
   11) AUTH / REGISTER PAGES — chhoti screen par form ka padding kam,
       fields ek column mein
   ======================================================================= */
@media (max-width: 600px) {
    .auth-right { padding: 0 18px !important; }
    .auth-content { padding: 30px 0 !important; }
    .field-grid,
    .checkbox-grid,
    .role-toggle-row {
        grid-template-columns: 1fr !important;
        flex-direction: column;
    }
    .radio-inline-row { flex-direction: column; gap: 10px; }
}


/* =======================================================================
   12) "WHY CHOOSE US" FEATURE CARD — landscape (icon left, text right)
   ======================================================================= */
@media (max-width: 600px) {
   @media (max-width: 400px) {
    .feature-card {
        flex: 0 0 100% !important;
        display: flex !important;
        align-items: center !important;
        height: auto !important;
        min-height: auto !important;
        border-radius: 0px;
  padding: 20px 50px;
        gap: 14px;
        margin: 0 !important;
        box-sizing: border-box !important; /* Yeh line add ki hai taake padding width se bahar na jaye */
    }
}
.feature-card.active { border-color: var(--orange); }
.feature-card .icon {
  font-size: 2.6rem;
  margin-bottom: 16px;
  color: var(--orange);
}
.feature-card h3 { color: var(--navy); margin-bottom: 10px; font-size: 1.15rem; }
.feature-card p { color: var(--gray); font-size: 0.92rem; }
}


/* =======================================================================
   13) ABOUT PAGE STATS BOX (Students / Tutors / Cities)
   Stacked/vertical layout hi chahiye (jaisa desktop pe hai) — bas
   mobile ke hisaab se size chhoti kar rahe hain. Grid ko poori tarah
   "block" bana diya hai taake koi purana grid-column rule conflict
   na kare.
   ======================================================================= */
@media (max-width: 600px) {
    .about-content .stats-grid,
    .stats-grid {
        display: block !important;
        grid-template-rows: unset !important;
    }
    .about-content .stat-box,
    .stat-box {
        display: block !important;
        padding: 14px 0 !important;
        min-height: auto !important;
        border-bottom: 1px solid #D98C0F !important;
        text-align: center;
    }
    .stat-box:last-child {
        border-bottom: none !important;
    }
    .stat-box .num {
        font-size: 1.6rem !important;
    }
    .stat-box .label,
    .stat-box .label1 {
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
    }
}
/* =====================================================================
   MOBILE FIXES: VIDEO SIZE, CAROUSEL ARROWS, AND STATS LINES
   ===================================================================== */
@media (max-width: 768px) {
    
    /* 1. Video ko mobile par full width (bara) karna */
    video, iframe {
        width: 100% !important;
        min-height: 220px !important; 
        border-radius: 10px;
    }

    /* 2 & 3. Why Choose Us: Arrows hide karna aur 1 card poora dikhana */
    .carousel-arrow {
        display: none !important; /* Mobile par arrows khatam */
    }
    .why-us-carousel {
        gap: 0 !important;
    }
    .carousel-viewport {
        width: 100% !important;
        overflow: hidden !important;
    }
    .feature-card {
        flex: 0 0 100% !important; /* Ek waqt mein mukammal 1 card */
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    /* 4. About Stats: Vertical orange line khatam karna */
    .stat-box:not(:last-child)::after {
        display: none !important; 
    }
    
    /* Stats box ko neechay line de kar center align karna (Mobile Standard) */
    .stat-box {
        display: block !important;
        padding: 15px 0 !important;
        border-bottom: 1px solid #D98C0F !important;
        border-right: none !important;
    }
    .stat-box:last-child {
        border-bottom: none !important;
    }
}
@media (max-width: 900px) {
    /* 1. Video ke main container ko poori screen par phailane ke liye */
    .video-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important; /* Sides se padding bilkul zero kar di taake width poori miley */
        margin: 0 auto !important;
    }

    /* 2. Grid ko fully kholne ke liye taake video side se block na ho */
    .video-grid {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
    }

    /* 3. Card ko full width dene ke liye */
    .video-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 4. MAIN FIX: Ab width aur height dono ek sath barhein gi */
    video, iframe {
        width: 100% !important;        /* 👈 Is se width poori screen par aa jaye gi */
        height: 350px !important;       /* 👈 Is se lambaee (height) barh jaye gi */
        min-height: unset !important;
        aspect-ratio: unset !important;
        object-fit: cover !important;   /* 👈 Video ko kharab ya stretch nahi hone dega */
        border-radius: 0px !important;  /* Poori width par standard look ke liye corners seedhe kiye */
    }
}
@media (max-width: 768px) {
    /* 1. Hero container ko mobile par top-to-bottom stack karne ke liye */
    .hero-inner {
        flex-direction: column !important; 
        gap: 35px !important;
        text-align: center !important;
    }

    /* 2. Mobile par text ko poori width dainay ke liye */
    .hero-content {
        max-width: 100% !important;
    }

    /* 3. Image container ko full width karne ke liye */
    .hero-image-placeholder {
        width: 100% !important;
    }

    /* 4. MAIN FIX: Image ko bina kute poora dikhane ke liye */
    .hero-image-placeholder img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;        /* 👈 Yeh line image ko khenchne ya katne nahi degi */
        object-fit: contain !important; /* 👈 Is se poori landscape image fit ho jayegi */
    }
}