
.hero-section {
    position: relative;
    overflow-x: hidden;
    padding: 30px 0;
}

.custom-carousel-card {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    padding: 60px 0 80px 0;
    margin: 0 12px;
    position: relative;
    z-index: 2;
}
.text-column {
    padding-left: calc(30px + var(--site-px));
    padding-right: 40px;
}

.img-column {
    padding-right: calc(30px + var(--site-px));
    padding-left: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.slide-image {
    width: 600px;
    height: 448px;
    max-width: 100%;
    border-radius: 12px;
    object-fit: cover;
    position: relative;
    z-index: 1; /* Para que quede por encima de los círculos rosados */
}

/* Separa un poco la imagen del título en desktop; en móvil/tablet queda al 100% */
@media (min-width: 992px) {
    .slide-image {
        max-width: 95%;
    }
}

/* Etiqueta nueva: texto en cursiva, sin fondo */
.slide-tag {
    display: inline-block;
    color: #070E46;
    font-size: 15.01px;
    font-family: 'BentonSansBBVA-BookItalic', sans-serif;
    margin-bottom: 12px;
    border-radius: 16px;
    background-color: #f8f8f8;
    padding: 4px 12px;
}

/* Título Serif Azul */
.slide-title {
    color: #001391; 
    font-size: 40px;
    font-family: 'TiemposHeadline', serif;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
    text-wrap: balance;
    /* Usa el gap hacia la imagen para ganar ancho, sin mover el margen alineado al header */
    width: calc(100% + 40px);
    margin-right: -40px;
}

/* Párrafo descriptivo */
.slide-desc {
    color: #070E46;
    font-size: 15.01px;
    font-family: 'BentonSansBBVA-Book', sans-serif;
    line-height: 1.6;
    margin-bottom: 35px;
}

/* Nuevo Botón */
.btn-bbva {
    display: inline-block;
    background-color: #001391;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 15px;
    font-family: 'BentonSansBBVA-Medium', sans-serif;
    padding: 16px 28px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.btn-bbva:hover {
    background-color: #070E46; 
}

.btn-bbva-programs {
    display: inline-block;
    background-color: #001391;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 15px;
    font-family: 'BentonSansBBVA-Medium', sans-serif;
    padding: 16px 28px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.horizontal-scroll-wrapper .btn-bbva.mt-4,
.horizontal-scroll-wrapper .btn-bbva-programs.mt-4 {
    margin-top: 0rem !important;
}

/* Controles Inferiores (Flechas y Contador) */
.carousel-custom-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 20px;
    padding-bottom: 10px;
}

/* En desktop: disuelve el wrapper para que prev y next sean
   hijos directos del flex y podamos reordenarlos */
.controls-arrows {
    display: contents;
}

#prev-slide {
    order: -1; /* antes del contador */
}

/* El contador y #next-slide tienen order:0 por defecto,
   por lo que el orden DOM (contador → next) se respeta */

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.control-btn:hover {
    transform: scale(1.1); /* Pequeño efecto de zoom al pasar el mouse */
}

.control-btn img {
    transition: opacity 0.2s ease;
}

/* Capa con la misma forma del ícono, coloreada, que reemplaza el SVG en hover */
.control-icon-hover {
    position: absolute;
    width: 11.86px;
    height: 20.71px;
    background-color: #070E46;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
    opacity: 0;
    pointer-events: none;
}

.control-btn:hover img {
    opacity: 0;
}

.control-btn:hover .control-icon-hover {
    opacity: 1;
}

.slide-counter {
    color: #070E46;
    font-size: 15.01px;
    font-family: 'BentonSansBBVA-BookItalic', sans-serif;
    background-color: white;
    border-radius: 40px;
    padding: 9px 12px;
}

/* Responsive (Móviles y Tablets) */
@media (max-width: 991px) {
    .custom-carousel-card {
        padding: 20px 0;
    }
    
    .text-column, .img-column {
        padding-left: 20px;
        padding-right: 20px;
    }
    .btn-bbva{
        width: 100%;
        text-align: center;
    }

    .slide-image {
        width: 100%;
        height: auto;
        aspect-ratio: 600 / 448;
    }

    /* Ocultamos los círculos en móvil para no saturar la pantalla */
    .img-column::before {
        display: none;
    }

    .slide-title {
        font-size: 32px;
        text-align: left;
        width: 100%;
        margin-right: 0;
    }
    
    .slide-desc {
        text-align: left;
        font-size: 20px;
    }
    .hero-section .row.align-items-center.g-0 {
        flex-direction: column !important;
        display: flex !important;
    }
    .hero-section {
        padding: 0px 0;
    }

    
    .hero-section .img-column {
        order: 1;
        margin-bottom: 2rem;
    }
    
    .hero-section .text-column {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    /* Controles: contador izquierda, flechas derecha */
    .carousel-custom-controls {
        justify-content: space-between;
        gap: 0;
        margin-top: 20px;
        padding-left: 10px;
        padding-right: 10px;
    }
    /* En móvil: restaura el wrapper de flechas como flex normal */
    .controls-arrows {
        display: flex;
        align-items: center;
        gap: 24px;
    }
    #prev-slide {
        order: 0; /* reset al orden normal dentro del grupo */
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .slide-image {
        height: 300px; 
    }
   .slide-title {
        font-size: 40px !important;
    }
    .btn-bbva{
        width: 28%;
    }
}

/* SEGUNDO CARRUSEL: Scroll Horizontal (Programas) */
.horizontal-scroll-wrapper {
   height: 190vh; 
    position: relative;
    background-color: #f8f8f8;
    margin-top: 0;
}
.sticky-container {
    position: sticky;
    top: 10vh; 
    height: 80vh; 
    overflow: hidden;
    display: flex;
    align-items: center;
}

.sticky-container .container-fluid,
.sticky-container .row {
    width: 127%;
}

.static-content {
    z-index: 20;
    padding-left: calc(42px + var(--site-px));
}

.programas-title {
    font-family: 'TiemposHeadline', serif;
    font-weight: 700;
    font-size: 48px;
    color: #070E46;
    margin-bottom: 32px;
    line-height: 1.15;
    width: 164%;
}

.track-wrapper {
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
}

.scroll-fade-overlay {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 9%; 
    background: linear-gradient(to right, #f8f8f8 40%, rgba(255,255,255,0) 104%);
    z-index: 10;
    pointer-events: none;
}

.horizontal-track {
    display: flex;
    gap: 20px;
    width: max-content;
    will-change: transform;
    padding-left: 0; 
    padding-right: 0;
    transition: transform 0.6s ease-out; 
}

.program-card {
    width: 361px;
    height: 472px;
    border-radius: 16px;
    position: relative;
    flex-shrink: 0;
}

.program-img {
    width: 100%;
    height: 110%;
    object-fit: cover;
    border-radius: 16px;
}

.program-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: #ffffff;
    padding: 24px;
    border-radius: 12px;
    min-height: 130px;
}

.program-info h3 {
    font-family: 'TiemposHeadline', serif;
    font-weight: 700;
    font-size: 32px;
    color: #070E46;
    margin-bottom: 12px;
    line-height: 1.2;
}

.program-info p {
    font-family: 'BentonSansBBVA-Book', sans-serif;
    font-size: 15.01px;
    color: #070E46;
    line-height: 1.5;
    margin: 0;
}
@media (min-width: 992px) {
    .offset-lg-1 {
        margin-left: 21.333333%;
    }
    .col-lg-7 {
        flex: 0 0 auto;
        width: 34.333333%;
    }

    .program-info {
        min-height: 182px;
    }

    .program-info h3 {
        min-height: 2.4em;
    }
}
@media (min-width: 992px) and (max-width: 1596px) {
      .offset-lg-1 {
        margin-left: 17.333333%;
    }
}

/* Responsive (Móviles y Tablets) */
@media (max-width: 991px) {
    .custom-carousel-card {
        padding: 18px 0;
        margin: 0 12px;
    }
    .text-column, .img-column {
        padding-left: 18px;
        padding-right: 18px;
    }
    .img-column::before {
        display: none;
    }
    .slide-title {
        font-size: 32px;
        text-align: left;
        width: 100%;
        margin-right: 0;
    }
    .slide-desc {
        text-align: left;
        font-size: 15.01px;
    }
    .hero-section .row.align-items-center.g-0 {
        flex-direction: column !important;
        display: flex !important;
    }
    .hero-section .img-column {
        order: 1;
        margin-bottom: 1rem;
    }
    .hero-section .text-column {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    .carousel-custom-controls {
        gap: 15px;
        margin-top: 20px;
    }

    /* Ajustes móviles para el segundo carrusel */
    .horizontal-scroll-wrapper {
        height: auto !important;
        padding-top: 40px;
        padding-bottom: 32px;
        overflow-x: hidden; 
    }
    .sticky-container {
        position: relative;
        height: auto;
        overflow: visible;
        top: auto;
        display: block;
    }
    /* La regla de 127% es un truco solo para desktop; en móvil/tablet
       descuadraba el título, las imágenes y las flechas */
    .sticky-container .container-fluid,
    .sticky-container .row {
        width: 100%;
    }
    .static-content {
        padding-left: 15px;
        padding-right: 24px;
        margin-bottom: 24px;
    }
    .programas-title {
        font-size: 40px;
        width: 100%; 
        margin-bottom: 0px;
        text-align: left;
    }
    .program-info{
        bottom: 16px;
        padding: 24px !important;
    }
    .program-info h3 {
        font-size: 24px;
    }
    .track-wrapper {
        overflow: visible; 
    }
    .horizontal-track {
        flex-direction: row !important; 
        width: 100%;
        padding-left: 0px;
        padding-right: 0px;
        gap: 10px;
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    }
    .program-img{
        width: 100%;
        height: 100%;
    }

    .program-info p{
        width: 94%;
    }
    .horizontal-scroll-wrapper .mt-4 {
        margin-top: 0.5rem !important;
       
    }
    .horizontal-scroll-wrapper .btn-bbva.mt-4,
    .horizontal-scroll-wrapper .btn-bbva-programs.mt-4 {
        margin-top: 0rem !important;
    }
    .btn-bbva-programs {
        width: 52%;
        text-align: center;
        padding: 18px 20px;
        margin-left: -12px;
        margin-top: -0.5rem !important;
    }
    .program-card {
        width: 85vw; /* Hace que la tarjeta ocupe el 85% de la pantalla, asomando la siguiente */
        max-width: 340px;
        height: 420px;
        margin-bottom: 0;
    }
    .horizontal-scroll-wrapper .d-flex.gap-4 {
        gap: 2.5rem !important;
    }
    .col-12.d-block.d-lg-none .d-flex.justify-content-between {
        width: 100%;
    }
    .col-12.d-block.d-lg-none button {
        flex-shrink: 0;
    }
}
@media (min-width: 768px) and (max-width: 991px) {
    .programas-title {
        white-space: nowrap;
        text-align: left;
    }
    .programas-title br {
        display: none;
    }
    .program-info h3 {
        white-space: nowrap;
    }
    .program-info h3 br {
        display: none;
    }
    
    .program-card {
        width: 94vw; 
        max-width: none;
        height: 464px;
        overflow: hidden;
    }
    
    .program-card .program-img {
        width: 100%;
        height: auto;
        object-fit: cover;
        object-position: center center;
        aspect-ratio: 6.6 / 6;
    }
    .btn-bbva-programs{
        width: 27%;
    }
    
    .program-info {
        padding: 24px;
        bottom: 24px;
        left: 24px;
        right: 24px;
    }
    
    .program-info h3 {
        font-size: 36px; 
    }
    
    .program-info p {
        font-size: 15.01px;
    }
}