/* G51 HERO — contenitore isolato dagli stili generici Litho. */
.g51-hero {
    --g51-hero-accent: #e30613;
    --g51-hero-height: 100svh;
    --g51-hero-bar-height: 64px;
    position: relative;
    width: 100%;
    padding: 0;
    overflow: hidden;
    background: #171717;
}

/* G51 HERO — il menu è trasparente soltanto mentre si trova sopra la foto. */
nav.navbar.header-transparent.g51-hero-nav-overlay {
    background: transparent !important;
}
.g51-hero::before { content: ''; position: absolute; z-index: 2; top: 0; right: 0; left: 0; height: 160px; background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent); pointer-events: none; }

.g51-hero--compact { --g51-hero-height: min(660px, 78svh); }
.g51-hero__viewport { position: relative; width: 100%; height: var(--g51-hero-height); overflow: hidden; }
.g51-hero--compact .g51-hero__viewport { min-height: 500px; }
.g51-hero__slides { width: 100%; height: 100%; }
.g51-hero__slide { position: relative; display: flex; width: 100%; height: 100%; color: #fff; isolation: isolate; }
.g51-hero__slide--dark { color: #171717; }
.g51-hero__picture,
.g51-hero__picture img,
.g51-hero__shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.g51-hero__picture { z-index: -2; display: block; overflow: hidden; background: #171717; }
.g51-hero__picture img { display: block; object-fit: cover; object-position: center; }
.g51-hero__slide--focus-left .g51-hero__picture img { object-position: left center; }
.g51-hero__slide--focus-right .g51-hero__picture img { object-position: right center; }

/* G51 HERO — velatura locale per immagini chiare o scure. */
.g51-hero__shade { z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.20) 58%, transparent); }
.g51-hero__slide--right .g51-hero__shade { background: linear-gradient(270deg, rgba(0,0,0,.72), rgba(0,0,0,.20) 58%, transparent); }
.g51-hero__slide--center .g51-hero__shade { background: linear-gradient(0deg, rgba(0,0,0,.72), rgba(0,0,0,.12) 72%, transparent); }
.g51-hero__slide--dark .g51-hero__shade { background: linear-gradient(90deg, rgba(255,255,255,.84), rgba(255,255,255,.24) 58%, transparent); }
.g51-hero__slide--dark.g51-hero__slide--right .g51-hero__shade { background: linear-gradient(270deg, rgba(255,255,255,.84), rgba(255,255,255,.24) 58%, transparent); }
.g51-hero__slide--dark.g51-hero__slide--center .g51-hero__shade { background: linear-gradient(0deg, rgba(255,255,255,.84), rgba(255,255,255,.15) 72%, transparent); }
.g51-hero__slide--shade-none .g51-hero__shade { display: none; }
.g51-hero__slide--shade-soft .g51-hero__shade { opacity: .5; }
.g51-hero__slide--shade-medium .g51-hero__shade { opacity: .75; }
.g51-hero__slide--shade-strong .g51-hero__shade { opacity: 1; }

/* G51 HERO — testo e pulsanti secondo la gerarchia del brief. */
.g51-hero__inner { position: relative; z-index: 1; display: flex; align-items: flex-end; width: 100%; padding-top: 180px; padding-bottom: clamp(70px, 9vh, 120px); }
.g51-hero--has-bar .g51-hero__inner { padding-bottom: calc(clamp(70px, 9vh, 120px) + var(--g51-hero-bar-height)); }
.g51-hero__slide--right .g51-hero__inner { justify-content: flex-end; }
.g51-hero__slide--center .g51-hero__inner { justify-content: center; }
.g51-hero__copy { width: min(100%, 780px); }
/* G51 HERO — allineamento completo della composizione a destra. */
.g51-hero__slide--right .g51-hero__copy { text-align: right; }
.g51-hero__slide--center .g51-hero__copy { text-align: center; }
.g51-hero__eyebrow { margin: 0 0 14px; color: var(--g51-hero-accent); font-size: 13px; font-weight: 700; letter-spacing: .16em; line-height: 1.4; text-transform: uppercase; }
.g51-hero__title { margin: 0 0 20px; color: inherit; font-size: clamp(46px, 5vw, 86px); font-weight: 700; letter-spacing: -.025em; line-height: 1.02; text-wrap: balance; }
.g51-hero__description { max-width: 680px; margin: 0 0 28px; color: inherit; font-size: clamp(16px, 1.35vw, 21px); line-height: 1.5; }
.g51-hero__slide--right .g51-hero__description { margin-left: auto; }
.g51-hero__slide--center .g51-hero__description { margin-right: auto; margin-left: auto; }
.g51-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.g51-hero__slide--right .g51-hero__actions { justify-content: flex-end; }
.g51-hero__slide--center .g51-hero__actions { justify-content: center; }
.g51-hero__button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 26px; border: 1px solid currentColor; border-radius: 0; color: inherit; font-size: 13px; font-weight: 700; letter-spacing: .08em; line-height: 1.2; text-align: center; text-transform: uppercase; }
.g51-hero__button--primary { border-color: var(--g51-hero-accent); background: var(--g51-hero-accent); color: #fff; }
.g51-hero__button--primary:hover,
.g51-hero__button--primary:focus-visible { border-color: #b9000b; background: #b9000b; color: #fff; }
.g51-hero__button--secondary:hover,
.g51-hero__button--secondary:focus-visible { background: rgba(255,255,255,.16); color: inherit; text-decoration: underline; }
.g51-hero__slide--dark .g51-hero__button--secondary:hover,
.g51-hero__slide--dark .g51-hero__button--secondary:focus-visible { background: rgba(0,0,0,.10); }
.g51-hero__button:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

/* G51 HERO — indicatori discreti dello slider Litho. */
.g51-hero__pagination { position: absolute; z-index: 3; right: 0; bottom: 24px; left: 0; display: flex; justify-content: center; gap: 8px; }
.g51-hero--has-bar .g51-hero__pagination { bottom: calc(var(--g51-hero-bar-height) + 16px); }
.g51-hero__pagination .swiper-pagination-bullet { width: 8px; height: 8px; margin: 0; background: #fff; opacity: .55; }
.g51-hero__pagination .swiper-pagination-bullet-active { background: var(--g51-hero-accent); opacity: 1; }

/* G51 HERO — barra informativa sovrapposta alla foto, ferma durante le slide. */
.g51-hero__fixed-bar { position: absolute; z-index: 4; right: 0; bottom: 0; left: 0; height: var(--g51-hero-bar-height); background: rgba(0,0,0,.55); color: #fff; }
.g51-hero__fixed-list { display: flex; align-items: center; justify-content: flex-start; flex-wrap: nowrap; gap: 0 22px; height: 100%; margin: 0 auto; padding-top: 8px; padding-bottom: 8px; overflow-x: auto; scrollbar-width: none; list-style: none; }
.g51-hero__fixed-list::-webkit-scrollbar { display: none; }
.g51-hero__fixed-list li { position: relative; flex: 0 0 auto; margin: 0; color: inherit; font-size: 12px; font-weight: 600; letter-spacing: .02em; line-height: 1.4; text-align: center; white-space: nowrap; }
.g51-hero__fixed-list li:first-child { margin-left: auto; }
.g51-hero__fixed-list li:last-child { margin-right: auto; }
.g51-hero__fixed-list li + li::before { content: '•'; display: inline-block; margin-right: 22px; color: var(--g51-hero-accent); }

/* G51 HERO — adattamento mobile della composizione. */
@media (max-width: 767px) {
    /* G51 HERO — barra più compatta senza accorciare la fotografia. */
    .g51-hero { --g51-hero-bar-height: 54px; }
    .g51-hero--compact { --g51-hero-height: 68svh; }
    .g51-hero__viewport { min-height: 0; }
    .g51-hero--compact .g51-hero__viewport { min-height: 480px; }
    .g51-hero__slide--mobile-focus-left .g51-hero__picture img { object-position: left center; }
    .g51-hero__slide--mobile-focus-center .g51-hero__picture img { object-position: center; }
    .g51-hero__slide--mobile-focus-right .g51-hero__picture img { object-position: right center; }
    .g51-hero__inner { align-items: flex-end; padding-top: 130px; padding-bottom: 76px; }
    .g51-hero--has-bar .g51-hero__inner { padding-bottom: calc(76px + var(--g51-hero-bar-height)); }
    .g51-hero__copy { width: 100%; text-align: left; }
    .g51-hero__slide--right .g51-hero__copy { text-align: left; }
    .g51-hero__slide--center .g51-hero__copy { text-align: left; }
    .g51-hero__slide--right .g51-hero__description { margin-left: 0; }
    .g51-hero__title { font-size: clamp(38px, 10vw, 58px); }
    .g51-hero__description { font-size: 16px; line-height: 1.4; }
    .g51-hero__slide--right .g51-hero__actions { justify-content: flex-start; }
    .g51-hero__slide--center .g51-hero__actions { justify-content: flex-start; }
    .g51-hero__fixed-list li:first-child,
    .g51-hero__fixed-list li:last-child { margin-right: 0; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .g51-hero *, .g51-hero *::before, .g51-hero *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}