/**
 * Modern Header Styles - Finpay/Mota Tarzı
 * 
 * @package Karadag_Tema
 */

/* ============================================
   MODERN HEADER BASE
   ============================================ */

.modern-header {
    background: transparent;
    border-bottom: none;
    box-shadow: none;
    /* Logo/header alanı sayfayla birlikte aksın (sticky/fixed olmasın) */
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    z-index: 1;
}

.modern-header.scrolled {
    background: transparent;
    box-shadow: none;
}

/* Header akışta olduğu için body padding yok */

.modern-header .container {
    /* Site genelindeki .container ile hizala */
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 2rem !important;
}

.modern-header .header-inner {
    display: flex;
    /* Nav sabit olduğu için header içinde sadece logo alanını hizalıyoruz */
    justify-content: flex-start;
    align-items: center;
    padding: 2rem 0;
    gap: 3rem;
}

/* ============================================
   LOGO STYLING
   ============================================ */

.site-branding {
    display: flex;
    align-items: center;
    background: transparent !important;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
    background: transparent !important;
}

.logo-link:hover {
    opacity: 0.85;
}

.site-logo-img {
    height: 100px;
    width: auto;
    display: block;
    background: transparent !important;
}

/* ============================================
   MODERN NAVIGATION
   ============================================ */

.modern-nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
    /* Sadece oval menü alanı (nav) sabit kalsın */
    position: fixed;
    top: 28px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    z-index: 1001;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

/* Oval Menu Container */
.modern-menu {
    list-style: none;
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 12px 18px;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

/* Header hidden state - only hide nav (oval alan) */
.modern-header.header-hidden .modern-nav {
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
}

/* WP Admin Bar uyumu (nav sabit olduğu için top’u artır) */
body.admin-bar .modern-nav {
    top: calc(28px + 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .modern-nav {
        top: calc(28px + 46px);
    }
}

.modern-menu li {
    position: relative;
}

.modern-menu > li > a {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 10px 22px;
    display: block;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
}

.modern-menu > li > a:hover {
    color: #1a1a1a;
    background: rgba(109, 192, 75, 0.08);
    transform: translateY(-1px);
}

.modern-menu .current-menu-item > a {
    color: #ffffff;
    background: linear-gradient(135deg, #6dc04b 0%, #5aa93d 100%);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(109, 192, 75, 0.3);
    padding: 12px 26px;
}

.modern-menu .current-menu-item > a:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(109, 192, 75, 0.4);
    background: linear-gradient(135deg, #6dc04b 0%, #5aa93d 100%);
}

/* Active indicator - Oval Style */
.modern-menu .current-menu-item > a::after {
    display: none;
}

/* ============================================
   MODERN MENU TOGGLE (Mobile)
   ============================================ */

.modern-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 10px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 1003;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 22px;
    height: 16px;
}

.menu-icon span {
    display: block;
    height: 2.5px;
    width: 100%;
    background: #1a1a1a;
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-menu-toggle:hover {
    background: rgba(109, 192, 75, 0.1);
    transform: scale(1.05);
}

.modern-menu-toggle[aria-expanded="true"] {
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.modern-menu-toggle[aria-expanded="true"] .menu-icon span {
    background: #6dc04b;
}

.modern-menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.modern-menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.modern-menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ============================================
   DROPDOWN MENU
   ============================================ */

.modern-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 50px;
    min-width: 220px;
    padding: 8px;
    z-index: 1000;
    margin-top: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.modern-menu li:hover > .sub-menu {
    display: block;
}

.modern-menu .sub-menu a {
    color: #4b5563;
    padding: 12px 16px;
    font-size: 0.9375rem;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-menu .sub-menu a:hover {
    background: rgba(109, 192, 75, 0.08);
    color: #1a1a1a;
    transform: translateX(2px);
}

.modern-menu .sub-menu .current-menu-item > a {
    background: linear-gradient(135deg, #6dc04b 0%, #5aa93d 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(109, 192, 75, 0.3);
    padding: 14px 20px;
}

/* ============================================
   STICKY HEADER EFFECT
   ============================================ */

/* Removed old sticky styles - using new auto-hide system */

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 1024px) {
    .modern-header .container {
        padding: 0 2rem !important;
    }
    
    .modern-menu {
        gap: 4px;
    }
    
    .modern-menu > li > a {
        padding: 8px 16px;
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .modern-header .container {
        padding: 0 1.5rem !important;
    }
    
    .modern-header .header-inner {
        padding: 0.75rem 0;
    }
    
    .site-logo-img {
        height: 72px;
    }
    
    .modern-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .modern-nav {
        width: 100%;
    }
    
    /* Mobil Menü Overlay - Tam Ekran */
    .modern-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 1002;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 80px 32px 40px;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        border: none;
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .modern-menu.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Menu Items Container */
    .modern-menu-container {
        max-width: 400px;
        width: 100%;
    }
    
    .modern-menu li {
        width: 100%;
        opacity: 0;
        transform: translateY(20px);
        animation: slideInMenuItem 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
    
    .modern-menu.active li:nth-child(1) { animation-delay: 0.1s; }
    .modern-menu.active li:nth-child(2) { animation-delay: 0.15s; }
    .modern-menu.active li:nth-child(3) { animation-delay: 0.2s; }
    .modern-menu.active li:nth-child(4) { animation-delay: 0.25s; }
    .modern-menu.active li:nth-child(5) { animation-delay: 0.3s; }
    .modern-menu.active li:nth-child(6) { animation-delay: 0.35s; }
    
    @keyframes slideInMenuItem {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .modern-menu > li > a {
        color: #1a1a1a;
        padding: 18px 24px;
        width: 100%;
        border-radius: 20px !important;
        font-size: 1.125rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: rgba(109, 192, 75, 0.03);
        border: none !important;
        box-shadow: none !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }
    .modern-menu > li > a::after,
    .modern-menu > li > a::before {
        display: none !important;
        content: none !important;
    }
    
    .modern-menu > li > a:hover {
        background: rgba(109, 192, 75, 0.12);
        color: #1a1a1a;
        transform: translateX(4px);
        border: none !important;
        box-shadow: none !important;
    }
    
    .modern-menu .current-menu-item > a {
        background: linear-gradient(135deg, #6dc04b 0%, #5aa93d 100%);
        color: #ffffff;
        font-weight: 700;
        box-shadow: 0 8px 20px rgba(109, 192, 75, 0.35);
        padding: 18px 24px;
        border: none !important;
        box-shadow: 0 8px 20px rgba(109, 192, 75, 0.35);
        transform: scale(1.02);
    }
    
    .modern-menu .current-menu-item > a:hover {
        box-shadow: 0 12px 28px rgba(109, 192, 75, 0.45);
        transform: scale(1.02) translateX(4px);
        border: none !important;
    }
    
    .modern-menu .current-menu-item > a::after {
        display: none !important;
        content: none !important;
    }
    
    .modern-menu .sub-menu {
        position: static;
        box-shadow: none;
        background: rgba(109, 192, 75, 0.05);
        margin: 8px 0 0 0;
        border: none;
        border-radius: 12px;
        padding: 8px;
    }
    
    .modern-menu .sub-menu a {
        border-radius: 12px;
        font-size: 1rem;
        padding: 14px 20px;
    }
    
    /* Body scroll lock when menu open */
    body.menu-open {
        overflow: hidden;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.header-cta-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: linear-gradient(135deg, #6dc04b 0%, #5aa93d 100%);
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(109, 192, 75, 0.25);
}

.header-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(109, 192, 75, 0.35);
}

/* Remove old header styles */
.modern-header .site-title,
.modern-header .site-description {
    display: none;
}
