/* === MENÚ MÓVIL MEJORADO PARA HEADER === */

/* Contenedor principal solo visible en móviles */
.header-mobile-menu-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    z-index: 1001;
}

/* Botón hamburguesa */
.header-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1002;
    background: transparent;
    border: none;
    padding: 0;
}

.header-hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Menú que se desliza desde arriba */
.header-mobile-menu {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: top 0.4s ease;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.header-mobile-menu.active {
    top: 0;
}

/* Título MesiHosting con logo, carrito y cruz */
.header-menu-title {
    padding: 20px;
    background: linear-gradient(135deg, #2c3e50, #4a6491);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.6rem;
    font-weight: 700;
}

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

.header-menu-logo img {
    height: 40px;
    width: auto;
}

.header-menu-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-menu-cart {
    position: relative;
    cursor: pointer;
}

.header-menu-cart .cart-icon {
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header-menu-cart .cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    min-width: 20px;
}

.header-menu-close {
    cursor: pointer;
    color: white;
    font-size: 1.5rem;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    transition: all 0.3s ease;
}

.header-menu-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.header-menu-cart:hover .cart-icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Contenedor principal del menú con scroll */
.header-menu-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Contenedor del acordeón */
.header-accordion-container {
    flex: 1;
    padding-bottom: 20px;
}

/* Animación del botón hamburguesa a X */
.header-hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.header-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.header-hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Overlay para el fondo cuando el menú está abierto */
.header-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 998;
}

.header-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Categorías del acordeón */
.header-accordion-item {
    border-bottom: 1px solid #eaeaea;
}

.header-accordion-header {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.header-accordion-header:hover {
    background: #f8f9fa;
}

.header-accordion-header i.header-chevron {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.header-accordion-header.active i.header-chevron {
    transform: rotate(180deg);
}

.header-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.header-accordion-content.active {
    max-height: 400px;
}

/* Lista de opciones del menú */
.header-menu-items {
    list-style: none;
    padding: 0;
    background: #f9f9f9;
}

.header-menu-items li a {
    display: flex;
    align-items: center;
    padding: 15px 20px 15px 50px;
    color: #555;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.header-menu-items li a:hover {
    background: #f0f4ff;
    border-left: 3px solid #4a6491;
    padding-left: 47px;
}

.header-menu-items li a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    color: #4a6491;
}

/* Colores para las categorías */
.header-category-hosting {
    color: #FF7F50;
    border-left: 4px solid #FF7F50;
}

.header-category-email {
    color: #2ECC71;
    border-left: 4px solid #2ECC71;
}

.header-category-web {
    color: #E74C3C;
    border-left: 4px solid #E74C3C;
}

.header-category-security {
    color: #9B59B6;
    border-left: 4px solid #9B59B6;
}

/* Badge para nuevos */
.header-new-badge {
    background-color: #e74c3c;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Información de contacto */
.header-contact-info {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #eaeaea;
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.header-contact-section {
    margin-bottom: 15px;
}

.header-contact-section h3 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.header-contact-section h3 i {
    margin-right: 8px;
    color: #4a6491;
    font-size: 1.1rem;
}

.header-contact-section p, .header-contact-section a {
    margin-left: 25px;
    margin-bottom: 5px;
    display: block;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
}

.header-contact-section a:hover {
    color: #4a6491;
    text-decoration: underline;
}

/* Mostrar solo en dispositivos móviles */
@media (min-width: 769px) {
    .header-mobile-menu-container {
        display: none !important;
    }
}

/* En móviles, mostrar el nuevo menú */
@media (max-width: 768px) {
    .header-mobile-menu-container {
        display: block !important;
    }
}
