/* Base styles and CSS variables */
:root {
    --primary: #2A5C82;
    --secondary: #5C9EAD;
    --background: #f8f9fa;
    --border: #e9ecef;
    --text-primary: #333;
    --text-secondary: #666;
    --white: #ffffff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    margin: 0;
    padding: 0;
}

/* Header Styles */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    text-align: center;
    position: relative;
}

.site-title-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 2rem;
    font-weight: 300;
    display: block;
    margin-bottom: 0.5rem;
}

.site-title-link:hover {
    color: var(--secondary);
}

.subtitle {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1.1rem;
}

/* Hamburger Menu Button */
.hamburger {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: absolute;
    top: 50%;
    right: 1.5rem;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.hamburger:hover {
    opacity: 0.8;
}

.hamburger-line {
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Navigation Styles */
.main-nav {
    background: var(--primary);
    width: 100%;
}

.nav-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 1rem 1.2rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.nav-link:hover {
    background: var(--secondary);
}

.dropdown-arrow {
    font-size: 0.7rem;
    margin-left: 0.4rem;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 0 0 4px 4px;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 0.7rem 1.2rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

.dropdown-link:hover {
    background: var(--background);
    color: var(--primary);
}

/* Mobile Responsive Adjustments */
@media (max-width: 992px) {
    .header-content {
        padding: 1.5rem 4rem 1.5rem 1rem; /* Space for hamburger */
        text-align: left;
    }
    
    .site-title-link {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }

    .hamburger {
        display: flex; /* Show hamburger on mobile */
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .main-nav.active {
        max-height: 100vh;
        overflow-y: auto;
    }

    .nav-list {
        flex-direction: column;
        padding: 0.5rem 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .nav-link {
        padding: 1.2rem 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-item.dropdown .nav-link::after {
        content: '';
        display: inline-block;
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 5px solid white;
        transition: transform 0.3s ease;
    }

    .nav-item.dropdown.active .nav-link::after {
        transform: rotate(180deg);
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        background: rgba(0,0,0,0.1);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none; /* Controlled by JS */
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }

    .nav-item.active .dropdown-menu {
        display: block;
        max-height: 500px;
    }

    .dropdown-link {
        color: rgba(255,255,255,0.9);
        padding: 1rem 1.5rem 1rem 2.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .dropdown-link:hover {
        background: rgba(255,255,255,0.1);
        color: white;
    }

    .dropdown-arrow {
        display: none;
    }
}

@media (max-width: 576px) {
    .header-content {
        padding: 1.2rem 3.5rem 1.2rem 1rem;
    }

    .site-title-link {
        font-size: 1.3rem;
    }

    .subtitle {
        display: none;
    }

    .hamburger {
        right: 1rem;
    }

    .nav-link {
        padding: 1rem 1.2rem !important;
    }

    .dropdown-link {
        padding: 0.8rem 1.2rem 0.8rem 2rem !important;
    }
}
