/**
 * 🚀 SV HEADER 2026 - FAZ-3.1
 * Global header CSS - SSOT
 * Inline style bloğundan taşındı (includes/header-unified.php)
 */

/* 🚀 BİRLEŞİK HEADER - 2025 ULTRA */
:root {
    --header-height: 70px;
    --header-bg: rgba(255, 255, 255, 0.98);
    --header-bg-dark: rgba(15, 23, 42, 0.98);
    --header-shadow: 0 2px 20px rgba(0,0,0,0.08);
    --module-icon-size: 40px;
    --module-icon-gap: 8px;
}

.dark-mode {
    --header-bg: var(--header-bg-dark);
}

.dark-mode .main-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dark-mode .header-btn {
    background: var(--bg-secondary, #1a1f3a);
    color: var(--text-primary, #ffffff);
}

.dark-mode .module-icon-btn {
    background: var(--bg-secondary, #1a1f3a);
    color: var(--text-primary, #ffffff);
}

.main-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    width: 100%;
    background: var(--header-bg, rgba(255, 255, 255, 0.98));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--header-shadow, 0 2px 20px rgba(0,0,0,0.08));
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    z-index: 10001;
    transition: transform 0.3s ease;
}

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

.header-logo img {
    height: 32px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(102, 126, 234, 0.2));
}

/* Modül İconları - Logo ile Sağ Taraf Arasında */
.header-modules {
    display: flex !important;
    align-items: center !important;
    gap: var(--module-icon-gap) !important;
    flex: 1 !important;
    justify-content: center !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    padding: 0 10px !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

.header-modules::-webkit-scrollbar {
    display: none;
}

.module-icon-btn {
    width: var(--module-icon-size);
    height: var(--module-icon-size);
    border-radius: 12px;
    border: none;
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-primary, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 20px;
    text-decoration: none;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    line-height: 1;
    vertical-align: middle;
}

.module-icon-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
    vertical-align: middle;
}

.module-icon-btn:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.module-icon-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.module-icon-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: white;
    border-radius: 2px;
}

/* Sağ Taraf İconlar */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-primary, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    position: relative;
}

.header-btn:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Hamburger Menu */
.hamburger {
    width: 48px;
    height: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 10001;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.hamburger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

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

/* Mobile Menu - 2025 Ultra Modern */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100vw;
    max-width: 400px;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    padding-top: calc(var(--header-height) + 20px);
    box-shadow: -10px 0 50px rgba(0,0,0,0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.dark-mode .mobile-menu {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    border-left: 1px solid rgba(255,255,255,0.1);
}

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

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-content {
    padding: 30px 20px;
    color: white;
}

.menu-nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    color: white;
    text-decoration: none;
    border-radius: 16px;
    margin-bottom: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 17px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.menu-nav-item:hover,
.menu-nav-item.active {
    background: rgba(255,255,255,0.25);
    transform: translateX(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.3);
}

.menu-action-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.menu-action-btn:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Dark mode için mobile menu */
.dark-mode .mobile-menu {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    border-left: 1px solid rgba(255,255,255,0.1);
}

.menu-nav-item i,
.menu-nav-item span:first-child {
    font-size: 22px;
    width: 28px;
    text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .header-modules {
        gap: 6px;
    }
    
    .module-icon-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
        gap: 10px;
    }
    
    .header-modules {
        display: none !important; /* Mobilde gizle, hamburger menüde göster */
    }
    
    /* Mobilde header iconlarını gizle - sadece hamburger kalsın */
    .header-btn {
        display: none !important;
    }
    
    /* Hamburger her zaman görünür */
    .hamburger {
        display: flex !important;
        width: 44px;
        height: 44px;
    }
    
    .header-logo img {
        height: 28px;
        max-width: 120px;
    }
    
    .header-actions {
        gap: 0 !important;
    }
}

/* Scroll padding for anchor links */
html {
    scroll-padding-top: var(--header-height, 70px);
}

/* Header container layout */
.main-header .header-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: var(--header-height, 70px);
}