/* Clean Header Design - 2024 */

/* Variables */
:root {
    --header-height: 80px;
    --container-width: 1200px;
    --primary-color: #FF7361;
    --dark-bg: #1D2023;
    --border-color: #e5e7eb;
}

/* Reset */
#header-top {
    display: none;
}

/* Header Container */
#header {
    position: relative; /* Fixed yerine relative */
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.98);
    /* border-bottom: 1px solid var(--border-color); */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    z-index: 100;
    transition: all 0.3s ease;
}

body.dark #header {
    background: rgba(29, 32, 35, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Header Inner Container */
#header .header-inner {
    max-width: var(--container-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Debug - görsel kontrol için */
#header .logo {
    /* border: 1px solid red; */
}

#header .navigation {
    /* border: 1px solid blue; */
}

#header .navigation ul {
    /* border: 1px solid green; */
}

/* Logo */
.logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    height: 100%; /* Header yüksekliğini doldur */
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
}

.logo img {
    height: 50px;
    width: auto;
    vertical-align: middle;
}

/* Navigation */
.navigation {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.navigation ul {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}

/* Agresif margin/padding reset */
#header .navigation,
#header .navigation ul,
#header .navigation li {
    margin: 0 !important;
    padding: 0 !important;
}

#header .navigation ul {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Navigation li reset */
#header .navigation li {
    display: flex;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1;
}

.navigation a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
    transition: all 0.2s ease;
    letter-spacing: 0.025em;
    text-transform: none;
}

body.dark .navigation a {
    color: #e5e7eb;
}

/* İkon boyut ve hizalama */
.navigation a i {
    font-size: 16px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

/* Metin hizalama */
.navigation a span {
    line-height: 1;
    vertical-align: middle;
    font-size: 14px;
}

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

.navigation a:hover i {
    opacity: 1;
}

.navigation a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 16px;
    right: 16px;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.2s ease;
    transform-origin: center;
}

.navigation a:hover::after {
    transform: scaleX(1);
}

.navigation .current_page_item a::after {
    transform: scaleX(1);
}

.navigation .current_page_item a {
    color: var(--primary-color);
    font-weight: 600;
}

.navigation .current_page_item a i {
    opacity: 1;
}

/* Special Links */

/* Giriş Yap Butonu */
.navigation a[href*="login"] {
    background: transparent;
    border: 1.5px solid rgba(255, 115, 97, 0.5);
    color: var(--primary-color);
    border-radius: 6px;
    padding: 6px 18px !important;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.navigation a[href*="login"]:hover {
    background: rgba(255, 115, 97, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

body.dark .navigation a[href*="login"] {
    border-color: #ff9b8f;
    color: #ff9b8f;
}

body.dark .navigation a[href*="login"]:hover {
    background: #ff9b8f;
    color: var(--dark-bg);
}

/* Üye Ol Butonu */
.navigation a[href*="register"] {
    background: var(--primary-color);
    color: white;
    border: 1.5px solid var(--primary-color);
    border-radius: 6px;
    padding: 6px 18px !important;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.navigation a[href*="register"]:hover {
    background: #ff5947;
    border-color: #ff5947;
    box-shadow: 0 2px 8px rgba(255, 115, 97, 0.2);
}

body.dark .navigation a[href*="register"] {
    background: #ff9b8f;
    border-color: #ff9b8f;
    color: var(--dark-bg);
}

body.dark .navigation a[href*="register"]:hover {
    background: #ffb3a7;
    border-color: #ffb3a7;
}

/* Alt çizgi animasyonunu bu butonlar için devre dışı bırak */
.navigation a[href*="login"]::after,
.navigation a[href*="register"]::after {
    display: none;
}

/* Çıkış Butonu */
.navigation a[onclick*="logout"] {
    color: #6b7280;
}

.navigation a[onclick*="logout"]:hover {
    color: #ef4444;
}

/* Premium Link */
.navigation a[href*="premium"] i {
    color: #fbbf24;
}

/* Admin Link */
.navigation a[href*="admin"] i {
    color: #8b5cf6;
}


/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
    width: 50px;
    height: 50px;
    position: relative;
}

.hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -2px;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 30px;
    height: 3px;
    background-color: #374151;
    border-radius: 3px;
    position: absolute;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

body.dark .hamburger-inner,
body.dark .hamburger-inner::before,
body.dark .hamburger-inner::after {
    background-color: #e5e7eb;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    display: block;
}

.hamburger-inner::before {
    top: -10px;
}

.hamburger-inner::after {
    bottom: -10px;
}

/* Hamburger animation when active */
.mobile-menu-toggle.is-active .hamburger-inner {
    transform: rotate(45deg);
}

.mobile-menu-toggle.is-active .hamburger-inner::before {
    top: 0;
    transform: rotate(90deg);
}

.mobile-menu-toggle.is-active .hamburger-inner::after {
    bottom: 0;
    opacity: 0;
}

/* Breadcrumb Area */
.breadcrumbs {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: relative;
}

body.dark .breadcrumbs {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border-bottom-color: #374151;
}

.breadcrumbs .container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Main Content - Add top margin */
.main-content,
section.container {
    padding-top: 20px;
}

/* Responsive */
@media (max-width: 991px) {
    .navigation ul {
        gap: 0;
    }
    
    .navigation a {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .navigation a i {
        font-size: 18px;
    }
    
    .navigation a span {
        display: none;
    }
    
    /* Giriş Yap ve Üye Ol butonlarının span'lerini görünür tut */
    .navigation a[href*="login"] span,
    .navigation a[href*="register"] span {
        display: inline;
    }
    
    /* Tablet'te buton padding'lerini koru */
    .navigation a[href*="login"],
    .navigation a[href*="register"] {
        padding: 5px 14px !important;
        font-size: 13px;
        margin-left: 4px;
    }
}

@media (max-width: 768px) {
    #header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: rgba(255, 255, 255, 0.98);
        z-index: 1000;
    }
    
    body.dark #header {
        background: rgba(29, 32, 35, 0.98);
    }
    
    /* Content padding to compensate for fixed header */
    body {
        padding-top: 60px;
    }
    
    .logo img {
        height: 35px;
    }
    
    .mobile-menu-toggle {
        display: block;
        position: relative;
        z-index: 1101;
    }
    
    /* Overlay removed - no dark background */
    
    .navigation {
        position: fixed;
        top: 60px;
        right: 0;
        bottom: 0;
        width: 300px;
        background: #ffffff;
        transform: translateX(100%); /* Başlangıçta gizli - sağ tarafta */
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 1099;
        overflow-y: auto;
        padding: 0;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
        border-radius: 20px 0 0 20px;
    }
    
    body.dark .navigation {
        background: #1a1a1a;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
    }
    
    .navigation.mobile-menu-open {
        transform: translateX(0);
    }
    
    .navigation ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 20px 0 !important;
    }
    
    .navigation li {
        width: 100%;
        border-bottom: none;
    }
    
    body.dark .navigation li {
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }
    
    .navigation li:last-child {
        border-bottom: none;
    }
    
    .navigation a {
        width: 100%;
        justify-content: flex-start;
        padding: 18px 30px !important;
        font-size: 16px;
        border-radius: 0;
        transition: all 0.3s ease;
        position: relative;
        font-weight: 500;
        letter-spacing: 0.3px;
    }
    
    .navigation a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 0;
        background: #0866ff;
        transition: height 0.3s ease;
        border-radius: 0 2px 2px 0;
    }
    
    .navigation a:hover {
        background: #f8f9fa;
        color: #0866ff;
        padding-left: 40px !important;
    }
    
    .navigation a:hover::before {
        height: 70%;
    }
    
    body.dark .navigation a:hover {
        background: #252525;
        color: #0866ff;
    }
    
    .navigation a i {
        font-size: 20px;
        width: 24px;
        text-align: center;
        margin-right: 8px;
    }
    
    .navigation a span {
        display: inline;
        font-weight: 500;
    }
    
    /* Alt çizgi animasyonunu mobilde devre dışı bırak */
    .navigation a::after {
        display: none;
    }
    
    /* Mobilde özel butonlar */
    .navigation a[href*="login"],
    .navigation a[href*="register"] {
        text-align: left;
        justify-content: flex-start !important;
        margin: 10px 20px;
        border-radius: 12px;
        font-weight: 600;
    }
    
    .navigation a[href*="login"] {
        background: white;
        border: 2px solid var(--primary-color);
        color: var(--primary-color);
    }
    
    body.dark .navigation a[href*="login"] {
        background: var(--dark-bg);
        border-color: #ff9b8f;
        color: #ff9b8f;
    }
    
    .navigation a[href*="register"] {
        background: var(--primary-color);
        color: white;
        border: 2px solid var(--primary-color);
    }
    
    body.dark .navigation a[href*="register"] {
        background: #ff9b8f;
        border-color: #ff9b8f;
        color: var(--dark-bg);
    }
    
    /* Special mobile menu styling for admin & premium */
    .navigation a[href*="admin"] {
        background: transparent;
    }
    
    .navigation a[href*="admin"]:hover {
        background: rgba(165, 180, 252, 0.1);
    }
    
    .navigation a[href*="admin"]:hover::before {
        background: #a5b4fc;
    }
    
    body.dark .navigation a[href*="admin"] {
        background: rgba(165, 180, 252, 0.05);
    }
    
    .navigation a[href*="premium"] {
        background: transparent;
    }
    
    .navigation a[href*="premium"]:hover {
        background: rgba(251, 191, 36, 0.1);
    }
    
    .navigation a[href*="premium"]:hover::before {
        background: #fbbf24;
    }
    
    body.dark .navigation a[href*="premium"] {
        background: rgba(251, 191, 36, 0.05);
    }
    
    /* Logout styling */
    .navigation a[onclick*="logout"] {
        color: #6b7280 !important;
    }
    
    .navigation a[onclick*="logout"]:hover {
        color: #ef4444 !important;
        background: rgba(239, 68, 68, 0.05);
    }
    
    .navigation a[onclick*="logout"]:hover::before {
        background: #ef4444;
    }
    
    body.dark .navigation a[onclick*="logout"] {
        background: rgba(239, 68, 68, 0.03);
    }
}


/* Header Scroll Effect */
#header.scrolled {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Print */
@media print {
    #header {
        position: relative;
        box-shadow: none;
    }
}