/* ========================================
   MODERN HEADER DESIGN SYSTEM
   ======================================== */

/* ========== TOPBAR ========== */
.topbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 12px 0;
    font-size: 14px;
    position: relative;
    z-index: 1001;
}

.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.topbar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.topbar-item i {
    font-size: 14px;
    opacity: 0.9;
}

.topbar-item a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.topbar-item a:hover {
    opacity: 0.8;
}

.topbar-social {
    display: flex;
    gap: 10px;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.topbar-social a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.topbar-social a:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-2px);
}

/* ========== MAIN HEADER ========== */
.header-main {
    background: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-main.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

.navbar-modern {
    padding: 0;
}

.navbar-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
}

/* ========== LOGO ========== */
.navbar-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-weight: 700;
    font-size: 28px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-primary {
    color: var(--primary);
    letter-spacing: 1px;
}

.logo-secondary {
    color: var(--dark);
    letter-spacing: 0.5px;
}

.tagline {
    font-size: 11px;
    color: #888;
    font-style: italic;
    margin: 0;
    padding-left: 2px;
    letter-spacing: 0.3px;
}

/* ========== NAVIGATION MENU ========== */
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link span {
    position: relative;
    z-index: 1;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-link:hover {
    color: white;
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link.active {
    color: white;
}

.nav-link.active::before {
    opacity: 1;
}

/* ========== ACTION BUTTONS ========== */
.navbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-nav i {
    font-size: 14px;
}

.btn-nav-outline {
    color: var(--accent);
    border-color: var(--accent);
    background: transparent;
    position: relative;
    overflow: hidden;
}

.btn-nav-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--accent);
    transition: width 0.4s ease;
    z-index: 0;
}

.btn-nav-outline span,
.btn-nav-outline i {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.btn-nav-outline:hover {
    color: white;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.btn-nav-outline:hover::before {
    width: 100%;
}

.btn-nav-primary {
    background: linear-gradient(135deg, var(--accent), #8B7FFF);
    color: white;
    border-color: transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.btn-nav-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8B7FFF, var(--accent));
    transition: left 0.4s ease;
}

.btn-nav-primary span,
.btn-nav-primary i {
    position: relative;
    z-index: 1;
}

.btn-nav-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.5);
}

.btn-nav-primary:hover::before {
    left: 0;
}

.btn-nav-primary:active {
    transform: translateY(-1px) scale(1.02);
}

/* ========== MOBILE TOGGLE ========== */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 28px;
}

.hamburger span {
    display: block;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 991px) {
    .topbar {
        font-size: 12px;
        padding: 10px 0;
    }
    
    .topbar-content {
        justify-content: center;
        text-align: center;
    }
    
    .topbar-left,
    .topbar-right {
        gap: 15px;
        font-size: 12px;
    }
    
    .topbar-item span {
        display: none;
    }
    
    .topbar-social {
        margin-left: 10px;
        padding-left: 10px;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .navbar-wrapper {
        padding: 15px 0;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .tagline {
        font-size: 10px;
    }
    
    .navbar-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 30px 30px;
        gap: 20px;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        overflow-y: auto;
        z-index: 999;
    }
    
    .navbar-menu.active {
        right: 0;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .nav-link {
        width: 100%;
        padding: 12px 20px;
    }
    
    .navbar-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .btn-nav {
        width: 100%;
        justify-content: center;
        padding: 12px 24px;
    }
    
    /* Mobile Menu Overlay */
    .navbar-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: -1;
    }
    
    .navbar-menu.active::before {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 576px) {
    .topbar-left {
        width: 100%;
        justify-content: center;
    }
    
    .topbar-right {
        width: 100%;
        justify-content: center;
    }
    
    .topbar-social {
        border-left: none;
        margin-left: 0;
        padding-left: 0;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .tagline {
        font-size: 9px;
    }
    
    .navbar-menu {
        width: 280px;
    }
}

/* ========== SCROLL ANIMATIONS ========== */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-main {
    animation: slideDown 0.5s ease-out;
}

/* ========== ACCESSIBILITY ========== */
.nav-link:focus,
.btn-nav:focus,
.mobile-toggle:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ========== PRINT STYLES ========== */
@media print {
    .topbar,
    .header-main {
        display: none;
    }
}
