@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
:root {

    --azul-principal: #004171;
    --azul-secundario1: #0d5575;
    --azul-secundario2: #297ba2;
    --azul-secundario3: #389eb0;
    --color-destacado: #FF9154;
    --gris-fondo: #f9f9f9;
    --gris-borde: #e5e5e5;
    --texto: #222222;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--texto);
    background: #ffffff;
}

/* =========================
   CONTENEDOR
========================= */
.header-container {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
}

/* =========================
   TOP HEADER
========================= */
.top-header {
    background: var(--gris-fondo);
    padding: 0;
    border-bottom: 1px solid var(--azul-secundario3);
    position: relative;
    z-index: 1001;
}

.top-header .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* =========================
   LOGO
========================= */
.custom-logo {
    max-height: 72px;
    width: auto;
    padding: 5px;
}

/* =========================
   TITULO
========================= */
.header-container {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    align-items: center;
    gap: 20px;
}

.header-logo {
    justify-self: start;
}

.header-page-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--azul-principal);
}

.header-social {
    justify-self: end;
    display: flex;
    gap: 12px;
}

/* =========================
   REDES SOCIALES
========================= */
.header-social {
    display: flex;
    align-items: center;
    gap: 14px;
    overflow: visible;
    z-index: 2000;
}

.header-social a {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--azul-principal);
    color: #ffffff;
    text-decoration: none;
    font-size: 17px;
    transition: all 0.3s ease;
}

.header-social a:hover {
    background: var(--azul-secundario2);
    transform: translateY(-2px);
    z-index: 9999;
}

/* TOOLTIP */
.header-social a::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 16px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.92);
    color: #ffffff;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    pointer-events: none;
    z-index: 99999;
}

/* FLECHITA */
.header-social a::before {
    content: '';
    position: absolute;
    left: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent rgba(0,0,0,0.92) transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 99999;
}

/* HOVER */
.header-social a:hover::after,
.header-social a:hover::before {
    opacity: 1;
    visibility: visible;
}

/* =========================
   MENÚ STICKY
========================= */
.menu-sticky {
    position: relative;
    width: 100%;
    background: var(--azul-secundario1);
    border-bottom: 3px solid var(--azul-secundario3);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.menu-sticky.fixed {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
}

.menu-principal {
    display: flex;
    align-items: center;
}

.menu-lista {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    min-height: 70px;
}

.menu-lista li {
    display: inline-flex;
    align-items:flex-end;
    position: relative;
}

.menu-lista li:not(:last-child)::after {
    content: '';
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,0.25);
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.menu-lista li a {
    display: flex;
    align-items: left;
    justify-content: left;
    padding: 24px 22px;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.menu-lista li a:hover {
    color: var(--azul-secundario3);
}

.menu-lista li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 16px;
    width: 0;
    height: 2px;
    background: var(--azul-secundario3);
    transition: width 0.3s ease;
}

.menu-lista li a:hover::after {
    width: 100%;
}

.current-menu-item a::after {
    width: 100%;
}

.menu-lista .current-menu-item > a,
.menu-lista .current-menu-ancestor > a {
    color: var(--azul-secundario3);
}

.menu-lista .current-menu-item > a::after,
.menu-lista .current-menu-ancestor > a::after {
    width: 100%;
}

/* SUBMENUS*/
.menu-lista li {
    position: relative;
}

.menu-lista .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: #ffffff;
    padding: 10px 0;
    margin: 0;
    list-style: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    border-top: 3px solid var(--azul-secundario3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    justify-content: flex-start;
}

.menu-lista li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-lista .sub-menu li {
    width: 100%;
    display: block;
}

.menu-lista .sub-menu li a {
    display: block;
    width: 100%;
    padding: 14px 22px;
    color: var(--azul-principal);
    text-align: left;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.menu-lista .sub-menu li a::after {
    display: none;
}

.menu-lista .sub-menu li a:hover {
    background: rgba(0, 65, 113, 0.06);
    color: var(--color-destacado);
    padding-left: 28px;
}

.menu-lista .sub-menu .current-menu-item a {
    background: rgba(0, 65, 113, 0.05);
    color: var(--color-destacado);
}

.submenu-toggle{
    display: none;
    margin: 0;
}

/* SEGUNDO NIVEL Y MÁS */
.menu-lista .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 0;
    border-top: none;
    border-left: 3px solid var(--color-destacado);
    border-radius: 0 8px 8px 0;
    transform: translateX(10px);
}
.menu-lista .sub-menu .sub-menu li a {
    justify-content: flex-start;
    text-align: left;
}

/* Mostrar submenú anidado */
.menu-lista .sub-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Flecha para items con hijos */
.menu-lista .sub-menu .menu-item-has-children > a::before {
    content: '\f105';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: auto;
}
.menu-sticky,
.menu-wrapper,
.menu-principal {
    overflow: visible;
}
.menu-lista .sub-menu .sub-menu {
    box-shadow: 0 12px 28px rgba(0,0,0,.15);
}

/* =========================
   MENU WRAPPER
========================= */
.menu-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================
   BOTÓN HAMBURGUESA
========================= */
.menu-toggle {
    display: none;
}

.menu-close {
    display: none;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 991px) {

    .top-header .header-container {
        flex-direction: column;
        gap: 18px;
        padding: 10px;
    }

    .menu-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 70px;
    }

    /* HAMBURGUESA */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        border: none;
        border-radius: 10px;
        color: #fff;
        font-size: 22px;
        cursor: pointer;
        transition: .3s;
    }

    /* PANEL LATERAL */
    .menu-principal {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100vw;
        height: 100vh;
        background: var(--azul-principal);
        z-index: 9999;
        overflow-y: auto;
        transition: left .3s ease;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 30px 30px;
    }

    .menu-principal.active {
        left: 0;
    }
    .menu-lista li.menu-open > .sub-menu {
    max-height: 5000px;
    }

    /* BOTON CERRAR */
    .menu-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
        border: none;
        border-radius: 10px;
        color: #fff;
        font-size: 20px;
        cursor: pointer;
    }

    .menu-lista {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-height: auto;
        margin: 0;
        padding: 0;
    }

    .menu-lista li {
        width: 100%;
        position: relative;
        display: block;
    }

    .menu-lista li::after {
        display: none;
    }

    /* ENLACES NIVEL 1 */
    .menu-lista > li > a {
        display: flex;
        align-items: center;
        min-height: 56px;
        padding: 0 20px;
        color: #fff;
        text-decoration: none;
        font-size: 24px;
        font-weight: 600;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    .menu-lista > li > a::after {
        display: none;
    }

    /* ITEM ACTIVO */
    .menu-lista .current-menu-item > a,
    .menu-lista .current-menu-parent > a {
        color: var(--color-destacado);
        border-left: 4px solid var(--color-destacado);
        background: rgba(255,255,255,.05);
    }

    /* SUBMENUS */
    .menu-lista .sub-menu {
        position: relative;
        top: auto;
        left: auto;
        min-width: 100%;
        display: block;
        background: rgba(255,255,255,.03);
        border: none;
        box-shadow: none;
        margin: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transition: max-height .35s ease;
    }

    .submenu-toggle{
        display:flex;
        align-items:center;
        justify-content:center;
        position:absolute;
        top:0;
        right:0;
        width:56px;
        height:56px;
        border:none;
        background:transparent;
        color:#fff;
        cursor:pointer;
        z-index:20;
    }

    /* SEGUNDO NIVEL */
    .menu-lista .sub-menu .sub-menu {
        background: rgba(255,255,255,.05);
    }

    .menu-lista .sub-menu .sub-menu li a {
        padding-left: 55px;
    }

    /* TERCER NIVEL */
    .menu-lista .sub-menu .sub-menu .sub-menu li a {
        padding-left: 65px;
        font-size: 13px;
        color: #fff;
    }

    /* FLECHA ITEMS CON HIJOS */
    .menu-lista .menu-item-has-children > a {
        position: relative;
        padding-right: 40px;
    }

    .submenu-toggle::before{
        content:'\f107';
        font-family:"Font Awesome 6 Free";
        font-weight:900;
    }

    .menu-open > .submenu-toggle::before{
        transform:rotate(180deg);
    }

    .menu-lista .sub-menu li a {
        display: flex;
        align-items: center;
        min-height: 50px;
        padding: 20px;
        color: #fff;
        text-decoration: none;
        font-size: 20px;
        font-weight: 500;
        border-bottom: 1px solid rgba(255,255,255,.05);
        word-break: break-word;
    }

    .menu-lista .sub-menu .sub-menu,
    .menu-lista .sub-menu .sub-menu .sub-menu {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        border: none;
        border-radius: 0;
        margin: 0;
        width: 100%;
    }

    .menu-lista .menu-item-has-children > a{
        padding-right: 60px;
    }

    .menu-lista .sub-menu .menu-item-has-children > a{
        padding-right: 60px;
    }
}

   