/* Redesign pagina news - regole scoped su classi .news-* e #newsGallery, usa le variabili Bootstrap 5 gia' definite in Prolights.css.
   Valori allineati al mockup redesign/news-redesign/news-redesign/css/news-redesign.css */

:root {
    --news-muted: #656565;
    --news-icon-expand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cpolyline points='9 21 3 21 3 15'/%3E%3Cline x1='21' y1='3' x2='14' y2='10'/%3E%3Cline x1='3' y1='21' x2='10' y2='14'/%3E%3C/svg%3E");
}

::selection {
    background-color: var(--bs-primary);
    color: var(--bs-dark);
    text-shadow: none;
}

/* Continuita' navbar -> hero su mobile: senza questa regola #spaziotop (sitewide, base.php) torna trasparente sotto i 992px,
   creando uno stacco col bordo scuro sopra l'hero (nel mockup e' invece senza soluzione di continuita') */
@media (max-width: 991.98px) {
    #spaziotop:has(~ .news-hero) {
        background: var(--bs-dark) !important;
        margin-bottom: 0 !important;
    }
}

/* Hero */
.news-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: min(62vh, 720px);
    background: var(--bs-dark);
    color: #fff;
    overflow: hidden;
}

@media (min-width: 992px) {
    .news-hero {
        min-height: min(78vh, 920px);
    }
}

.news-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
}

.news-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        rgba(20, 20, 20, .85) 0%,
        rgba(20, 20, 20, .55) 28%,
        rgba(20, 20, 20, 0) 55%);
}

.news-hero-zoom {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 2;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(20, 20, 20, .6) var(--news-icon-expand) center / 1.15rem no-repeat;
    cursor: zoom-in;
    transition: background-color .2s ease;
}

.news-hero-zoom:hover {
    background-color: rgba(20, 20, 20, .85);
}

.news-hero-zoom:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 3px;
}

.news-hero-zoom[hidden] {
    display: none;
}

.news-hero.is-zoomable,
.news-hero.is-zoomable .news-hero-zoom {
    cursor: zoom-in;
}

.news-hero.is-zoomable .news-title,
.news-hero.is-zoomable .news-meta {
    cursor: auto;
}

.news-hero-content {
    position: relative;
    z-index: 1;
    padding-top: 5rem;
    padding-bottom: 2.5rem;
}

.news-title {
    max-width: 32ch;
    margin-bottom: 1rem;
    font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem);
    font-weight: 700;
    line-height: 1.08;
    color: #fff;
    text-shadow: 0 2px 24px rgba(20, 20, 20, .45);
}

.news-meta {
    font-size: .875rem;
    color: rgba(255, 255, 255, .8);
    text-shadow: 0 1px 12px rgba(20, 20, 20, .6);
}

.news-meta time {
    font-weight: 700;
    color: #fff;
}

.news-meta .news-meta-sep {
    opacity: .5;
}

.news-hero-credit {
    margin: 0;
    padding-top: .6rem;
    font-size: .8rem;
    line-height: 1.4;
    color: var(--news-muted);
}

.news-hero-credit strong {
    font-weight: 600;
    color: var(--bs-body-color);
}

/* Corpo articolo */
.news-body-wrap {
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.news-body {
    max-width: 68ch;
    font-size: 1.125rem;
    line-height: 1.65;
}

.news-body p {
    margin-bottom: 1.35rem;
}

.news-lead {
    font-size: 1.3rem;
    line-height: 1.55;
}

.news-body h2 {
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.25;
}

.news-body h2::before {
    content: "";
    display: block;
    width: 2.5rem;
    height: 4px;
    margin-bottom: .9rem;
    background: var(--bs-primary);
}

.news-body a {
    color: var(--bs-body-color);
    text-decoration: underline;
    text-decoration-color: var(--bs-primary);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: background-color .15s;
}

.news-body a:hover {
    background-color: var(--bs-primary);
    text-decoration-color: transparent;
}

/* Citazioni */
.news-blockquote {
    margin: 2rem 0;
    padding: .25rem 0 .25rem 1.5rem;
    border-left: 4px solid var(--bs-primary);
}

.news-blockquote p {
    margin-bottom: .75rem;
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.5;
}

.news-blockquote footer {
    font-size: .875rem;
    color: var(--news-muted);
}

.news-blockquote footer strong {
    color: var(--bs-body-color);
}

/* Pull quote grande */
.news-blockquote-lg {
    margin: 2.75rem 0;
    padding: 0;
    border-left: 0;
}

.news-blockquote-lg p {
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    font-style: normal;
    font-weight: 700;
    line-height: 1.25;
}

.news-blockquote-lg p::before {
    content: "\201C";
    display: block;
    margin-bottom: -.35em;
    font-size: 3em;
    line-height: 1;
    color: var(--bs-primary);
}

/* Immagini nel testo */
.news-figure {
    margin: 2.5rem 0;
}

.news-figure img {
    width: 100%;
    height: auto;
    border-radius: var(--bs-border-radius);
}

.news-figure figcaption {
    margin-top: .6rem;
    font-size: .85rem;
    color: var(--news-muted);
}

.news-body .news-figure-link {
    position: relative;
    display: block;
    border-radius: var(--bs-border-radius);
    text-decoration: none;
    cursor: zoom-in;
}

.news-body .news-figure-link:hover {
    background-color: transparent;
}

.news-body .news-figure-link:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 3px;
}

.news-figure-link::after {
    content: "";
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: rgba(20, 20, 20, .6) var(--news-icon-expand) center / 1rem no-repeat;
    transition: background-color .2s ease;
}

.news-figure-link:hover::after {
    background-color: rgba(20, 20, 20, .85);
}

.news-credits {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--bs-border-color);
    font-size: .875rem;
    color: var(--news-muted);
}

.news-credits p {
    margin-bottom: .5rem;
}

/* Aside: scheda prodotto, dati progetto, share */
.news-sticky {
    position: sticky;
    top: 98px;
}

@media (max-width: 991.98px) {
    .news-sticky {
        position: static;
    }
}

.news-products {
    border-radius: var(--bs-border-radius);
    background: #fff;
    border: 1px solid var(--bs-border-color) !important;
}

.news-products .card-body {
    padding: 1rem 1.25rem;
}

.news-products-list li + li {
    border-top: 1px solid var(--bs-border-color);
}

.news-product-row {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .6rem 0;
    color: var(--bs-body-color);
    text-decoration: none;
}

.news-product-thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    padding: .25rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-light);
    object-fit: contain;
}

.news-product-row-text {
    flex: 1 1 auto;
    min-width: 0;
}

.news-product-row-name {
    display: block;
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.25;
}

.news-product-row-name strong {
    font-weight: 700;
}

.news-product-row-tagline {
    display: block;
    margin-top: .15rem;
    font-size: .8rem;
    line-height: 1.35;
    color: var(--news-muted);
}

.news-product-row-arrow {
    flex: 0 0 auto;
    color: var(--bs-body-color);
    transition: transform .2s ease;
}

.news-product-row:hover .news-product-row-name,
.news-product-row:focus-visible .news-product-row-name {
    text-decoration: underline;
    text-decoration-color: var(--bs-primary);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.news-product-row:hover .news-product-row-thumb,
.news-product-row:hover .news-product-thumb {
    background: var(--bs-primary);
}

.news-product-row:hover .news-product-row-arrow {
    transform: translateX(4px);
}

/* Dati progetto: in fondo all'articolo, dopo il testo */
.news-facts {
    margin-top: 3rem;
    padding: 1.5rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-light);
    font-size: 1rem;
    line-height: 1.5;
}

.news-body .news-facts h2 {
    margin-top: 0;
    font-size: .9rem;
}

.news-body .news-facts h2::before {
    display: none;
}

.news-facts-list {
    display: grid;
    grid-template-columns: 10rem 1fr;
    column-gap: 1.5rem;
    row-gap: .75rem;
    align-items: start;
}

.news-facts dt {
    margin: 0;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.5rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--news-muted);
}

.news-facts dd {
    margin: 0;
    line-height: 1.5rem;
}

@media (max-width: 575.98px) {
    .news-facts-list {
        grid-template-columns: 1fr;
        row-gap: .2rem;
    }

    .news-facts dd + dt {
        margin-top: .75rem;
    }
}

.news-share {
    margin-top: 1.5rem;
}

.news-inline-aside {
    margin-top: 2.5rem;
}

.news-inline-aside .news-share {
    margin-top: 0;
}

.news-inline-aside .news-products {
    margin-top: 2rem;
}

.news-share .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 50%;
}

.news-share .btn.is-copied {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: var(--bs-dark);
}

/* Prev/next */
.news-card-kicker {
    display: block;
    margin-bottom: .35rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--news-muted);
}

.news-prevnext a {
    max-width: 48%;
    color: var(--bs-body-color);
    text-decoration: none;
}

.news-prevnext a:hover .news-prevnext-title {
    text-decoration: underline;
    text-decoration-color: var(--bs-primary);
    text-decoration-thickness: 2px;
}

.news-prevnext small {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--news-muted);
}

/* Galleria foto (modal fullscreen + carousel di Bootstrap) */
.news-gallery .modal-content {
    border: 0;
    border-radius: 0;
    background: var(--bs-dark);
    color: #fff;
}

.news-gallery-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem .75rem .75rem 1.25rem;
}

.news-gallery-count {
    font-size: .875rem;
    font-weight: 700;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, .8);
}

.news-gallery .btn-close {
    padding: .75rem;
    opacity: .85;
}

.news-gallery .btn-close:hover {
    opacity: 1;
}

.news-gallery .carousel {
    flex: 1 1 auto;
    height: 100%;
}

.news-gallery .carousel-inner,
.news-gallery .carousel-item {
    height: 100%;
}

.news-gallery .carousel-item {
    transition-duration: .4s;
}

.news-gallery-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0;
    padding: 4rem 5.5rem 2rem;
}

.news-gallery-slide img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 10rem);
    max-height: calc(100dvh - 10rem);
    width: auto;
    height: auto;
    object-fit: contain;
}

.news-gallery-media {
    position: relative;
    max-width: 100%;
}

/* Bottone "link della foto" (es. sito del fotografo), solo se l'immagine ha data-photo-href */
.news-gallery-source {
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    max-width: calc(100% - 1.5rem);
    padding: .5rem .9rem;
    border-radius: 50rem;
    background: rgba(20, 20, 20, .72);
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

.news-gallery-source:hover {
    background: var(--bs-primary);
    color: var(--bs-dark);
}

.news-gallery-source:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 2px;
}

.news-gallery-source-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-gallery-slide figcaption {
    max-width: 68ch;
    margin-top: 1rem;
    font-size: .875rem;
    line-height: 1.45;
    text-align: center;
    color: rgba(255, 255, 255, .75);
}

.news-gallery .carousel-control-prev,
.news-gallery .carousel-control-next {
    z-index: 2;
    width: 5.5rem;
    opacity: .85;
}

.news-gallery .carousel-control-prev:hover,
.news-gallery .carousel-control-next:hover {
    opacity: 1;
}

.news-gallery .carousel-control-prev-icon,
.news-gallery .carousel-control-next-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .12);
    background-size: 45%;
}

.news-gallery.is-single .carousel-control-prev,
.news-gallery.is-single .carousel-control-next {
    display: none;
}

/* Responsive */
@media (max-width: 991.98px) {
    .news-hero-content {
        padding-top: 4rem;
        padding-bottom: 2rem;
    }

    .news-body-wrap {
        padding-top: 2rem;
        padding-bottom: 3rem;
    }

    .news-body {
        font-size: 1.0625rem;
    }
}

@media (max-width: 575.98px) {
    .news-blockquote {
        padding-left: 1rem;
    }

    .news-blockquote p {
        font-size: 1.125rem;
    }

    .news-hero-zoom {
        top: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }

    .news-gallery-slide {
        padding: 3.75rem 0 1.5rem;
    }

    .news-gallery-slide figcaption {
        padding: 0 1rem;
    }

    .news-gallery .carousel-control-prev,
    .news-gallery .carousel-control-next {
        width: 3.25rem;
    }

    .news-gallery .carousel-control-prev-icon,
    .news-gallery .carousel-control-next-icon {
        width: 2.25rem;
        height: 2.25rem;
        background-color: rgba(20, 20, 20, .55);
    }
}

/* Telefono (sotto i 768px). Solo qui: il desktop non cambia. */
@media (max-width: 767.98px) {
    .news-hero {
        display: block;
        min-height: 0;
    }

    .news-hero-img {
        position: relative;
        inset: auto;
        height: auto;
        aspect-ratio: 4 / 3;
        object-position: center;
    }

    .news-hero::after {
        display: none;
    }

    .news-hero-content {
        padding-top: 1.25rem;
        padding-bottom: 1.5rem;
    }

    .news-title {
        margin-bottom: .75rem;
        font-size: 1.75rem;
        line-height: 1.12;
        text-shadow: none;
    }

    .news-meta {
        text-shadow: none;
    }

    .news-figure {
        margin-inline: -.75rem;
    }

    .news-figure img,
    .news-body .news-figure-link {
        border-radius: 0;
    }

    .news-figure figcaption {
        padding-inline: .75rem;
    }

    .news-products {
        border: 0 !important;
        background: transparent;
        box-shadow: none !important;
    }

    .news-products .card-body {
        padding: 0;
    }

    .news-products-list {
        display: flex;
        gap: .75rem;
        margin-inline: -.75rem;
        padding: 0 .75rem .25rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: .75rem;
        scrollbar-width: none;
    }

    .news-products-list::-webkit-scrollbar {
        display: none;
    }

    .news-products-list li {
        flex: 0 0 80%;
        scroll-snap-align: start;
    }

    .news-products-list li + li {
        border-top: 0;
    }

    .news-product-row {
        height: 100%;
        padding: .75rem;
        border: 1px solid var(--bs-border-color);
        border-radius: var(--bs-border-radius);
        background: #fff;
    }

    .news-prevnext {
        flex-direction: column;
        gap: 1.25rem !important;
    }

    .news-prevnext a {
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .news-body a,
    .news-product-row-arrow,
    .news-figure-link::after,
    .news-gallery-source,
    .news-hero-zoom {
        transition: none;
    }
}

@media print {
    .news-hero::after,
    .news-figure-link::after,
    .news-hero-zoom,
    .news-gallery,
    .news-share {
        display: none;
    }

    .news-hero {
        min-height: 0;
        color: #000;
    }

    .news-hero-img {
        position: static;
        max-height: 60mm;
    }
}
