/* =========================================================
   XenonPC Menu Mobile PRO – Estilos
   ========================================================= */

/* ── Variables ── */
:root {
    --xenon-accent:   #68d2da;
    --xenon-dark:     #111111;
    --xenon-white:    #ffffff;
    --xenon-gray:     #f4f4f4;
    --xenon-border:   #e8e8e8;
    --xenon-text:     #222222;
    --xenon-muted:    #666666;
    --xenon-radius:   12px;
    --xenon-shadow:   0 8px 32px rgba(0,0,0,0.18);
    --xenon-drawer-w: 320px;
    --xenon-transition: 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Botón hamburguesa ── */
.xenon-mobile-widget {
    display: inline-flex;
    align-items: center;
    
}

.xenon-burger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: var(--xenon-dark);
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background var(--xenon-transition);
    -webkit-tap-highlight-color: transparent;
}

.xenon-burger-btn:hover,
.xenon-burger-btn:focus {
    background: var(--xenon-accent);
    outline: none;
}

/* ── Overlay ── */
.xenon-mobile-overlay {
    position: fixed;
    inset: 0;
    background: var(--xenon-accent);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--xenon-transition);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.xenon-mobile-overlay.is-visible {
    opacity: 1;
    pointer-events: all;
}

/* ── Drawer ── */
.xenon-mobile-drawer {
    position: fixed;
    top: 0 !important; /* Forzamos el inicio al borde superior absoluto */
    right: -100%;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Altura dinámica para móviles */
    background: #fff;
    z-index: 9999;
    transition: right 0.3s ease;
    display: none;
    margin: 0 !important; /* Eliminamos posibles márgenes heredados */
}

.xenon-mobile-drawer.is-open {
    display: flex;
    right: 0;
    flex-direction: column;}

/* ── Cabecera del drawer ── */
.xenon-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: var(--xenon-dark);
    flex-shrink: 0;
    border-bottom: 3px solid var(--xenon-accent);
}

.xenon-drawer-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.xenon-drawer-brand {
    color: var(--xenon-white);
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.xenon-drawer-close {
    background: transparent;
    border: none;
    color: var(--xenon-white);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--xenon-transition), background var(--xenon-transition);
    -webkit-tap-highlight-color: transparent;
}

.xenon-drawer-close:hover,
.xenon-drawer-close:focus {
    color: var(--xenon-accent);
    background: rgba(104, 210, 218, 0.12);
    outline: none;
}

/* ── Cuerpo del drawer (scroll) ── */
.xenon-drawer-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

/* scrollbar discreta */
.xenon-drawer-body::-webkit-scrollbar { width: 4px; }
.xenon-drawer-body::-webkit-scrollbar-track { background: transparent; }
.xenon-drawer-body::-webkit-scrollbar-thumb { background: var(--xenon-border); border-radius: 4px; }

/* ── Pie del drawer ── */
.xenon-drawer-footer {
    flex-shrink: 0;
    padding: 14px 16px;
    border-top: 1px solid var(--xenon-border);
    background: var(--xenon-white);
    display: flex;
    justify-content: center;
}

.xenon-btn-ver-mas {
    background: var(--xenon-dark);
    color: var(--xenon-white);
    padding: 10px 28px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    font-family: 'Segoe UI', Arial, sans-serif;
    transition: background var(--xenon-transition);
    display: inline-block;
    -webkit-tap-highlight-color: transparent;
}

.xenon-btn-ver-mas:hover {
    background: var(--xenon-accent);
    color: var(--xenon-dark);
}

/* ── Noticias móvil ── */
.xenon-mobile-news {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.xenon-news-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.xenon-news-thumb {
    width: 62px;
    height: 62px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    display: block;
}

.xenon-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.xenon-news-content {
    flex: 1;
    min-width: 0;
}

.xenon-news-title {
    display: block;
    font-weight: 700;
    font-size: 20px;
    color: #0063cc;
    text-decoration: none;
    line-height: 1.35;
    margin-bottom: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.xenon-news-excerpt {
    font-size: 12px;
    color: var(--xenon-muted);
    line-height: 1.4;
}

/* ── Grid de categorías móvil trajetas tambien ── */
.xenon-mobile-grid {
    display: grid;
    gap: 10px;
    width: 100%;
}

.xenon-mobile-cat-card {
    border: 1.5px solid var(--xenon-border);
    border-radius: var(--xenon-radius);
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
    background: var(--xenon-white);
    height: 10vh;
}

.xenon-mobile-cat-card:hover,
.xenon-mobile-cat-card:focus-within {
    border-color: var(--xenon-accent);
    box-shadow: 0 4px 14px rgba(104, 210, 218, 0.18);
    transform: translateY(-2px);
}

.xenon-mobile-cat-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 10px 8px;
    height: 100%;
}

.xenon-mobile-cat-header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    width: 100%;
    overflow: hidden;
}

.xenon-mobile-logo img {

    width: 90%;
    height: auto;
    object-fit: contain;
}

.xenon-mobile-cat-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--xenon-text);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    padding: 0 4px;
}

/* ── Separador y fila de iconos inferior ── */
.xenon-mobile-divider {
    border: 0;
    border-top: 1px solid var(--xenon-border);
    margin: 14px 0 10px;
}

.xenon-mobile-icon-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding-bottom: 4px;
}

.xenon-mobile-icon-item a {
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: var(--xenon-text);
    font-weight: 600;
    font-size: 20px;
    font-family: 'Segoe UI', Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.xenon-mobile-icon-item img {
    width: 26px;
    height: auto;
    object-fit: contain;
}

.xenon-mobile-icon-item:hover span { color: var(--xenon-accent); }

/* Navegación horizontal de pestañas */
.x-nav-mobile {
    display: flex;
    overflow-x: auto;
    background: #fff;
    border-bottom: 2px solid var(--xenon-accent);
    padding: 0 10px;
    gap: 15px;
    scrollbar-width: none; /* Ocultar scroll en Firefox */
}
.x-nav-mobile::-webkit-scrollbar { display: none; } /* Ocultar scroll en Chrome */

.x-btn-mob {
    padding: 12px 5px;
    border: none;
    background: none;
    font-weight: 700;
    font-size: 20px;
    color: #888;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.x-btn-mob.active {
    background-color: #111111;
    color: white;
    border-bottom-color: var(--xenon-accent);
}

/* Paneles de contenido */
.x-panel-mob {
    display: none;
    padding: 15px;
    animation: fadeIn 0.3s ease;
}

.x-panel-mob.active {
    display: block;
}

/* Cabecera pegajosa para que las tabs no desaparezcan al hacer scroll */
.xenon-drawer-header-sticky {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ocultamos todos los paneles por defecto */
.x-panel-mob {
    display: none; 
    opacity: 0;
    visibility: hidden;
    height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

/* Solo mostramos el que tenga la clase .active */
.x-panel-mob.active {
    display: block;
    opacity: 1;
    visibility: visible;
    height: auto;
    overflow: visible;
}

.xenon-burger-line {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--xenon-white);
    border-radius: 2px;
    transition: transform var(--xenon-transition), opacity var(--xenon-transition);
    transform-origin: center;
}

/* Animación hamburguesa → X */
.xenon-burger-btn.is-open .xenon-burger-line:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.xenon-burger-btn.is-open .xenon-burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.xenon-burger-btn.is-open .xenon-burger-line:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* El botón ahora siempre es visible y fijo en su sitio */
.xenon-burger-btn {
    position: fixed;
    top: 10px;    /* Ajusta según la altura de tu header */
    left: 15px;   /* A la izquierda */
    z-index: 10005; /* Por encima de TODO (incluso del drawer) */
    background: var(--xenon-accent);
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    border-radius: 8px;
}

/* El contenedor de las pestañas dentro del menú */
.x-nav-container-flex {
    display: flex;
    align-items: center;
    background: #fff;
    height: 60px; /* Altura fija para alinear con el botón */
}

/* El spacer hace que la primera pestaña (News) empiece después del botón */
.x-burger-spacer {
    width: 60px; /* El mismo ancho que ocupa el botón aproximadamente */
    flex-shrink: 0;
}

.x-nav-mobile {
    flex-grow: 1;
    overflow-x: auto;
    display: flex;
}

/* Animación del icono (opcional para que se vea la X al abrir) */
.xenon-burger-btn.is-open .xenon-burger-line:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.xenon-burger-btn.is-open .xenon-burger-line:nth-child(2) {
    opacity: 0;
}
.xenon-burger-btn.is-open .xenon-burger-line:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

.xenon-burger-btn {
    position: fixed;
    top: 25px;    /* Aumenta este valor para darle más margen superior */
    left: 15px;   /* Mantenlo a la izquierda */
    z-index: 10005; 
    background: var(--xenon-accent);
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    border-radius: 8px;
}
/* FIX: botón cerrar drawer */
.xenon-drawer-close {
    position: absolute;
    top: 28px;
    right: 15px;
    z-index: 10006;
    background: transparent;
    border: none;
    color: var(--xenon-text);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    -webkit-tap-highlight-color: transparent;
}
.xenon-drawer-close:hover,
.xenon-drawer-close:focus {
    color: var(--xenon-accent);
    outline: none;
}

/* =========================================================
   FIX PARA EL EDITOR DE ELEMENTOR
   Oculta el menú desplegable y el overlay mientras editamos
   para que no interfieran con la interfaz.
   ========================================================= */

.elementor-editor-active .xenon-mobile-drawer,
.elementor-editor-active .xenon-mobile-overlay {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.elementor-editor-active .xenon-burger-btn {
    position: relative !important; /* En el editor, que no flote */
    top: 0 !important;
    left: 0 !important;
    z-index: 1 !important;
}

/* Opcional: Si quieres ver un mensaje o espacio en el editor */
.elementor-editor-active .xenon-mobile-widget::after {
    content: "Menú Móvil XenonPC (Oculto en Editor)";
    font-size: 11px;
    color: #aaa;
    display: block;
    margin-top: 5px;
}