:root {
    --white-color: #fff;
    --primary-color: #002f43;
    --hover-color: rgba(0, 47, 67, 0.1);
    --accent-color: #f2bb06;
    --main-color: #0177c1;
    --nav-bg: #0177c1;
    --nav-hover: #015a94;
    --text-light: #f8f9fa;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Open Sans", sans-serif;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

li {
    list-style: none;
}

a {
    text-decoration: none;
}

/* Enhanced Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    background: linear-gradient(135deg, var(--white-color) 0%, #f8f9fa 100%);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 99;
    transition: var(--transition);
}

.logo {
    width: 40%;
    height: 103px;
    z-index: 1;
    transition: var(--transition);
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.mobile-logo {
    display: none;
}

ul {
    padding-left: 0;
}

.header-title {
    text-align: right;
    flex: 1;
    padding: 0 20px;
}

.header-title h2 {
    color: var(--main-color);
    font-weight: 700;
    font-size: 1.4rem;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.header-title h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color));
    border-radius: 2px;
}

/* Enhanced Navigation */
nav {
    background: linear-gradient(135deg, var(--nav-bg) 0%, #015a94 100%);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(1, 119, 193, 0.3);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 50px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

nav ul {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0px;
    margin: 0;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: var(--text-light);
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

nav ul li a:hover::before {
    left: 100%;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

nav ul li a i {
    font-size: 1.1em;
    transition: var(--transition);
}

nav ul li a:hover i {
    transform: scale(1.1);
    color: var(--accent-color);
}

/* Active state */
nav ul li a.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--accent-color);
}

nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 90%;
    height: 5px;
    background: var(--accent-color);
    border-radius: 8px 8px 0 0;
    transform: translateX(-50%);
}

/* Logout button special styling */
nav ul li a.logout-btn:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: var(--transition);
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .logo {
        width: 35%;
    }
    
    .header-title h2 {
        font-size: 1.2rem;
    }
    
    nav, nav ul {
        padding: 0 30px;
    }
    
    nav ul {
        gap: 20px;
    }
    
    nav ul li a {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
}

@media (max-width: 992px) {
    header {
        padding: 0 30px;
    }
    
    .logo {
        width: 45%;
        height: 90px;
    }
    
    .header-title h2 {
        font-size: 1.1rem;
    }
    
    nav, nav ul {
        padding: 0 20px;
    }
    
    nav ul {
        gap: 15px;
    }
    
    nav ul li a {
        padding: 10px 14px;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
        flex-direction: row;
        gap: 15px;
    }

    .mobile-logo {
        display: block;
        height: 70px;
        z-index: 1;
        transition: var(--transition);
    }

    .mobile-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        transition: var(--transition);
    }
    
    .logo {
        display: none;
    }
    
    .header-title {
        text-align: center;
        width: 100%;
        padding: 0;
    }
    
    .header-title h2 {
        font-size: 1rem;
        text-align: right;
    }
    
    .header-title h2::after {
        left: 50%;
        transform: translateX(-50%);
        width: 40%;
    }
    
    /* Mobile menu styles */
    .mobile-menu-btn {
        display: block;
    }
    
    nav {
        padding: 10px 20px;
        justify-content: space-between;
    }
    
    nav ul {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, var(--nav-bg) 0%, #015a94 100%);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        padding: 80px 20px 20px;
        transition: var(--transition);
        z-index: 1000;
    }
    
    nav ul.mobile-active {
        right: 0;
    }
    
    nav ul li {
        width: 100%;
    }
    
    nav ul li a {
        padding: 15px 20px;
        border-radius: 8px;
        margin: 5px 0;
        justify-content: flex-start;
    }
    
    .nav-text {
        display: inline;
    }
}

@media (max-width: 576px) {
    header {
        padding: 12px 15px;
    }
    
    .logo {
        width: 100%;
        height: 70px;
    }
    
    .header-title h2 {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    nav {
        padding: 8px 15px;
    }
    
    nav ul {
        width: 250px;
        padding: 70px 15px 15px;
    }
}

/* Animation for page load */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    animation: fadeInDown 0.6s ease-out;
}

nav {
    animation: fadeInDown 0.8s ease-out;
}

/* Hover effects for logo */
.logo:hover img {
    transform: scale(1.02);
    filter: brightness(1.1);
}

/* Focus states for accessibility */
nav ul li a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.2);
}