/* =====================
   MENÚ PRINCIPAL
===================== */
.m-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-direction: row;
    flex-wrap: nowrap;
    /* 🆕 evita salto de línea */
}

.m-menu li {
    flex-shrink: 0;
    flex-direction: row;
    flex-wrap: nowrap;
    /* 🆕 evita salto de línea */
}

.m-menu li {
    flex-shrink: 0;
    flex-direction: row;
    flex-wrap: nowrap;
    /* 🆕 evita salto de línea */
}

.m-menu li {
    flex-shrink: 0;
}

.m-menu li a.menu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: "Rethink Sans", sans-serif !important;
    font-size: 16px;
    font-weight: 500;
    color: #15284b;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-align: left;
    white-space: nowrap;
    /* 🆕 mantiene en una sola línea */
}

/* Hover efecto */
.m-menu li a.menu-link.hovered,
.m-menu li a.menu-link:hover {
    color: #f26600;
    background-color: #f2660022;
}

/* Ítem activo */
.m-menu .current-menu-item a.menu-link {
    background-color: #e56700;
    color: #ffffff;
}

/* Íconos SVG inactivos */
.menu-icon {
    display: inline-flex;
}

.menu-label {
    fill: #a1a9b7;
}

a.menu-link .menu-icon.rotate-bottom {
    rotate: 90deg;
}

.menu-icon svg {
    width: 16px;
    height: 16px;
    fill: #a1a9b7;
    transition: fill 0.3s ease;
}

/* Ícono blanco en ítem activo */
.m-menu li a.menu-link svg * {
    fill: #15284b;
    transition: all 0.4s ease;
}

.m-menu .current-menu-item a.menu-link .menu-icon svg * {
    fill: #ffffff;
}

.m-menu li a.menu-link.hovered svg *,
.m-menu li a.menu-link:hover svg *,
.m-menu .current-menu-item:hover a.menu-link .menu-icon svg * {
    fill: #f26600 !important;
}

/* =====================
   HEADER GENERAL
===================== */
.header-wrapper {
	background: white;
    position: fixed;
    top: var(--anuario-admin-bar-height);
    left: 0;
    width: 100%;
    z-index: 10;
}

.header-wrapper.scrolled {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.site-header {
    align-items: center;
    background: white;
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    position: relative;
    transition: padding 0.3s ease;
    width: 100%;
    z-index: 10;
}

.header-wrapper.scrolled .site-header {
    padding: 5px 0;
}

.logo-container {
    flex-shrink: 0;
}

.logo-container img.custom-logo {
    transition: height 0.3s ease;
    height: 72px;
}

.header-wrapper.scrolled .logo-container img.custom-logo {
    height: 55px;
}

.main-nav {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    /* 🆕 alineado a la izquierda */
    overflow-x: auto;
    /* 🆕 para evitar desbordes si hay muchos ítems */
}

/* =====================
   BOTÓN MENÚ (Hamburguesa)
===================== */
.btn-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-menu {
    width: 28px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger-menu span,
.hamburger-menu::before,
.hamburger-menu::after {
    content: "";
    display: block;
    width: 100%;
    height: 3px;
    background-color: #15284b;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: relative;
}

.hamburger-menu::before {
    position: absolute;
    top: 0;
}

.hamburger-menu::after {
    position: absolute;
    bottom: 0;
}

/* Animación cuando está activo */
.hamburger-menu.active span {
    background-color: transparent;
}

.hamburger-menu.active::before {
    transform: rotate(45deg);
    top: 8px;
}

.hamburger-menu.active::after {
    transform: rotate(-45deg);
    bottom: 8px;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 1150px) {
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        background: white;
        width: 80%;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        /* flex-direction: column; */
        align-items: flex-start;
        padding: 24px;
        box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .m-menu {
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    .btn-menu {
        display: block;
    }

    .site-header {
        justify-content: space-between;
    }

    .m-menu li {
        width: 100%;
    }

    .m-menu li a.menu-link {
        width: 100%;
    }
}

.hamburger-menu {
    width: 28px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger-menu span,
.hamburger-menu::before,
.hamburger-menu::after {
    content: "";
    display: block;
    width: 100%;
    height: 3px;
    background-color: #15284b;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: relative;
}

.hamburger-menu::before {
    position: absolute;
    top: 0;
}

.hamburger-menu::after {
    position: absolute;
    bottom: 0;
}

/* Animación cuando está activo */
.hamburger-menu.active span {
    background-color: transparent;
}

.hamburger-menu.active::before {
    transform: rotate(45deg);
    top: 8px;
}

.hamburger-menu.active::after {
    transform: rotate(-45deg);
    bottom: 8px;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 1150px) {
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        background: white;
        width: 80%;
        height: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        /* flex-direction: column; */
        align-items: flex-start;
        padding: 24px;
        box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .m-menu {
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    .btn-menu {
        display: block;
    }

    .site-header {
        justify-content: space-between;
    }

    .site-header {
        padding: 16px;
    }

    .header-wrapper.scrolled .site-header {
        padding: 8px;
    }

    .m-menu li {
        width: 100%;
    }

    .m-menu li a.menu-link {
        width: 100%;
    }
}
