/* ============================================================
   Fenix Mega Menu — Estilos
   Archivo: /assets/css/megamenu.css
   ============================================================ */


/* ── 1. Panel contenedor ────────────────────────────────── */

.has-megamenu > .sub-menu.fnx-mega-panel {
    min-width: 820px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    border-top: none !important;
    overflow: hidden;
    margin-top: 18px !important;
    top: 100% !important;
}

/* Bridge hover gap */
.has-megamenu {
    position: relative;
}

.has-megamenu::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 0;
    width: 100%;
    height: 14px;
    background: transparent;
    z-index: 999;
}

/* Evita que Astra recorte el panel */
.main-header-wrap,
.main-header-bar,
.ast-primary-header-bar,
#masthead,
.main-navigation {
    overflow: visible !important;
}


/* ── 2. Layout flex principal ───────────────────────────── */

.fnx-mm-layout {
    display: flex;
    width: 100%;
    min-height: 280px;
    align-items: stretch;
}


/* ── 3. Columna izquierda (tabs nav) ────────────────────── */

.fnx-mm-left {
    flex: 1;
    min-width: 0;
    background: #ffffff;
    padding: 48px 28px;
}

/* Oculta el label VER: */
.fnx-ver-label {
    display: none;
}

/* Todos los tabs: negrita */
.fnx-tab-nav {
    display: block;
    position: relative;
    padding: 10px 12px;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    font-style: normal;
    color: #222222;
    margin-bottom: 4px;
    line-height: 1.35;
    transition: color 0.15s;
    text-decoration: none;
    border: none;
    margin-top: 0;
    background: none !important;
}

/* Hover y activo: azul, sin fondo */
.fnx-tab-nav:hover {
    color: #0066CC;
    background: none !important;
}

.fnx-tab-nav.active {
    color: #0066CC;
    background: none !important;
}

/* Flecha en tab activo: apunta izquierda, sale de columna 2 */
.fnx-tab-nav.active::after {
    content: '';
    position: absolute;
    right: -42px; /* -28px padding col1 + -14px ancho flecha */
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 14px solid #f5f5f5; /* ◀ apunta izquierda, color col2 */
    z-index: 2;
}

/* Links directos: mismo estilo, sin separador ni cursiva */
.fnx-tab-nav--direct {
    border-top: none;
    margin-top: 0;
    padding-top: 10px;
    color: #222222;
    font-style: normal;
}

.fnx-tab-nav--direct:hover {
    color: #0066CC;
    background: none !important;
}


/* ── 4. Columna central (contenido tabs) ────────────────── */

.fnx-mm-center {
    flex: 1;
    background: #f5f5f5;
    padding: 48px 44px;
    min-width: 0;
}

.fnx-tab-panel {
    display: none;
}

.fnx-tab-panel.active {
    display: block;
}

/* Bullets indentados y más grandes */
.fnx-l3-link {
    display: block;
    position: relative;
    padding-left: 22px;
    color: #0099A8;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.15s;
}

.fnx-l3-link::before {
    content: '\2022'; /* bullet • */
    position: absolute;
    left: 4px;
    top: -1px;
    font-size: 20px;
    line-height: 1.2;
    color: #0099A8;
}

.fnx-l3-link:hover {
    color: #007A87;
}

.fnx-l3-link:hover::before {
    color: #007A87;
}


/* ── 5. Columna derecha (imagen + texto) ────────────────── */

.fnx-mm-right {
    flex: 1;
    min-width: 0;
    background: #ffffff;
    padding: 48px 40px;
    border-left: 1px solid #eeeeee;
    display: flex;
    flex-direction: column;
}

/* Fondo invertido en layout simple: izq gris, der blanco */
.has-megamenu-simple > .sub-menu .fnx-mm-right {
    background: #ffffff;
    border-left: 1px solid #eeeeee;
}

/* Imagen 16:9 sin bordes redondeados */
.fnx-mm-right img {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
    border-radius: 0;
    display: block;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.fnx-mm-right h4 {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #222222 !important;
    margin: 0 0 8px !important;
    line-height: 1.3;
}

.fnx-mm-right p {
    font-size: 13px !important;
    color: #666666 !important;
    line-height: 1.6 !important;
    margin: 0 0 16px !important;
    flex: 1;
}

.fnx-mm-cta {
    display: inline-block;
    background: #0099A8;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 13px;
    text-decoration: none !important;
    transition: background 0.2s;
    align-self: flex-start;
    font-weight: 500;
}

.fnx-mm-cta:hover {
    background: #007A87;
    color: #ffffff !important;
}


/* ── 6. Layout simple (2 columnas, 66.67% del container) ── */

.fnx-mm-links {
    flex: 1;
    min-width: 0;
    background: #f5f5f5;
    padding: 48px 44px;
    border-right: 1px solid #eeeeee;
}

.fnx-l2-link {
    display: block;
    position: relative;
    padding-left: 22px;
    color: #0099A8;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.15s;
}

.fnx-l2-link::before {
    content: '\2022';
    position: absolute;
    left: 4px;
    top: -1px;
    font-size: 20px;
    line-height: 1.2;
    color: #0099A8;
}

.fnx-l2-link:hover {
    color: #007A87;
}


/* ── 7. Responsive — breakpoints Astra/Elementor ──────────
   Elementor: laptop 1366, tablet_extra 1200, tablet 1024,
              mobile_extra 880, mobile 767
   ─────────────────────────────────────────────────────── */

@media (max-width: 1200px) {
    .has-megamenu > .sub-menu.fnx-mega-panel {
        min-width: unset !important;
    }
}

@media (max-width: 1024px) {
    .fnx-mm-layout {
        flex-direction: column;
    }

    .fnx-mm-left,
    .fnx-mm-center,
    .fnx-mm-right,
    .fnx-mm-links {
        width: 100% !important;
        min-width: unset !important;
        max-width: unset !important;
        flex: none;
        border-right: none;
        border-left: none;
        border-bottom: 1px solid #eeeeee;
    }

    .fnx-tab-panel {
        display: block !important;
    }

    .fnx-tab-nav.active,
    .fnx-tab-nav:hover {
        background: none !important;
        color: #444 !important;
    }
}

@media (max-width: 880px) {
    .has-megamenu > .sub-menu.fnx-mega-panel {
        box-shadow: none !important;
        border-top: none !important;
    }
}

@media (max-width: 767px) {
    .fnx-mm-right img {
        aspect-ratio: 16 / 9;
    }
}