/* =====================================================
   Boyraz Offcanvas Menu Widget — Full-Screen Blur
   ===================================================== */

/* ── Tetikleyici ──────────────────────────────────── */

/* Widget kabı: buton satır kutusunda baseline'a oturunca altında
   descender boşluğu kalır ve komşu bileşenlerle dikeyde 2-3px kayar.
   Kabı flex yapıp ortalayınca hizalama pikseli pikseline oturur. */
.elementor-widget-boyraz-menu > .elementor-widget-container {
    display: flex;
    align-items: center;
    justify-content: inherit;
    height: 100%;
}

.boyraz-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin: 0;
    color: inherit;
    line-height: 1;
    vertical-align: middle;
    transition: background-color 0.2s, color 0.2s, opacity 0.2s;
}

/* İkon kabı (Elementor ICONS kontrolü ile seçilen ikon) */
.boyraz-menu-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.boyraz-menu-trigger-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.boyraz-menu-trigger-icon i {
    font-size: inherit;
    line-height: 1;
}

.boyraz-menu-trigger-lines {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    flex-shrink: 0;
}

.boyraz-menu-trigger-lines span {
    display: block;
    height: 2px;
    width: 100%;
    background: currentColor;
    border-radius: 1px;
}

.boyraz-menu-trigger-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* ── Portal kökü (body'ye taşınan kap) ────────────── */
/* Çocukları position:fixed olduğundan kök bir stacking context veya
   layout etkisi yaratmamalı; transform/filter/opacity verilmez. */
.boyraz-menu-portal-root,
.boyraz-menu-portal-scope {
    display: block;
}

/* ── Full-screen overlay (dark + blur) ────────────── */

.boyraz-menu-overlay {
    position: fixed;
    inset: 0;
    /* Renk, widget render'ında inline --bp-menu-overlay-bg değişkeniyle
       basılır: panel body'ye taşınsa da (portal) ayar elementle taşınır */
    background-color: var(--bp-menu-overlay-bg, rgba(8, 16, 36, 0.82));
    /* Sitedeki sticky header / fixed buton / eklenti widget'larının
       (genellikle z-index 99999) üzerinde kalması için 32-bit signed int
       maksimumuna yakın bir değer kullanılır. */
    z-index: 2147483646;
    opacity: 0;
    visibility: hidden;
    /* backdrop-filter yalnızca menü açıkken uygulanır; kapalıyken tanımlı
       olması bazı tarayıcılarda gereksiz compositor layer maliyeti doğurur. */
    transition: opacity 0.38s cubic-bezier(0.25, 0.1, 0.25, 1),
                visibility 0.38s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.boyraz-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(var(--bp-menu-overlay-blur, 10px));
    -webkit-backdrop-filter: blur(var(--bp-menu-overlay-blur, 10px));
}

/* ── Panel (transparent, content container) ───────── */

.boyraz-menu-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 2147483647;
    background: transparent;
    width: 44%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.38s cubic-bezier(0.25, 0.1, 0.25, 1) 0.06s,
                visibility 0.38s cubic-bezier(0.25, 0.1, 0.25, 1) 0.06s,
                transform 0.38s cubic-bezier(0.25, 0.1, 0.25, 1) 0.06s;
}

.boyraz-menu-panel--right {
    right: 0;
    left: auto;
}

.boyraz-menu-panel--left {
    left: 0;
    right: auto;
}

.boyraz-menu-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ── Panel Header (Geri Dön + KAPAT) ──────────────── */

.boyraz-menu-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 36px 56px 20px;
    flex-shrink: 0;
    min-height: 80px;
}

/* Geri Dön butonu */
.boyraz-menu-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 0;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-6px);
    transition: opacity 0.25s, color 0.2s, transform 0.25s;
}

.boyraz-menu-back.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.boyraz-menu-back:hover {
    color: #fff;
}

.boyraz-menu-back svg {
    display: block;
    width: 14px;
    height: 14px;
}

/* KAPAT X butonu */
.boyraz-menu-close {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 0;
    line-height: 1;
    margin-left: auto;
    transition: opacity 0.2s;
}

.boyraz-menu-close:hover {
    opacity: 0.65;
}

.boyraz-menu-close svg {
    display: block;
    width: 16px;
    height: 16px;
}

/* ── Kaydırılabilir menü alanı ────────────────────── */

.boyraz-menu-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 56px 16px;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.boyraz-menu-nav::-webkit-scrollbar { width: 2px; }
.boyraz-menu-nav::-webkit-scrollbar-track { background: transparent; }
.boyraz-menu-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

/* ── Push Navigation Views ────────────────────────── */

.boyraz-menu-view {
    display: none;
}

.boyraz-menu-view.is-active {
    display: block;
    animation: boyrazMenuViewIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes boyrazMenuViewIn {
    from { opacity: 0; transform: translateX(18px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Ana menü listesi ─────────────────────────────── */

.boyraz-menu-list,
.boyraz-submenu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.boyraz-menu-item {
    display: block;
}

/* Ana öğe linki */
.boyraz-menu-item-link {
    display: inline-block;
    padding: 10px 0;
    font-size: clamp(20px, 2.4vw, 32px);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    line-height: 1.15;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: inherit;
    text-align: inherit;
}

.boyraz-menu-item-link:hover {
    opacity: 0.55;
    text-decoration: none;
    color: #fff;
}

/* Parent item (alt menüsü olan) — ok işareti */
.boyraz-menu-item.has-children .boyraz-menu-item-link::after {
    content: ' ›';
    font-weight: 300;
    opacity: 0.6;
    margin-left: 2px;
}

/* ── Alt menü listesi (sub-view) ──────────────────── */

.boyraz-submenu-link {
    display: inline-block;
    padding: 10px 0;
    font-size: clamp(18px, 2vw, 28px);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    line-height: 1.2;
    transition: opacity 0.2s;
}

.boyraz-submenu-link:hover {
    opacity: 0.55;
    text-decoration: none;
    color: #fff;
}

/* ── Footer (dil + sosyal) ────────────────────────── */

.boyraz-menu-footer {
    padding: 16px 56px 44px;
    flex-shrink: 0;
}

/* ── Sosyal medya ikonları ────────────────────────── */

.boyraz-menu-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.boyraz-menu-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
    transition: border-color 0.2s, background-color 0.2s;
}

.boyraz-menu-social-link:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: #fff;
}

.boyraz-menu-social-link svg {
    display: block;
    width: 15px;
    height: 15px;
    pointer-events: none;
}

/* ── Body scroll lock ─────────────────────────────── */

body.boyraz-menu-open {
    overflow: hidden;
    touch-action: none;
}

/* ── Editör notları ──────────────────────────────── */

.boyraz-menu-editor-note {
    margin-top: 6px;
    padding: 6px 10px;
    background: #f0f0f0;
    border: 1px dashed #ccc;
    border-radius: 4px;
    font-size: 11px;
    color: #888;
    text-align: center;
}

.boyraz-menu-editor-placeholder {
    padding: 16px 0;
    color: rgba(255,255,255,0.5);
    font-style: italic;
    font-size: 14px;
}

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 1024px) {
    .boyraz-menu-panel {
        width: 60%;
    }
}

@media (max-width: 767px) {
    .boyraz-menu-panel {
        width: 100% !important;
        left: 0;
        right: 0;
    }

    .boyraz-menu-panel-header {
        padding: 28px 24px 16px;
        min-height: 68px;
    }

    .boyraz-menu-nav {
        padding: 8px 24px 12px;
    }

    .boyraz-menu-footer {
        padding: 12px 24px 36px;
    }

    .boyraz-menu-item-link {
        padding: 9px 0;
    }

    .boyraz-submenu-link {
        padding: 9px 0;
    }

    .boyraz-menu-social-link {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 479px) {
    .boyraz-menu-panel-header {
        padding: 22px 20px 12px;
    }

    .boyraz-menu-nav {
        padding: 6px 20px 10px;
    }

    .boyraz-menu-footer {
        padding: 10px 20px 32px;
    }
}
