/**
 * TRCodex Yan Menü - Premium Styles
 * Tüm class'lar benzersiz trxym__ prefix ile çakışma önlenir
 * Version: 1.0.0
 */

/* ==========================================
   CSS Reset & Değişkenler
   ========================================== */

/* Hiçbir WordPress CSS'i ile çakışmamak için tüm elementler sıfırlanır */
[class^="trxym__"],
[class^="trxym__"]::before,
[class^="trxym__"]::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   Görünürlük Kontrolleri
   ========================================== */

/* Sadece Mobil - 1024px altı */
.trxym__visible-mobile_only {
    display: none !important;
}

@media screen and (max-width: 1024px) {
    .trxym__visible-mobile_only {
        display: block !important;
    }
}

/* Tablet ve Mobil - 1200px altı */
.trxym__visible-tablet_mobile {
    display: none !important;
}

@media screen and (max-width: 1200px) {
    .trxym__visible-tablet_mobile {
        display: block !important;
    }
}

/* Her Zaman Görünür */
.trxym__visible-always {
    display: block !important;
}

/* ==========================================
   Hamburger Buton
   ========================================== */

.trxym__container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.trxym__hamburger-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 45px;
    height: 45px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    z-index: 100;
}

.trxym__hamburger-btn:hover {
    transform: scale(1.05);
}

.trxym__hamburger-btn:active {
    transform: scale(0.95);
}

.trxym__hamburger-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.4);
}

/* Hamburger Çizgileri */
.trxym__hamburger-line {
    position: relative;
    display: block;
    width: 28px;
    height: 3px;
    border-radius: 3px;
    background-color: #333333;
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    transform-origin: center;
}

/* Açık durumda X animasyonu */
.trxym__hamburger-btn.trxym__active .trxym__hamburger-line--top {
    transform: translateY(9px) rotate(45deg);
}

.trxym__hamburger-btn.trxym__active .trxym__hamburger-line--middle {
    opacity: 0;
    transform: scaleX(0);
}

.trxym__hamburger-btn.trxym__active .trxym__hamburger-line--bottom {
    transform: translateY(-9px) rotate(-45deg);
}

/* ==========================================
   Overlay
   ========================================== */

.trxym__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999998;
    cursor: pointer;
}

.trxym__overlay.trxym__visible {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   Yan Panel (Sidebar)
   ========================================== */

.trxym__sidebar-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 320px;
    max-width: 90vw;
    height: 100vh;
    height: 100dvh;
    background-color: #ffffff;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 999999;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Sağdan Açılış */
.trxym__sidebar-panel--right {
    right: 0;
    transform: translateX(110%);
    border-radius: 24px 0 0 24px;
}

.trxym__sidebar-panel--right.trxym__open {
    transform: translateX(0);
}

/* Soldan Açılış */
.trxym__sidebar-panel--left {
    left: 0;
    transform: translateX(-110%);
    border-radius: 0 24px 24px 0;
}

.trxym__sidebar-panel--left.trxym__open {
    transform: translateX(0);
}

/* ==========================================
   Panel Header
   ========================================== */

.trxym__sidebar-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 70px;
    padding: 16px 20px;
    background-color: #E31E24;
    background-image: linear-gradient(135deg, #E31E24 0%, #c41a1f 100%);
    flex-shrink: 0;
}

/* Kapatma Butonu */
.trxym__close-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.trxym__close-btn::before,
.trxym__close-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2.5px;
    border-radius: 2px;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.trxym__close-btn::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.trxym__close-btn::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.trxym__close-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.trxym__close-btn:active {
    transform: rotate(90deg) scale(0.9);
}

.trxym__close-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

/* ==========================================
   Menü Navigasyon
   ========================================== */

.trxym__menu-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(227, 30, 36, 0.3) transparent;
}

.trxym__menu-nav::-webkit-scrollbar {
    width: 5px;
}

.trxym__menu-nav::-webkit-scrollbar-track {
    background: transparent;
}

.trxym__menu-nav::-webkit-scrollbar-thumb {
    background-color: rgba(227, 30, 36, 0.3);
    border-radius: 10px;
}

/* Ana Menü Listesi */
.trxym__menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Menü Öğesi */
.trxym__menu-item {
    position: relative;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.trxym__menu-item:last-child {
    border-bottom: none;
}

/* Menü Linki */
.trxym__menu-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    color: #333333;
    text-decoration: none;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    text-align: left;
}

.trxym__menu-link:hover {
    color: #E31E24;
    background-color: rgba(227, 30, 36, 0.08);
    padding-left: 28px;
}

.trxym__menu-link:focus-visible {
    background-color: rgba(227, 30, 36, 0.08);
    outline: 2px solid #E31E24;
    outline-offset: -2px;
}

/* Menü Metni */
.trxym__menu-text {
    flex: 1;
    display: flex;
    align-items: center;
}

/* Dropdown Ok İşareti */
.trxym__menu-arrow {
    width: 10px;
    height: 10px;
    border-right: 2.5px solid #666666;
    border-bottom: 2.5px solid #666666;
    transform: rotate(-45deg);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 12px;
    flex-shrink: 0;
}

/* Aktif Alt Menü Toggle */
.trxym__submenu-toggle.trxym__active {
    color: #ffffff;
    background-color: #E31E24;
    background-image: linear-gradient(135deg, #E31E24 0%, #c41a1f 100%);
}

.trxym__submenu-toggle.trxym__active:hover {
    background-color: #c41a1f;
    padding-left: 28px;
}

.trxym__submenu-toggle.trxym__active .trxym__menu-arrow {
    border-color: #ffffff;
    transform: rotate(45deg);
}

/* ==========================================
   Alt Menü (Submenu)
   ========================================== */

.trxym__submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.02);
    border-left: 4px solid rgba(227, 30, 36, 0.15);
    margin-left: 20px;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.trxym__submenu.trxym__expanded {
    max-height: 1000px;
}

/* Alt Menü Öğesi */
.trxym__submenu-item {
    margin: 0;
    padding: 0;
}

/* Alt Menü Linki */
.trxym__submenu-link {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 14px 20px 14px 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: #555555;
    text-decoration: none;
    background-color: transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.trxym__submenu-link:hover {
    color: #E31E24;
    background-color: rgba(227, 30, 36, 0.06);
    padding-left: 22px;
}

.trxym__submenu-link:focus-visible {
    background-color: rgba(227, 30, 36, 0.08);
    outline: 2px solid #E31E24;
    outline-offset: -2px;
}

/* Alt Menü İkonu (Ok) */
.trxym__submenu-icon {
    position: relative;
    width: 8px;
    height: 8px;
    margin-right: 12px;
    flex-shrink: 0;
}

.trxym__submenu-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 8px;
    height: 8px;
    border-right: 2px solid #E31E24;
    border-bottom: 2px solid #E31E24;
    transform: translateY(-50%) rotate(-45deg);
    transition: transform 0.3s ease;
}

.trxym__submenu-link:hover .trxym__submenu-icon::before {
    transform: translateY(-50%) translateX(3px) rotate(-45deg);
}

/* Alt Menü Metni */
.trxym__submenu-text {
    flex: 1;
}

/* ==========================================
   Body Scroll Lock
   ========================================== */

body.trxym__body-locked {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* ==========================================
   Responsive Düzenlemeler
   ========================================== */

@media screen and (max-width: 480px) {
    .trxym__sidebar-panel {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
    }

    .trxym__sidebar-panel--right,
    .trxym__sidebar-panel--left {
        border-radius: 0;
    }

    .trxym__menu-link {
        padding: 18px 20px;
        font-size: 17px;
    }

    .trxym__submenu-link {
        padding: 16px 20px 16px 16px;
        font-size: 15px;
    }
}

@media screen and (min-width: 481px) and (max-width: 768px) {
    .trxym__sidebar-panel {
        width: 360px;
    }
}

/* ==========================================
   Animasyon Performans Optimizasyonları
   ========================================== */

.trxym__sidebar-panel,
.trxym__overlay {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

/* Azaltılmış hareket tercihi */
@media (prefers-reduced-motion: reduce) {

    .trxym__hamburger-line,
    .trxym__hamburger-btn,
    .trxym__overlay,
    .trxym__sidebar-panel,
    .trxym__menu-link,
    .trxym__submenu-link,
    .trxym__menu-arrow,
    .trxym__close-btn,
    .trxym__submenu {
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   Print Styles
   ========================================== */

@media print {

    .trxym__container,
    .trxym__overlay,
    .trxym__sidebar-panel {
        display: none !important;
    }
}