/**
 * CSS específico para el Header Component
 * Estilos para banner, navegación, menús y responsive design
 */

/* Estilos para Swiper Banner */
.banner-swiper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.banner-swiper .swiper-wrapper {
    display: flex;
    align-items: center;
}

/* Optimización para efecto fade */
.banner-swiper .swiper-slide {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.banner-swiper .swiper-slide-active {
    opacity: 1 !important;
}

.banner-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: 2rem;
}

/* Asegurar que el contenido sea visible */
.banner-swiper .swiper-slide span {
    display: block;
    width: 100%;
    text-align: center;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Ajustes específicos para móvil */
@media (max-width: 640px) {
    .banner-container {
        padding: 0 0.25rem !important;
    }
    
    .banner-swiper .swiper-slide span {
        font-size: 0.65rem !important;
        padding: 0 0.25rem !important;
        line-height: 1.2 !important;
        white-space: normal !important; /* Permitir salto de línea en móvil */
        overflow: hidden !important;
        text-align: center !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important; /* Máximo 2 líneas */
        -webkit-box-orient: vertical !important;
        max-width: 100% !important;
        text-overflow: ellipsis !important;
    }
}

/* Tamaños de texto responsivos para el banner */
.banner-swiper span {
    font-size: 0.6rem !important; /* Muy pequeño para móvil */
    line-height: 1.2 !important;
    padding: 0 0.5rem !important;
}

@media (min-width: 480px) {
    .banner-swiper span {
        font-size: 0.65rem !important;
    }
}

@media (min-width: 640px) {
    .banner-swiper span {
        font-size: 0.75rem !important; /* text-xs */
    }
}

@media (min-width: 768px) {
    .banner-swiper span {
        font-size: 0.8rem !important;
    }
}

@media (min-width: 1024px) {
    .banner-swiper span {
        font-size: 0.875rem !important; /* text-sm */
    }
}

/* Estilos para menú móvil y navegación */
#mobile-menu-toggle span {
    background-color: rgb(55, 65, 81) !important;
}

#submenu.hidden {
    display: none !important;
}

/* Responsive design para móvil */
@media (max-width: 63.99rem) {
    .max-lg\:block {
        display: block;
    }
    
    #submenu {
        display: none;
    }
    
    #submenu:not(.hidden) {
        display: block;
    }
    
    form[role="search"] {
        overflow: hidden;
    }
    
    #search-input-mobile {
        padding-right: 3.5rem; /* 56px */
    }
    
    #search-input-mobile + button {
        right: 0.5rem; /* 8px */
    }
    
    #mobile-menu-toggle span {
        height: 4px !important;
    }
    
    .header-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0 0.5rem;
    }
    
    .header-left {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
    
    .header-center {
        flex: 1;
        display: flex;
        justify-content: center;
        padding: 0 1rem;
    }
    
    .header-right {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
}

/* Responsive design para desktop */
@media (min-width: 64rem) {
    .header-center {
        display: flex !important;
    }
    
    .container {
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .header-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
        padding: 0 1rem;
    }
    
    .header-left {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        justify-content: flex-start;
        min-width: 280px;
        gap: -0.5rem;
    }
    
    .header-center {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        max-width: 600px;
        width: 100%;
    }
    
    .header-right {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        justify-content: flex-end;
        min-width: 280px;
        gap: 1rem;
    }
}