/* Estilos para PC y móvil */
/* Por defecto, ocultar elementos móviles en vista desktop */
.mobile-icons, .mobile-contact-info, .search-toggle {
    display: none;
}

/* Por defecto, mostrar elementos desktop */
.desktop-only {
    display: block;
}

/* Animación del menú hamburguesa independientemente del viewport */
.menu-toggle {
    transition: transform 0.3s;
}

.menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.menu-toggle span {
    transition: transform 0.3s, opacity 0.3s;
}

/* Estilos específicos para móvil */
@media (max-width: 768px) {
    /* Ocultar la barra superior en móviles */
    .top-bar {
        display: none;
    }
    
    /* Ocultar elementos desktop en móvil */
    .desktop-only {
        display: none !important;
    }
    
    /* Mostrar elementos móviles */
    .mobile-icons {
        display: flex;
        align-items: center;
        margin-left: auto;
        margin-right: 1rem;
    }
    
    .mobile-icons a {
        color: #222c36;
        margin-left: 1rem;
        font-size: 1.2rem;
    }
    
    .search-toggle {
        display: flex;
        background: none;
        border: none;
        cursor: pointer;
        font-size: 1.2rem;
        color: #222c36;
        padding: 0.5rem;
    }
    
    /* Mejorar header en móvil */
    .main-header {
        padding: 0.5rem 1rem;
    }
    
    .logo-nav {
        flex-direction: row;
        align-items: center;
        padding: 0;
        position: relative;
    }
    
    .logo img {
        height: 45px;
    }
    
    /* Ajustar búsqueda en móvil */
    .search-bar {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 0.5rem 1rem;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        display: none;
        z-index: 99;
    }
    
    .search-bar.open {
        display: flex;
    }
    
    /* Mejorar menú móvil */
    .nav-menu {
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        padding: 1rem;
        border-radius: 0;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .nav-menu a {
        width: 100%;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-menu a:last-child {
        border-bottom: none;
    }
    
    /* Información de contacto dentro del menú móvil */
    .mobile-contact-info {
        display: flex;
        flex-direction: column;
        margin-top: 1rem;
        padding: 1rem;
        background: #f5f5f5;
        border-radius: 8px;
    }
    
    .mobile-contact-info h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        color: #1976d2;
    }
    
    .mobile-contact-info p {
        margin: 0.3rem 0;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
    }
    
    .mobile-contact-info p i {
        margin-right: 0.5rem;
        color: #4fc3f7;
        width: 20px;
        text-align: center;
    }
    
    .mobile-social-icons {
        display: flex;
        margin-top: 0.5rem;
    }
    
    .mobile-social-icons a {
        width: auto;
        border: none;
        padding: 0.5rem;
        margin-right: 0.5rem;
        color: #4fc3f7;
    }
    
    /* Mejorar menú desplegable en móvil */
    .dropdown {
        width: 100%;
    }
    
    .dropdown-toggle {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .dropdown-menu {
        position: static !important;
        box-shadow: none;
        margin: 0 !important;
        padding: 0 0 0 1rem !important;
        display: none;
        border-top: 1px solid #f0f0f0;
        border-bottom: 1px solid #f0f0f0;
        background: #f9f9f9;
    }
    
    .dropdown-menu.open {
        display: flex;
        flex-direction: column;
    }
}
