/* =========================
   HEADER NEWS SINGOLA
   ========================= */

.page-header--news {
    position: relative;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: #fff;
    padding-top: 0.75rem;
    padding-bottom: 3.75rem;
    overflow: hidden;
}

.page-header--news .page-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        145deg,
        rgba(15, 23, 42, 0.80) 0%,
        rgba(15, 23, 42, 0.55) 35%,
        rgba(15, 23, 42, 0.80) 100%
    );
    /* piccolo blur per effetto "frosted" sopra l'immagine */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1;
}

.page-header--news .page-header-inner {
    position: relative;
    z-index: 2;
    padding-top: 0.75rem;
    padding-bottom: 1.75rem;
}

/* Contenuto header (titolo + breadcrumb + bottone) */
.page-header--news .page-header-content {
    margin-top: 5rem; /* sotto alla navbar sticky */
    max-width: 780px;
}

/* Titolo news grande */
.page-title--news {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

/* Sottotitolo: data + categorie */
.page-subtitle--news {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* Badge categoria nella riga sotto il titolo */
.badge-news-category {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Bottone "Torna alle news" nello header */
.btn-back-news {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    line-height: 1.1;
    border-width: 1px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(15, 23, 42, 0.25);
    text-decoration: none;
}

.btn-back-news:hover {
    background: rgba(15, 23, 42, 0.45);
    color: #fff;
}

.btn-back-news-icon {
    font-size: 1.1rem;
    transform: translateY(-1px);
}

/* Breadcrumb sovra-immagine */
.page-header--news .page-breadcrumb ol {
    padding-left: 0;
    margin-bottom: 0.6rem;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.8rem;
}

.page-header--news .page-breadcrumb li {
    color: rgba(255, 255, 255, 0.8);
}

.page-header--news .page-breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.page-header--news .page-breadcrumb li + li::before {
    content: "›";
    margin: 0 0.2rem 0 0.1rem;
    opacity: 0.65;
}

/* =========================
   LAYOUT CONTENUTO NEWS
   ========================= */

.page-main {
    position: relative;
}

.single-news {
    max-width: 840px;
    margin: 0 auto;
    padding-bottom: 4rem;
}

/* Card principale della news (effetto che "sale" dall'header) */
.single-news-article {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    padding: 2rem 2.25rem;
    margin-top: -4.5rem; /* sovrappone leggermente l'header */
    position: relative;
    z-index: 1;
}

/* Meta sopra il contenuto (solo mobile, desktop già coperto nel header) */
.single-news-meta {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.single-news-date {
    font-weight: 500;
}

.single-news-separator {
    margin: 0 0.25rem;
}

.single-news-category {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.78rem;
}

/* Tipografia corpo articolo (riusa .content se ce l'hai già) */
.single-news-body p {
    margin-bottom: 1rem;
}

.single-news-body h2,
.single-news-body h3,
.single-news-body h4 {
    margin-top: 1.4rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

/* Galleria immagini extra */
.single-news-gallery {
    margin-top: 1.5rem;
}

.single-news-thumb {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.single-news-thumb img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.single-news-thumb:hover img {
    transform: scale(1.03);
    filter: brightness(1.05);
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 767.98px) {

    .page-header--news .page-header-content {
        margin-top: 4.25rem;
    }

    .single-news-article {
        padding: 1.4rem 1.15rem;
        margin-top: -2rem;
        border-radius: 18px;
    }

    .btn-back-news {
        font-size: 0.8rem;
        padding: 0.35rem 0.75rem;
    }
}