/* =========================================================
   FT ITALIA - PAGINA NOVITA 2026
   Stili isolati: prefisso .novita-
========================================================= */

.novita-page {
    overflow: hidden;
}

.novita-hero {
    position: relative;
    isolation: isolate;
}

.novita-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 360px;
    height: 360px;
    right: -120px;
    bottom: -220px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
}

.novita-section {
    padding-top: clamp(48px, 7vw, 92px);
    padding-bottom: clamp(58px, 8vw, 110px);
}

.novita-feature {
    position: relative;
    overflow: hidden;
    padding: clamp(26px, 4vw, 54px);
    border: 1px solid rgba(31, 59, 128, .10);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 22px 58px rgba(22, 37, 70, .08);
}

.novita-feature + .novita-feature {
    margin-top: clamp(34px, 5vw, 62px);
}

.novita-feature::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    right: -185px;
    top: -185px;
    border-radius: 50%;
    background: rgba(34, 65, 142, .055);
    pointer-events: none;
}

.novita-feature--alternate::before {
    right: auto;
    left: -185px;
}

.novita-feature__header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 14px;
}

.novita-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 8px;
    color: #24458f;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.novita-kicker::before {
    content: "";
    width: 26px;
    height: 2px;
    background: currentColor;
}

.novita-feature h2 {
    margin: 0;
    color: #1d315f;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.05;
}

.novita-index {
    color: rgba(36, 69, 143, .10);
    font-size: clamp(3.4rem, 7vw, 6.6rem);
    font-weight: 800;
    line-height: .8;
    letter-spacing: -.05em;
    user-select: none;
}

.novita-availability {
    max-width: 1050px;
    margin: 0 0 clamp(26px, 4vw, 42px);
    color: #667085;
    font-size: clamp(.98rem, 1.3vw, 1.08rem);
    line-height: 1.75;
}

.novita-availability strong {
    color: #243b70;
}

.novita-gallery {
    display: grid;
    gap: clamp(18px, 2.5vw, 30px);
    align-items: stretch;
}

.novita-gallery--clip,
.novita-gallery--press {
    grid-template-columns: minmax(290px, .76fr) minmax(0, 1.24fr);
}

.novita-figure {
    min-width: 0;
    margin: 0;
}

.novita-figure--product {
    height: 100%;
}

.novita-figure--detail {
    position: relative;
    padding-bottom: 48px;
}

.novita-image-shell {
    position: relative;
    height: 100%;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #e4e8ef;
    border-radius: 18px;
    background: linear-gradient(145deg, #fff 0%, #f8fafc 100%);
    color: inherit;
    text-decoration: none;
    cursor: zoom-in;
    outline: none;
}

.novita-image-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
    pointer-events: none;
}

.novita-image-shell:focus-visible {
    box-shadow: 0 0 0 4px rgba(36, 69, 143, .18);
}

.novita-image-shell img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .35s ease, filter .35s ease;
}

.novita-figure:hover .novita-image-shell img,
.novita-image-shell:focus-visible img {
    transform: scale(1.025);
}

.novita-zoom-hint {
    position: absolute;
    z-index: 2;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 50%;
    background: rgba(19, 35, 71, .78);
    box-shadow: 0 10px 24px rgba(18, 31, 61, .18);
    backdrop-filter: blur(10px);
    transform: translateY(-5px);
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease, background .25s ease;
}

.novita-zoom-hint svg {
    width: 19px;
    height: 19px;
    fill: #fff;
}

.novita-image-shell:hover .novita-zoom-hint,
.novita-image-shell:focus-visible .novita-zoom-hint {
    opacity: 1;
    transform: translateY(0);
}

.novita-image-shell:hover .novita-zoom-hint {
    background: rgba(36, 69, 143, .92);
}

.novita-details-grid {
    display: grid;
    gap: clamp(14px, 1.7vw, 22px);
}

.novita-details-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.novita-details-grid--stack {
    grid-template-columns: 1fr;
}

.novita-image-shell--detail {
    min-height: 420px;
}

.novita-image-shell--wide {
    min-height: 230px;
    aspect-ratio: 2.2 / 1;
}

/* Caption editoriale: sovrapposto all'immagine come piccola scheda */
.novita-caption {
    position: absolute;
    z-index: 3;
    left: 14px;
    right: 14px;
    bottom: 0;
    min-height: 76px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "meta optional"
        "title optional";
    align-items: center;
    column-gap: 14px;
    padding: 13px 16px 14px;
    border: 1px solid rgba(31, 59, 128, .10);
    border-radius: 15px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 15px 35px rgba(22, 37, 70, .13);
    backdrop-filter: blur(12px);
}

.novita-caption::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 0;
    width: 34px;
    height: 2px;
    border-radius: 99px;
    background: #24458f;
}

.novita-caption__meta {
    grid-area: meta;
    color: #8590a3;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.novita-caption strong {
    grid-area: title;
    margin-top: 3px;
    color: #1d315f;
    font-size: .93rem;
    line-height: 1.25;
}

.novita-caption > span:last-child {
    grid-area: optional;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    border-radius: 999px;
    background: #eef3ff;
    color: #24458f;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* =========================================================
   LIGHTBOX / GALLERY + ZOOM
========================================================= */
html.novita-lightbox-open,
html.novita-lightbox-open body {
    overflow: hidden;
}

.novita-lightbox {
    position: fixed;
    z-index: 99999;
    inset: 0;
    visibility: hidden;
    opacity: 0;
    transition: opacity .22s ease, visibility .22s ease;
}

.novita-lightbox.is-open {
    visibility: visible;
    opacity: 1;
}

.novita-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 14, 29, .90);
    backdrop-filter: blur(12px);
}

.novita-lightbox__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding: clamp(14px, 2.5vw, 30px);
}

.novita-lightbox__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 52px;
    color: #fff;
}

.novita-lightbox__counter {
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    opacity: .72;
}

.novita-lightbox__tools {
    display: flex;
    align-items: center;
    gap: 7px;
}

.novita-lightbox__tool,
.novita-lightbox__zoom-level,
.novita-lightbox__close,
.novita-lightbox__nav {
    border: 1px solid rgba(255, 255, 255, .20);
    color: #fff;
    background: rgba(255, 255, 255, .08);
    box-shadow: none;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.novita-lightbox__tool:hover,
.novita-lightbox__zoom-level:hover,
.novita-lightbox__close:hover,
.novita-lightbox__nav:hover {
    border-color: rgba(255, 255, 255, .42);
    background: rgba(255, 255, 255, .16);
}

.novita-lightbox__tool,
.novita-lightbox__close {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 1.35rem;
    line-height: 1;
}

.novita-lightbox__close {
    margin-left: 7px;
    font-size: 1.55rem;
}

.novita-lightbox__zoom-level {
    min-width: 64px;
    height: 42px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.novita-lightbox__stage {
    position: relative;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 8px clamp(48px, 6vw, 88px) 16px;
    border-radius: 20px;
    cursor: zoom-in;
    touch-action: none;
}

.novita-lightbox__stage.is-zoomed {
    cursor: grab;
}

.novita-lightbox__stage.is-dragging {
    cursor: grabbing;
}

.novita-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
    transition: opacity .18s ease;
}

.novita-lightbox__image.is-loading {
    opacity: .18;
}

.novita-lightbox__loader {
    position: absolute;
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255, 255, 255, .22);
    border-top-color: #fff;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.novita-lightbox__loader.is-visible {
    opacity: 1;
    animation: novita-spin .75s linear infinite;
}

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

.novita-lightbox__nav {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
    transform: translateY(-50%);
}

.novita-lightbox__nav:hover {
    transform: translateY(-50%) scale(1.04);
}

.novita-lightbox__nav--prev {
    left: clamp(14px, 2.5vw, 34px);
}

.novita-lightbox__nav--next {
    right: clamp(14px, 2.5vw, 34px);
}

.novita-lightbox__caption {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    color: #fff;
    text-align: center;
}

.novita-lightbox__title {
    font-size: .95rem;
}

.novita-lightbox__text {
    color: rgba(255, 255, 255, .68);
    font-size: .82rem;
}

@media (hover: none) {
    .novita-zoom-hint {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1199.98px) {
    .novita-gallery--clip,
    .novita-gallery--press {
        grid-template-columns: 1fr;
    }

    .novita-figure--product .novita-image-shell {
        min-height: 520px;
    }
}

@media (max-width: 767.98px) {
    .novita-feature {
        padding: 22px 18px 25px;
        border-radius: 20px;
    }

    .novita-feature__header {
        gap: 12px;
    }

    .novita-index {
        font-size: 3.2rem;
    }

    .novita-details-grid--three {
        grid-template-columns: 1fr;
    }

    .novita-figure--product .novita-image-shell,
    .novita-image-shell,
    .novita-image-shell--detail {
        min-height: 340px;
    }

    .novita-image-shell--wide {
        min-height: 190px;
        aspect-ratio: 16 / 9;
    }

    .novita-figure--detail {
        padding-bottom: 42px;
    }

    .novita-caption {
        left: 10px;
        right: 10px;
        min-height: 70px;
        padding: 12px 14px 13px;
    }

    .novita-lightbox__panel {
        padding: 10px;
    }

    .novita-lightbox__stage {
        margin: 4px 0 12px;
        border-radius: 12px;
    }

    .novita-lightbox__nav {
        top: auto;
        bottom: 74px;
        width: 44px;
        height: 44px;
        background: rgba(7, 14, 29, .66);
        transform: none;
    }

    .novita-lightbox__nav:hover {
        transform: none;
    }

    .novita-lightbox__nav--prev { left: 16px; }
    .novita-lightbox__nav--next { right: 16px; }

    .novita-lightbox__caption {
        min-height: 62px;
        padding: 0 56px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
    }

    .novita-lightbox__text {
        display: none;
    }
}

@media (max-width: 479.98px) {
    .novita-index {
        display: none;
    }

    .novita-figure--product .novita-image-shell,
    .novita-image-shell,
    .novita-image-shell--detail {
        min-height: 300px;
    }

    .novita-image-shell--wide {
        min-height: 165px;
    }

    .novita-caption strong {
        font-size: .88rem;
    }

    .novita-caption > span:last-child {
        padding: 5px 7px;
    }

    .novita-lightbox__counter {
        display: none;
    }

    .novita-lightbox__tool,
    .novita-lightbox__close {
        width: 38px;
        height: 38px;
    }

    .novita-lightbox__zoom-level {
        min-width: 58px;
        height: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .novita-image-shell img,
    .novita-zoom-hint,
    .novita-lightbox,
    .novita-lightbox__tool,
    .novita-lightbox__zoom-level,
    .novita-lightbox__close,
    .novita-lightbox__nav,
    .novita-lightbox__image {
        transition: none;
    }
}
