/* ============================================
   HEADER - 3 Columnas: Toggle | Logo | Idiomas
   ============================================ */

/* Variables */
:root {
    --chocolate: #4F413B;
}

/* Header Container */
.zem-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: transparent;
    padding: 40px 40px 40px 40px;
    transition: background-color 0.3s ease, padding-bottom 0.3s ease, padding-top 0.3s ease;
}

.zem-header.scrolled {
    background-color: #3B312CE5;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding-bottom: 20px;
    padding-top: 20px;
}

/* Header forzado como scrolled (ej: páginas de Legales) */
body.header-is-scrolled .zem-header {
    position: relative;
    /* Para que deje de ser fixed (fijo) y haga scroll con la página */
    background-color: #3B312CE5;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding-bottom: 20px;
    padding-top: 20px;
}

.zem-header__wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: start;
    gap: 20px;
    max-width: 1920px;
    margin: 0 auto;
}

.zem-header.scrolled .zem-header__logo img,
body.header-is-scrolled .zem-header__logo img {
    height: 60px;
}

.zem-header__logo svg {
    height: 145px;
    width: auto;
    display: block;
    transition: height 0.3s ease;
}

@media (min-width: 769px) {

    .zem-header.scrolled .zem-header__logo svg,
    body.header-is-scrolled .zem-header__logo svg {
        height: 100px;
    }
}

/* Columna 1: Toggle Button */
.zem-header__col--left {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 45px;
}

.menu-toggle {
    position: relative;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: none !important;
    height: 100%;
    justify-content: center;
}

.menu-toggle:hover {
    background: none !important;
    border-radius: 0 !important;
}

.menu-toggle:focus {
    outline: none;
    box-shadow: none !important;
    background: none !important;
}

.menu-toggle__line {
    display: block;
    width: 100%;
    height: 1px;
    background-color: white;
    transition: all 0.3s ease;
}

.menu-toggle:hover .menu-toggle__line {
    background-color: white;
}

/* Hover: las líneas se acortan a la mitad desde el centro */
.menu-toggle__line {
    transform-origin: center;
}

.menu-toggle:hover .menu-toggle__line {
    transform: scaleX(0.5);
}

.menu-toggle__text {
    display: block;
    text-align: center;
    color: white;
    font-family: "Inter", sans-serif !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Columna 2: Logo */
.zem-header__col--center {
    display: flex;
    justify-content: center;
    align-items: stretch;
}

.zem-header__logo {
    display: block;
    transition: opacity 0.3s ease;
}

.zem-header__logo:hover {
    opacity: 0.8;
}

.zem-header__logo img {
    height: 60px;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

/* Columna 3: Selector de Idiomas + Right Menu */
.zem-header__col--right {
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    gap: 20px;
}

/* Language Selector Dropdown */
.language-selector-dropdown {
    position: relative;
    display: inline-flex;
    flex-direction: column;
}

.language-selector-dropdown__button {
    background: none !important;
    border: none !important;
    padding: 10px 20px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-radius: 0 !important;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: none !important;
    height: 100%;
    width: 100%;
}

.language-selector-dropdown__button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 0 !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.language-selector-dropdown__current {
    color: white;
    font-family: "Inter", sans-serif !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.language-selector-dropdown__arrow {
    transition: transform 0.3s ease;
}

.language-selector-dropdown__button.active .language-selector-dropdown__arrow {
    transform: rotate(90deg);
}

.language-selector-dropdown__list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background-color: rgba(79, 65, 59, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    isolation: isolate;
}

.language-selector-dropdown__list::before {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: -1;
}

.language-selector-dropdown__list.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-selector-dropdown__item {
    display: block;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    font-family: "Inter", sans-serif !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.language-selector-dropdown__item:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.language-selector-dropdown__item--active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 500;
}

/* Contact Menu (texto plano, a la izquierda del botón Reserve) */
.contact-menu__list {
    display: flex;
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
    height: 100%;
}

.contact-menu__list li {
    margin: 0;
}

.contact-menu__list a {
    color: white;
    text-decoration: none;
    font-family: "Inter", sans-serif !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 20px;
    display: inline-block;
}

.contact-menu__list a:hover {
    opacity: 0.7;
}

.contact-menu__list .current-menu-item>a,
.contact-menu__list .current_page_item>a {
    font-weight: 500;
}

/* Right Menu (botón Reserve - contorno) */
.right-menu__list {
    display: flex;
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: stretch;
    height: 100%;
}

.right-menu__list li {
    margin: 0;
    display: flex;
}

.right-menu__list a {
    color: white;
    text-decoration: none;
    font-family: "Inter", sans-serif !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.85);
    padding: 20px 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 140px;
    /* Hover "apertura central": relleno blanco que nace del centro */
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: color .5s cubic-bezier(.77, 0, .18, 1);
}

.right-menu__list a::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #fff;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .5s cubic-bezier(.77, 0, .18, 1);
    z-index: -1;
}

.right-menu__list a:hover::before,
.right-menu__list a:focus-visible::before {
    transform: scaleX(1);
}

.right-menu__list a:hover,
.right-menu__list a:focus-visible {
    color: var(--chocolate);
}

/* Respeta usuarios con movimiento reducido: cambio instantáneo, sin animación */
@media (prefers-reduced-motion: reduce) {

    .right-menu__list a,
    .right-menu__list a::before {
        transition: none;
    }
}

.right-menu__list .current-menu-item>a,
.right-menu__list .current_page_item>a {
    background-color: white;
    border-color: white;
    color: var(--chocolate);
    font-weight: 500;
}

/* Barra Reserve fija: solo visible en móvil */
.reserve-bar {
    display: none;
}

/* ============================================
   MENÚ MÓVIL (se abre en todas las pantallas)
   ============================================ */

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s;
}

.mobile-menu.active {
    visibility: visible;
    opacity: 1;
}

.mobile-menu__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.mobile-menu__content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 500px;
    height: 100%;
    background-color: rgba(255, 255, 255, 1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

@media (min-width: 769px) {
    .mobile-menu.active .mobile-menu__content {
        padding-left: 20px;
    }
}



.mobile-menu.active .mobile-menu__content {
    transform: translateX(0);
}

.mobile-menu__header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 45px 40px 40px 25px;
    border-bottom: none;
    min-height: 45px;
}

@media (max-width: 768px) {
    .mobile-menu__header {
        padding-top: 40px;
        padding-left: 30px;
    }
}

.mobile-menu__logo {
    display: none;
}

.mobile-menu__logo img,
.mobile-menu__logo svg {
    width: 100%;
    height: auto;
}

.mobile-menu__close {
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 10px 20px !important;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: none !important;
    height: 100%;
    width: 55px;
}

@media (max-width: 768px) {
    .mobile-menu__close {
        padding: 12px !important;
        width: auto;
        justify-content: flex-start;
    }
}

.mobile-menu__close:hover {
    background: rgba(79, 65, 59, 0.1) !important;
    border-radius: 0 !important;
}

.mobile-menu__close:focus {
    outline: none;
    box-shadow: none !important;
    background: none !important;
}

.mobile-menu__close svg {
    width: 14px;
    height: 17px;
}

.mobile-menu__close svg path {
    fill: #4F413B;
}

.mobile-menu__nav {
    flex: 1;
    padding: 0 60px 30px 40px;
    position: relative;
    overflow: hidden;
}

.mobile-menu__language-list {
    display: none;
    list-style: none;
    margin: 0;
    gap: 0
}

.mobile-menu__language-list li a.active {
    opacity: 1;
    font-weight: 400;
}

@media (max-width: 1024px) {
    .mobile-menu__language-list {
        display: flex;
    }
}

@media (max-width: 768px) {
    .mobile-menu__nav {
        padding-left: 40px;
        padding-right: 40px;
    }
}

.mobile-menu__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.mobile-menu__list li {
    margin-bottom: 0;
    width: 100%;
}

.mobile-menu__list a {
    color: #3B312C;
    text-decoration: none;
    font-family: "Inter", sans-serif !important;
    font-size: 24px;
    font-weight: 300;
    text-transform: none;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

/* Flechas de navegación para items con submenú */
.mobile-menu__list .menu-item-has-children>a::after {
    content: '';
    width: 9px;
    height: 15px;
    background-image: url("data:image/svg+xml,%3Csvg width='11' height='16' viewBox='0 0 11 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.320069 15.3841L9.32007 7.88411L0.320069 0.38411' stroke='%233B312C'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    margin-left: 10px;
}

/* Ocultar flecha en items con hijos dentro de nivel 1 */
.mobile-menu__list .sub-menu .menu-item-has-children>a::after {
    display: none;
}

/* Submenús - ocultos por defecto */
.mobile-menu__list .sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 500px;
    height: 100vh;
    background-color: rgba(255, 255, 255, 1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 10;
}

.mobile-menu__list .sub-menu.active {
    transform: translateX(0);
}

.mobile-menu__list .sub-menu {
    display: flex;
    flex-direction: column;
    padding-left: 25px;
}

.mobile-menu__list .sub-menu li {
    margin-bottom: 0;
    width: 100%;
}

/* Título del submenú */
.mobile-menu__submenu-title {
    color: #4F413B;
    text-decoration: none;
    font-family: "Inter", sans-serif !important;
    font-size: 24px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 30px 10px 30px;
    transition: opacity 0.3s ease;
    margin: 0;
}

.mobile-menu__submenu-title a {
    color: inherit;
    text-decoration: none;
    font: inherit;
    letter-spacing: inherit;
    text-transform: uppercase !important;
    margin-bottom: 0 !important;
}

.mobile-menu__list .sub-menu a {
    font-family: "Inter", sans-serif !important;
    font-size: 24px;
    text-transform: none;
    font-weight: 300;
    padding-top: 5px;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

/* Idioma activo dentro del submenú "Idiomas" */
.mobile-menu__list .sub-menu a.active {
    font-weight: 500;
}

/* ========================================
   EFECTO HOVER EN ENLACES DEL MENÚ MÓVIL
   Para desactivar: comenta todo este bloque
   ======================================== */
.mobile-menu__list a {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu__list a:hover,
.mobile-menu__list a:active {
    opacity: 0.6;
    transform: translateX(5px);
}

.mobile-menu__list .sub-menu a:hover,
.mobile-menu__list .sub-menu a:active {
    opacity: 0.6;
    transform: translateX(8px);
}

/* ======================================== */

.mobile-menu__list .sub-menu>li {
    padding: 0 30px;
}

/* Sub-sub-menú nivel 2: mostrar inline debajo del padre */
.mobile-menu__list .sub-menu .sub-menu {
    display: block !important;
    position: static !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    padding-left: 10px !important;
    background: none !important;
    box-shadow: none !important;
    overflow-y: visible !important;
}

/* Botón de volver en submenús */
.mobile-menu__back {
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 10px 20px !important;
    margin: 40px 0 30px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: none !important;
    min-height: 45px;
    width: 55px;
}

@media (max-width: 768px) {
    .mobile-menu__back {
        margin-top: 20px;
        padding: 10px;
        width: 50px;
        justify-content: flex-start;
        margin-left: 10px;
        padding: 12px !important;
    }
}

.mobile-menu__back:hover {
    background: rgba(79, 65, 59, 0.1) !important;
    border-radius: 0 !important;
}

.mobile-menu__back:focus {
    outline: none;
    box-shadow: none !important;
    background: none !important;
}

.mobile-menu__back svg {
    width: 11px;
    height: 17px;
}

.mobile-menu__footer {
    padding: 30px;
    border-top: none;
}

.mobile-menu__social {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.mobile-menu__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    transition: opacity 0.3s ease;
}

.mobile-menu__social a:hover {
    opacity: 0.7;
}

.mobile-menu__social svg {
    width: 20px;
    height: 20px;
}

.mobile-menu__social svg path {
    fill: #4F413B;
}

/* Prevenir scroll del body cuando el menú está abierto */
body.mobile-menu-open {
    overflow: hidden;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .zem-header {
        padding: 30px 30px 15px 30px;
    }

    .zem-header__wrapper {
        grid-template-columns: 80px 1fr 80px;
    }

    .zem-header__logo {
        max-width: 150px;
    }
}

@media (max-width: 1199px) {
    .zem-header {
        padding: 15px 20px;
    }

    /* Evitar que el scroll agrande el header en móvil */
    .zem-header.scrolled {
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .zem-header__wrapper {
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }

    .zem-header__col--left {
        align-items: center;
    }

    .zem-header__col--center {
        justify-content: center;
        padding-right: 0;
    }

    /* En móvil la columna derecha queda visible solo para el menú Contact */
    .zem-header__col--right {
        display: flex;
        justify-content: flex-end;
    }

    .zem-header__logo {
        max-width: none;
    }

    .zem-header__logo img {
        height: 40px;
    }

    .zem-header__logo svg {
        height: 80px;
    }

    /* Logo siempre del mismo tamaño (no se agranda/achica al hacer scroll) */
    .zem-header.scrolled .zem-header__logo img {
        height: 40px;
    }



    .language-selector-dropdown,
    .right-menu {
        display: none;
    }

    /* Botón Reserve como barra fija full-width en móvil (fuera del header) */
    .reserve-bar {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        background-color: #4F413B;
        padding: 14px 20px;
        transform: translateY(0);
        opacity: 1;
        transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
    }

    /* Oculto mientras se hace scroll (se desliza hacia abajo) */
    .reserve-bar.reserve-hidden {
        transform: translateY(120%);
        opacity: 0;
        pointer-events: none;
    }

    .reserve-bar__list {
        display: flex;
        justify-content: center;
        gap: 0;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .reserve-bar__list li {
        margin: 0;
        width: 100%;
    }

    .reserve-bar__list a {
        display: block;
        text-align: center;
        color: white;
        text-decoration: none;
        font-family: "Inter", sans-serif !important;
        font-size: 10px;
        font-weight: 400;
        line-height: 1;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        width: 100%;
        padding: 6px 0;
        transition: opacity 0.3s ease;
    }

    .reserve-bar__list a:hover {
        opacity: 0.8;
    }

    /* WhatsApp: sube con delicadeza para quedar justo arriba de la barra Reserve */
    #whatsapp-chat {
        transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reserve-bar:not(.reserve-hidden) ~ #whatsapp-chat {
        transform: translateY(-66px);
    }

    /* Menú Contact: compacto en móvil */
    .contact-menu__list {
        gap: 0;
    }

    .contact-menu__list a {
        padding: 10px 0;
        font-size: 14px;
    }

    .mobile-menu__content,
    .mobile-menu__list .sub-menu {
        max-width: 100%;
    }

    .mobile-menu__list .sub-menu {
        padding-left: 20px;
    }

    .mobile-menu__list .sub-menu>li,
    .mobile-menu__submenu-title {
        padding-left: 20px;
    }

    .menu-toggle__text {
        font-size: 10px;
    }

    .contact-menu__list a {
        font-size: 10px;
    }

    .mobile-menu__list .sub-menu.menu-level-1 {
        padding-left: 20px;
        padding-top: 20px;
    }
}

@media (max-width: 480px) {
    .zem-header {
        padding: 20px;
    }

    /* Evitar que el scroll agrande el header en pantallas pequeñas */
    .zem-header.scrolled {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .zem-header__logo {
        max-width: 100px;
    }
}

/* Elementor Editor */
.elementor-editor-active .zem-header {
    position: relative !important;
}