/* ---------------------------------------------------------------------- */
/* ! CUSTOM BLOCKS */
/* ---------------------------------------------------------------------- */

/* ! - Hero */
.rw-hero {height: 100vh; max-height: 100vh; overflow: hidden;}


.rw-hero .hero__badges {height: 40px;}
.rw-hero .hero__badges img {max-height: 100%; max-width: 30%; object-fit: contain;}

/* Video backgound */
/* Wrapper video */
.rw-hero__video-wrapper {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

/* Video layers */
.rw-hero__video {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: brightness(.5);
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}


.rw-hero__video.is-active {
    opacity: 1;
    z-index: 2;
}

/* Poster fallback */
.rw-hero__poster {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    z-index: 3; /* sopra i video finché non parte */
}

/* Poster loading spinner */
.rw-hero__poster.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    pointer-events: none; /* non blocca interazioni */
    z-index: 4;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Contenuto Hero sopra il video */
.rw-hero__overlay {
    position: relative;
    z-index: 10; /* sempre sopra video e poster */
}

/* Optional: fade-in testo o CTA */
.rw-hero__content {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

/* Fade del poster quando il video parte */
.rw-hero__poster:not(.is-loading) {
    opacity: 0;
}

/* Mobile optimization: spinner più piccolo e semi-trasparente */
@media (max-width: 768px) {
    .rw-hero__poster.is-loading::after {
        width: 24px;
        height: 24px;
        margin: -12px 0 0 -12px;
        border-width: 3px;
        border-top-color: rgba(255,255,255,0.8);
    }
}


/* .rw-hero__video {position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; filter: brightness(.35) hue-rotate(38deg) contrast(1.25)} */

.rw-hero .hero__highlights {margin-top: -5vh; margin-bottom: 5vh; gap:2%; max-width: 1200px;}
.rw-hero .hero__highlights>.col {border-radius: 10px; line-height: 1.2;}
.rw-highlight-item__icon img {width: 60px; height: 60px;}
.only-small-devices {display: none;}

@media (max-width: 1179px) and (min-width: 992px) {
  .rw-hero .rw-hero__content {height: 80%;}
  .rw-hero .hero__highlights>.col {max-height: 220px;}
  .hero__highlights.col-90 {width: 100%;}
}

@media (max-width: 1179px) {
  .rw-hero .hero__badges {height: 15px; margin-top: 10px;}
  .rw-hero .hero__badges img {max-height: 100%; width: auto;}
}

@media (max-width: 767px) {
  .hero__logo-mobile {position: absolute; top: 5vw;left: 5vw;width:24vw; height:auto; max-height: calc(18vh - 20px - 10vw); object-fit: contain;}
  .rw-hero>.wp-container {height: calc(100vh - var(--h-header));}
}

@media (max-width: 767px) and (orientation: landscape) {
  .rw-hero>.wp-container {padding-top: 140px;}
  .rw-hero .rw-hero__content {width: 60%; padding-bottom: 0!important;}
}



