/* --- RX STICKY HEADER DOCK TASARIMI --- */

:root {
    --rx-dropdown-x: 0px;
    --rx-dropdown-y: 0px;
}

.rx-header-dock-outer-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99990;
    pointer-events: none;
    box-sizing: border-box;
    transition: top 0.3s ease, z-index 0.2s ease;
}

/* ÇEKMECE AÇIKKEN DIŞ SARMALIN KATMANINI EN ÜSTE ALIR */
.rx-header-dock-outer-wrapper.rx-drawer-open {
    z-index: 2147483647 !important; /* Tarayıcının desteklediği en üst 32-bit tavan z-index limiti */
}

/* WORDPRESS ADMIN BAR UYUMLULUĞU */
body.admin-bar .rx-header-dock-outer-wrapper {
    top: 32px;
    top: var(--wp-admin--admin-bar--height, 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .rx-header-dock-outer-wrapper {
        top: 46px;
        top: var(--wp-admin--admin-bar--height, 46px);
    }
}

/* Ana Header Kapsülü (Flat Beyaz) */
.rx-header-container {
    position: relative;
    width: 100%;
    height: 74px;
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    pointer-events: auto;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease, box-shadow 0.4s ease;
}

/* Scroll Sonrası Büzülmüş / Küçülmüş Header Sınıfı */
.rx-header-container.rx-header-shrunk {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

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

/* Logo */
.rx-header-logo {
    display: flex;
    align-items: center;
}
.rx-header-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
    overflow: hidden;
}
.rx-header-logo-img {
    display: block;
    width: 120px;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
    transition: width 0.3s ease, height 0.3s ease;
}

/* Masaüstü Navigasyon */
.rx-header-nav-desktop {
    display: block;
    height: 100%;
}
.rx-header-menu-list {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    height: 100%;
}

.rx-header-menu-item {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 220px;
}

.rx-header-menu-link, .rx-header-menu-list a {
    display: flex;
    align-items: center;
    width: 100% !important;
    padding: 0 24px;
    height: 100% !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #babfcf;
    border-radius: 0 !important;
    box-sizing: border-box;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.rx-menu-item-text {
    flex: 1;
    text-align: left;
    margin-left: 12px;
}

/* Masaüstü İkonlar */
.rx-menu-item-icon-left {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.rx-menu-item-icon-left svg, .rx-menu-item-icon-left i {
    display: block;
}

.rx-menu-item-icon-right {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    transition: transform 0.25s ease, margin-right 0.25s ease; /* Pürüzsüz kaydırma için margin-right geçişi eklendi */
}
.rx-menu-item-icon-right svg {
    display: block;
}

.rx-header-menu-item:hover .rx-menu-item-icon-right {
    transform: rotate(180deg);
}

/* --- MASAÜSTÜ ALT MENÜ VE GEÇİŞLER --- */
.rx-header-menu-list .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100% !important;
    box-sizing: border-box;
    background-color: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 8px !important;
    padding: 6px 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translate(var(--rx-dropdown-x, 0px), calc(var(--rx-dropdown-y, 0px) + 10px));
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.rx-header-menu-list .sub-menu::before {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 24px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #ffffff transparent;
}

.rx-header-menu-list li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(var(--rx-dropdown-x, 0px), var(--rx-dropdown-y, 0px));
}

.rx-header-menu-list .sub-menu li {
    width: 100%;
    display: block;
    background: transparent !important;
}

.rx-header-menu-list .sub-menu li:not(:last-child) {
    border-bottom: 1px solid #f3f6f9;
}

.rx-header-menu-list .sub-menu a {
    display: inline-flex;
    align-items: center;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #9ba4b4;
    white-space: nowrap;
    box-sizing: border-box;
    border-left: 3px solid transparent;
    border-radius: 0 !important;
    height: auto !important;
    background-color: transparent !important;
    transition: color 0.2s, border-left-color 0.2s;
}

.rx-header-menu-list .sub-menu .rx-menu-item-icon-left {
    margin-right: 12px;
}
.rx-header-menu-list .sub-menu .rx-menu-item-text {
    flex: none;
    margin-left: 0;
    text-align: left;
}

.rx-header-menu-list .sub-menu a:hover {
    border-left-color: #5998f5;
    background-color: transparent !important;
    color: #5a6275 !important;
}

/* Mobil Hamburger Butonu */
.rx-header-hamburger {
    display: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.rx-header-hamburger svg, .rx-header-hamburger i {
    width: 22px;
    height: 22px;
    font-size: 22px;
}


/* --- MOBİL & TABLET ALT MENÜLERİ (TAM AKORDİYON SİSTEMİ) --- */
@media (max-width: 1024px) {
    .rx-header-mobile-list .sub-menu {
        position: relative !important; 
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
        
        display: none; /* JS slideToggle ile açılır */
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 1000 !important;
        box-shadow: none !important;
        
        transform: translate(var(--rx-dropdown-x, 0px), var(--rx-dropdown-y, 0px)) !important;
        transition: transform 0.25s ease !important;
    }
}


/* --- MOBİL DRAWER PANELİ VE MUTLAK EN ÜST KATMAN Z-INDEX DEĞERİ --- */
.rx-header-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    background-color: #F8F6F0;
    
    z-index: 2147483647 !important; 
    
    pointer-events: auto;
    box-sizing: border-box;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.rx-header-mobile-drawer-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 30px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
}

.rx-header-nav-mobile {
    overflow: visible !important;
}

body.admin-bar .rx-header-mobile-drawer {
    top: 32px;
    top: var(--wp-admin--admin-bar--height, 32px);
    height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
}

@media screen and (max-width: 782px) {
    body.admin-bar .rx-header-mobile-drawer {
        top: 46px;
        top: var(--wp-admin--admin-bar--height, 46px);
        height: calc(100vh - var(--wp-admin--admin-bar--height, 46px));
    }
}

.rx-header-mobile-drawer.rx-active {
    transform: translateX(0);
}

/* Üst Satır: Sadece Kapatma "X" Butonu (THERESIA-EVENTS Tarz Sade Tasarım) */
.rx-header-mobile-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-bottom: 1px solid transparent; /* "Başlık Alt Çizgi Rengi" kontrolüyle görünür yapılabilir */
    padding-bottom: 10px;
    margin-bottom: 10px;
}

/* Erişilebilirlik: metin ekran okuyucular için korunur, görsel olarak gizlenir */
.rx-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* SADE İNCE ÇİZGİLİ KAPATMA "X" BUTONU (Yuvarlak arka plan olmadan) */
.rx-header-mobile-close {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin-left: auto;
}
.rx-header-mobile-close svg {
    width: 26px;
    height: 26px;
    display: block;
    transition: stroke 0.2s ease;
}

/* Logo: THERESIA-EVENTS Tarz Büyük, Ortalanmış Marka Görseli */
.rx-header-mobile-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
}
.rx-header-mobile-logo img {
    width: 260px;
    max-width: 100%;
    height: auto;
    display: block;
}

/* Menü Listesi: Sol Kenarda Zarif Kıvrımlı Motif (Logo Süslemesine Uyumlu) + Bol Boşluklu Dikey Sıralama */
.rx-header-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 45px;
    margin: 0;
    padding: 0 0 0 42px;
    list-style: none;
    position: relative;
}
.rx-header-mobile-list::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 24px;
    background-color: #2b2b28;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='420' viewBox='0 0 40 420' preserveAspectRatio='none'%3E%3Cpath d='M20,10 C6,10 6,26 20,26 C38,55 0,120 20,175 C40,230 0,300 20,360 C30,380 28,398 20,410' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3Ccircle cx='20' cy='18' r='3.2' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='420' viewBox='0 0 40 420' preserveAspectRatio='none'%3E%3Cpath d='M20,10 C6,10 6,26 20,26 C38,55 0,120 20,175 C40,230 0,300 20,360 C30,380 28,398 20,410' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3Ccircle cx='20' cy='18' r='3.2' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: left top;
    mask-position: left top;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}
.rx-header-mobile-item {
    position: relative;
    display: block;
}

/* Mobil Menü Link Düzeni: Serif, Büyük Harf, Geniş Harf Aralığı */
.rx-header-mobile-link, .rx-header-mobile-list a {
    display: flex;
    align-items: center;
    color: #2b2b28;
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 28px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    padding: 0;
    width: 100% !important;
    box-sizing: border-box;
}

/* Mobil Sağ Chevron İkonunun Animasyonu */
.rx-header-mobile-item .rx-menu-item-icon-right {
    margin-left: auto;
    transition: transform 0.3s ease, margin-right 0.3s ease; /* Pürüzsüz kaydırma geçişi buraya da eklendi */
}

/* Alt menüsü açık olan mobil sekmeler */
.rx-header-mobile-item.rx-submenu-open > .rx-header-mobile-link {
    color: #6b6b63; 
}
.rx-header-mobile-item.rx-submenu-open > .rx-header-mobile-link .rx-menu-item-icon-right {
    transform: rotate(180deg); 
}

/* Mobil Dropdown Kart Düzeni */
.rx-header-mobile-list .sub-menu {
    border: 1px solid #eef2f6;
    border-radius: 8px !important;
    padding: 6px 0;
    margin: 0;
    list-style: none;
}

.rx-header-mobile-list .sub-menu::before {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 24px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #ffffff transparent;
    pointer-events: none;
    display: block !important;
}

.rx-header-mobile-list .sub-menu li {
    display: block;
    width: 100% !important;
    background: transparent !important;
}

.rx-header-mobile-list .sub-menu li:not(:last-child) {
    border-bottom: 1px solid #f3f6f9;
}

.rx-header-mobile-list .sub-menu a {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: #9ba4b4;
    padding: 12px 20px;
    border-left: 3px solid transparent;
    box-sizing: border-box;
    width: 100% !important;
    background-color: transparent !important;
    transition: color 0.2s, border-left-color 0.2s;
}

.rx-header-mobile-list .sub-menu a:hover {
    border-left-color: #5998f5;
    color: #5a6275 !important;
    background-color: transparent !important;
}

/* DROPDOWN İÇİNDEKİ İKONLARIN GÖRÜNME KURALLARI */
.sub-menu .rx-menu-item-icon-left,
.rx-header-mobile-list .sub-menu .rx-menu-item-icon-left {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-right: 12px !important;
}
.sub-menu .rx-menu-item-icon-left svg,
.rx-header-mobile-list .sub-menu .rx-menu-item-icon-left svg {
    width: 14px !important;
    height: 14px !important;
    display: block !important;
}
.sub-menu .rx-menu-item-icon-left i,
.rx-header-mobile-list .sub-menu .rx-menu-item-icon-left i {
    font-size: 14px !important;
    display: block !important;
}

.rx-header-mobile-list .sub-menu .rx-menu-item-text {
    flex: none;
    margin-left: 0;
    text-align: left;
}

/* RESPONSIVE */
@media (max-width: 991px) {
    .rx-header-nav-desktop {
        display: none;
    }
    .rx-header-hamburger {
        display: inline-flex;
    }
}