/* ===================================================================
   COMPONENTS/HEADER-MODERN.CSS
   Modern Header with Smooth Animations
   =================================================================== */

/* ===== HEADER CONTAINER ===== */
.modern-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #212529;
    border-bottom: 1px solid #343a40;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    opacity: 0;
    transform: translateY(-100%);
    overflow: visible;
}

.modern-header.loaded {
    opacity: 1;
    transform: translateY(0);
}

.modern-header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background-color: rgba(33, 37, 41, 0.98);
    backdrop-filter: blur(10px);
}

.modern-header.hidden {
    transform: translateY(-100%);
}

/* ===== HEADER LAYOUT ===== */
.header-container {
    display: flex;
    align-items: center;
    max-width: 100%;
    padding: 0.5rem 1.5rem;
    margin: 0 auto;
    gap: 180px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 7rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

/* ===== LOGO ===== */
.header-logo {
    display: flex;
    align-items: center;
}

.logo-link {
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.logo-image {
    display: block;
    height: 40px;
    width: auto;
}

/* Prevent layout shift */
.header-logo img {
    height: 46px;
    width: 96px;
}

/* ===== NAVIGATION ===== */
.modern-header .header-nav {
    display: flex;
    align-items: center;
}

.modern-header .nav-list {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.modern-header .nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

#custom-header.modern-header .nav-link {
    color: #0088cc;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    display: inline-block;
}

#custom-header.modern-header .nav-link:hover {
    color: #00a8ff;
    background-color: rgba(0, 136, 204, 0.1);
}

/* ===== DROPDOWN ===== */
.dropdown-item {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-trigger::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    transition: transform 0.3s ease;
}

.dropdown-trigger[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Dropdown toggle button styles */
.dropdown-toggle {
    display: flex;
    align-items: center;
    height: 100%;
    min-width: auto;
    gap: 0.3rem;
    padding: 0 0.75rem;
    font-size: 0.95em;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #00a8ff;
    background: none;
    border: none;
    box-shadow: none;
}

/* Modern header dropdown menu */
.modern-header .dropdown-menu {
    position: absolute;
    top: calc(100% + 0.64rem);
    left: 0;
    min-width: 220px;
    max-height: 70vh;
    background-color: #212529;
    border: 1px solid #343a40;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
}

.modern-header .dropdown-menu-inner {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-height: 70vh;
}

.modern-header .dropdown-menu-inner::-webkit-scrollbar {
    display: none;
}

.modern-header .dropdown-menu::-webkit-scrollbar {
    display: none;
}

.modern-header .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: flex;
}

.modern-header .dropdown-menu li {
    list-style: none;
    border: none;
}

.modern-header .dropdown-link {
    display: block;
    padding: 0.5rem 1rem;
    margin: 0;
    color: #0088cc;
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap;
    border-radius: 0;
    border: none;
    outline: none;
    box-shadow: none;
    transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.modern-header .dropdown-link:first-child {
    border-radius: 6px 6px 0 0;
}

.modern-header .dropdown-link:last-child {
    border-radius: 0 0 6px 6px;
}

.modern-header .dropdown-link:hover,
.modern-header .dropdown-link:focus {
    background-color: rgba(0, 136, 204, 0.1);
    color: #00a8ff;
    text-decoration: none;
}

/* Dropdown hover behavior for desktop */
@media (min-width: 992px) {
    .modern-header .dropdown-item:hover .dropdown-menu {
        display: block;
        pointer-events: auto;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .header-container {
        padding: 0.5rem 1rem;
    }
    
    .header-left {
        gap: 1rem;
    }
    
    .logo-image {
        height: 40px;
    }
    
    .nav-list {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.6rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0.5rem 0.75rem;
    }
    
    .header-left {
        gap: 0.75rem;
    }
    
    .logo-image {
        height: 35px;
    }
    
    .nav-list {
        gap: 0.5rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.35rem 0.5rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===================================================================
   NAVIGATION COMPONENTS (merged from navigation.css)
   =================================================================== */

/* Nav Base */
.nav {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #0d6efd;
    text-decoration: none;
    background-color: transparent;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.nav-link:hover,
.nav-link:focus {
    color: #0a58ca;
}

.nav-link.disabled {
    color: #6c757d;
    pointer-events: none;
    cursor: default;
}

/* Nav List (custom variant) */
.nav-list {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}
