.hero {
    position: relative;
    overflow: hidden;
    background: #fff;
}

.hero-image {
    left: 40%;
    right: 2%;
    background-image: url('../../images/download/cataloghi-hero-detail.webp');
    background-color: #fff;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.hero .hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: clamp(400px, 40vw, 720px);
    padding: 4rem 20px;
}

.hero .hero-content h1 {
    max-width: 12ch;
    color: #214ecd;
    font-size: var(--fs-h1);
    line-height: 0.98;
    letter-spacing: 0;
}

.hero .lead {
    width: 35%;
    max-width: 38ch;
    margin-top: 1.25rem;
    color: #354158;
    line-height: 1.65;
}

/* Keep the longer French title intact, including on narrow screens. */
html:lang(fr) .hero .hero-content h1 {
    max-width: none;
    font-size: min(var(--fs-h1), 7vw);
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

@media (max-width: 768px) {
    .hero .hero-image {
        inset: auto 0 0;
        height: 64vw;
        background-size: contain;
        background-position: center;
    }

    .hero .hero-content {
        min-height: 0;
        padding-top: 3rem;
        padding-bottom: calc(64vw + 2rem);
    }

    .hero .hero-content .lead {
        width: 100%;
        max-width: 38ch;
    }
}

.media-kit {
    padding: var(--site-section-gap) 0;
    background: #f7f8fb;
}

.media-kit__header {
    margin-bottom: 28px;
}

.media-kit-section__header p,
.media-kit-card__meta {
    margin: 0 0 8px;
    color: #214ecd;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.media-kit__header h2 {
    margin: 0 0 10px;
    color: #121212;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1;
}

.media-kit__header p:last-child {
    max-width: 720px;
    color: #3b3b3b;
}

.media-kit__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.media-kit__filter {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #d8deeb;
    background: #fff;
    color: #26324a;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.media-kit__filter:hover,
.media-kit__filter[aria-pressed="true"] {
    border-color: #214ecd;
    background: #214ecd;
    color: #fff;
}

.media-kit__status {
    padding: 22px;
    border: 1px solid #d8deeb;
    background: #fff;
    color: #3b3b3b;
}

.media-kit__status[hidden] {
    display: none;
}

.media-kit__status.is-error {
    border-color: #c53535;
    color: #8a1f1f;
}

.media-kit__sections {
    display: grid;
    gap: 34px;
}

.media-kit-section {
    padding: 34px;
    background: #fff;
    border: 1px solid #e1e5ee;
}

.media-kit-section__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    padding-bottom: 22px;
    border-bottom: 1px solid #e6e9f0;
}

.media-kit-section__header h3 {
    margin: 0;
    color: #121212;
    font-size: clamp(1.7rem, 3vw, 3rem);
    line-height: 1;
}

.media-kit-section__header span {
    flex: 0 0 auto;
    color: #666;
    font-size: 0.95rem;
    font-weight: 700;
}

.media-kit-category {
    padding-top: 30px;
}

.media-kit-section--by-type .media-kit-category__body {
    padding-top: 30px;
}

.media-kit-category h4 {
    margin: 0 0 18px;
    color: #214ecd;
    font-size: 1.35rem;
}

.media-kit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 18px;
}

.media-kit-category__actions {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.media-kit-load-more {
    min-width: 180px;
    background: #fff;
}

.media-kit-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border: 1px solid #e6e9f0;
    background: #fff;
}

.media-kit-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    /* 2:3 come la maggior parte delle copertine (82 su 132 il 23/10/2026; prima 4:5 tagliava sopra e sotto) */
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #eef2f7;
}

.media-kit-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-kit-card__image.has-no-image::before {
    content: "PDF";
    color: #214ecd;
    font-size: 1.4rem;
    font-weight: 800;
}

.media-kit-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.media-kit-card__meta {
    color: #687188;
    font-size: 0.72rem;
}

.media-kit-card h5 {
    margin: 0 0 18px;
    color: #121212;
    font-size: 1.2rem;
    line-height: 1.15;
}

/* Pulsanti affiancati e larghi uguali quando ci stanno; se una parola non entra
   (es. «TÉLÉCHARGER» in francese) vanno uno sotto l'altro a tutta larghezza (21/10/2026). */
.media-kit-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.media-kit-card__actions .btn {
    flex: 1 1 0;
    min-width: max-content;
    padding-right: 8px;
    padding-left: 8px;
    white-space: nowrap;
    text-align: center;
}

@media (max-width: 760px) {
    .media-kit {
        padding: 48px 0 64px;
    }

    .media-kit-section {
        padding: 22px;
    }

    .media-kit-section__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .media-kit-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
    }

    .media-kit-card__actions .btn {
        flex-basis: 100%;
        min-width: 0;
    }
}

/* The async archive can be taller than the viewport: never gate its
   visibility on the shared reveal observer's intersection percentage. */
.media-kit__sections.leone-reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

.media-kit__sections,
.media-kit-section,
.media-kit-category__body,
.media-kit-grid,
.media-kit-card {
    min-width: 0;
}

.media-kit-card h5 {
    overflow-wrap: anywhere;
}

.media-kit-card__actions .btn {
    min-height: 44px;
    white-space: normal;
    overflow-wrap: anywhere;
}
