/* header.css - Menu and header styles */

.header-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 30, 60, 0.08);
    padding: 0.4rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.logo ul { 
    display: flex; 
    align-items: center; 
    list-style: none;
    margin: 0;
    padding: 0;
}

.logo img { 
    height: 45px; 
    width: auto; 
    max-width: 204px; 
    display: block; 
}

/* desktop menu */
.menu > ul {
    display: flex;
    gap: 0.3rem 0.8rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu li {
    position: relative;
    list-style: none;
}

.menu li a {
    display: block;
    padding: 0.6rem 1rem;
    font-weight: 520;
    color: #0b3b5c;
    border-radius: 40px;
    transition: background 0.2s;
    white-space: nowrap;
    font-size: 0.95rem;
}

.menu li a:hover { 
    background: #e3f0fd; 
}

/* submenu desktop */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 15px 30px rgba(0, 35, 70, 0.2);
    border-radius: 20px;
    padding: 0.6rem 0;
    min-width: 260px;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    border: 1px solid #deeaf5;
    z-index: 9999;
    list-style: none;
}

.menu li:hover > .submenu {
    opacity: 1;
    visibility: visible;
}

.submenu li {
    width: 100%;
}

.submenu li a {
    display: block;
    padding: 0.7rem 2rem;
    white-space: nowrap;
    border-radius: 0;
}

.submenu li a:hover { 
    background: #f0f8ff; 
}

/* hamburger (hidden desktop) */
.menu-toggle {
    display: none;
    font-size: 2.2rem;
    background: none;
    border: none;
    color: #123e5c;
    cursor: pointer;
    padding: 0.3rem 0.8rem;
}

/* mobile styles */
@media screen and (max-width: 1024px) {
    .header-section { padding: 0.4rem 1.2rem; }
}

@media screen and (max-width: 900px) {
    .menu-toggle { 
        display: block; 
    }
    
    .menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out;
        box-shadow: 0 15px 25px rgba(0,0,0,0.1);
        border-radius: 0 0 26px 26px;
    }
    
    .menu.show { 
        max-height: 90vh; 
        overflow-y: auto; 
    }
    
    .menu > ul {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.2rem;
        gap: 0.2rem;
    }
    
    .menu li {
        width: 100%;
        border-bottom: 1px solid #e6edf6;
    }
    
    .menu li:last-child { 
        border-bottom: none; 
    }
    
    .menu li a {
        width: 100%;
        padding: 1rem 0.8rem;
        font-size: 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-radius: 14px;
        white-space: normal;
    }
    
    .menu li a:not(:only-child)::after {
        content: '\f107';
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        transition: transform 0.3s;
    }
    
    .menu li.active > a:not(:only-child)::after { 
        transform: rotate(180deg); 
    }
    
    /* submenu mobile */
    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        padding: 0;
        min-width: auto;
        background: #f4f9fe;
        border: none;
        border-radius: 18px;
        margin: 0.5rem 0 0.5rem 1.2rem;
        display: none;
    }
    
    .menu li.active .submenu { 
        display: block; 
    }
    
    .submenu li { 
        border-bottom: 1px solid #d4e2f2; 
    }
    
    .submenu li:last-child { 
        border-bottom: none; 
    }
    
    .submenu li a { 
        padding: 0.9rem 1.8rem; 
        font-size: 0.95rem; 
    }
    
    .submenu li a::after { 
        display: none; 
    }
}

@media screen and (max-width: 480px) {
    .header-section { padding: 0.2rem 0.8rem; }
    .logo img { height: 38px; }
}