/* =========================================================
 *  Virtual 360 Zone - Header
 *  Escopado sob .vrl-header e .vrl-mobile para evitar
 *  conflito com estilos do Blocksy.
 * ========================================================= */

:root {
    --vrl-header-h: 88px;
    --vrl-header-pad-x: clamp(16px, 4vw, 40px);
    --vrl-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.vrl-header *,
.vrl-mobile * {
    box-sizing: border-box;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.vrl-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    height: var(--vrl-header-h);
    background: rgba(8, 12, 30, 0.85);
    backdrop-filter: saturate(150%) blur(12px);
    -webkit-backdrop-filter: saturate(150%) blur(12px);
    border-bottom: 1px solid rgba(164, 173, 196, 0.08);
    transition: background 200ms var(--vrl-ease), border-color 200ms var(--vrl-ease);
}

.vrl-header.is-scrolled {
    background: rgba(8, 12, 30, 0.96);
    border-bottom-color: rgba(58, 123, 213, 0.18);
}

.vrl-header__spacer {
    height: var(--vrl-header-h);
}

.vrl-header__inner {
    height: 100%;
    padding: 0 var(--vrl-header-pad-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
}

/* Brand */
.vrl-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary, #eef0f8);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.vrl-header__brand-mark {
    width: 30px;
    height: 30px;
    background: var(--blue, #3a7bd5);
    border-radius: 7px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 15px;
    transition: transform 200ms var(--vrl-ease);
}

.vrl-header__brand:hover .vrl-header__brand-mark {
    transform: scale(1.06);
}

/* Nav (desktop) */
.vrl-header__nav {
    display: none;
}

.vrl-header__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 28px;
    align-items: center;
}

.vrl-header__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--text-secondary, #a4adc4);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    line-height: var(--vrl-header-h);
    transition: color 180ms var(--vrl-ease);
    font-family: inherit;
}

.vrl-header__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    height: 2px;
    background: var(--blue, #3a7bd5);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 220ms var(--vrl-ease);
}

.vrl-header__link:hover,
.vrl-header__has-mega.is-open .vrl-header__link {
    color: var(--text-primary, #eef0f8);
}

.vrl-header__link:hover::after,
.vrl-header__has-mega.is-open .vrl-header__link::after {
    transform: scaleX(1);
}

.vrl-header__caret {
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 200ms var(--vrl-ease);
}

.vrl-header__has-mega.is-open .vrl-header__caret {
    transform: rotate(-135deg) translateY(0);
}

/* Actions */
.vrl-header__actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vrl-header__wa {
    display: none;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: #fff;
    padding: 9px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: transform 180ms var(--vrl-ease), box-shadow 180ms var(--vrl-ease);
}

.vrl-header__wa:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.25);
}

.vrl-header__wa-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: vrl-pulse 2s infinite;
}

@keyframes vrl-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.4); }
}

.vrl-header__lang {
    display: none;
    font-size: 12px;
    color: var(--text-muted, #5e6a84);
    gap: 6px;
}

.vrl-header__lang-item--active {
    color: var(--text-primary, #eef0f8);
    font-weight: 500;
}

/* Burger (mobile default) */
.vrl-header__burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 7px;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.vrl-header__burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary, #eef0f8);
    border-radius: 1px;
    transition: transform 220ms var(--vrl-ease), opacity 180ms var(--vrl-ease);
}

/* Mega menu (desktop only) */
.vrl-mega {
    display: none;
    position: absolute;
    top: var(--vrl-header-h);
    left: 0;
    right: 0;
    background: rgba(14, 19, 48, 0.98);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-top: 1px solid rgba(58, 123, 213, 0.2);
    border-bottom: 1px solid rgba(164, 173, 196, 0.1);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 220ms var(--vrl-ease), transform 220ms var(--vrl-ease);
}

.vrl-header__has-mega.is-open .vrl-mega {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.vrl-mega__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px var(--vrl-header-pad-x) 28px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.vrl-mega__col {
    display: flex;
    flex-direction: column;
}

.vrl-mega__kicker {
    color: var(--blue-light, #5a9bf6);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.2px;
    margin-bottom: 4px;
}

.vrl-mega__title {
    color: var(--text-primary, #eef0f8);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 2px;
}

.vrl-mega__verb {
    color: var(--text-secondary, #a4adc4);
    font-size: 12px;
    font-style: italic;
    margin-bottom: 16px;
}

.vrl-mega__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vrl-mega__item {
    color: var(--text-primary, #eef0f8);
    font-size: 13px;
    text-decoration: none;
    padding-left: 0;
    border-left: 2px solid transparent;
    padding: 2px 0 2px 0;
    transition: border-color 160ms var(--vrl-ease), padding-left 160ms var(--vrl-ease), color 160ms var(--vrl-ease);
}

.vrl-mega__item:hover {
    color: var(--blue-light, #5a9bf6);
    border-left-color: var(--blue, #3a7bd5);
    padding-left: 10px;
}

.vrl-mega__foot {
    border-top: 1px solid rgba(164, 173, 196, 0.08);
    padding: 16px var(--vrl-header-pad-x);
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.vrl-mega__foot-text {
    color: var(--text-secondary, #a4adc4);
    font-size: 12px;
}

.vrl-mega__foot-cta {
    color: var(--blue-light, #5a9bf6);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: transform 180ms var(--vrl-ease);
}

.vrl-mega__foot-cta:hover {
    transform: translateX(4px);
}

/* Mobile drawer */
.vrl-mobile {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    background: var(--navy, #080c1e);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 300ms var(--vrl-ease);
    overflow-y: auto;
    padding: 0;
}

.vrl-mobile.is-open {
    transform: translateX(0);
}

.vrl-mobile-backdrop {
    display: none !important;
}

.vrl-mobile__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(164, 173, 196, 0.08);
}

.vrl-mobile__close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 0;
    cursor: pointer;
    position: relative;
}

.vrl-mobile__close span {
    position: absolute;
    left: 6px;
    right: 6px;
    top: 50%;
    height: 2px;
    background: var(--text-primary, #eef0f8);
    border-radius: 1px;
}

.vrl-mobile__close span:first-child { transform: rotate(45deg); }
.vrl-mobile__close span:last-child  { transform: rotate(-45deg); }

.vrl-mobile__nav {
    padding: 20px 24px 40px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vrl-mobile__link {
    display: block;
    padding: 14px 4px;
    color: var(--text-secondary, #a4adc4);
    font-size: 15px;
    text-decoration: none;
    border-bottom: 1px solid rgba(164, 173, 196, 0.06);
}

.vrl-mobile__group {
    padding: 10px 0 6px;
    border-bottom: 1px solid rgba(164, 173, 196, 0.06);
}

.vrl-mobile__summary {
    color: var(--text-primary, #eef0f8);
    font-size: 15px;
    font-weight: 500;
    padding: 6px 4px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vrl-mobile__summary::-webkit-details-marker { display: none; }

.vrl-mobile__summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 1.5px solid var(--blue-light, #5a9bf6);
    border-bottom: 1.5px solid var(--blue-light, #5a9bf6);
    transform: rotate(45deg);
    transition: transform 220ms var(--vrl-ease);
}

details[open] .vrl-mobile__summary::after {
    transform: rotate(-135deg);
}

.vrl-mobile__pillar {
    padding: 12px 0 4px;
}

.vrl-mobile__kicker {
    color: var(--blue-light, #5a9bf6);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
}

.vrl-mobile__item {
    display: block;
    color: var(--text-primary, #eef0f8);
    font-size: 13px;
    text-decoration: none;
    padding: 7px 0 7px 12px;
    border-left: 2px solid rgba(58, 123, 213, 0.3);
    margin-bottom: 2px;
}

.vrl-mobile__wa {
    display: block;
    text-align: center;
    background: #25d366;
    color: #fff;
    padding: 13px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    margin-top: 20px;
}

.vrl-mobile__lang {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted, #5e6a84);
    font-size: 12px;
}

.vrl-mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms var(--vrl-ease);
}

.vrl-mobile-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

body.vrl-mobile-lock {
    overflow: hidden;
}

/* =========================================================
 *  Desktop breakpoint (tablet e mobile compartilham o mesmo
 *  layout mobile por decisão de produto).
 * ========================================================= */
@media (min-width: 1025px) {
    .vrl-header__nav,
    .vrl-header__wa,
    .vrl-header__lang {
        display: flex;
    }
    .vrl-header__burger {
        display: none;
    }
    .vrl-header__has-mega {
        position: static;
    }
}

@media (max-width: 1024px) {
    .vrl-header__nav {
        display: none;
    }
    .vrl-header__brand-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .vrl-header__brand-text {
        display: none;
    }
}

/* =========================================================
 *  Logo do header (GIF oficial) - tamanhos aumentados
 * ========================================================= */
.vrl-header__logo-img {
    display: block;
    height: 56px;
    width: auto;
    max-width: 220px;
}

.vrl-mobile .vrl-header__logo-img {
    height: 50px;
    max-width: 200px;
}

@media (max-width: 480px) {
    .vrl-header__logo-img {
        height: 44px;
        max-width: 180px;
    }
}

body.vrl-mobile-lock .vrl-header {
    visibility: hidden;
}

/* === LANGUAGE SWITCHER WITH FLAGS === */
.vrl-lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
}
.vrl-lang-opt {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #a4adc4;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
    letter-spacing: 0.5px;
}
.vrl-lang-opt:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
}
.vrl-lang-active {
    color: #FFFFFF;
}
.vrl-lang-sep {
    color: rgba(255, 255, 255, 0.15);
    font-size: 12px;
    user-select: none;
}
.vrl-flag {
    width: 20px;
    height: 14px;
    flex-shrink: 0;
    border-radius: 2px;
    overflow: hidden;
}

/* Mobile: bandeiras na barra, não no drawer */
@media (max-width: 1024px) {
    .vrl-lang-switch {
        margin-right: 8px;
        gap: 4px;
    }
    .vrl-lang-opt {
        padding: 3px 6px;
        font-size: 11px;
    }
    .vrl-lang-opt span {
        display: none;
    }
    .vrl-flag {
        width: 22px;
        height: 15px;
    }
}
