:root {
    /* Blue Palette */
    --blue-light: #e0f2fe;    /* Sky 100 */
    --blue-main: #0ea5e9;     /* Sky 500 */
    --blue-bold: #0284c7;     /* Sky 600 */
    --blue-deep: #0c4a6e;     /* Sky 900 */
    --accent: #06b6d4;        /* Cyan */
    --shadow-blue: 0 10px 40px -10px rgba(14, 165, 233, 0.3);
    --grad-blue: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
}

body { font-family: 'Nunito', sans-serif; color: #334155; background-color: #f0f9ff; overflow-x: hidden; }
h1, h2, h3, h4, h5 { font-family: 'Raleway', sans-serif; font-weight: 800; color: var(--blue-deep); }

/* Animations */
.reveal-up { opacity: 0; transform: translateY(50px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-up.active { opacity: 1; transform: translateY(0); }
.delay-100 { transition-delay: 0.1s; } .delay-200 { transition-delay: 0.2s; } .delay-300 { transition-delay: 0.3s; }

/* Navbar */
.navbar { background: rgba(0, 0, 0, 0.1); backdrop-filter: blur(4px); padding: 15px 0; position: fixed; width: 100%; top: 0; z-index: 1000; transition: all 0.3s ease; }
.navbar.scrolled { background: rgba(12, 74, 110, 0.95); padding: 10px 0; box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.navbar-brand { display: flex; align-items: center; gap: 10px; margin-right: 20px; }
.navbar-brand img { height: 50px; width: auto; }
.navbar-brand span { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.5px; color: #fff; }
.navbar-collapse { justify-content: flex-end; }
.navbar-nav { flex-direction: row; flex-wrap: wrap; align-items: center; } 
.nav-link { font-weight: 700; color: rgba(255, 255, 255, 0.9) !important; font-size: 0.9rem; padding: 6px 10px !important; margin: 0 1px; border-radius: 50px; transition: all 0.3s ease; }
.nav-link:hover, .nav-link.active { background: rgba(255, 255, 255, 0.2); color: #fff !important; transform: translateY(-2px); }

@media (max-width: 991px) {
    .navbar-nav { flex-direction: column; width: 100%; padding-top: 10px; }
    .nav-link { width: 100%; text-align: center; margin-bottom: 5px; font-size: 1rem; padding: 12px !important; color: var(--blue-deep) !important; }
    .nav-link:hover, .nav-link.active { background: var(--blue-light); color: var(--blue-bold) !important; }
    .navbar-collapse { background: #fff; position: absolute; top: 100%; left: 0; right: 0; padding: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); border-radius: 0 0 20px 20px; }
    .navbar-toggler i { color: #fff !important; }
}

/* Hero Slider */
.hero-slider .carousel-item { height: 85vh; min-height: 650px; background: #000; }
.hero-slider img { height: 100%; width: 100%; object-fit: cover; opacity: 0.9; transform: scale(1); transition: transform 8s linear; }
.hero-slider .active img { transform: scale(1.15); } 
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(12, 74, 110, 0.7) 0%, transparent 80%); }
.hero-caption { position: absolute; bottom: 20%; left: 8%; z-index: 10; text-align: left; }
.hero-box { background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.3); padding: 30px 40px; border-radius: 20px; max-width: 600px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); border-left: 5px solid var(--accent); }
.hero-title { margin: 0; font-size: 2.2rem; color: #fff; line-height: 1.2; text-shadow: 0 4px 10px rgba(0,0,0,0.3); }

/* Floating Features */
.feature-strip { margin-top: -60px; position: relative; z-index: 20; padding-bottom: 60px; }
.feature-card { background: #fff; padding: 30px 20px; border-radius: 20px; text-align: center; box-shadow: var(--shadow-blue); text-decoration: none; display: block; color: var(--blue-deep); height: 100%; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); border: 2px solid #fff; }
.feature-card:hover { transform: translateY(-15px); border-color: var(--blue-main); }
.f-icon { width: 65px; height: 65px; line-height: 65px; border-radius: 50%; background: var(--blue-light); color: var(--blue-main); font-size: 1.8rem; margin: 0 auto 15px; transition: 0.4s; }
.feature-card:hover .f-icon { background: var(--grad-blue); color: #fff; transform: rotate(20deg); }
.f-title { font-size: 1.1rem; font-weight: 800; margin: 0; }

/* Main UI Components */
.section-padding { padding: 80px 0; }
.welcome-card { background: #fff; padding: 45px; border-radius: 24px; margin-bottom: 30px; box-shadow: 0 5px 25px rgba(0,0,0,0.03); border-top: 5px solid var(--blue-main); }
.welcome-content { font-size: 1.1rem; line-height: 1.8; color: #475569; }
.welcome-content img { float: left; margin-right: 30px; margin-bottom: 20px; border-radius: 20px; box-shadow: 10px 10px 0 var(--blue-light); max-width: 45%; transition: 0.3s; }
.welcome-content img:hover { transform: scale(1.02); }

.sidebar-card { background: #fff; border-radius: 20px; overflow: hidden; margin-bottom: 30px; box-shadow: var(--shadow-blue); border: 1px solid var(--blue-light); height: 100%; }
.sidebar-header { background: var(--blue-deep); color: #fff; padding: 20px 25px; display: flex; justify-content: space-between; align-items: center; }
.sidebar-header h5 { margin: 0; font-size: 1.1rem; color: #fff; }
.sidebar-header a { color: var(--accent); font-size: 0.85rem; font-weight: 700; text-decoration: none; }
.list-item { padding: 15px 20px; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; transition: 0.2s; }
.list-item:hover { background: var(--blue-light); padding-left: 25px; }
.date-box { background: #fff; color: var(--blue-main); padding: 5px 12px; border: 1px solid var(--blue-light); border-radius: 12px; text-align: center; min-width: 65px; margin-right: 15px; }
.db-d { font-size: 1.3rem; font-weight: 800; line-height: 1; }
.db-m { font-size: 0.7rem; text-transform: uppercase; font-weight: 700; }
.item-link { color: var(--blue-deep); font-weight: 700; text-decoration: none; font-size: 0.95rem; }

.news-card { display: block; text-decoration: none; color: inherit; background: #fff; border-radius: 20px; overflow: hidden; height: 100%; box-shadow: var(--shadow-blue); transition: 0.4s; border: 1px solid #f8fafc; }
.news-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(14, 165, 233, 0.2); }
.nc-body { padding: 25px; }
.nc-tag { color: var(--blue-main); font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.nc-title { font-size: 1.25rem; font-weight: 700; margin: 10px 0; color: var(--blue-deep); }

/* Gallery Grid adapted for 50% width */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.gallery-item { height: 160px; border-radius: 16px; overflow: hidden; position: relative; box-shadow: 0 5px 15px rgba(0,0,0,0.1); transition: 0.4s; }
.gallery-item:hover { transform: scale(1.05); z-index: 2; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* Facilities Grid */
.fac-card { display: block; position: relative; border-radius: 20px; overflow: hidden; height: 250px; box-shadow: var(--shadow-blue); transition: 0.4s; margin-bottom: 20px; }
.fac-card:hover { transform: translateY(-5px); }
.fac-card img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.fac-card:hover img { transform: scale(1.1); }
.fac-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 20px; background: linear-gradient(to top, var(--blue-deep), transparent); color: #fff; font-weight: 700; font-size: 1.2rem; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

/* Counter Section */
.counter-section { background: var(--grad-blue); padding: 70px 0; color: #fff; position: relative; overflow: hidden; }
.counter-section::before { content:''; position:absolute; top:0; left:0; width:100%; height:100%; background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%); pointer-events: none; }
.counter-item { text-align: center; }
.counter-item .icon-wrapper { font-size: 3rem; margin-bottom: 15px; color: var(--blue-light); }
.counter-number { font-size: 3.5rem; font-weight: 900; margin-bottom: 5px; font-family: 'Raleway', sans-serif; }
.counter-text { font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; opacity: 0.9; }

/* Testimonials */
.section-testimonials { background: #e0f2fe; padding: 100px 0; position: relative; }
.section-testimonials::before { content:''; position:absolute; top:0; left:0; width:100%; height:100%; background: radial-gradient(circle at top right, rgba(255,255,255,0.8), transparent); pointer-events: none;}
.testi-card { background: #fff; padding: 50px 30px 40px; border-radius: 24px; text-align: center; box-shadow: 0 15px 35px rgba(14, 165, 233, 0.1); position: relative; margin: 50px 10px 30px; border: 2px solid #fff; transition: 0.4s; }
.testi-card:hover { transform: translateY(-10px); }
.testi-img { width: 110px; height: 110px; border-radius: 50%; border: 5px solid #fff; margin: -105px auto 25px; object-fit: cover; box-shadow: 0 10px 25px rgba(14, 165, 233, 0.2); background-color: #eee; display: block; }
.testi-quote { font-size: 1.05rem; color: #64748b; margin-bottom: 20px; font-style: italic; }
.testi-name { font-weight: 800; color: var(--blue-deep); margin-bottom: 5px; }
.testi-badge { background: var(--blue-light); color: var(--blue-bold); font-size: 0.75rem; padding: 3px 10px; border-radius: 20px; font-weight: 700; text-transform: uppercase; }

/* Teachers */
.teacher-card { background: #fff; border-radius: 24px; padding: 30px; text-align: center; box-shadow: var(--shadow-blue); transition: 0.3s; border: 1px solid #fff; }
.teacher-card:hover { border-color: var(--blue-main); transform: translateY(-5px); }
.t-img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; margin: 0 auto 20px; border: 5px solid var(--blue-light); }

/* ========================================= */
/* PREMIUM FOOTER STYLES (WAVE & MINIMALIST) */
/* ========================================= */

.main-footer { font-family: 'Nunito', sans-serif; }

/* Link Hover Effects */
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: #bae6fd; text-decoration: none; transition: all 0.3s ease; display: inline-block; }
.footer-links a:hover { color: #fff; transform: translateX(5px); }

/* Contact List Typography */
.footer-contact li { font-size: 0.95rem; line-height: 1.6; }

/* Circular Social Links */
.footer-socials a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.1); color: #fff; margin-right: 12px; font-size: 1.1rem; transition: all 0.3s ease; }
.footer-socials a:hover { background: var(--blue-main); transform: translateY(-3px); box-shadow: 0 5px 15px rgba(14, 165, 233, 0.4); }

/* Back to Top Button */
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 45px; height: 45px; border-radius: 50%; background: var(--blue-main); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; text-decoration: none; opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 999; }
.back-to-top.active { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--blue-deep); color: #fff; transform: translateY(-3px); }

/* Hide back-to-top on small screens so it doesn't fight the sidebar */
@media (max-width: 991px) { .back-to-top { bottom: 20px; right: 20px; } }

/* ========================================= */
/* OLD FEATURES INTEGRATION                  */
/* ========================================= */

/* Social Sidebar */
.social-sidebar { position: fixed; top: 50%; right: 0; transform: translateY(-50%); z-index: 9999; display: flex; flex-direction: column; box-shadow: -2px 2px 10px rgba(0,0,0,0.1); }
.social-sidebar a { display: flex; justify-content: center; align-items: center; width: 45px; height: 45px; color: white; font-size: 20px; text-decoration: none; transition: all 0.3s ease; border-radius: 5px 0 0 5px; margin-bottom: 2px; position: relative; right: -5px; }
.social-sidebar a:hover { width: 55px; right: 0; padding-right: 5px; }
.s-facebook { background: #3b5998; } .s-youtube { background: #ff0000; } .s-instagram { background: #E1306C; } .s-phone { background: #2c3e50; } .s-tiktok { background: #000000; }

@media (max-width: 768px) {
    .social-sidebar { top: auto; bottom: 0; right: 0; left: 0; transform: none; flex-direction: row; width: 100%; justify-content: center; background: rgba(255,255,255,0.95); padding: 10px 0; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); }
    .social-sidebar a { width: 40px; height: 40px; border-radius: 50%; margin: 0 10px; right: 0; }
    .social-sidebar a:hover { width: 40px; transform: translateY(-5px); }
}

/* Popup Responsive Fix */
#autoPopupModal .modal-body img { max-width: 100%; height: auto; border-radius: 12px; }
/* ========================================= */
/* MOBILE NAVBAR ALIGNMENT FIX               */
/* ========================================= */
@media (max-width: 576px) {
    /* Prevent the brand section from pushing the menu down */
    .navbar > .container-fluid {
        flex-wrap: nowrap;
    }
    
    .navbar-brand {
        max-width: calc(100% - 50px); /* Leave exact room for hamburger */
        margin-right: 0;
        gap: 8px; /* Slightly tighter spacing */
    }
    
    .navbar-brand img {
        height: 35px; /* Scale logo down for mobile */
    }
    
    .navbar-brand span {
        font-size: 1.1rem; /* Scale text down */
        white-space: nowrap; /* Force text to stay on one line */
        overflow: hidden; 
        text-overflow: ellipsis; /* Add "..." if it hits the edge */
    }
    
    .navbar-toggler {
        padding: 4px 8px; /* Make the button a bit more compact */
    }
}