/* ===== MODERN HEADER STYLES ===== */

:root {
    --primary-color: #003366;
    --primary-dark: #002244;
    --secondary-color: #1e5a8e;
    --accent-color: #ff9800;
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, #003366 0%, #0066cc 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

/* ===== TOP BAR - PROFESSIONAL & MODERN ===== */
.top-bar {
    background: linear-gradient(90deg, #003366 0%, #004d99 100%);
    color: white;
    padding: 12px 0;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.15);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.top-bar-left {
    display: flex;
    gap: 30px;
    align-items: center;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.top-bar-item i {
    font-size: 16px;
}

.top-bar-item:hover {
    color: var(--accent-color);
    transform: translateX(3px);
}

.top-bar-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.social-icon {
    color: white;
    font-size: 18px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    color: var(--accent-color);
    background: rgba(255, 152, 0, 0.2);
    transform: translateY(-3px);
}

/* ===== MAIN NAVBAR ===== */
.navbar {
    background: white;
    box-shadow: 0 2px 12px rgba(0, 51, 102, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 51, 102, 0.15);
    padding: 8px 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: height 0.3s ease;
}

.navbar.scrolled .nav-container {
    height: 70px;
}

/* ===== LOGO & SITE NAME ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 350px;
    flex-shrink: 1;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

.logo:hover img {
    filter: drop-shadow(0 4px 12px rgba(0, 51, 102, 0.2));
}

.site-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #ffcc00;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: -0.5px;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-name:hover {
    color: #ffd700;
    text-shadow: 2px 2px 8px rgba(255, 204, 0, 0.4);
    transform: scale(1.05);
}

/* ===== NAVIGATION MENU ===== */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-menu li {
    position: relative;
}

.nav-link {
    display: block;
    padding: 10px 18px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
}

.nav-link i {
    margin-right: 6px;
    font-size: 16px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: var(--accent-color);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.08) 0%, rgba(255, 152, 0, 0.04) 100%);
}

.nav-link:hover::after {
    width: 50%;
}

.nav-link.active {
    color: var(--accent-color);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.12) 0%, rgba(255, 152, 0, 0.06) 100%);
}

.nav-link.active::after {
    width: 50%;
}

/* ===== LOGIN BUTTON (DESKTOP) ===== */
#desktop-login {
    display: block;
    margin-left: auto;
    padding-left: 20px;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #ffcc00 0%, #ffd700 100%);
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.3);
    border: none;
    cursor: pointer;
}

.login-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 204, 0, 0.5);
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.login-btn:active {
    transform: translateY(-1px);
}

.login-btn.btn-student {
    background: linear-gradient(135deg, #ffcc00 0%, #ffd700 100%);
}

.login-btn.btn-student:hover {
    box-shadow: 0 8px 25px rgba(255, 204, 0, 0.5);
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.login-btn.btn-staff {
    background: linear-gradient(135deg, #ffcc00 0%, #ffd700 100%);
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.3);
}

.login-btn.btn-staff:hover {
    box-shadow: 0 8px 25px rgba(255, 204, 0, 0.5);
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.login-btn.btn-logout {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}

.login-btn.btn-logout:hover {
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.35);
}

/* Login Button Group (Desktop) */
.login-btn-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Mobile Login Group */
.mobile-login-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== HAMBURGER MENU (MOBILE) ===== */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1001;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.hamburger:hover {
    background: rgba(0, 51, 102, 0.08);
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===== OVERLAY FOR MOBILE MENU ===== */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.overlay.active {
    display: block;
}

/* ===== RESPONSIVE DESIGN - TABLET ===== */
@media (max-width: 992px) {
    .top-bar {
        display: none;
    }

    #desktop-login {
        display: none !important;
    }

    .hamburger {
        display: flex;
    }

    .nav-container {
        height: 70px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 85%;
        max-width: 360px;
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 100px 30px 30px;
        gap: 0;
        box-shadow: -10px 0 40px rgba(0, 51, 102, 0.15);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        z-index: 1001;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-link {
        width: 100%;
        padding: 16px 12px;
        border-radius: 0;
        border-left: 4px solid transparent;
        transition: all 0.3s ease;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover {
        padding-left: 20px;
        background: rgba(0, 51, 102, 0.05);
        border-left-color: var(--accent-color);
    }

    .nav-link.active {
        background: rgba(255, 152, 0, 0.1);
        border-left-color: var(--accent-color);
        color: var(--accent-color);
    }

    .logo {
        min-width: auto;
    }

    .site-name {
        display: none;
    }

    .logo img {
        height: 50px;
    }

    .login-btn {
        width: 100%;
        text-align: center;
        display: flex;
        justify-content: center;
        margin-top: 20px;
        padding: 12px 20px;
    }
}

/* ===== RESPONSIVE DESIGN - MOBILE ===== */
@media (max-width: 640px) {
    .top-bar-content {
        flex-direction: column;
        gap: 12px;
        padding: 12px 15px;
    }

    .top-bar-left {
        width: 100%;
        gap: 15px;
        flex-wrap: wrap;
    }

    .top-bar-right {
        width: 100%;
        gap: 15px;
        justify-content: space-around;
    }

    .top-bar-item span {
        display: none;
    }

    .top-bar-item {
        padding: 8px 12px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        flex: 1;
        justify-content: center;
    }

    .nav-container {
        height: 65px;
        padding: 0 15px;
    }

    .hamburger {
        gap: 5px;
    }

    .hamburger span {
        width: 24px;
        height: 2.5px;
    }

    .nav-menu {
        width: 100%;
        max-width: none;
        right: -100%;
        padding: 90px 20px 20px;
    }

    .nav-menu li.login-btn {
        margin-top: 15px;
    }

    .login-btn {
        padding: 12px 20px;
        font-size: 13px;
    }

    .site-name {
        display: none;
    }

    .logo img {
        height: 45px;
    }
}

/* ===== SMOOTH SCROLLING & ACCESSIBILITY ===== */
html {
    scroll-behavior: smooth;
}

/* Focus styles for keyboard navigation */
.nav-link:focus-visible,
.btn-login:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Smooth page transitions */
@media (prefers-reduced-motion: no-preference) {
    * {
        scroll-behavior: smooth;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Can add dark mode styles here in future */
}

/* ===== MOTTO MARQUEE STYLES ===== */
.motto-marquee {
    background: linear-gradient(90deg, #bf008c 0%, #ff1493 100%);
    color: white;
    padding: 12px 0;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(191, 0, 140, 0.2);
    overflow: hidden;
    border-bottom: 3px solid #ff1493;
}

.motto-text {
    display: inline-block;
    font-size: 16px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    padding-right: 30px;
}

marquee {
    width: 100%;
}

/* Badge styles moved to footer.php for better responsive handling */

@media (max-width: 768px) {
    .motto-marquee {
        padding: 8px 0;
    }
    
    .motto-text {
        font-size: 14px;
    }
}

/* Print styles */
@media print {
    .top-bar,
    .navbar,
    .motto-marquee {
        position: static;
        box-shadow: none;
    }
}
