/* =============================================
   RW Proyecto Carousel
   ============================================= */

.rw-carousel {
    --sw:    58%;
    --gap:   20px;
    --trans: 600ms;

    overflow: hidden;
    width: 100%;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    /* Altura fija para evitar saltos en el contenido inferior durante transiciones */
    min-height: 580px;
}

.rw-carousel__track {
    display: flex;
    align-items: center;
    gap: var(--gap);
    will-change: transform;
    cursor: grab;
}

.rw-carousel__track.is-dragging {
    cursor: grabbing;
    transition: none !important;
}

/* ---- Slides ---- */

.rw-carousel__slide {
    flex: 0 0 var(--sw);
    width: var(--sw);
    box-sizing: border-box;
    transition: transform var(--trans) ease;
    padding: 37px 0;
}

.rw-carousel__slide.is-active {
    padding: 0;
}

/* ---- Image: altura fija con overflow hidden ---- */

.rw-carousel__image-wrap {
    overflow: hidden;
    max-height: 400px;       /* laterales */
    transition: max-height var(--trans) ease;
}

.rw-carousel__slide.is-active .rw-carousel__image-wrap {
    max-height: 500px;       /* central */
}

.rw-carousel__image {
    width: 100%;
    height: 500px;           /* altura base — se recorta por max-height en laterales */
    background-size: cover;
    background-position: center;
    background-color: #e4e2de;
}

/* ---- Body ---- */

/* Por defecto todos ocultos */
.rw-carousel__body,
.rw-carousel__body-prev,
.rw-carousel__body-next {
    display: none;
    align-items: center;
    padding: 50px 0 0;
    gap: 16px;
}

/* Slide activo: título + CTA */
.rw-carousel__slide.is-active .rw-carousel__body {
    display: flex;
    justify-content: space-between;
    padding-left: 50px;
    padding-right: 50px;
}

/* Lateral izquierdo: solo CTA — siempre visible cuando is-prev */
.rw-carousel__slide.is-prev .rw-carousel__body-prev {
    display: flex;
    justify-content: flex-start;
}

/* Lateral derecho: solo título — siempre visible cuando is-next */
.rw-carousel__slide.is-next .rw-carousel__body-next {
    display: flex;
    justify-content: flex-end;
}

.rw-carousel__inner {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Evitar que el drag active el enlace */
.rw-carousel__track.is-dragging .rw-carousel__inner {
    pointer-events: none;
}

.rw-carousel__title {
    font-family: 'Nunito', sans-serif;
    font-size: 20px;
    font-weight: 300;
    font-style: normal;
    line-height: 1.3;
    color: inherit;
}

.rw-carousel__cta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 400;
    font-style: normal;
    white-space: nowrap;
    flex-shrink: 0;
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.rw-carousel__cta:hover {
    color: #868686;
}

.rw-carousel__cta svg {
    flex-shrink: 0;
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
    .rw-carousel { --sw: 70%; }
    .rw-carousel__image-wrap                    { max-height: 320px; }
    .rw-carousel__slide.is-active .rw-carousel__image-wrap { max-height: 400px; }
    .rw-carousel__image                         { height: 400px; }
}

@media (max-width: 600px) {
    .rw-carousel { --sw: 86%; }
    .rw-carousel__image-wrap                    { max-height: 220px; }
    .rw-carousel__slide.is-active .rw-carousel__image-wrap { max-height: 280px; }
    .rw-carousel__image                         { height: 280px; }

    .rw-carousel__slide.is-active .rw-carousel__body {
        padding-left: 0;
        padding-right: 0;
    }

    .rw-carousel__title {
        font-size: 15px;
    }
}
