:root {
    /* --primary: #0a6f95; */
    --primary: #4361ee;
    --accent: #4cc9f0;
    --parent-theme: #ba0202;
    /* Amber for Parents */
    --dark: #0f172a;
    --glass: rgba(255, 255, 255, 0.9);
    --safe-area-bottom: env(safe-area-inset-bottom);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--dark);
    background-color: #f8fafc;
    overflow-x: hidden;
}

/* --- MODERN HEADER & NAV --- */
.navbar {
    background: var(--glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: .25rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--primary) !important;
}

/* Desktop Nav Link Animation */
@media (min-width: 992px) {
    .nav-link {
        position: relative;
        padding: 0.5rem 1rem !important;
        margin: 0 0.2rem;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--primary);
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }

    .nav-link:hover::after {
        width: 70%;
    }
}

/* MOBILE BOTTOM NAV (App-like feel) */
@media (max-width: 991px) {
    .navbar-collapse {
        display: none !important;
        /* Hide standard collapse */
    }

    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        display: flex;
        justify-content: space-around;
        padding: 10px 0 calc(10px + var(--safe-area-bottom));
        z-index: 1050;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #94a3b8;
        font-size: 0.7rem;
        font-weight: 600;
        transition: 0.3s;
    }

    .mobile-nav-item i {
        font-size: 1.25rem;
        margin-bottom: 4px;
    }

    .mobile-nav-item.active {
        color: var(--primary);
    }

    /* Custom Hamburger for Sidebar */
    .menu-toggle {
        border: none;
        background: #f1f5f9;
        padding: 8px 12px;
        border-radius: 10px;
        color: var(--dark);
    }
}

/* Offcanvas Tablet Sidebar */
.offcanvas {
    border-radius: 0 20px 20px 0;
    background: #ffffff;
}

.offcanvas-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 2rem;
}

.offcanvas-body .nav-link {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 0;
    color: var(--dark);
    border-bottom: 1px solid #f8fafc;
}

section {
    scroll-margin-top: 60px;
}

/* --- HERO --- */
.hero-section {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(67, 97, 238, 0.5)),
        url('../../img/home-bg.jpg');
    background-size: contain;
    background-position: center;
    min-height: 80vh;
    /* clip-path: ellipse(150% 100% at 100% 0%); */
    display: flex;
    align-items: center;
    color: white;
    padding: 60px 0;
}

/* --- HERO LOGIN FORM DYNAMIC BACKGROUND --- */
.hero-login-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* State: Teacher Login Active */
.login-theme-teacher {
    background: rgba(67, 97, 238, 0.15);
    /* Primary Blue based */
    box-shadow: 0 25px 50px -12px rgba(67, 97, 238, 0.3);
    border-color: rgba(67, 97, 238, 0.4);
}

/* State: Parent Login Active */
.login-theme-parent {
    background: rgba(245, 11, 11, 0.15);
    /* Amber based */
    box-shadow: 0 25px 50px -12px rgba(245, 11, 11, 0.3);
    border-color: rgba(245, 11, 11, 0.4);
}

.nav-pills-custom .nav-link {
    color: white;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 12px;
    transition: 0.3s;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 15px;
    border: 1px solid transparent;
}

/* Custom tab colors */
.nav-pills-custom #teacher-tab.active {
    background: var(--primary);
    box-shadow: 0 10px 15px -3px rgba(67, 97, 238, 0.4);
}

.nav-pills-custom #parent-tab.active {
    background: var(--parent-theme);
    box-shadow: 0 10px 15px -3px rgba(245, 11, 11, 0.4);
}

.hero-form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 12px;
    padding: 12px 15px;
    transition: 0.3s;
}

.hero-form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.hero-form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    color: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

/* Dynamic button colors based on parent/teacher */
.btn-teacher {
    background: var(--primary);
    color: white;
    border: none;
}

.btn-parent {
    background: var(--parent-theme);
    color: white;
    border: none;
}


@media (max-width: 768px) {
    .display-2 {
        font-size: 2.5rem;
        font-weight: 800;
    }

    .btn-modern {
        width: 100%;
    }
}

/* Scroller Styling */
.news-ticker {
    background: var(--dark);
    color: white;
    padding: 12px 0;
    overflow: hidden;
}

/* Footer margin for Mobile Nav */
@media (max-width: 991px) {
    footer {
        margin-bottom: 70px;
    }
}

/* Styling Utils */
.btn-modern {
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

.btn-primary-modern {
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.2);
}

.card-modern {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.card-modern:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.gallery-img {
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    transition: 0.3s;
    cursor: pointer;
}

.gallery-img:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.teacher-badge {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 8px 20px;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 80%;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 15px auto;
    border-radius: 2px;
}

/* Footer */
.footer-modern {
    background: var(--dark);
    color: #ffffff !important;
}