/* ============================================================
   HMR Finance – Custom Language Switcher
   Replaces Weglot. Injects a FR/NL dropdown into the header.
   ============================================================ */

/* ── Wrapper injected next to the CTA button ── */
.hmr-lang-switcher {
    display: inline-flex;
    align-items: center;
    position: relative;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.2px;
    z-index: 9999;
    margin-left: 12px;
}

/* ── Trigger button ── */
.hmr-lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #ffffff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    padding: 6px 10px;
    transition: background 0.25s, border-color 0.25s;
    user-select: none;
    white-space: nowrap;
}

.hmr-lang-trigger:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Flag square image (24×16 px) */
.hmr-lang-flag {
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Label text */
.hmr-lang-label {
    line-height: 1;
}

/* Chevron arrow */
.hmr-lang-arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.hmr-lang-switcher.is-open .hmr-lang-arrow {
    transform: rotate(180deg);
}

/* ── Dropdown list ── */
.hmr-lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 140px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
    overflow: hidden;
    z-index: 10000;
    animation: hmr-dropdown-in 0.18s ease;
}

@keyframes hmr-dropdown-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hmr-lang-switcher.is-open .hmr-lang-dropdown {
    display: block;
}

/* ── Individual language options ── */
.hmr-lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    color: #333333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: background 0.18s, color 0.18s;
    cursor: pointer;
    white-space: nowrap;
}

.hmr-lang-option:hover {
    background: #605be5;
    color: #ffffff;
    text-decoration: none;
}

.hmr-lang-option.is-active {
    font-weight: 600;
    pointer-events: none;
    opacity: 0.55;
}

/* ── Mobile tweaks (≤ 767 px) ── */
@media (max-width: 767px) {
    .hmr-lang-switcher {
        margin-left: 6px;
    }

    .hmr-lang-trigger {
        padding: 5px 8px;
        font-size: 13px;
    }

    .hmr-lang-dropdown {
        right: 0;
        left: auto;
    }
}

/* ============================================================
   HAMBURGER / MOBILE NAV – animation + open-state styles
   Works alongside the JS fix in custom-switcher.js.
   ============================================================ */

/* The three lines should transition smoothly */
.wpr-mobile-toggle-line {
    transition: transform 0.25s ease, opacity 0.25s ease;
    transform-origin: center;
}

/* When the menu is open, morph the hamburger into an ✕ */
.wpr-mobile-toggle--open .wpr-mobile-toggle-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.wpr-mobile-toggle--open .wpr-mobile-toggle-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.wpr-mobile-toggle--open .wpr-mobile-toggle-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

