/*
Theme Name: Civideportes Pure Gutenberg
Author: Civi Dev
Description: Motor limpio sin estilos. Renderiza Gutenberg al 100% en pantalla.
Version: 1.0
*/

/* ==========================================================================
   1. RESETEO GLOBAL Y COMPORTAMIENTO BASE
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth; /* Hace que los botones de salto naveguen de forma suave */
}

body {
    background-color: #0f172a; /* Fondo oscuro premium global */
    color: #f1f5f9;            /* Texto claro legible por defecto */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;       /* Evita desplazamientos horizontales accidentales */
}

/* ==========================================================================
   2. TIPOGRAFÍAS Y ENCABEZADOS DE TODO EL SITIO
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #60a5fa;
}

/* ==========================================================================
   3. CONTENEDOR ESTÁNDAR PARA SECCIONES INTERNAS
   ========================================================================== */
.civi-main-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ==========================================================================
   4. VERSION UNIVERSAL: CABECERA Y MAX MEGA MENU (ESCRITORIO)
   ========================================================================== */

/* 1. Contenedor Global de la Navbar */
.civi-nav-bar {
    width: 100% !important;
    background-color: rgba(15, 23, 42, 0.85) !important; /* Fondo oscuro Slate con opacidad */
    backdrop-filter: blur(12px) !important;              /* Efecto esmerilado iOS/Glassmorphism */
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 99999 !important;
}

/* 2. Distribución y Alineación */
.civi-nav-container {
    max-width: 1300px !important;
    margin: 0 auto !important;
    padding: 12px 40px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

/* Estilo del Logotipo */
.civi-logo a {
    color: #ffffff !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    font-size: 22px !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
}

.civi-menu-wrapper {
    flex-grow: 1 !important;
    display: flex !important;
    justify-content: flex-end !important;
}

/* 3. Limpieza de Contenedores usando Clases Globales del Plugin */
.mega-menu-wrap, 
.mega-menu-wrap .mega-menu {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 4. Estilización de los Enlaces Principales */
.mega-menu-wrap .mega-menu > li.mega-menu-item > a.mega-menu-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    padding: 10px 18px !important;
    line-height: 20px !important;
    background: transparent !important;
    transition: all 0.25s ease-in-out !important;
    border-radius: 4px !important;
}

/* Hover e Ítem Activo */
.mega-menu-wrap .mega-menu > li.mega-menu-item > a.mega-menu-link:hover,
.mega-menu-wrap .mega-menu > li.mega-menu-item.mega-current-menu-item > a.mega-menu-link {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Flechas indicadoras */
.mega-menu-wrap .mega-menu > li.mega-menu-item > a.mega-menu-link .mega-indicator {
    color: rgba(255, 255, 255, 0.4) !important;
    margin-left: 6px !important;
    font-size: 11px !important;
}

/* 5. Paneles Desplegables / Submenús */
.mega-menu-wrap .mega-menu li.mega-menu-flyout ul.mega-sub-menu,
.mega-menu-wrap .mega-menu li.mega-menu-megamenu ul.mega-sub-menu {
    background-color: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
    padding: 15px !important;
}

/* Enlaces dentro de los submenús */
.mega-menu-wrap .mega-menu li.mega-menu-flyout ul.mega-sub-menu li.mega-menu-item a.mega-menu-link,
.mega-menu-wrap .mega-menu li.mega-menu-megamenu ul.mega-sub-menu li.mega-menu-item a.mega-menu-link {
    color: #94a3b8 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 8px 12px !important;
    transition: all 0.2s ease !important;
}

.mega-menu-wrap .mega-menu li.mega-menu-flyout ul.mega-sub-menu li.mega-menu-item a.mega-menu-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.03) !important;
    padding-left: 16px !important;
}

/* ==========================================================================
   5. ARQUITECTURA RESPONSIVE MÓVIL OPTIMIZADA (BREAKPOINT 959PX)
   ========================================================================== */
@media (max-width: 959px) {
    /* Cambiamos la Navbar a block para que el script calcule la altura al cerrar */
    .civi-nav-bar {
        height: auto !important;
        position: relative !important;
        display: block !important;
    }

    .civi-nav-container {
        max-width: 100% !important;
        height: auto !important;
        min-height: 70px !important;
        padding: 12px 24px !important;
        display: block !important; /* Desactivamos flexbox en móvil para permitir el colapso */
    }

    /* El logo flota a la izquierda */
    .civi-logo {
        float: left !important;
        display: flex !important;
        align-items: center !important;
        height: 45px !important;
    }

    /* El contenedor del menú limpia los flujos laterales */
    .civi-menu-wrapper {
        width: 100% !important;
        clear: both !important;
        display: block !important;
        margin-top: 10px !important;
    }

    .mega-menu-wrap {
        width: 100% !important;
        display: block !important;
    }

    /* Posicionamiento y reseteo del botón hamburguesa */
    .mega-menu-wrap .mega-menu-toggle {
        background: transparent !important;
        border: none !important;
        float: right !important; 
        margin-top: -45px !important; /* Alinea con la altura exacta del logo */
        height: 45px !important;
        line-height: 45px !important;
    }

    .mega-menu-wrap .mega-menu-toggle .mega-toggle-block-1 {
        color: #ffffff !important;
    }

    /* Bloque vertical de enlaces móviles */
    .mega-menu-wrap #mega-menu-main-menu {
        width: 100% !important;
        background-color: #0f172a !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 8px !important;
        padding: 10px !important;
        box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.5) !important;
        margin-top: 5px !important;
    }

    .mega-menu-wrap .mega-menu > li.mega-menu-item {
        width: 100% !important;
        display: block !important;
    }

    .mega-menu-wrap .mega-menu > li.mega-menu-item > a.mega-menu-link {
        color: #ffffff !important;
        width: 100% !important;
        padding: 12px 16px !important;
        box-sizing: border-box !important;
        display: block !important;
    }
}

/* ==========================================================================
   6. ARQUITECTURA DEL FOOTER PREMIUM (CSS GRID CON SOCIALS & WATERMARK)
   ========================================================================== */
.civi-footer {
    width: 100%;
    background-color: #0b1329; /* Un tono ligeramente más oscuro que el body */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 70px 0 0 0;
    margin-top: 80px;
    position: relative; /* Esencial para contener la marca de agua */
    overflow: hidden;   /* Evita que el logo gigante rompa los laterales */
}

.civi-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr; /* Rebalanceo a 4 columnas */
    gap: 40px;
    position: relative;
    z-index: 2; /* Pone los textos por encima de la marca de agua */
}

.civi-footer-col h4 {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 22px;
}

.civi-footer-logo {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #ffffff;
    margin-bottom: 15px;
}

.civi-footer-text {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
}

.civi-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.civi-footer-links li {
    margin-bottom: 12px;
}

.civi-footer-links a {
    color: #94a3b8;
    font-size: 14px;
    transition: color 0.2s ease;
}

.civi-footer-links a:hover {
    color: #ffffff;
}

/* Contenedor de Botones de Redes Sociales */
.civi-footer-socials {
    display: flex;
    gap: 12px;
}

.social-icon-btn {
    width: 42px;
    height: 42px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-icon-btn:hover {
    color: #ffffff;
    background-color: #2563eb; /* Azul corporativo en Hover */
    border-color: #3b82f6;
    transform: translateY(-3px); /* Efecto levitación suave */
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

/* LOGO GIGANTE DECORATIVO (Marca de agua) */
.civi-footer-watermark {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    user-select: none;
    pointer-events: none;
    z-index: 1;
    line-height: 0.8;
}

.civi-footer-watermark span {
    font-size: 13vw; /* Escala de forma fluida según el ancho de pantalla */
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, rgba(255, 255, 255, 0.002) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Barra de Copyright */
.civi-footer-bottom {
    max-width: 1200px;
    margin: 60px auto 0 auto;
    padding: 25px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    text-align: center;
    position: relative;
    z-index: 2;
}

.civi-footer-bottom p {
    color: #64748b;
    font-size: 13px;
}

/* Responsive del Footer */
@media (max-width: 959px) {
    .civi-footer-container {
        grid-template-columns: 1fr; /* Se apila verticalmente en móviles y tablets */
        gap: 35px;
        padding: 0 24px;
    }
    .civi-footer-bottom {
        margin-top: 40px;
        padding: 20px 24px;
    }
    .civi-footer-watermark span {
        font-size: 15vw; /* Crece un poco en móvil para mantener presencia */
    }
}