/* ==================================================
   HERO HOME
   ================================================== */

.hero-home {
    --hero-min-height: 720px;
    --hero-overlay: rgba(10, 24, 32, 0.68);
    --hero-primary: #f28c18;
    --hero-primary-hover: #d97608;
    --hero-whatsapp: #25d366;
    --hero-whatsapp-hover: #1eaf55;

    position: relative;
    display: flex;
    align-items: center;
    min-height: var(--hero-min-height);
    padding: 120px 0 90px;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background-color: #13242d;
}

/* Contenedor general */

.hero-home .container {
    width: min(100% - 40px, 1200px);
    margin-inline: auto;
}

/* ==================================================
   SLIDER DE FONDO
   ================================================== */

.hero-slider {
    position: absolute;
    z-index: -3;
    inset: 0;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transform: scale(1.04);
    animation: heroSlide 24s infinite;
    will-change: opacity, transform;
}

/* Animación preparada para cuatro imágenes */

.hero-slide:nth-child(1) {
    animation-delay: 0s;
}

.hero-slide:nth-child(2) {
    animation-delay: 6s;
}

.hero-slide:nth-child(3) {
    animation-delay: 12s;
}

.hero-slide:nth-child(4) {
    animation-delay: 18s;
}

@keyframes heroSlide {
    0% {
        opacity: 0;
        transform: scale(1.04);
    }

    4% {
        opacity: 1;
    }

    25% {
        opacity: 1;
    }

    29% {
        opacity: 0;
    }

    100% {
        opacity: 0;
        transform: scale(1.12);
    }
}

/* Si solamente existe una imagen */

.hero-slide:only-child {
    opacity: 1;
    animation: none;
    transform: scale(1);
}

/* ==================================================
   CAPA OSCURA
   ================================================== */

.hero-overlay {
    position: absolute;
    z-index: -2;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            rgba(8, 20, 27, 0.92) 0%,
            rgba(8, 20, 27, 0.72) 48%,
            rgba(8, 20, 27, 0.3) 100%
        ),
        linear-gradient(
            0deg,
            rgba(8, 20, 27, 0.35) 0%,
            transparent 45%
        );
}

/* ==================================================
   CONTENIDO
   ================================================== */

.hero-home-content {
    position: relative;
    z-index: 1;
}

.hero-copy {
    max-width: 780px;
}

.hero-home .kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-home .kicker::before {
    width: 35px;
    height: 3px;
    content: "";
    border-radius: 999px;
    background-color: var(--hero-primary);
}

.hero-home h1 {
    max-width: 850px;
    margin: 0 0 24px;
    color: #fff;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.03;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.hero-subtitle {
    max-width: 720px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(1.2rem, 2.3vw, 1.65rem);
    font-weight: 600;
    line-height: 1.4;
}

.hero-intro {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.7;
}

/* ==================================================
   BOTONES
   ================================================== */

.hero-home .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.hero-home .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 24px;
    border: 2px solid transparent;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.hero-home .btn:hover {
    color: #fff;
    transform: translateY(-2px);
}

.hero-home .btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

/* Llamar */

.hero-home .btn-primary {
    background-color: var(--hero-primary);
    border-color: var(--hero-primary);
    box-shadow: 0 10px 25px rgba(242, 140, 24, 0.25);
}

.hero-home .btn-primary:hover {
    background-color: var(--hero-primary-hover);
    border-color: var(--hero-primary-hover);
}

/* WhatsApp */

.hero-home .btn-whatsapp {
    background-color: var(--hero-whatsapp);
    border-color: var(--hero-whatsapp);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.2);
}

.hero-home .btn-whatsapp:hover {
    background-color: var(--hero-whatsapp-hover);
    border-color: var(--hero-whatsapp-hover);
}

/* Botón transparente */

.hero-home .btn-ghost {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(6px);
}

.hero-home .btn-ghost:hover {
    color: #17262d;
    background-color: #fff;
    border-color: #fff;
}

/* ==================================================
   TABLET
   ================================================== */

@media (max-width: 991px) {
    .hero-home {
        --hero-min-height: 650px;

        padding: 100px 0 70px;
    }

    .hero-overlay {
        background: rgba(8, 20, 27, 0.7);
    }

    .hero-copy {
        max-width: 700px;
    }
}

/* ==================================================
   MÓVIL
   ================================================== */

@media (max-width: 767px) {
    .hero-home {
        --hero-min-height: 620px;

        align-items: flex-end;
        padding: 110px 0 55px;
    }

    .hero-home .container {
        width: min(100% - 30px, 1200px);
    }

    .hero-home .kicker {
        margin-bottom: 15px;
        font-size: 0.75rem;
    }

    .hero-home h1 {
        margin-bottom: 18px;
        font-size: clamp(2.25rem, 11vw, 3.4rem);
    }

    .hero-subtitle {
        margin-bottom: 14px;
        font-size: 1.15rem;
    }

    .hero-intro {
        font-size: 1rem;
        line-height: 1.55;
    }

    .hero-home .actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 26px;
    }

    .hero-home .btn {
        width: 100%;
    }

    .hero-slide {
        background-position: 60% center;
    }
}

/* ==================================================
   ACCESIBILIDAD
   ================================================== */

@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        display: none;
        animation: none;
    }

    .hero-slide:first-child {
        display: block;
        opacity: 1;
        transform: none;
    }

    .hero-home .btn {
        transition: none;
    }
}