/*
 * RW Hero Slider — Estilos del widget Elementor
 * BEM: .rw-hero / .rw-hero__*
 */

/* ── Contenedor ───────────────────────────────────────────── */
.rw-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.rw-hero--viewport {
    min-height: 100vh;
    min-height: 100dvh;
}

/* ── Track y slides ───────────────────────────────────────── */
/*
 * flex: 1 sustituye a height: 100%.
 * height: 100% no funciona cuando el padre tiene solo min-height (sin height explícito);
 * con flex: 1 el track ocupa todo el espacio disponible del contenedor flex.
 */
.rw-hero__track {
    flex: 1;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.rw-hero__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--rw-hero-transition, 700ms) ease,
                visibility var(--rw-hero-transition, 700ms) ease;
    will-change: opacity;
}

.rw-hero__slide--active {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* ── Imagen de fondo ──────────────────────────────────────── */
.rw-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1);
    transition: transform 8s ease;
    z-index: 0;
}

.rw-hero__slide--active .rw-hero__bg {
    transform: scale(1.04);
}

/* ── Overlay oscuro ───────────────────────────────────────── */
.rw-hero__overlay {
    position: absolute;
    inset: 0;
    background-color: #000;
    opacity: 0.45;
    z-index: 1;
    pointer-events: none;
}

/* ── Contenido ────────────────────────────────────────────── */
.rw-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2.5rem);
    padding-block: clamp(6rem, 12vw, 10rem);
}

.rw-hero__content--left  { text-align: left; }
.rw-hero__content--center { text-align: center; }

/* ── Heading ──────────────────────────────────────────────── */
.rw-hero__heading {
    margin: 0 0 2rem;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #fff;
    max-width: 14em;
}

.rw-hero__content--center .rw-hero__heading {
    margin-inline: auto;
}

/* ── Botones ──────────────────────────────────────────────── */
.rw-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.rw-hero__content--center .rw-hero__actions {
    justify-content: center;
}

.rw-hero__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

/* Primario: fondo verde lima */
.rw-hero__btn--primary {
    background-color: var(--rw-color-accent, #b5ca00);
    color: var(--rw-color-primary, #1a2332);
    border: 2px solid transparent;
}

.rw-hero__btn--primary:hover {
    background-color: var(--rw-color-accent-dark, #96a900);
    color: var(--rw-color-primary, #1a2332);
}

/* Secundario: contorno blanco */
.rw-hero__btn--secondary {
    background-color: transparent;
    color: #fff;
    border: 2px solid rgba(255 255 255 / 0.7);
}

.rw-hero__btn--secondary:hover {
    background-color: rgba(255 255 255 / 0.12);
    border-color: #fff;
    color: #fff;
}

/* ── Dots ─────────────────────────────────────────────────── */
.rw-hero__dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 0.5rem;
}

.rw-hero__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background-color: rgba(255 255 255 / 0.4);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.rw-hero__dot--active,
.rw-hero__dot:hover {
    background-color: #fff;
    transform: scale(1.25);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
    .rw-hero__actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .rw-hero__content--center .rw-hero__actions {
        align-items: center;
    }
}
