/* Impedisce al wrapper di Elementor di collassare ad altezza 0 */
#home-slider, #home-slider > div.elementor-shortcode {
    width: 100% !important;
    height: 100vh !important;
    min-height: 500px !important;
    display: block !important;
}

/* --- Core Hero Slider Layout --- */
.hero-slider-container.swiper {
    background-color: #0d0d0d !important;
    width: 100% !important;
    height: 100% !important;
}

.hero-slide {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex; /* Need flex for the overlay content placement */
    flex-direction: column;
}

/* Assicurati che i video abbiano una dimensione bloccata e visibile */
.hero-video-bg {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.8) 100%); /* Subtle gradient overlay */
    z-index: 2;
}

/*
 * BOTTONE PLAY/PAUSA
 */
.hero-play-btn {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    /* Centra il pulsante compensando leggermente la larghezza del triangolo */
    transform: translate(-35%, -50%) !important;

    /* Nessun cerchio, nessun bordo esterno */
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
    z-index: 20;

    /* Disegna il triangolo perfetto tramite i bordi CSS */
    border-style: solid !important;
    border-width: 45px 0 45px 75px !important; /* Altezza e larghezza del triangolo */
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.85) !important; /* Colore bianco opaco/semitrasparente */
    transition: border-color 0.3s ease, transform 0.3s ease !important;
}

.hero-play-btn:hover {
    /* Effetto Hover: Il triangolo diventa bianco pieno e si illumina */
    border-color: transparent transparent transparent rgba(255, 255, 255, 1) !important;
    transform: translate(-35%, -50%) scale(1.08) !important; /* Leggero zoom dinamico */
}

.hero-slide.video-is-playing .hero-play-btn {
    /* Quando il JS aggiunge la classe .video-is-playing alla slide,
    trasformiamo il triangolo in due barre verticali di pausa nette */
    width: 60px !important;
    height: 80px !important;
    border: none !important; /* Rimuove il triangolo */
    transform: translate(-50%, -50%) !important; /* Ripristina la centratura geometrica */

    /* Disegna le due barre verticali usando un gradiente lineare nativo */
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.85) 35%,
        transparent 35%,
        transparent 65%,
        rgba(255, 255, 255, 0.85) 65%,
        rgba(255, 255, 255, 0.85) 100%
    ) !important;
}

.hero-slide.video-is-playing .hero-play-btn:hover {
    /* Hover sullo stato di pausa */
    transform: translate(-50%, -50%) scale(1.08) !important;
    background: linear-gradient(
        90deg,
        #fff 0%, #fff 35%,
        transparent 35%, transparent 65%,
        #fff 65%, #fff 100__
    ) !important;
}

/*
 * BOTTONE PLAY/PAUSA: mobile view
 */
@media (max-width: 768px) {

    /* Stato PLAY (Triangolo) su Mobile */
    .hero-play-btn {
        /* Sposta il pulsante in alto: puoi usare una percentuale (es. 20%)
           oppure un valore fisso in pixel (es. 60px) dalla cima del contenitore */
        top: 20% !important;
        left: 50% !important;

        /* Ridimensiona leggermente il triangolo su mobile per non farlo gigante */
        border-width: 30px 0 30px 50px !important;

        /* Mantiene la centratura orizzontale compensando la larghezza del triangolo ridotto */
        transform: translate(-35%, -50%) !important;
    }

    /* Hover Stato PLAY su Mobile */
    .hero-play-btn:hover {
        transform: translate(-35%, -50%) scale(1.05) !important;
    }

    /* Stato PAUSA (Due barre) su Mobile */
    .hero-slide.video-is-playing .hero-play-btn {
        top: 20% !important; /* Deve coincidere esattamente con il top impostato sopra */
        left: 50% !important;

        /* Ridimensiona proporzionalmente le barre di pausa per matchare il triangolo mobile */
        width: 40px !important;
        height: 55px !important;

        /* Ripristina la centratura geometrica perfetta per il rettangolo */
        transform: translate(-50%, -50%) !important;
    }

    /* Hover Stato PAUSA su Mobile */
    .hero-slide.video-is-playing .hero-play-btn:hover {
        transform: translate(-50%, -50%) scale(1.05) !important;
    }
}

/* --- Text at Left Bottom + Controls Under Text --- */
.hero-text-and-controls-container {
    position: absolute;
    bottom: 50px; /* Adjust distance from bottom */
    left: 8%; /* Adjust distance from left */
    z-index: 10;
    max-width: 80%; /* Ensure it doesn't wrap too wide */
    display: flex;
    flex-direction: column; /* Text first, controls underneath */
}

.hero-slide-text {
    text-align: left;
    margin-bottom: 40px; /* Space from text to controls */
}

.hero-slide-text h1 {
    font-family: "Posterama 2001", sans-serif; /* Use your specific font */
    font-size: 80px; /* Adjust size based on design */
    font-weight: 600;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: 2px;
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

.hero-slide-text p {
    font-family: "Sofia Pro", sans-serif;
    font-size: 28px;
    font-weight: 300;
    color: #ffffff;
    line-height: 1.3;
    margin: 0;
}

/* --- Controls (Arrows) --- */
.hero-slide-controls {
    display: flex;
    gap: 15px; /* Spacing between the arrows */
    align-items: center;
    text-align: left; /* Keep left alignment */
}

/* Swiper default overrides for the custom style */
.swiper-button-prev.hero-arrow,
.swiper-button-next.hero-arrow {
    position: static; /* Let flex position them */
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: #ffffff;
    background-color: transparent;
    margin: 0;
    transition: border-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-button-prev.hero-arrow:hover,
.swiper-button-next.hero-arrow:hover {
    border-color: rgba(255, 255, 255, 1);
}

/* Override Swiper's default pseudo-elements */
.swiper-button-prev.hero-arrow::after,
.swiper-button-next.hero-arrow::after {
    font-size: 20px; /* Resize Swiper icon */
    font-weight: bold;
}
