/* ============================================================
   css/hero.css
   Hero carousel — sin dependencias externas.
   ============================================================ */

/* ── Contenedor principal ── */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    /* Compensa la lang-bar + nav fija */
    margin-top: calc(-1 * (var(--lang-bar-height) + var(--nav-height)));
}

/* ── Track de slides ── */
.hero__track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ── Slide individual ── */
.hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
    pointer-events: none;
}
.hero__slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* ── Imagen de fondo ── */
.hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.04);
    transition: transform 6s ease;
}
.hero__slide.is-active .hero__bg {
    transform: scale(1);   /* Ken Burns sutil */
}

/* ── Máscara oscura ── */
.hero__mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        165deg,
        rgba(10, 42, 61, 0.78) 0%,
        rgba(14, 77, 110, 0.55) 50%,
        rgba(26, 127, 166, 0.35) 100%
    );
}

/* ── Ondas decorativas (parte inferior) ── */
.hero__waves {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 180px;
    pointer-events: none;
}
.hero__wave {
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 300%;
    height: 100%;
    background: var(--color-ivory);
    border-radius: 50% 50% 0 0 / 80% 80% 0 0;
    animation: wave-move 8s ease-in-out infinite;
    opacity: 0.12;
}
.hero__wave:nth-child(2) {
    animation-delay: -3s;
    opacity: 0.08;
    background: var(--color-turquoise);
}
.hero__wave:nth-child(3) {
    animation-delay: -6s;
    opacity: 0.06;
}
@keyframes wave-move {
    0%, 100% { transform: translateX(0)   scaleY(1); }
    50%       { transform: translateX(5%) scaleY(1.06); }
}

/* ── Contenido ── */
.hero__content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 48px;
    padding: 0 var(--space-xl);
    /* espacio para nav + lang-bar */
    padding-top: calc(var(--lang-bar-height) + var(--nav-height) + 20px);
    padding-bottom: 160px; /* espacio para las ondas */
}

.hero__content--left   { justify-content: flex-start; }
.hero__content--center { justify-content: center; text-align: center; }
.hero__content--right  { justify-content: flex-end;  text-align: right; }

/* ── Texto ── */
.hero__text {
    max-width: 680px;

    /* Animación de entrada al activar slide */
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}
.hero__slide.is-active .hero__text {
    opacity: 1;
    transform: translateY(0);
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(46, 196, 212, 0.12);
    border: 1px solid rgba(46, 196, 212, 0.35);
    color: var(--color-turquoise);
    padding: 6px 18px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero__heading {
    font-family: var(--font-display);
    font-size: var(--text-hero);
    font-weight: 300;
    line-height: 1.0;
    color: var(--color-white);
    margin-bottom: 20px;
}

/* El encabezado puede tener saltos de línea desde el CMS;
   la segunda línea se colorea automáticamente */
.hero__heading em,
.hero__heading span {
    font-style: italic;
    color: var(--color-turquoise);
    display: block;
}

.hero__subheading {
    font-size: clamp(15px, 1.8vw, 18px);
    color: rgba(255, 255, 255, 0.65);
    font-weight: 300;
    line-height: var(--leading-loose);
    max-width: 520px;
    margin-bottom: 40px;
}

/* Alineación center: centrar subheading también */
.hero__content--center .hero__subheading {
    margin-inline: auto;
}

/* ── Acciones ── */
.hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.hero__content--center .hero__actions {
    justify-content: center;
}
.hero__content--right .hero__actions {
    justify-content: flex-end;
}

/* ── Imagen promo ── */
.hero__promo {
    flex-shrink: 0;
    opacity: 0;
    transform: rotate(10deg) translateY(20px);
    transition: opacity 0.8s ease 0.6s, transform 0.8s ease 0.6s;
}
.hero__slide.is-active .hero__promo {
    opacity: 1;
    transform: rotate(8deg) translateY(0);
}
.hero__promo img {
    width: 160px;
    border-radius: var(--radius-md);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    background: var(--color-white);
    padding: 12px;
}

/* ── Flechas ── */
.hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--color-white);
    transition: all var(--transition-normal);
    cursor: pointer;
}
.hero__arrow:hover {
    background: var(--color-turquoise);
    border-color: var(--color-turquoise);
    color: var(--color-ocean-deep);
    transform: translateY(-50%) scale(1.08);
}
.hero__arrow--prev { left: 28px; }
.hero__arrow--next { right: 28px; }

/* ── Dots ── */
.hero__dots {
    position: absolute;
    bottom: 52px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.hero__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    padding: 0;
}
.hero__dot.is-active,
.hero__dot:hover {
    background: var(--color-turquoise);
    transform: scale(1.3);
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .hero {
        height: 90vh;
        min-height: 520px;
    }
    .hero__content {
        padding: 0 24px;
        padding-top: calc(var(--lang-bar-height) + var(--nav-height) + 16px);
        padding-bottom: 140px;
        flex-direction: column;
        align-items: flex-start !important;
        justify-content: center !important;
        text-align: left !important;
    }
    .hero__promo   { display: none; }
    .hero__arrow   { display: none; }
    .hero__heading { font-size: clamp(38px, 10vw, 60px); }
    .hero__actions { flex-direction: column; align-items: flex-start; }
}