/* ============================================================
   hero-carousel.css — Estilos del Hero / Carrusel
   Crearte Publi · Desarrollado por Gerkies
   ============================================================ */

/* ============================================================
   HERO — SECCIÓN PRINCIPAL
   ============================================================ */

.hero {
    position: relative;
    width: 100%;
    height: 100svh;
    min-height: 560px;
    overflow: hidden;
    background: var(--ink);
}

/* ---- Pista de slides ---- */
.hero-track {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transform: translate3d(0, 0, 0) scale(var(--hero-slide-rest-scale));
    filter: brightness(0.82);
    backface-visibility: hidden;
    will-change: opacity, transform, filter;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
    transform: translate3d(0, 0, 0) scale(var(--hero-slide-active-scale));
    filter: brightness(1);
}

.hero-slide.is-entering {
    z-index: 3;
    pointer-events: auto;
    animation: heroSlideIn var(--hero-slide-transition) var(--hero-crossfade-ease) both;
}

.hero-slide.is-exiting {
    z-index: 2;
    pointer-events: none;
    animation: heroSlideOut var(--hero-slide-transition) var(--hero-crossfade-ease) both;
}

/* ---- Fondo del slide (contenedor + zoom) ---- */
.hero-slide-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    transform: translate3d(0, 0, 0) scale(1.035);
    background: var(--bg-darker);
    will-change: transform;
}

/* Imagen de fondo */
.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* ---- Overlay de oscurecimiento ---- */
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 5, 5, 0.82) 0%, rgba(5, 5, 5, 0.46) 34%, rgba(5, 5, 5, 0.04) 74%),
        linear-gradient(to top, rgba(5, 5, 5, 0.78) 0%, rgba(5, 5, 5, 0.10) 68%, rgba(5, 5, 5, 0.36) 100%);
    pointer-events: none;
}

/* ---- Contenido del slide ---- */
.hero-content {
    position: absolute;
    bottom: clamp(6.5rem, 11vh, 9rem);
    left: 0;
    right: 0;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
    max-width: 1440px;
    margin: 0 auto;
}

.hero-tag {
    display: inline-block;
    font-size: var(--font-sz-xs);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.hero-title {
    font-size: var(--text-4xl);
    font-weight: 900;
    line-height: 0.98;
    color: var(--text-light);
    margin-bottom: 1rem;
    max-width: 20ch;
    letter-spacing: 0;
    text-wrap: balance;
}

.hero-desc {
    font-size: var(--text-lg);
    font-weight: 400;
    color: var(--pearl);
    margin-bottom: 2rem;
    max-width: 55ch;
    line-height: 1.6;
}

/* ---- Botón CTA del slide ---- */
.hero-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    border-radius: var(--pill-radius);
    background: var(--primary-color);
    color: var(--bg-darker);
    border: none;
    font-size: var(--font-sz-md);
    font-weight: 700;
    letter-spacing: 0;
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(250, 166, 26, 0);
    transition:
        opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1),
        transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.hero-cta:hover {
    background: #ffb93a;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(250, 166, 26, 0.35);
}

.hero-cta:active {
    background: #e5950f;
    transform: translateY(0);
    box-shadow: none;
}

/* ---- Contenedo inferior compartido (indicadores) ----
   Mismo alineamiento que .hero-content: misma base de padding
   y max-width para que los indicadores siempre estén alineados
   al inicio del texto sin necesidad de left manual. ---- */
.hero-bottom {
    position: absolute;
    bottom: 2.5rem;
    left: 0;
    right: 0;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
    z-index: 10;
    pointer-events: none;
}

/* ---- Indicadores de slide (pills) ---- */
.hero-indicators {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    pointer-events: auto;
}

.hero-indicator {
    width: 8px;
    height: 8px;
    border-radius: var(--pill-radius);
    background: rgba(255, 255, 255, 0.35);
    border: none;
    cursor: pointer;
    padding: 0;
    transition:
        background var(--transition),
        width var(--transition),
        transform var(--transition);
}

.hero-indicator:hover {
    background: rgba(255, 255, 255, 0.65);
    transform: scale(1.2);
}

.hero-indicator.is-active {
    width: 28px;
    background: var(--primary-color);
    border-radius: var(--pill-radius);
}

/* ============================================================
   RESPONSIVE — HERO
   ============================================================ */
@media (max-width: 900px) {
    .hero-content {
        padding: 0 1.5rem;
        bottom: 6rem;
    }

    .hero-bottom {
        padding: 0 1.5rem;
    }
}

@media (max-width: 600px) {
    .hero-content {
        bottom: 5.5rem;
    }

    .hero-title {
        font-size: var(--text-3xl);
        max-width: 10ch;
    }

    .hero-desc {
        display: block;
        max-width: 28ch;
        font-size: var(--text-sm);
        margin-bottom: 1.25rem;
    }

    .hero-bottom {
        padding: 0 1.25rem;
        bottom: 2rem;
    }
}

/* ============================================================
   TRANSICIONES DE ENTRADA/SALIDA PREMIUM
   ============================================================ */

@keyframes heroSlideIn {
    from {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(var(--hero-slide-rest-scale));
        filter: brightness(0.82);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(var(--hero-slide-active-scale));
        filter: brightness(1);
    }
}

@keyframes heroSlideOut {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(var(--hero-slide-active-scale));
        filter: brightness(1);
    }
    to {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(var(--hero-slide-leave-scale));
        filter: brightness(0.72);
    }
}

@keyframes heroContentIn {
    from {
        opacity: 0;
        transform: translate3d(0, 18px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes heroContentOut {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    to {
        opacity: 0;
        transform: translate3d(0, -12px, 0);
    }
}

.hero-slide .hero-content {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    will-change: opacity, transform;
}

.hero-slide.is-active .hero-content {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.hero-slide.is-entering .hero-content {
    animation: heroContentIn var(--hero-content-transition) var(--hero-content-ease) 240ms both;
}

.hero-slide.is-exiting .hero-content {
    animation: heroContentOut 560ms ease both;
}

.hero-slide.is-active .hero-cta:hover {
    transform: translateY(-2px);
}

.hero-slide.is-active .hero-cta:active {
    transform: translateY(0);
}

/* Accesibilidad: Desactivar animaciones si se prefiere movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        transform: none !important;
        filter: none !important;
        animation: none !important;
    }
    .hero-slide-bg {
        transform: none !important;
        animation: none !important;
    }
    .hero-slide .hero-content,
    .hero-slide .hero-tag,
    .hero-slide .hero-title,
    .hero-slide .hero-desc,
    .hero-slide .hero-cta {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

