/* Estilos para el menú hamburguesa */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 9010;
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Animación para el menú hamburguesa */
.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Estilos para el menú móvil */
.mobile-menu {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: clamp(190px, 67vw, 250px);
    max-width: calc(100vw - 56px);
    height: 100vh;
    height: 100dvh;
    background-color: #fff;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 9000;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.show {
    display: flex !important;
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 8990;
    display: block;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.mobile-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu ul {
    list-style: none;
    padding: 20px;
    margin: 0;
}

.mobile-menu ul li {
    margin-bottom: 15px;
}

.mobile-menu ul li a {
    text-decoration: none;
    color: #333;
    font-size: 18px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.mobile-menu ul li a:hover {
    color: #007bff;
}

/* Responsividad */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .menu {
        display: none;
    }

    body.menu-open .header {
        z-index: 8980;
    }
}
