/* ============================================================
   MYB Header – style.css
   ============================================================ */

.myb-header *, .myb-header *::before, .myb-header *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.myb-header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
    transition: background 0.35s ease, box-shadow 0.35s ease;
}
.myb-header--transparent              { background: transparent; }
.myb-header--transparent.is-scrolled {
    background: #0B213D;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}
.myb-header--solid {
    background: #0B213D;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.myb-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 30px;
    height: 80px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    overflow: visible;
}

.myb-header__nav {
    display: flex;
    align-items: center;
    gap: 28px;
    overflow: visible;
}
.myb-header__nav--left  { justify-content: flex-start; }
.myb-header__nav--right { justify-content: flex-end; }

.myb-header__nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    white-space: nowrap;
    position: relative;
    transition: color 0.2s;
}
.myb-header__nav-link::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0;
    width: 0; height: 1px;
    background: #c9a96e;
    transition: width 0.25s ease;
}
.myb-header__nav-link:hover,
.myb-header__nav-link.is-active,.myb-header__nav-link:focus,.myb-header__nav-link:active { color: #c9a96e !important; }
.myb-header__nav-link:hover::after,
.myb-header__nav-link.is-active::after { width: 100%; }

.myb-header__logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    line-height: 1;
}
.myb-header__logo-img  { max-height: 64px; width: auto; display: block; }
.myb-header__logo-text { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.myb-header__logo-wave { color: #c9a96e; font-size: 14px; letter-spacing: 4px; display: block; }
.myb-header__logo-sub  { color: #b0c8dc; font-size: 8px; font-weight: 600; letter-spacing: 4px; text-transform: uppercase; display: block; }
.myb-header__logo-main { color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; display: block; }

/* ── Language switcher ── */
.myb-lang-switcher {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.globe-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}
.globe-btn:hover         { background: rgba(255,255,255,0.13); }
.globe-btn:focus-visible { outline: 2px solid #c9a96e; outline-offset: 2px; }
.globe-img {
    display: block;
    width: 22px; height: 22px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Panel that wraps the TP shortcode */
.myb-lang-panel {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0; left: auto;
    min-width: 100px;
    background: #132f48;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    box-shadow: 0 10px 32px rgba(0,0,0,0.45);
    overflow: visible;
    z-index: 99999;
    animation: mybLangIn 0.18s ease;
}
.myb-lang-panel--left   { right: auto; left: 0; }
.myb-lang-panel.is-open { display: block; }

/* ── TP shortcode wrapper inside panel ── */
.myb-lang-panel .trp-shortcode-switcher__wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    width: 100% !important;
    /* Override TP CSS custom props */
    --bg: #132f48 !important;
    --bg-hover: rgba(255,255,255,0.09) !important;
    --text: #ffffff !important;
    --text-hover: #c9a96e !important;
    --border: transparent !important;
}

/* TP anchor element (the hidden sizing anchor) */
.myb-lang-panel .trp-shortcode-anchor {
    display: none !important;
}

/* TP overlay — reposition from fixed/absolute viewport to static inside our panel */
.myb-lang-panel .trp-shortcode-overlay {
    position: static !important;
    left: auto !important;
    top: auto !important;
    z-index: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

/* Current language row */
.myb-lang-panel .trp-current-language-item__wrapper {
    padding: 10px 0px !important;
    border-bottom: 1px solid rgba(255,255,255,0.12) !important;
    background: transparent !important;
}

/* Dropdown list container */
.myb-lang-panel .trp-switcher-dropdown-list,
.myb-lang-panel [id^="trp-shortcode-dropdown"] {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    position: static !important;
}

/* Each language link */
.myb-lang-panel .trp-switcher-dropdown-list a,
.myb-lang-panel [id^="trp-shortcode-dropdown"] a,
.myb-lang-panel .trp-language-switcher a {
    color: #fff !important;
    padding: 9px 14px !important;
    border-bottom: 1px solid rgba(255,255,255,0.07) !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}
.myb-lang-panel .trp-switcher-dropdown-list a:hover,
.myb-lang-panel [id^="trp-shortcode-dropdown"] a:hover,
.myb-lang-panel .trp-language-switcher a:hover {
    background: rgba(255,255,255,0.09) !important;
    color: #c9a96e !important;
}

@keyframes mybLangIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/*
 * Let TranslatePress render exactly as it wants to inside .myb-lang-panel.
 * We only override colors/spacing to match our dark theme.
 * TP's own JS handles opening/closing its internal dropdown — we just
 * show/hide the outer panel via .is-open.
 */
.myb-lang-panel .trp-shortcode-switcher__wrapper,
.myb-lang-panel .trp-language-switcher-shortcode-wrap {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    color: #fff !important;
    --bg: transparent !important;
    --bg-hover: rgba(255,255,255,0.09) !important;
    --text: #fff !important;
    --text-hover: #c9a96e !important;
    --border: none !important;
    --border-color: transparent !important;
}

/* All links inside */
.myb-lang-panel a {
    color: #fff !important;
    text-decoration: none !important;
}
.myb-lang-panel a:hover { color: #c9a96e !important; }

/* Override TP's inline --bg custom property on the wrapper */
.myb-lang-panel [style*="--bg"] {
    --bg: transparent !important;
    --bg-hover: rgba(255,255,255,0.09) !important;
    --text: #fff !important;
    --text-hover: #c9a96e !important;
    --border: none !important;
}

/* ── Mobile row ── */
.myb-header__mobile-row { display: none; }

.myb-header__burger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px; height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.myb-header__burger span {
    display: block;
    width: 100%; height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}
.myb-header__burger.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.myb-header__burger.is-active span:nth-child(2) { opacity: 0; width: 0; }
.myb-header__burger.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.myb-header__drawer {
    display: none;
    flex-direction: column;
    background: #1b4b6e;
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(255,255,255,0.12);
}
.myb-header__drawer.is-open { display: flex; }

.myb-header__drawer-link {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: color 0.2s, padding-left 0.2s;
}
.myb-header__drawer-link:last-child { border-bottom: none; }
.myb-header__drawer-link:hover      { color: #c9a96e; padding-left: 6px; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .myb-header__inner {
        grid-template-columns: 1fr;
        height: 64px;
        padding: 0 20px;
        overflow: visible;
    }
    .myb-lang-panel--left {
    right: 0 !important;
    left: auto !important;
}
    .myb-header__nav { display: none; }
    .myb-header__logo-wrap:not(.myb-header__logo-wrap--mobile) { display: none; }
    .myb-header__mobile-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 12px;
        overflow: visible;
        position: relative;
    }
    .myb-header__logo-wrap--mobile { display: flex; flex: 1; justify-content: center; }
    .myb-header__logo-img          { max-height: 44px; }
    .myb-header__logo-main         { font-size: 13px; letter-spacing: 2px; }

@media (max-width: 480px) {
    .myb-header__inner     { padding: 0 16px; height: 58px; }
    .myb-header__logo-img  { max-height: 38px; }
    .myb-header__logo-main { font-size: 11px; }
    .myb-lang-switcher--mobile .myb-lang-panel {
        min-width: 110px;
        max-width: calc(100vw - 32px);
    }
}
