/* ===================== RESET & GLOBAL ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* ===================== NAVBAR ===================== */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* ===================== LOGO AREA ===================== */
.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    cursor: pointer;
    transition: var(--transition);
}

.logo-area:hover {
    transform: translateY(-2px);
}

.school-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
    transition: var(--transition);
}

.logo-area:hover .school-logo {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.school-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.school-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--bg-white);
    letter-spacing: 1px;
    margin: 0;
    line-height: 1.2;
}

.school-tagline {
    font-size: 13px;
    color: var(--accent-color);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ===================== NAVIGATION MENU ===================== */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
    align-items: center;
    flex: 1;
    margin-left: 40px;
}

.nav-item,
.nav-menu > li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link {
    color: var(--bg-white);
    text-decoration: none;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--accent-color);
}

.nav-link.active {
    background-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-link i {
    font-size: 14px;
    transition: var(--transition);
}

.has-submenu > .nav-link i {
    transition: transform 0.3s ease;
}

.has-submenu:hover > .nav-link i {
    transform: rotate(180deg);
}

/* ===================== SUBMENU ===================== */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    list-style: none;
    min-width: 220px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    border-bottom: 1px solid var(--border-color);
}

.submenu li:last-child {
    border-bottom: none;
}

.submenu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
}

.submenu-link:hover {
    background-color: var(--bg-light);
    color: var(--secondary-color);
    padding-left: 26px;
}

.submenu-link i {
    font-size: 16px;
    color: var(--secondary-color);
    min-width: 20px;
}

.submenu-link span {
    flex: 1;
}

/* ===================== EXTERNAL LINK ===================== */
.external-link {
    background-color: rgba(245, 158, 11, 0.2);
    border-left: 3px solid var(--accent-color);
}

.external-link:hover {
    background-color: rgba(245, 158, 11, 0.3);
    border-left-color: var(--accent-color);
}

/* ===================== MOBILE MENU BUTTON ===================== */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 6px;
    padding: 10px;
    margin-right: 10px;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background-color: var(--bg-white);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(10px, -10px);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .navbar-container {
        height: 70px;
        padding: 0 15px;
    }

    .school-title {
        font-size: 16px;
    }

    .school-tagline {
        font-size: 12px;
    }

    .school-logo {
        width: 50px;
        height: 50px;
    }

    .logo-area {
        gap: 12px;
    }

    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        gap: 0;
        margin-left: 0;
    }

    .nav-menu.active {
        max-height: 500px;
    }

    .nav-item,
    .nav-menu > li {
        width: 100%;
        height: auto;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-link {
        width: 100%;
        padding: 15px 20px;
        border-radius: 0;
        justify-content: space-between;
        font-size: 14px;
    }

    .submenu {
        position: static;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: none;
        margin-top: 0;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: max-height 0.3s ease;
    }

    .has-submenu:hover .submenu {
        max-height: 300px;
    }

    .submenu.active {
        max-height: 300px;
    }

    .submenu-link {
        padding: 12px 20px 12px 50px;
        font-size: 13px;
        border-bottom: none;
    }

    .submenu-link:hover {
        padding-left: 56px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu > li:not(.has-submenu) a {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        height: 60px;
    }

    .school-title {
        font-size: 14px;
    }

    .school-tagline {
        font-size: 11px;
    }

    .school-logo {
        width: 45px;
        height: 45px;
    }

    .logo-area {
        gap: 10px;
    }

    .nav-link {
        padding: 12px 15px;
        font-size: 13px;
    }

    .submenu-link {
        padding: 10px 15px 10px 45px;
        font-size: 12px;
    }

    .menu-toggle span {
        width: 24px;
        height: 2.5px;
    }
}