/* Layout sin sidebar */
body {
    font-family: "Open Sans", sans-serif;
}

.main {
    margin-left: 0 !important;
    padding-top: 130px !important;
}

/* Menú horizontal */
.horizontal-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.horizontal-nav-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.horizontal-nav-scroll::-webkit-scrollbar {
    display: none;
}

.horizontal-menu .nav {
    flex-wrap: nowrap;
    padding: 10px 0;
}

.horizontal-menu .nav-link {
    color: #6c757d;
    border-radius: 20px;
    padding: 8px 16px;
    margin: 0 5px;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.horizontal-menu .nav-link:hover {
    color: #0d6efd;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.horizontal-menu .nav-link.active {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.horizontal-menu .nav-link i {
    margin-right: 5px;
}

/* Dropdown para subcategorías */
.horizontal-menu .dropdown-menu {
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: none;
    margin-top: 8px;
    min-width: 280px;
    padding: 8px 0;
}

.horizontal-menu .dropdown-item {
    padding: 12px 20px;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.horizontal-menu .dropdown-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.horizontal-menu .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
    transform: translateX(5px);
    padding-left: 25px;
}

/* Submenús jerárquicos */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    position: absolute;
    top: 0;
    left: 100%;
    margin-top: -8px;
    margin-left: 5px;
    display: none;
    min-width: 250px;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block !important;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.dropdown-submenu .dropdown-toggle::after {
    content: '\25B6';
    border: none;
    float: right;
    margin-top: 2px;
    font-size: 10px;
    margin-left: auto;
}

.dropdown-submenu:hover > .dropdown-item {
    background-color: #e3f2fd;
    color: #0d6efd;
}

/* Espacio para futuras funcionalidades de búsqueda */
.search-bar {
    /* Reservado para futuras mejoras */
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .search-bar .d-flex {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-bar select,
    .search-bar button {
        width: 100% !important;
        min-width: auto !important;
    }
    
    .horizontal-menu {
        top: 60px;
    }
    
    #main {
        padding-top: 120px !important;
    }
    
    .horizontal-menu .nav-link {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .col-lg-3 {
        margin-bottom: 1.5rem;
    }
}

/* Scroll suave para el menú horizontal */
.horizontal-nav-scroll {
    scroll-behavior: smooth;
}

/* Indicador de scroll */
.horizontal-menu::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.8));
    pointer-events: none;
}

/* Animación para items activos */
.horizontal-menu .nav-link.active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* Mejorar visibilidad de submenús */
.dropdown-submenu .dropdown-menu {
    z-index: 1050;
    border: 1px solid #dee2e6;
}

.dropdown-submenu:hover {
    background-color: #f8f9fa;
}

/* Flecha indicadora */
.dropdown-submenu > .dropdown-item::after {
    content: '\25B6';
    float: right;
    margin-left: auto;
    font-size: 10px;
    color: #6c757d;
}

/* Espaciado mejorado */
.dropdown-item i {
    color: inherit;
    opacity: 0.8;
}

.dropdown-item:hover i {
    opacity: 1;
}

/* Indicador de filtros */
#indicadorFiltros {
    padding: 10px 0;
    font-size: 16px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
}

#indicadorFiltros .text-primary {
    font-size: 18px;
}

/* Responsive para indicador */
@media (max-width: 768px) {
    #indicadorFiltros {
        font-size: 14px;
        padding: 8px 0;
    }
    
    #indicadorFiltros .text-primary {
        font-size: 16px;
    }
}

/* Vista de resultados compacta */
.resultado-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.resultado-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.resultado-card .card-img-overlay {
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.resultado-card:hover .card-img-overlay {
    opacity: 1;
}

.resultado-card .card-title {
    font-weight: 600;
    color: #2c3e50;
}

/* Grid responsive mejorado */
@media (max-width: 576px) {
    .resultado-card .card-body {
        padding: 15px;
    }
    
    .resultado-card .card-title {
        font-size: 14px;
    }
}

/* Mejoras visuales para las cards */
.card-img-top {
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card {
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Estilo para el botón de búsqueda */
#btnBusquedaRapida {
    min-width: 50px;
    height: 40px;
}

/* Carousel responsive mejorado */
#carouselPrincipal {
    margin-bottom: 2rem;
}

.carousel-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.carousel-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    margin-bottom: 0.5rem;
}

.carousel-text {
    font-size: 1.1rem;
    color: #f8f9fa;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    margin-bottom: 0;
}

/* Responsive para tablets */
@media (max-width: 992px) {
    .carousel-image-container {
        height: 300px;
    }
    
    .carousel-title {
        font-size: 1.5rem;
    }
    
    .carousel-text {
        font-size: 1rem;
    }
    
    .carousel-caption {
        padding: 2rem 1.5rem 1.5rem;
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .carousel-image-container {
        height: 250px;
    }
    
    .carousel-title {
        font-size: 1.25rem;
    }
    
    .carousel-text {
        font-size: 0.9rem;
        display: none; /* Ocultar texto en móviles para mejor legibilidad */
    }
    
    .carousel-caption {
        padding: 1.5rem 1rem 1rem;
    }
}

/* Responsive para móviles pequeños */
@media (max-width: 576px) {
    .carousel-image-container {
        height: 200px;
    }
    
    .carousel-title {
        font-size: 1.1rem;
    }
}

/* Mejorar controles del carousel */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    z-index: 10;
    top: 30%;
    height: 40%;
    transform: translateY(-50%);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev {
    left: 10px;
}

.carousel-control-next {
    right: 10px;
}

/* Indicadores mejorados */
.carousel-indicators {
    bottom: 0px;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255,255,255,0.5);
    border: 2px solid rgba(255,255,255,0.8);
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: #fff;
    transform: scale(1.2);
}

/* Botón limpiar más pequeño */
.horizontal-menu .btn-sm.px-2 {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
    min-width: auto;
}

/* Optimización del espacio */
.container-fluid.px-3 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

@media (min-width: 1200px) {
    .container-fluid.px-3 {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

