/* Contenedor del Carrusel */
.sb-carousel-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    position: relative;
    --swiper-theme-color: #ffffff; /* Color de las flechas y paginación */
}

.sb-swiper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.sb-slide-inner {
    position: relative;
    width: 100%;
    /* Mantiene una relación de aspecto 2:1 ideal para banners anchos */
    padding-top: 50%; 
    background-color: #111;
}

.sb-slide-inner .sb-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sombra/Gradiente para que el texto sea legible */
.sb-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: #fff;
    padding: 40px 30px 20px;
    box-sizing: border-box;
}

.sb-caption h3 {
    margin: 0;
    font-size: 1.8rem;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    font-weight: 600;
}

/* Contenedor de la Grilla (Todos los segmentos) */
.sb-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.sb-grid-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Relación de aspecto 16:9 para la vista en grilla */
    padding-top: 56.25%; 
    background-color: #222;
}

.sb-grid-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.sb-grid-item .sb-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sb-grid-item:hover .sb-image {
    transform: scale(1.05);
}

.sb-caption-grid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.4), transparent);
    color: #fff;
    padding: 20px 15px 15px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sb-grid-item:hover .sb-caption-grid {
    opacity: 1;
}

.sb-caption-grid h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
    font-weight: 500;
}

/* Buscador Premium UI/UX */
.sb-search-container {
    width: 100%; max-width: 650px; margin: 0 auto 50px auto; padding: 0 15px; display: flex; flex-direction: column; align-items: center;
}

.sb-search-box {
    position: relative; width: 100%; display: flex; align-items: center;
    background: #ffffff !important; border-radius: 60px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 6px 12px !important;
}

.sb-search-box.is-focused {
    box-shadow: 0 15px 40px rgba(30, 58, 138, 0.15) !important;
    border-color: rgba(30, 58, 138, 0.3) !important;
    transform: translateY(-3px);
}

.sb-search-icon-wrapper {
    width: 46px; height: 46px;
    background: #1E3A8A !important;
    border-radius: 50% !important;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(30,58,138,0.3) !important;
    transition: transform 0.3s ease;
}

.sb-search-box.is-focused .sb-search-icon-wrapper {
    transform: scale(1.08);
}

.sb-search-icon-svg {
    width: 20px; height: 20px; color: #fff !important;
}

.sb-search-input-premium { 
    width: 100% !important; padding: 12px 15px !important; border: none !important; 
    font-size: 1.15rem !important; background: transparent !important; 
    color: #333 !important; outline: none !important; font-family: inherit !important;
    margin: 0 !important; box-shadow: none !important; border-radius: 0 !important;
    appearance: none !important; line-height: 1.5 !important;
}

.sb-search-input-premium:focus {
    box-shadow: none !important; border: none !important; outline: none !important; background: transparent !important;
}

.sb-search-input-premium::placeholder { color: #a0a0a0 !important; font-weight: 400 !important; opacity: 1 !important; }

.sb-search-clear {
    background: none !important; border: none !important; cursor: pointer; padding: 10px 15px !important; color: #aaa !important; transition: color 0.2s; display: flex; align-items: center; justify-content: center; outline: none !important; box-shadow: none !important; margin: 0 !important;
}

.sb-search-clear:hover { color: #dc3545 !important; }
.sb-search-clear svg { width: 20px; height: 20px; }

.sb-search-results-count {
    margin-top: 12px; font-size: 0.9rem; color: #888; font-weight: 500; animation: fadeIn 0.3s ease;
}

.sb-empty-state { text-align: center; padding: 50px 0; }
.sb-empty-state p { font-size: 1.2rem; color: #555; margin-bottom: 5px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* SweetAlert2 Custom Styles para el frontend */
.sb-swal-popup {
    border-radius: 16px !important;
}

.sb-swal-title {
    color: #0F172A !important;
    font-weight: 700 !important;
    font-size: 1.5rem !important;
    margin-bottom: 15px !important;
}

.sb-swal-image {
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    width: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
}

/* Responsive Ajustes */
@media (max-width: 768px) {
    .sb-slide-inner {
        padding-top: 60%; /* En móviles hacemos el banner un poco más alto */
    }
    .sb-caption h3 {
        font-size: 1.3rem;
    }
}
