/* Sideways card carousel, shared by the home page and the campaign pages.
 *
 * From new_design_6/ ("¿Qué necesitas?", the treatments, and the campaigns'
 * "¿Cuándo conviene…?"): three cards across on a desktop, one and a peek on a
 * phone, swiped or stepped with the two round arrows (pages/js/carousel.js).
 * Its own file, like reviews.css, because both designs draw it identically.
 */

/* The text gives way, never the arrows: a long heading wraps inside its
   column instead of pushing the arrows onto a line of their own. */
.carousel__head {
    display: flex; justify-content: space-between; align-items: end;
    gap: 24px; margin: 0 0 32px;
}
.carousel__head > :first-child { flex: 1 1 auto; min-width: 0; }
.carousel__arrows { display: flex; flex: none; gap: 10px; }

.carousel__arrow {
    width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .18s ease, opacity .18s ease;
}
.carousel__arrow[hidden] { display: none; }
.carousel__arrow:disabled { opacity: .4; cursor: default; }
.carousel__arrow--prev { border: 1.5px solid #2A7B94; background: #fff; color: #2A7B94; }
.carousel__arrow--prev:not(:disabled):hover { background: #EAF5F7; }
.carousel__arrow--next { border: 0; background: #2A7B94; color: #fff; }
.carousel__arrow--next:not(:disabled):hover { background: #1F6177; }
.carousel__arrow:focus-visible { outline: 2px solid #2A7B94; outline-offset: 3px; }

.carousel__track {
    display: grid; grid-auto-flow: column;
    grid-auto-columns: minmax(min(270px, 85%), calc((100% - 32px) / 3));
    gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain; scrollbar-width: none;
    padding: 2px 2px 6px;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; }

@media (prefers-reduced-motion: reduce) {
    .carousel__arrow { transition: none; }
}
