/* ==========================================================================
   TCM SUCCHI - Hero Slider Cinematico con Effetto Movimento Video Continuo
   ========================================================================== */

.hero-slider-container {
    position: relative;
    height: 650px;
    background: #09170e;
    overflow: hidden;
    user-select: none;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.3s;
    z-index: 1;
    overflow: hidden;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* ==========================================================================
   EFFETTO VIDEO CONTINUO: MOVIMENTO CINEMATOGRAFICO COSTANTE (GIMBAL / DRONE)
   ========================================================================== */
.slide-bg {
    position: absolute;
    inset: -5%;
    width: 110%;
    height: 110%;
    background-size: cover;
    background-position: center 40%;
    transform-origin: center center;
    will-change: transform;
}

/* Quando la slide e attiva, esegue un ciclo continuo fluido che fa sembrare la foto un video */
.hero-slide.active .slide-bg {
    animation: continuousCinematicVideo 24s ease-in-out infinite alternate;
}

@keyframes continuousCinematicVideo {
    0% {
        transform: scale(1.05) translate(0%, 0%);
    }
    30% {
        transform: scale(1.12) translate(-1.2%, -0.8%);
    }
    70% {
        transform: scale(1.18) translate(1.4%, 0.5%);
    }
    100% {
        transform: scale(1.07) translate(0%, 1%);
    }
}

/* ==========================================================================
   FASCIO DI LUCE NATURALE SOLARE IN MOVIMENTO (SIMULAZIONE VIDEO LUCE VIVA)
   ========================================================================== */
.hero-slide::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at 35% 35%,
        rgba(255, 235, 185, 0.22) 0%,
        rgba(255, 215, 140, 0.12) 35%,
        rgba(0, 0, 0, 0) 70%
    );
    z-index: 2;
    pointer-events: none;
    animation: naturalSunlightDrift 16s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}

@keyframes naturalSunlightDrift {
    0% {
        transform: translate(0%, 0%) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translate(4%, 3%) rotate(2deg);
        opacity: 0.95;
    }
    100% {
        transform: translate(-3%, -2%) rotate(-1deg);
        opacity: 0.7;
    }
}

/* Canvas particelle atmosferiche (polvere solare e micro-nebbia di agrumi) */
.hero-particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.75;
}

/* Gradiente Scuro Cinema per la massima leggibilita del testo */
.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(9, 23, 14, 0.90) 0%,
        rgba(9, 23, 14, 0.75) 45%,
        rgba(9, 23, 14, 0.35) 75%,
        rgba(9, 23, 14, 0.15) 100%
    );
    z-index: 3;
    pointer-events: none;
}

/* Badge Live Industriale in Sovrimpressione */
.live-facility-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(14, 38, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #e5f4e6;
    margin-bottom: 18px;
    backdrop-filter: blur(8px);
    width: fit-content;
}

.live-facility-tag .live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #39e061;
    box-shadow: 0 0 10px #39e061;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.6; }
}

/* Contenuto Testuale */
.hero-content {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 var(--site-gutter);
    max-width: 860px;
    color: #ffffff;
}

.hero-content .eyebrow {
    color: #ffc978;
    margin-bottom: 12px;
    letter-spacing: 2.5px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s ease 0.15s;
}

.hero-content h1 {
    color: #ffffff;
    font-size: clamp(38px, 5.2vw, 68px);
    font-weight: 500;
    line-height: 1.08;
    margin-bottom: 22px;
    opacity: 0;
    transform: translateY(25px);
    transition: all 0.8s ease 0.3s;
}

.hero-content p {
    font-size: clamp(15px, 1.3vw, 18px);
    line-height: 1.8;
    color: #e5ede3;
    max-width: 600px;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(25px);
    transition: all 0.8s ease 0.45s;
}

.hero-content .hero-actions {
    display: flex;
    gap: 16px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease 0.6s;
}

.hero-slide.active .eyebrow,
.hero-slide.active h1,
.hero-slide.active p,
.hero-slide.active .hero-actions,
.hero-slide.active .live-facility-tag {
    opacity: 1;
    transform: translateY(0);
}

.btn-hero-primary {
    background: var(--color-accent);
    color: #ffffff;
    padding: 15px 30px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(226, 113, 29, 0.35);
}

.btn-hero-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(226, 113, 29, 0.5);
}

.btn-hero-outline {
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #ffffff;
    padding: 15px 26px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13.5px;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #ffffff;
}

/* Indicatori e Controlli allineati al gutter */
.slider-controls {
    position: absolute;
    bottom: 35px;
    right: var(--site-gutter);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 18px;
}

.slider-dots {
    display: flex;
    gap: 10px;
}

.slider-dot {
    width: 32px;
    height: 4px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.slider-dot.active {
    background: #ffffff;
    width: 50px;
}

.slider-dot.active::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-accent);
    transform-origin: left;
    animation: dotProgress 6s linear forwards;
}

@keyframes dotProgress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.slider-nav-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(6px);
}

.slider-nav-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: #ffffff;
}

@media (max-width: 768px) {
    .hero-slider-container {
        height: 540px;
    }

    .hero-content h1 {
        font-size: 33px;
        margin-bottom: 14px;
    }

    .hero-content p {
        font-size: 14px;
        line-height: 1.65;
        margin-bottom: 20px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn-hero-primary, .btn-hero-outline {
        padding: 12px 22px;
        font-size: 12.5px;
    }

    .slider-controls {
        bottom: 20px;
    }

    .slider-nav-btn {
        display: none;
    }
}
