/* Header Glass Effect - Base */
.glass-header {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-radius: 90px;
    padding: 15px 30px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
    height: 80px;
    display: flex;
    align-items: flex-start;
    box-sizing: border-box;
}

.glass-header:hover:not(.expanded) {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Header Container */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    height: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== ESTADO COMPACTO ===== */
.glass-header.compact-mode:not(.expanded) {
    padding: 8px 25px;
    top: 50px;
    width: 70%;
    max-width: 800px;
    height: 60px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px) saturate(188%);
    -webkit-backdrop-filter: blur(18px) saturate(188%);
}

.glass-header.compact-mode:not(.expanded) .header-container {
    max-width: 800px;
    width: 100%;
    justify-content: space-between;
    height: 44px;
}

.glass-header.compact-mode:not(.expanded) .logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Logo */
.logo {
    position: relative;
    flex-shrink: 0;
    z-index: 10002;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-img {
    width: 90px;
    height: auto;
    object-fit: contain;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 1;
    filter: blur(0);
}

.logo-img.changing {
    opacity: 0;
    filter: blur(5px);
}

.logo-img:hover {
    transform: scale(1.05);
}

/* ===== BOTÓN HAMBURGUESA ===== */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 6px;
    z-index: 10001;
    transition: all 0.3s ease;
    position: relative;
    outline: none;
}

.menu-toggle span {
    display: block;
    width: 30px;
    height: 2px;
    background: #ffffff;
    transition: all 0.3s ease;
    border-radius: 2px;
    position: relative;
}

.menu-toggle:hover {
    box-shadow: none;
    transform: scale(1.1);
}

.menu-toggle:hover span {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(255, 255, 255, 0.5);
}

/* ===== MENÚ EXPANDIDO ===== */
.glass-header.expanded {
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    height: 92vh;
    max-width: 99vw;
    border-radius: 30px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    top: 4vh;
}

.glass-header.expanded .header-container {
    height: 100%;
    flex-direction: column;
    justify-content: flex-start;
    max-width: none;
    padding-top: 0;
    width: 100%;
    flex: 1;
}

.glass-header.expanded .logo {
    position: absolute;
    top: 30px;
    left: 30px;
}

.glass-header.expanded .logo-img {
    width: 90px;
    height: auto;
}

.glass-header.expanded .menu-toggle {
    position: absolute;
    top: 30px;
    right: 30px;
}

.glass-header.expanded .menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
    width: 24px;
}

.glass-header.expanded .menu-toggle span:nth-child(2) {
    opacity: 0;
    width: 0;
}

.glass-header.expanded .menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
    width: 24px;
}

/* Grid del Menú Expandido */
.menu-grid {
    display: none;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
    width: 100%;
    flex: 1;
    margin-top: 80px;
    height: auto;
}

.glass-header.expanded .menu-grid {
    display: grid;
    animation: fadeInGrid 0.8s ease-out forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

@keyframes fadeInGrid {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== CONTENEDORES DEL MENÚ ===== */
.menu-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 20px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 400;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-align: center;
    padding: 20px;
    width: 100%;
    height: 100%;
    min-height: 0;
    word-wrap: break-word;
    line-height: 1.1;
    font-size: clamp(3rem, 6vw, 5rem);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.005);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    z-index: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .menu-grid {
        gap: 10px;
    }

    .menu-item {
        font-size: clamp(2.5rem, 5vw, 4rem);
    }
}

@media (max-width: 768px) {
    .glass-header {
        width: 90%;
        padding: 12px 20px;
        height: 70px;
        top: 5%;
    }

    .glass-header.expanded {
        width: 92%;
        height: 92vh;
        border-radius: 20px;
        padding: 20px;
        top: 4vh;
    }

    .glass-header.expanded .logo {
        top: 20px;
        left: 20px;
    }

    .glass-header.expanded .menu-toggle {
        top: 20px;
        right: 20px;
    }

    .menu-grid {
        gap: 8px;
        margin-top: 70px;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
    }

    .menu-item {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .menu-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        gap: 6px;
    }

    .menu-item {
        font-size: 2rem;
    }
}

/* ===== SECCIÓN GLASS (STATIC) ===== */
.glass-section-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    /* Altura fija, sin scroll extra */
    background: #111;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Contenedor Cristal Principal */
.glass-main-container {
    position: relative;
    width: 90vw;
    height: 80vh;
    max-width: 1600px;
    border-radius: 40px;
    z-index: 20;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
    border: none;
    overflow: hidden;
    /* Importante para recortar el video */
}

/* Wrapper del Video dentro del cristal */
.glass-bg-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Al fondo del contenedor */
}

.glass-bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Capa de Efecto Glass sobre el video */
.glass-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Encima del video */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    transition: background 3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estados de Degradado aplicados al OVERLAY */
.glass-main-container.gradient-left .glass-overlay {
    background: linear-gradient(90deg, rgba(59, 80, 234, 0.4) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px) saturate(150%);
}

.glass-main-container.gradient-right .glass-overlay {
    background: linear-gradient(to left, rgba(255, 109, 109, 0.4) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px) saturate(150%);
}

/* Logos Superiores */
.glass-logo-trigger {
    position: absolute;
    top: 25px;
    width: 60px;
    height: auto;
    cursor: pointer;
    z-index: 30;
    /* Encima del overlay */
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.glass-logo-trigger:hover {
    transform: scale(1.1);
}

.glass-logo-trigger.logo-left {
    left: 25px;
}

.glass-logo-trigger.logo-right {
    right: 25px;
}

/* Paneles de Contenido */
.content-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 10%;
    box-sizing: border-box;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 30;
    /* Encima del overlay */
}

.content-panel.active {
    opacity: 1;
    pointer-events: all;
}

/* Panel Izquierdo */
.panel-left-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    transform: translateX(-50px);
    transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.content-panel.active .panel-left-content {
    transform: translateX(0);
}

.text-block-left {
    text-align: left;
    width: 40%;
}

.video-block-right {
    width: 55%;
    height: 55vh;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    background: #000;
}

.panel-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Panel Derecho */
.panel-right-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-direction: row-reverse;
    transform: translateX(50px);
    transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.content-panel.active .panel-right-content {
    transform: translateX(0);
}

.text-block-right {
    text-align: right;
    width: 40%;
}

.video-block-left {
    width: 55%;
    height: 55vh;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    background: #000;
}

.glass-title {
    font-size: clamp(2rem, 4vw, 4rem);
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.1;
}

.glass-p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .glass-main-container {
        width: 95vw;
        height: 70vh;
        border-radius: 20px;
    }

    .glass-logo-trigger {
        width: 100px;
        top: 20px;
    }

    .glass-logo-trigger.logo-left {
        left: 20px;
    }

    .glass-logo-trigger.logo-right {
        right: 20px;
    }

    .panel-left-content,
    .panel-right-content {
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        text-align: center;
    }

    .panel-right-content {
        flex-direction: column;
    }

    .text-block-left,
    .text-block-right,
    .video-block-right,
    .video-block-left {
        width: 100%;
        text-align: center;
    }

    .text-block-right {
        text-align: center;
    }
}

/* === OCULTAR ELEMENTOS DEL TEMA BASE === */
header:not(.glass-header),
#masthead,
.site-header,
.elementor-location-header,
.ast-main-header-wrap,
#header {
    display: none !important;
}