/* --- Root Variables & Base Styling --- */
:root {
    --primary-red: #ff6b6b; /* Coral Red */
    --secondary-blue: #3498db; 
    --text-dark: #1a365d; 
    --text-body: #000000;
    --background-light: #ffffff;
    --background-alternate: #f8fafc;
    --transition: all 0.3s ease;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
    color: var(--text-body);
    font-size: 16px;
    scroll-padding-top: 90px;
}

body {
    background-color: var(--background-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Common Utilities --- */
.section-padded { padding: 100px 5%; }
.alternate-bg { background-color: var(--background-alternate); }
.section-title { text-align: center; margin-bottom: 70px; }
.section-title h2 { font-size: 3rem; color: var(--text-dark); font-weight: 700; }
.section-title p { font-size: 1.1rem; margin-top: 10px; }

/* Custom Colors & Gradients */
.royal-blue-text { color: #000000 !important; }
.red-text { color: #f83737 !important; }
.red-orange-text { color: #ff5722 !important; } 
.black-text { color: #000000 !important; }

.gradient-blue-text {
    background: linear-gradient(180deg, #4da9e8 0%, #0033a0 100%);
    -webkit-background-clip: text;  
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
    font-weight: 800;
}

/* --- Brand Title Container Styling (Navbar Fix) --- */
.brand-title-container {
    display: flex;
    align-items: baseline; 
    gap: 8px; 
    white-space: nowrap; 
    font-weight: bold; 
}

.brand-title-container .gradient-blue-text,
.brand-title-container .red-text,
.brand-title-container .black-text-nx {
    font-size: 20px; 
}
.brand-title-container .black-text-nx {
    color: #000000;
}

@media (min-width: 768px) {
    .brand-title-container .gradient-blue-text,
    .brand-title-container .red-text,
    .brand-title-container .black-text-nx {
        font-size: 32px; 
    }
}

p .gradient-blue-text,
p .red-text,
p .red-orange-text,
p .black-text-nx {
    font-size: 1.2rem !important; 
    font-weight: bold;
    display: inline; 
    vertical-align: baseline; 
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
    position: fixed; top: 0; left: 0; width: 0%; height: 4px;
    background: linear-gradient(to right, #ff5722, #0033a0);
    z-index: 1002;
}

/* --- Navigation Bar --- */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 5%; background-color: rgba(255, 255, 255, 0.98);
    position: fixed; top: 0; left: 0; width: 100%;
    box-sizing: border-box; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); z-index: 1000;
    transition: transform 0.4s ease-in-out, background-color 0.4s ease, box-shadow 0.3s ease;
}
.navbar.nav-hidden { transform: translateY(-100%); }
.logo-area { display: flex; align-items: center; gap: 15px; }
.nav-logo { height: 50px; width: auto; border-radius: 8px; }

.nav-links { list-style: none; display: flex; gap: 30px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--text-body); font-weight: 500; transition: var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--primary-red); }
.menu-toggle { display: none; font-size: 1.5rem; color: var(--text-dark); cursor: pointer; }

/* --- Hero Section --- */
.hero {
    min-height: auto; 
    display: flex; 
    align-items: flex-start; 
    margin-top: 110px; 
    padding: 0 5% 40px; 
    position: relative;
    background-color: var(--background-light); 
}

.courses-offered {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .courses-offered {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

.course-pill {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #ffffff;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-left: 5px solid #0033a0; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 1rem;
    color: var(--text-dark);
    cursor: default;
}

@media (min-width: 1024px) {
    .course-pill {
        padding: 22px 40px; 
        font-size: 1.25rem;  
        border-radius: 15px;
    }
    .course-pill i {
        font-size: 1.8rem; 
    }
}

.course-pill i { font-size: 1.4rem; color: #0033a0; }
.course-pill.commerce-pill { border-left-color: var(--primary-red); }
.course-pill.commerce-pill i { color: var(--primary-red); }
.course-pill:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }       

.tagline {
    display: block; 
    font-family: 'Great Vibes', cursive;
    font-size: 1.8rem; 
    color: var(--text-dark);
    margin-top: -27px;  
    margin-bottom: 30px; 
    font-weight: 500;
    padding-left: 0;   
}

@media (min-width: 1024px) {
    .tagline {
        font-size: 2.2rem;   
        margin-top: -1px;    
        padding-left: 57px;  
        margin-bottom: 30px; 
    }
}

.hero-content h1 { font-size: 5rem; color: var(--text-dark); font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.hero-highlight { color: var(--primary-red); }
.hero-content p { font-size: 1.2rem; margin-bottom: 40px; font-weight: 500; }
.hero-btns { display: flex; gap: 20px; }
.btn {
    display: inline-block; padding: 15px 30px; border-radius: 40px;
    text-decoration: none; font-weight: 600; font-size: 1rem;
    cursor: pointer; transition: var(--transition); border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn-primary { background-color: var(--primary-red); color: #ffffff; }
.btn-primary:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4); }
.btn-secondary { background-color: #0033a0; color: #ffffff; }
.btn-secondary:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0, 51, 160, 0.4); }

/* --- Results / Toppers Sections --- */
.results { text-align: center; }

/* 1. Main Topper Feature Section (PC Styling) */
.main-topper-feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    background: #ffffff;
    border-radius: var(--border-radius);
    padding: 50px;
    margin-bottom: 70px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.06);
    border: 2px solid rgba(0, 51, 160, 0.05);
}

.feature-left {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.feature-img-container {
    width: 100%;
    max-width: 550px;
    aspect-ratio: 4 / 3; /* Handles large images beautifully */
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 6px solid #fff;
}

.feature-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.feature-right {
    flex: 1;
    text-align: left;
}

.feature-text-content h3 {
    font-size: 3rem;
    color: var(--text-dark);
    font-weight: 800;
    margin-bottom: 5px;
    line-height: 1.1;
}

.main-topper-school {
    font-size: 1.2rem;
    color: var(--text-body);
    margin-bottom: 20px;
    font-weight: 500;
}

.feature-percentage {
    font-size: 4.5rem;
    color: #0033a0;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 25px;
    text-shadow: 2px 2px 0px rgba(0, 51, 160, 0.1);
}

.top-subjects-list-container h4 {
    font-size: 1.3rem;
    color: var(--primary-red);
    margin-bottom: 12px;
}

.top-subjects-main {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.top-subjects-main li {
    background: var(--background-alternate);
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    border-left: 4px solid var(--primary-red);
    color: var(--text-dark);
}

/* 2. Toppers Grid Updates */
.toppers-grid, .hsc-toppers-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 30px; margin-bottom: 30px;
}

.topper-card {
    background-color: #ffffff; padding: 30px 15px; border-radius: var(--border-radius);
    position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Image Frame Increased in Size */
.topper-img-frame {
    width: 160px; /* Increased from 100px */
    height: 160px; /* Increased from 100px */
    margin: 0 auto 20px; 
    border-radius: 50%;
    overflow: hidden; 
    border: 5px solid rgba(255, 107, 107, 0.2);
}

.topper-img { width: 100%; height: 100%; object-fit: cover; }

.topper-rank {
    position: absolute; top: 10px; right: 10px; background-color: #ffd700;
    color: #111; padding: 3px 10px; border-radius: 20px; font-weight: 700; font-size: 0.8rem;
}

.topper-card h4 { font-size: 1.2rem; color: var(--text-dark); font-weight: 600; margin-bottom: 5px; }
.topper-school { font-size: 0.85rem; color: var(--text-body); margin-bottom: 10px; }

/* Small Subjects List Inside Grid Cards */
.top-subjects {
    list-style: none;
    padding: 0;
    margin: 10px 0 15px 0;
    font-size: 0.85rem;
    color: #444;
    text-align: center;
}

.top-subjects li {
    display: inline-block;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
    margin: 3px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

.topper-score { font-size: 1.5rem; font-weight: 700; color: #0033a0; }


/* --- IMAGE CONTROL UTILITIES ---
   (Aap in IDs/classes me values change karke zoom in/out, left/right set kar sakte hain) 
*/

#mainTopperImage {
    /* Upar/Niche/Left/Right adjust karne ke liye (x% y%) */
    object-position: center 20%; 
    /* Zoom in/out karne ke liye, eg. scale(1.1) means 10% zoom */
    transform: scale(1); 
}

/* Example selector agar specifically kisi ek card ki photo thik karni ho */
#topper1Image img { object-position: center top; transform: scale(1.05); }
#topper2Image img { object-position: center 10%; transform: scale(1); }
#topper3Image img { object-position: center; transform: scale(1); }

/* Common rule to easily position all images nicely */
.topper-img {
    object-position: top center; /* Default fallback */
}


/* --- Next Can Be YOU Card --- */
.next-you-card {
    background: linear-gradient(135deg, rgba(0, 51, 160, 0.03) 0%, rgba(255, 107, 107, 0.05) 100%);
    border: 2px dashed rgba(255, 107, 107, 0.3);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px 15px;
}
.silhouette-frame { width: 100px; height: 100px; border-radius: 50%; background-color: #f1f1f1; display: flex; justify-content: center; align-items: center; margin: 0 auto 15px; border: 3px dashed #ddd; }
.silhouette-icon { font-size: 3.5rem; color: #ccc; }
.next-you-content h3 { font-size: 1.6rem; color: var(--text-dark); font-weight: 800; line-height: 1.2; margin-bottom: 10px; }
.next-you-card .call-to-action { font-size: 0.95rem; color: var(--text-body); font-weight: 500; margin-bottom: 15px; }
.btn-join { padding: 12px 20px; font-size: 0.95rem; width: 100%; }

/* --- Results Highlight Banner --- */
.results-highlight-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    background: linear-gradient(135deg, rgba(77, 169, 232, 0.1), rgba(0, 51, 160, 0.05));
    border: 2px solid rgba(0, 51, 160, 0.1);
    border-radius: 20px;
    padding: 40px;
    margin: 60px auto 0;
    max-width: 900px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transform: translateZ(0);
}

.feature-item { text-align: center; flex: 1; }
.highlight-icon { font-size: 3rem; color: var(--primary-red); margin-bottom: 15px; filter: drop-shadow(0 4px 6px rgba(255, 107, 107, 0.3)); }
.feature-item h3 { font-size: 4rem; color: #0033a0; font-weight: 800; line-height: 1; margin-bottom: 5px; display: flex; justify-content: center; align-items: baseline; }
.feature-item p { font-size: 1.3rem; color: var(--text-dark); font-weight: 500; }
.highlight-divider { width: 3px; height: 100px; background: linear-gradient(to bottom, transparent, rgba(0, 51, 160, 0.3), transparent); border-radius: 5px; }


/* --- Events Section --- */
.event-card {
    display: flex; flex-direction: column; gap: 15px;
    background: #fff; padding: 30px; border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

@media (min-width: 769px) {
    .event-card { display: block !important; padding: 50px; }
    .event-card::after { content: ""; display: table; clear: both; }
    .e-title { float: left; width: 45%; clear: left; text-align: left; margin: 0 0 15px 0 !important; }
    .e-text { float: left; width: 45%; clear: left; text-align: left; margin: 0 !important; }
    .e-img-row { float: right; width: 50%; clear: right; display: flex; justify-content: space-between; gap: 15px; }
    .e-img-row:nth-of-type(1) { margin-bottom: 20px !important; }
}

.e-title { font-size: 2.5rem; color: #0033a0; font-weight: 700; text-align: center; margin-bottom: 10px; }
.e-subtitle { font-weight: 600; color: var(--primary-red); margin-bottom: 10px; font-size: 1.1rem; }
.e-img-row { display: flex; gap: 15px; }
.e-img-row img { width: 48%; height: 200px; object-fit: cover; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); cursor: pointer; transition: transform 0.3s ease; }
.e-img-row img:hover { transform: scale(1.03); }

/* --- Previous Results --- */
.prev-toppers-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }

/* --- Success Stories --- */
.student-voices { background-color: var(--background-light); }
.carousel-container { position: relative; max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 20px; }
.carousel-track { display: flex; gap: 25px; overflow: hidden; padding: 20px 5px; flex: 1; }
.carousel-track::-webkit-scrollbar { display: none; }
.review-card { 
    flex: 0 0 calc(33.333% - 17px); scroll-snap-align: start; background: #fff; padding: 40px 30px; 
    border-radius: var(--border-radius); box-shadow: 0 10px 30px rgba(0,0,0,0.05); text-align: center; 
    position: relative; transition: transform 0.3s; border-top: 5px solid #0033a0; 
}
.review-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
.quote-mark { color: rgba(255, 107, 107, 0.1); font-size: 4rem; position: absolute; top: 15px; right: 25px; z-index: 0; }
.r-name { font-size: 1.4rem; color: var(--text-dark); font-weight: 700; position: relative; z-index: 1; margin-bottom: 2px;}
.r-year { font-size: 0.9rem; color: #777; margin-bottom: 15px; font-weight: 500; position: relative; z-index: 1; }
.r-percentage { font-size: 2.8rem; color: var(--primary-red); font-weight: 800; line-height: 1; margin-bottom: 20px; position: relative; z-index: 1; }
.r-text { font-size: 1rem; color: var(--text-body); font-style: italic; line-height: 1.6; position: relative; z-index: 1; }
.carousel-btn { background: #0033a0; color: #fff; border: none; width: 50px; height: 50px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; transition: 0.3s; display: flex; justify-content: center; align-items: center; flex-shrink: 0; box-shadow: 0 5px 15px rgba(0, 51, 160, 0.3); }
.carousel-btn:hover { background: var(--primary-red); transform: scale(1.1); box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4); }
.r-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(255, 107, 107, 0.3); margin: 0 auto 15px; position: relative; z-index: 1; display: block; }

/* --- Owner Section --- */
.owner-container { display: flex; align-items: center; gap: 70px; }
.owner-photo-frame { flex: 0 0 350px; }
.owner-photo { width: 100%; border-radius: var(--border-radius); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.owner-details { flex: 1; }
.owner-details h2 { font-size: 2.5rem; margin-top: 10px; color: var(--text-dark); }
.owner-message { font-size: 1.1rem; margin-top: 20px; line-height: 1.7; font-style: italic; }
.sub-heading { display: block; text-transform: uppercase; font-size: 1rem; font-weight: 600; margin-bottom: 5px; }

/* --- Milestone Section --- */
.milestone { text-align: center; }
.milestone-container { display: flex; flex-direction: column; align-items: center; gap: 60px; }
.achievement-badge { background: linear-gradient(135deg, #ffd700, #ff8c00); padding: 50px 80px; border-radius: var(--border-radius); color: #ffffff; box-shadow: 0 10px 30px rgba(255, 140, 0, 0.3); }
.achievement-badge h3 { font-size: 4.5rem; font-weight: 800; }
.milestone-icon { font-size: 4rem; margin-bottom: 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 50px; }
.stat-item { background-color: #ffffff; padding: 40px; border-radius: var(--border-radius); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.stat-item i { font-size: 3rem; color: var(--primary-red); margin-bottom: 15px; }
.number-wrapper { display: flex; justify-content: center; align-items: baseline; margin: 10px 0; }
.stat-item h4, .stat-symbol { font-size: 3.5rem; color: var(--text-dark); font-weight: 800; margin: 0; line-height: 1; }

/* --- Branches Section --- */
.branch-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.branch-card { background-color: #ffffff; padding: 50px; border-radius: var(--border-radius); text-align: center; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.main-branch-badge { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); background-color: var(--primary-red); color: #ffffff; padding: 5px 20px; border-radius: 20px; font-weight: 700; font-size: 0.9rem; }
.branch-icon { font-size: 3.5rem; color: #0033a0; margin-bottom: 20px; }
.branch-card h3 { font-size: 1.8rem; color: var(--text-dark); margin-bottom: 10px; }
.branch-btns { margin-top: 30px; display: flex; gap: 15px; justify-content: center; }

/* --- Final CTA & Footer --- */
.final-cta { text-align: center; }
.final-cta-container { max-width: 800px; margin: 0 auto; }
.final-cta-container h3 { font-size: 2.5rem; margin-bottom: 20px; color: var(--text-dark); }
.final-cta-container p { font-size: 1.1rem; margin-bottom: 40px; font-weight: 500; }
.cta-btns { display: flex; gap: 20px; justify-content: center; }
.footer { text-align: center; padding: 40px 5%; font-size: 0.95rem; background-color: #111; color: #fff; }
.credit { margin-top: 15px; font-size: 0.85rem; color: #888; font-style: normal; }

/* --- Fixed Floating Action Buttons --- */
.fab-container { position: fixed; bottom: 30px; right: 30px; display: flex; flex-direction: column; gap: 15px; z-index: 9999; align-items: center; }
.fab-container { transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease; }
.fab-container.hide-at-bottom { opacity: 0; visibility: hidden; transform: translateY(30px); pointer-events: none; }
.fab { width: 60px; height: 60px; border-radius: 50%; display: flex !important; justify-content: center !important; align-items: center !important; color: #ffffff !important; text-decoration: none; font-size: 30px; box-shadow: 0 6px 15px rgba(0,0,0,0.3); cursor: pointer; border: none; transition: var(--transition); padding: 0 !important; margin: 0; }
.fab i { margin: 0 !important; padding: 0 !important; line-height: 1 !important; display: block; }
.fab:hover { transform: scale(1.1); }
.fab-whatsapp { background-color: #25d366 !important; }
.fab-call { background-color: #0033a0 !important; }
.fab-scroll { background-color: #111 !important; opacity: 0; visibility: hidden; pointer-events: none; }
.fab-scroll.show { opacity: 1; visibility: visible; pointer-events: auto; }

/* --- Image Modal --- */
.modal { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); backdrop-filter: blur(5px); align-items: center; justify-content: center; }
.modal.show-modal { display: flex; }
.modal-content { max-width: 90%; max-height: 90vh; border-radius: 10px; object-fit: contain; animation: zoomIn 0.3s ease-out; }
@keyframes zoomIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.close-modal { position: absolute; top: 20px; right: 30px; color: #ffffff; font-size: 40px; font-weight: bold; cursor: pointer; transition: color 0.3s; z-index: 10001; }
.close-modal:hover { color: var(--primary-red); }

/* ====== SCROLL ANIMATIONS ====== */
.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.4s ease-out, transform 0.4s ease-out; }
.animate-on-scroll.show { opacity: 1; transform: translateY(0); }
.animate-fade-up { animation: fadeUp 0.8s ease-out forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* Hardware Acceleration */
.event-card, .topper-card, .e-img-row img, .review-card { transform: translateZ(0); -webkit-transform: translateZ(0); backface-visibility: hidden; -webkit-backface-visibility: hidden; perspective: 1000; }

/* ==========================================
   PRELOADER CSS
   ========================================== */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100dvh; background-color: #ffffff;
    z-index: 999999; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}
.preloader-content { text-align: center; width: 90%; max-width: 650px; display: flex; flex-direction: column; align-items: center; }
.preloader-welcome { font-size: 1rem; color: #555555; margin-bottom: 5px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; }
.preloader-brand { font-size: 3.5rem; font-weight: 800; margin-bottom: 5px; display: flex; justify-content: center; align-items: center; gap: 12px; white-space: nowrap; line-height: 1.1; }
.p-excellent { background: linear-gradient(180deg, #4da9e8 0%, #0033a0 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.p-tutorials { color: #ff3b3b; }
.p-nx { color: #000000; }
.preloader-tagline { font-family: 'Great Vibes', cursive; font-size: 2.5rem; color: #1a365d; margin-bottom: 30px; font-weight: 400; }
.progress-bar-container { width: 100%; max-width: 400px; height: 6px; background-color: #f0f0f0; border-radius: 10px; overflow: hidden; position: relative; box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); margin: 0 auto; }
.progress-bar { width: 0%; height: 100%; background: linear-gradient(to right, #0033a0, #ff3b3b); border-radius: 10px; transition: width 0.3s ease; }



/* ==========================================
   MOBILE DEVICES & RESPONSIVE CSS
   ========================================== */

@media (max-width: 1200px) {
    .section-title h2 { font-size: 2.5rem; }
    .hero-content h1 { font-size: 4rem; }
    .prev-toppers-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 992px) {
    .hero-content h1 { font-size: 3.5rem; }
    .section-title h2 { font-size: 2.2rem; }
    .owner-container { flex-direction: column; text-align: center; }
    .owner-photo-frame { flex: 0 0 250px; width: 250px; margin: 0 auto; }
    .branch-grid { grid-template-columns: 1fr; gap: 30px; }
    
    .toppers-grid, .hsc-toppers-grid { grid-template-columns: repeat(2, 1fr); }
    .main-topper-feature { flex-direction: column; text-align: center; gap: 30px; padding: 40px 20px; }
    .feature-left { justify-content: center; }
    .feature-right { text-align: center; }
    
    .prev-toppers-grid { grid-template-columns: repeat(3, 1fr); }
    .stat-item { padding: 30px; }
    .milestone-container { gap: 40px; }
    .achievement-badge { padding: 30px 50px; }
    .achievement-badge h3 { font-size: 3rem; } 
    .milestone-icon { font-size: 2.5rem; }
    
    .review-card { flex: 0 0 calc(50% - 12.5px); }
}

@media (max-width: 768px) {
    /* Preloader Mobile Adjustments */
    .preloader-brand { font-size: 2.2rem; gap: 8px; white-space: normal; flex-wrap: wrap; }
    .preloader-tagline { font-size: 1.8rem; margin-bottom: 25px; }

    /* Navbar Mobile Fix */
    .logo-area { gap: 10px; max-width: 85%; } 
    .brand-title-container { font-size: 21px; gap: 4px; }
    .brand-title-container .gradient-blue-text,
    .brand-title-container .red-text,
    .brand-title-container .black-text-nx { font-size: 21px; }
    
    .menu-toggle { display: block; margin-left: auto; font-size: 1.8rem; }
    
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; width: 100%;
        background-color: rgba(255, 255, 255, 0.98); flex-direction: column;
        text-align: center; padding: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    }
    .nav-links.show { display: flex; }
    
    /* Layout Mobile Fix */
    .section-padded { padding: 60px 5%; }
    .tagline { font-size: 1.8rem; padding-left: 0; }
    .hero-content h1 { font-size: 2.5rem; }
    .stats-grid { grid-template-columns: 1fr; gap: 20px; }
    
    /* Main Topper Mobile Adjustments */
    .main-topper-feature { padding: 25px 15px; margin-bottom: 40px; }
    .feature-text-content h3 { font-size: 2.2rem; }
    .feature-percentage { font-size: 3.5rem; margin-bottom: 15px; }
    .top-subjects-main { grid-template-columns: 1fr; gap: 8px; }
    .top-subjects-main li { font-size: 0.9rem; padding: 8px 12px; }

    /* Updated Toppers Grid (SSC & HSC) Mobile Fixes */
    .toppers-grid, .hsc-toppers-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .toppers-grid .topper-card, .hsc-toppers-grid .topper-card { padding: 20px 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.03) !important; }
    
    /* Perfect Image Size for mobile (Bigger than old 70px) */
    .topper-img-frame { width: 120px; height: 120px; border-width: 3px; margin-bottom: 12px; }
    
    .toppers-grid h4, .hsc-toppers-grid h4 { font-size: 1rem; }
    .toppers-grid .topper-school, .hsc-toppers-grid .topper-school { font-size: 0.75rem; margin-bottom: 5px; }
    .toppers-grid .topper-score, .hsc-toppers-grid .topper-score { font-size: 1.25rem; }
    .toppers-grid .topper-rank, .hsc-toppers-grid .topper-rank { font-size: 0.75rem; padding: 3px 8px; }
    
    .top-subjects { margin: 8px 0 10px 0; }
    .top-subjects li { font-size: 0.7rem; padding: 2px 6px; margin: 1px; }

    /* Next You Mobile Fix */
    .next-you-card { padding: 15px 5px !important; }
    .silhouette-frame { width: 70px; height: 70px; }
    .silhouette-icon { font-size: 2.5rem; }
    .next-you-content h3 { font-size: 1.2rem; }
    .next-you-card .call-to-action { font-size: 0.8rem; }
    .btn-join { padding: 8px 10px; font-size: 0.85rem; }

    /* Highlight Banner Fix */
    .results-highlight-banner { flex-direction: column; gap: 30px; padding: 40px 20px; margin: 40px 15px 0; }
    .highlight-divider { width: 80%; height: 3px; background: linear-gradient(to right, transparent, rgba(0, 51, 160, 0.3), transparent); }
    .feature-item h3 { font-size: 3.5rem; }
    .feature-item p { font-size: 1.1rem; }
    .highlight-icon { font-size: 2.5rem; }

    /* Rest of Mobile Fixes */
    .prev-toppers-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .prev-toppers-grid .topper-card { padding: 15px 5px; }
    .prev-toppers-grid .topper-img-frame { width: 70px; height: 70px; border-width: 2px; }
    .prev-toppers-grid h4 { font-size: 0.85rem; }
    .prev-toppers-grid .topper-score { font-size: 1.1rem; }
    .prev-toppers-grid .topper-card:nth-child(n+10) { display: none; }

    .e-img-row img { height: 120px; }
    .event-card, .stat-item, .branch-card { box-shadow: 0 4px 10px rgba(0,0,0,0.03) !important; }
    
    .review-card { flex: 0 0 100%; }
    .carousel-container { gap: 10px; }
    .carousel-btn { width: 40px; height: 40px; font-size: 1rem; }

    .cta-btns, .hero-btns, .branch-btns { flex-direction: column; gap: 10px; }
    .cta-btns .btn, .hero-btns .btn, .branch-btns .btn { width: 100%; text-align: center; }
    
    .fab { width: 50px; height: 50px; font-size: 1.4rem; }
    .modal-content { max-width: 95%; }
    .close-modal { top: 10px; right: 20px; font-size: 35px; }
}

@media (max-width: 480px) {
    .preloader-brand { font-size: 1.8rem; gap: 6px; }
    .preloader-tagline { font-size: 1.5rem; }
    .topper-img-frame { width: 100px; height: 100px; }
}