/* Header Styles */
.main-header {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 5px rgba(44, 122, 123, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.4rem 0;
}

/* Top-Right Corner Bracket */
.main-header::before {
    content: '';
    position: fixed;
    top: 90px;
    right: 20px;
    width: 60px;
    height: 50px;
    border-right: 3px solid var(--accent-color);
    border-top: 3px solid var(--accent-color);
    opacity: 0.4;
    z-index: 1001;
    pointer-events: none;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo a {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.logo a:hover {
    color: var(--secondary-color);
}

/* Navigation */
.main-nav > ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a.active {
    color: var(--secondary-color);
}

/* Dropdown Menu */
.has-dropdown {
    position: relative;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: transparent;
    box-shadow: none;
    padding: 0.5rem 0;
    z-index: 1000;
    flex-direction: row !important;
    gap: 0;
    min-width: auto;
    white-space: nowrap;
}

.has-dropdown:hover .dropdown {
    display: flex;
}

.dropdown li {
    list-style: none;
    white-space: nowrap;
}

.dropdown a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
}

.dropdown a:hover {
    background-color: var(--background-light);
    color: var(--secondary-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        box-shadow: 0 5px 10px rgba(44, 122, 123, 0.15);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .main-nav.active {
        max-height: 600px;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }
    
    .main-nav li {
        text-align: center;
    }
    
    .main-nav a {
        display: block;
        padding: 1rem;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Adjust top-right bracket for mobile */
    .main-header::before {
        top: 70px;
        right: 10px;
        width: 40px;
        height: 40px;
        border-width: 2px;
    }
}

@media (max-width: 1090px) {
    .dropdown {
        position: static;
        box-shadow: none;
        background-color: var(--background-light);
        padding-left: 1rem;
        display: none;
        flex-direction: column !important;
        transform: none;
        left: auto;
        width: 100%;
    }
    
    .has-dropdown:hover .dropdown {
        display: none;
    }
    
    .has-dropdown.active .dropdown {
        display: flex;
    }
}

@media (max-width: 480px) {
    .main-header::before {
        width: 30px;
        height: 30px;
    }
}

/* Force header below PDF modal */
.pdf-modal ~ .main-header,
body:has(.pdf-modal[style*="display: block"]) .main-header {
    z-index: 100 !important;
}


/*adjust logo size */
.logo img {
    width: 200px; /* or whatever size your logo should be */
    height: auto;
}