/* Color Palette */
:root {
    --primary-blue: #e81b1c;
    --white: #FFFFFF;
    --light-gray: #e5eff6;
    --dark-gray: #333333;
    --accent-blue: #e81b1c;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
}

#mobile-menu-btn {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

/* Estilos del menú móvil */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px; /* Cambiado a derecha para mejor UX */
    width: 280px;
    height: 100vh;
    background-color: var(--primary-blue);
    z-index: 2000;
    transition: all 0.3s ease;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.mobile-menu-header .logo {
    width: 150px;
}

.mobile-menu-header .logo img {
    max-height: 40px;
    border-radius: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5em;
    cursor: pointer;
    padding: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2200;
}

.close-btn:hover {
    transform: rotate(90deg);
}

.close-btn i {
    pointer-events: none; /* Evita que el icono capture los eventos de clic */
}

/* Asegurar que el overlay funcione correctamente */
.menu-overlay {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.mobile-nav-list {
    list-style-type: none;
    padding: 20px 0;
    margin: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-item a {
    display: block;
    padding: 15px 20px;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.mobile-nav-item.active a {
    background-color: rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.mobile-nav-item a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-dropdown {
    position: relative;
}

.mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-dropdown-toggle i {
    transition: transform 0.3s ease;
}

.mobile-dropdown.active .mobile-dropdown-toggle i {
    transform: rotate(180deg);
}

.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(0, 0, 0, 0.2);
}

.mobile-dropdown.active .mobile-dropdown-menu {
    max-height: 250px;
}

.mobile-dropdown-menu li {
    list-style-type: none;
}

.mobile-dropdown-menu li a {
    padding: 12px 30px;
    font-size: 0.95em;
}

.mobile-menu-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-contact-info {
    margin-bottom: 20px;
}

.mobile-contact-info a {
    display: block;
    margin-bottom: 10px;
    color: var(--white);
    text-decoration: none;
    font-size: 0.9em;
}

.mobile-contact-info a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.mobile-social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.mobile-social-links a {
    color: var(--white);
    font-size: 1.2em;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.mobile-social-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
    }
    
    .header-top {
        display: none; /* Ocultar en móvil y mostrar en el menú móvil */
    }
    
    .header-main .container {
        padding: 10px 15px;
    }
    
    .logo img {
        max-height: 50px;
    }
}

/* Prevent scrolling when menu is open */
body.menu-open {
    overflow: hidden;
}