/* ====================================
   HEADER STYLES - DIGISAPIENCE
   ==================================== */

/* ===== VARIABLES ===== */
:root {
    --header-height: 80px;
    --header-bg: rgba(0, 0, 0, 0.95);
    --header-blur: 10px;
    --primary: #F8BE14;
    --primary-dark: #E5A90C;
    --primary-light: #FFD966;
    --text-light: #FFFFFF;
    --text-dim: #CCCCCC;
    --text-muted: #888888;
    --border-color: #333333;
    --border-light: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 5px 20px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

/* ===== HEADER BASE ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--header-bg);
    backdrop-filter: blur(var(--header-blur));
    -webkit-backdrop-filter: blur(var(--header-blur));
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: var(--transition);
}

.site-header.scrolled {
    height: 70px;
    background: rgba(0, 0, 0, 0.98);
    box-shadow: var(--shadow-sm);
}

/* ===== HEADER WRAPPER ===== */
.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* ===== LOGO ===== */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    z-index: 1001;
}

.logo img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(248, 190, 20, 0.3));
}

/* ===== DESKTOP NAVIGATION ===== */
.desktop-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    color: var(--text-dim);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-link i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(248, 190, 20, 0.05);
}

.nav-link:hover i {
    transform: rotate(180deg);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(248, 190, 20, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* ===== DROPDOWN MENU ===== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 240px;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--text-dim);
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: rgba(248, 190, 20, 0.1);
    color: var(--primary);
    padding-left: 25px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* ===== HEADER ACTIONS ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    border: 1px solid var(--border-color);
    z-index: 1002;
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    bottom: -35px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-primary {
    background: var(--primary);
    color: #000000;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(248, 190, 20, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(248, 190, 20, 0.3);
}

.btn-outline:hover {
    background: rgba(248, 190, 20, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* ===== MOBILE TOGGLE ===== */
.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    margin-left: 10px;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-light);
    margin: 5px auto;
    transition: var(--transition);
    border-radius: 2px;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 1px solid var(--border-color);
    z-index: 1002;
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow-y: auto;
    padding: 80px 20px 30px;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.5);
}

.mobile-menu-header .logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
}

.mobile-menu-header .logo span {
    color: var(--primary);
}

.mobile-close {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mobile-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    margin-bottom: 5px;
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
}

.mobile-nav-link i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.mobile-nav-item.active .mobile-nav-link i {
    transform: rotate(90deg);
}

.mobile-nav-link:hover,
.mobile-nav-item.active .mobile-nav-link {
    color: var(--primary);
}

.mobile-submenu {
    list-style: none;
    padding: 0 0 10px 15px;
    margin: 0;
    display: none;
}

.mobile-nav-item.active .mobile-submenu {
    display: block;
}

.mobile-submenu li {
    margin-bottom: 10px;
}

.mobile-submenu a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    display: block;
    padding: 5px 0;
}

.mobile-submenu a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.mobile-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .header-actions .btn-outline span,
    .header-actions .btn-secondary span {
        display: none;
    }
    
    .header-actions .btn-outline,
    .header-actions .btn-secondary {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }
    
    .header-actions .btn-outline i,
    .header-actions .btn-secondary i {
        margin: 0;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .header-actions .btn-primary span {
        display: none;
    }
    
    .header-actions .btn-primary {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }
    
    .header-actions .btn-primary i {
        margin: 0;
        font-size: 16px;
    }
    
    .logo img {
        height: 40px;
    }
    
    .mobile-menu {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .header-actions .btn-outline,
    .header-actions .btn-secondary,
    .header-actions .btn-primary {
        display: none;
    }
    
    .mobile-toggle {
        margin-left: 0;
    }
}