/**
 * iDealSunucu - Header & Navigation CSS
 * Version: 5.2.0
 * Modern Profesyonel Tasarım
 */

/* ==========================================================================
   TOP BAR
   ========================================================================== */
.top-bar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    font-size: 13px;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.uptime-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 20px;
    color: var(--accent);
    font-weight: 500;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.top-link:hover {
    color: var(--text-primary);
}

.top-link.whatsapp:hover {
    color: #25D366;
}

.top-link i {
    font-size: 14px;
}

@media (max-width: 768px) {
    .top-bar-left .uptime-badge,
    .hide-mobile {
        display: none;
    }
}

/* ==========================================================================
   MAIN HEADER
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    flex-shrink: 0;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-text span {
    color: var(--primary);
}

/* Custom Logo (WordPress) - Wide Logo Support */
.custom-logo-link {
    display: flex;
    align-items: center;
}

.custom-logo-img {
    height: 50px;
    width: auto;
    max-width: 320px;
    object-fit: contain;
}

.mobile-logo-img {
    height: 40px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
}

/* Scrolled header - slightly smaller logo */
.site-header.scrolled .custom-logo-img {
    height: 44px;
}

@media (max-width: 1200px) {
    .custom-logo-img {
        height: 44px;
        max-width: 260px;
    }
}

@media (max-width: 768px) {
    .custom-logo-img {
        height: 38px;
        max-width: 200px;
    }
}

/* ==========================================================================
   DESKTOP NAVIGATION
   ========================================================================== */
.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-item.has-dropdown .nav-link {
    padding-right: 12px;
}

.nav-link .chevron {
    transition: transform 0.2s ease;
}

.nav-item.has-dropdown:hover .nav-link .chevron,
.nav-item.has-dropdown.active .nav-link .chevron {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 280px;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 100;
}

.nav-item.has-dropdown:hover .dropdown-menu,
.nav-item.has-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu.dropdown-large {
    min-width: 480px;
}

.dropdown-grid {
    display: grid;
    gap: 4px;
}

.dropdown-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Dropdown Item */
.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

.dropdown-item.featured {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.dropdown-item.featured:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
}

.item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 16px;
    flex-shrink: 0;
}

.item-icon.blue {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
}

.item-icon.cyan {
    background: rgba(56, 189, 248, 0.15);
    color: #38BDF8;
}

.item-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.item-icon.yellow {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.item-icon.purple {
    background: rgba(139, 92, 246, 0.15);
    color: #8B5CF6;
}

.item-icon.red {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.item-content {
    flex: 1;
    min-width: 0;
}

.item-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.item-desc {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.item-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
}

.item-badge.hot {
    background: #EF4444;
}

/* Dropdown Footer */
.dropdown-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
}

.dropdown-footer span {
    color: var(--text-muted);
}

.dropdown-footer span i {
    color: var(--primary);
    margin-right: 6px;
}

.dropdown-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.dropdown-footer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   HEADER ACTIONS
   ========================================================================== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-login:hover {
    color: var(--text-primary);
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--primary);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    color: #fff;
}

/* Mobile Toggle Button */
.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

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

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

/* ==========================================================================
   MOBILE NAVIGATION
   ========================================================================== */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 100%;
    height: 100%;
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    z-index: 1002;
    display: none;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.mobile-nav.active {
    display: flex;
    transform: translateX(0);
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.mobile-logo span {
    color: var(--primary);
}

.mobile-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: none;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-close:hover {
    background: var(--bg-tertiary);
}

.mobile-nav-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.mobile-nav-group {
    margin-bottom: 4px;
}

.mobile-nav-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-nav-toggle:hover {
    background: var(--bg-secondary);
}

.mobile-nav-toggle span {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-nav-toggle span i {
    width: 20px;
    color: var(--primary);
}

.mobile-nav-toggle > i {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

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

.mobile-nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-nav-group.active .mobile-nav-submenu {
    max-height: 500px;
}

.mobile-nav-submenu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 12px 48px;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-nav-submenu a:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
    border-radius: 8px;
}

.mobile-nav-submenu .badge {
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    background: #EF4444;
    color: #fff;
    border-radius: 6px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    background: var(--bg-secondary);
}

.mobile-nav-link i {
    width: 20px;
    color: var(--primary);
}

.mobile-nav-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-mobile-login,
.btn-mobile-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-mobile-login {
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
}

.btn-mobile-primary {
    color: #fff;
    background: var(--primary);
}

.mobile-contact {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.mobile-contact a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-contact a:hover {
    color: var(--primary);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
    .main-nav {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .btn-login span {
        display: none;
    }
    
    .btn-login {
        padding: 10px 12px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: 64px;
    }
    
    .btn-primary {
        display: none;
    }
    
    .top-bar {
        padding: 8px 0;
    }
    
    .top-bar-inner {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .mobile-nav {
        width: 100%;
    }
    
    .top-bar-left .status-indicator span {
        display: none;
    }
    
    .top-link span {
        display: none;
    }
    
    .top-link.whatsapp span {
        display: inline;
    }
}
