/**
 * ExamBlaze Header Styles - FIXED VERSION
 * Modern header with new dropdown styles
 * 
 * @package ExamBlaze
 * @version 3.0
 */

/* ========================================
   TOP CONTACT BAR
   ======================================== */

.top-contact-bar {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 12px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.top-contact-bar .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.contact-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 30px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.contact-link:hover {
    color: var(--accent-gold);
}

.contact-link i {
    font-size: 16px;
}

.trust-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.badge i {
    color: var(--accent-gold);
    font-size: 14px;
}

.badge-separator {
    color: rgba(255, 255, 255, 0.3);
}

/* ========================================
   MAIN HEADER
   ======================================== */

.main-header {
    background: rgba(15, 23, 42, 0.9);
    /* Dark background */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(15, 118, 110, 0.08);
    border-bottom: 1px solid rgba(15, 118, 110, 0.05);
}

.main-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.main-nav {
    padding: 0;
}

.main-nav .container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
}

/* ========================================
   LOGO
   ======================================== */

.logo a {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo a:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 36px;
    filter: drop-shadow(0 2px 4px rgba(15, 118, 110, 0.3));
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo {
    margin-right: auto;
    flex-shrink: 0;
}

/* ========================================
   NAVIGATION MENU
   ======================================== */

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu>li {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 10px 0;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--accent-gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-white);
}

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

.nav-link i {
    font-size: 12px;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

/* ========================================
   DROPDOWN MENU
   ======================================== */

.nav-item-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    /* Align right to prevent overflow */
    left: auto;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 240px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1001;
    list-style: none;
    margin: 0;
}

/* Wide dropdown alignment fixes */
.dropdown-menu-wide {
    min-width: 280px;
}

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

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

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown-menu a i {
    font-size: 14px;
    color: var(--accent-gold);
    width: 20px;
    text-align: center;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
    border-left-color: var(--accent-gold);
    padding-left: 30px;
}

/* Dropdown divider */
.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

/* ========================================
   CTA BUTTONS (Portal + Order Now)
   ======================================== */

.nav-cta {
    margin-left: 30px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
}

/* Portal Button Styles inside Header */
.nav-cta .btn-outline-white {
    padding: 10px 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-cta .btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Order Now Button Styles inside Header */
.nav-cta .btn-orange {
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-cta .btn-orange:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.6);
}

/* ========================================
   MOBILE MENU TOGGLE
   ======================================== */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1010;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-navy);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ========================================
   MOBILE MENU OVERLAY
   ======================================== */

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 990;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* ========================================
   MOBILE MENU
   ======================================== */

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85%;
    height: 100vh;
    background: var(--bg-white);
    z-index: 1005;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: var(--primary-navy);
    color: var(--text-white);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-white);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 20px;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    color: var(--accent-gold);
}

/* Mobile Navigation Menu */
.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 20px 0;
}

.mobile-nav-menu>li {
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav-menu>li>a {
    display: block;
    padding: 15px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.mobile-nav-menu>li>a:hover {
    background: var(--bg-light);
    color: var(--accent-gold);
}

/* Mobile Dropdown */
.mobile-dropdown {
    position: relative;
}

.mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
}

.mobile-dropdown-toggle i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.mobile-dropdown.active .mobile-dropdown-toggle i {
    transform: rotate(180deg);
}

.mobile-dropdown-menu {
    display: none;
    background: var(--bg-light);
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-dropdown.active .mobile-dropdown-menu {
    display: block;
}

.mobile-dropdown-menu li {
    border-bottom: 1px solid var(--border-light);
}

.mobile-dropdown-menu li:last-child {
    border-bottom: none;
}

.mobile-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px 12px 35px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.mobile-dropdown-menu a i {
    font-size: 12px;
    color: var(--accent-gold);
    width: 16px;
}

.mobile-dropdown-menu a:hover {
    background: var(--bg-white);
    color: var(--accent-gold);
}

/* Mobile Divider */
.mobile-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 0;
    border: none;
}

/* Mobile Menu CTA */
.mobile-menu-cta {
    padding: 20px;
    border-top: 2px solid var(--border-light);
    border-bottom: none;
}

/* Mobile Contact */
.mobile-contact {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: var(--bg-light);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mobile-contact-btn:hover {
    background: var(--accent-orange);
    color: var(--text-white);
}

.mobile-contact-btn i {
    font-size: 18px;
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */

@media (max-width: 1024px) {
    .nav-menu {
        gap: 20px;
    }

    .nav-link {
        font-size: 14px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 768px) {

    /* Hide desktop menu */
    .nav-menu,
    .nav-cta {
        display: none;
    }

    /* Show mobile toggle */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Hide trust badges on mobile */
    .trust-badges {
        display: none;
    }

    /* Stack contact bar */
    .contact-bar-content {
        justify-content: center;
    }

    .contact-info {
        gap: 20px;
    }

    /* Smaller logo on mobile */
    .logo-text {
        font-size: 22px;
    }

    .logo-icon {
        font-size: 28px;
    }

    .nav-content {
        min-height: 65px;
    }
}

/* ========================================
   RESPONSIVE - SMALL MOBILE
   ======================================== */

@media (max-width: 480px) {
    .top-contact-bar {
        font-size: 12px;
    }

    .contact-link span {
        display: none;
    }

    .contact-link i {
        font-size: 18px;
    }

    .mobile-menu {
        width: 100%;
        max-width: 100%;
    }
}