/**
 * KeCMS Frontend - Blocchi Page Builder
 * Stili per i blocchi renderizzati dal page builder:
 * Hero Banner, Cards, Testo, Form Contatto, Articoli Masonry
 *
 * Estratto da page.twig per mantenere il template pulito.
 * Servito come file statico, cacheable dal browser.
 */

/* ═══════════════════════════════════════════════════════════
   HERO BANNER - 4 formati
   ═══════════════════════════════════════════════════════════ */

/* ─── Base hero ─── */
.hero-banner {
    position: relative;
    overflow: hidden;
    width: 100%;
}
.hero-banner * {
    color: inherit;
}
.hero-banner .hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.hero-banner .hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.hero-banner .hero-cta {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
    align-self: flex-start;
    width: auto;
}
.hero-banner .hero-cta:hover {
    opacity: 0.85;
}
.hero-banner .hero-title-accent {
    /* colore impostato inline via style */
}

/* ─── Formato: Fullscreen ─── */
.hero-fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 80vh;
}
.hero-fullscreen .hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem 1rem;
}
.hero-fullscreen .hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}
.hero-fullscreen .hero-content .hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .hero-fullscreen .hero-content h1 { font-size: 3.5rem; }
    .hero-fullscreen .hero-content .hero-subtitle { font-size: 1.5rem; }
}

/* ─── Formato: Split (immagine sx, testo dx) ─── */
.hero-split {
    display: flex;
    flex-direction: column;
    min-height: 400px;
}
.hero-split .hero-image-side {
    position: relative;
    width: 100%;
    min-height: 300px;
    overflow: hidden;
}
.hero-split .hero-image-side img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.hero-split .hero-text-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2rem;
    width: 100%;
}
.hero-split .hero-text-side h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}
.hero-split .hero-text-side .hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .hero-split {
        flex-direction: row;
        min-height: 450px;
    }
    .hero-split .hero-image-side {
        width: 50%;
        min-height: auto;
    }
    .hero-split .hero-text-side {
        width: 50%;
        padding: 3rem;
    }
    .hero-split .hero-text-side h1 { font-size: 2.5rem; }
    .hero-split .hero-text-side .hero-subtitle { font-size: 1.25rem; }
}

/* ─── Variante: immagine illustrativa (contain) per split e split-reverse ─── */
.hero-split.hero-img-contain .hero-image-side,
.hero-split-reverse.hero-img-contain .hero-image-side {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    min-height: unset;
}
.hero-split.hero-img-contain .hero-image-side img,
.hero-split-reverse.hero-img-contain .hero-image-side img {
    position: static;
    width: 100%;
    height: auto;
    object-fit: unset;
    max-width: 100%;
    display: block;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
}
@media (min-width: 768px) {
    .hero-split.hero-img-contain,
    .hero-split-reverse.hero-img-contain {
        align-items: center;
    }
    .hero-split.hero-img-contain .hero-image-side,
    .hero-split-reverse.hero-img-contain .hero-image-side {
        padding: 1rem 2rem;
    }
}

/* ─── Variante: hero split/split-reverse in container (non full-width) ─── */
.hero-split-container,
.hero-split-reverse-container {
    background-color: inherit;
}
.hero-split-container .hero-inner,
.hero-split-reverse-container .hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}
.hero-split-container .hero-inner .hero-image-side,
.hero-split-reverse-container .hero-inner .hero-image-side {
    width: 100%;
    position: relative;
    min-height: 280px;
    overflow: hidden;
    border-radius: 0.75rem;
}
.hero-split-container .hero-inner .hero-image-side img,
.hero-split-reverse-container .hero-inner .hero-image-side img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center; border-radius: 0.75rem;
}
.hero-split-container .hero-inner .hero-text-side,
.hero-split-reverse-container .hero-inner .hero-text-side {
    width: 100%;
    display: flex; flex-direction: column; justify-content: center;
}
.hero-split-container .hero-inner .hero-text-side h1,
.hero-split-reverse-container .hero-inner .hero-text-side h1 {
    font-size: 2rem; font-weight: 800; line-height: 1.2; margin-bottom: 0.75rem;
}
.hero-split-container .hero-inner .hero-text-side .hero-subtitle,
.hero-split-reverse-container .hero-inner .hero-text-side .hero-subtitle {
    font-size: 1.125rem; opacity: 0.9; margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .hero-split-container .hero-inner,
    .hero-split-reverse-container .hero-inner {
        flex-direction: row;
        gap: 3rem;
        padding: 4rem 2rem;
    }
    .hero-split-container .hero-inner .hero-image-side,
    .hero-split-reverse-container .hero-inner .hero-image-side {
        width: 50%; min-height: 380px;
    }
    .hero-split-container .hero-inner .hero-text-side,
    .hero-split-reverse-container .hero-inner .hero-text-side {
        width: 50%;
    }
    .hero-split-container .hero-inner .hero-text-side h1,
    .hero-split-reverse-container .hero-inner .hero-text-side h1 { font-size: 2.75rem; }
    /* split_reverse in container: testo prima, immagine dopo */
    .hero-split-reverse-container .hero-inner { flex-direction: row; }
    .hero-split-reverse-container .hero-inner .hero-text-side { order: 1; }
    .hero-split-reverse-container .hero-inner .hero-image-side { order: 2; }
}
/* Variante contain per container */
.hero-split-container.hero-img-contain .hero-inner .hero-image-side,
.hero-split-reverse-container.hero-img-contain .hero-inner .hero-image-side {
    min-height: unset; overflow: visible;
}
.hero-split-container.hero-img-contain .hero-inner .hero-image-side img,
.hero-split-reverse-container.hero-img-contain .hero-inner .hero-image-side img {
    position: static; height: auto; object-fit: unset;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
}

/* ─── Formato: Split Reverse (testo sx, immagine dx) ─── */
.hero-split-reverse {
    display: flex;
    flex-direction: column-reverse;
    min-height: 400px;
}
.hero-split-reverse .hero-image-side {
    position: relative;
    width: 100%;
    min-height: 300px;
    overflow: hidden;
}
.hero-split-reverse .hero-image-side img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.hero-split-reverse .hero-text-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2rem;
    width: 100%;
}
.hero-split-reverse .hero-text-side h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}
.hero-split-reverse .hero-text-side .hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .hero-split-reverse {
        flex-direction: row;
        min-height: 450px;
    }
    .hero-split-reverse .hero-text-side {
        width: 50%;
        padding: 3rem;
        order: 1;
    }
    .hero-split-reverse .hero-image-side {
        width: 50%;
        min-height: auto;
        order: 2;
    }
    .hero-split-reverse .hero-text-side h1 { font-size: 2.5rem; }
    .hero-split-reverse .hero-text-side .hero-subtitle { font-size: 1.25rem; }
}

/* ─── Formato: Centrato (testo centrato su immagine) ─── */
.hero-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 250px;
}
.hero-centered .hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem 1rem;
}
.hero-centered .hero-content h1 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}
.hero-centered .hero-content .hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .hero-centered .hero-content h1 { font-size: 2rem; }
    .hero-centered .hero-content .hero-subtitle { font-size: 1.375rem; }
}

/* ─── Formato: Minimale (solo testo, sfondo colore) ─── */
.hero-minimal {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 250px;
    padding: 3rem 1rem;
}
.hero-minimal .hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}
.hero-minimal .hero-content h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}
.hero-minimal .hero-content .hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.85;
    margin-bottom: 1.25rem;
}
@media (min-width: 768px) {
    .hero-minimal .hero-content h1 { font-size: 2.5rem; }
}

/* ═══════════════════════════════════════════════════════════
   CARDS SECTION
   ═══════════════════════════════════════════════════════════ */
.cards-section .card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s, transform 0.3s;
}
.cards-section .card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}
.cards-section .card .card-img-wrapper {
    overflow: hidden;
}
.cards-section .card .card-img-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s;
}
.cards-section .card:hover .card-img-wrapper img {
    transform: scale(1.05);
}
.cards-section .card .card-body {
    padding: 1.25rem;
}
.cards-section .card .card-body h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}
.cards-section .card .card-body p {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}
.cards-section .card .card-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #7c3aed;
    text-decoration: none;
}
.cards-section .card .card-link:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════
   TESTO SECTION
   ═══════════════════════════════════════════════════════════ */
.testo-section .prose {
    max-width: none;
}
.testo-section .prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.testo-section .prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}
.testo-section .prose p {
    margin-bottom: 1rem;
    line-height: 1.75;
    color: #374151;
}
.testo-section .prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}
.testo-section .prose ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.testo-section .prose ol {
    list-style: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.testo-section .prose a {
    color: #7c3aed;
    text-decoration: underline;
}
.testo-section .prose strong {
    font-weight: 700;
}
.testo-section .prose em {
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   TESTO SPLIT - immagine laterale
   ═══════════════════════════════════════════════════════════ */
.testo-split {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}
.testo-split .testo-split-img {
    width: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
}
.testo-split .testo-split-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
.testo-split .testo-split-content { width: 100%; }
@media (min-width: 768px) {
    .testo-split { flex-direction: row; }
    .testo-split .testo-split-img { width: 45%; flex-shrink: 0; }
    .testo-split .testo-split-content { width: 55%; }
    .testo-split.testo-split-right .testo-split-img { order: 2; }
    .testo-split.testo-split-right .testo-split-content { order: 1; }
}

/* ═══════════════════════════════════════════════════════════
   TESTO FEATURES - layout split con voci strutturate
   ═══════════════════════════════════════════════════════════ */
.testo-features { display: flex; flex-direction: column; gap: 2rem; align-items: center; }
.testo-features .testo-features-img {
    width: 100%; border-radius: 0.75rem; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.testo-features .testo-features-img img {
    max-width: 100%; height: auto; display: block;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.12));
}
.testo-features .testo-features-content { width: 100%; }
@media (min-width: 768px) {
    .testo-features { flex-direction: row; align-items: center; }
    .testo-features .testo-features-img { width: 48%; flex-shrink: 0; }
    .testo-features .testo-features-content { width: 52%; }
    .testo-features.testo-features-right .testo-features-img { order: 2; }
    .testo-features.testo-features-right .testo-features-content { order: 1; }
}
.testo-features-list { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 1.5rem; }
.testo-features-list .feature-item h3 {
    font-size: 1.0625rem; font-weight: 700; margin-bottom: 0.375rem;
    color: var(--color-primary, #4557a1);
}
.testo-features-list .feature-item p {
    font-size: 0.9375rem; color: #4b5563; line-height: 1.65;
}
.testo-features-citazione {
    border-left: 4px solid #bfdbfe;
    padding-left: 1rem; margin-top: 1.5rem;
    font-size: 0.875rem; color: #6b7280; font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   CARDS OFFERTA - variante PSV con icona, badge, checkmark
   ═══════════════════════════════════════════════════════════ */
.card-offerta {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 2rem 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s, transform 0.3s;
}
.card-offerta:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}
.card-offerta .card-offerta-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.card-offerta .card-offerta-badge {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}
.card-offerta h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.25rem; color: #111827; }
.card-offerta .card-offerta-tipo { font-size: 0.875rem; color: #6b7280; margin-bottom: 1rem; }
.card-offerta .card-offerta-features { list-style: none; padding: 0; margin: 0 0 1.5rem 0; flex-grow: 1; }
.card-offerta .card-offerta-features li {
    display: flex; align-items: flex-start; gap: 0.5rem;
    font-size: 0.9375rem; color: #374151; padding: 0.35rem 0;
}
.card-offerta .card-offerta-features li .check-icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.card-offerta .card-offerta-cta {
    display: block; text-align: center;
    padding: 0.75rem 1.5rem; border-radius: 0.5rem;
    font-weight: 700; text-decoration: none;
    transition: opacity 0.2s; margin-top: auto;
}
.card-offerta .card-offerta-cta:hover { opacity: 0.85; }
.card-offerta .card-offerta-nota { font-size: 0.75rem; color: #9ca3af; text-align: center; margin-top: 0.75rem; }

/* ═══════════════════════════════════════════════════════════
   CARDS KECMS - barra top colorata, icona box, checkmark verde
   ═══════════════════════════════════════════════════════════ */
.card-eneide {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 1px solid #f1f5f9;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s, transform 0.3s;
}
.card-eneide:hover {
    box-shadow: 0 16px 50px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}
.card-eneide .card-eneide-bar {
    position: absolute; top: 0; left: 0; right: 0;
    height: 6px;
}
.card-eneide .card-eneide-body {
    padding: 2rem;
    display: flex; flex-direction: column; flex-grow: 1;
}
.card-eneide .card-eneide-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 1.5rem; margin-top: 0.5rem;
}
.card-eneide .card-eneide-icon-box {
    padding: 0.75rem;
    border-radius: 0.5rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.card-eneide h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.25rem; color: #111827; }
.card-eneide .card-eneide-tipo { font-size: 0.875rem; color: #6b7280; margin-bottom: 0; }
.card-eneide .card-eneide-badge {
    display: inline-flex; align-items: center; gap: 0.25rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem; font-weight: 700;
}
.card-eneide .card-eneide-features {
    list-style: none; padding: 0; margin: 0 0 1.5rem 0; flex-grow: 1;
}
.card-eneide .card-eneide-features li {
    display: flex; align-items: flex-start; gap: 0.75rem;
    font-size: 0.9375rem; color: #374151; padding: 0.4rem 0;
}
.card-eneide .card-eneide-features li .check-icon {
    width: 20px; height: 20px; flex-shrink: 0; color: #22c55e; margin-top: 1px;
}
.card-eneide .card-eneide-cta {
    display: block; text-align: center;
    padding: 0.75rem 1.5rem; border-radius: 0.5rem;
    font-weight: 700; text-decoration: none;
    transition: opacity 0.2s; margin-top: auto;
}
.card-eneide .card-eneide-cta:hover { opacity: 0.85; }
.card-eneide .card-eneide-nota {
    font-size: 0.75rem; color: #9ca3af; text-align: center; margin-top: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════
   FORM CORPORATE - sfondo colorato con icone laterali
   ═══════════════════════════════════════════════════════════ */
.form-corporate { padding: 4rem 0; }
.form-corporate .form-corporate-inner {
    display: flex; flex-direction: column; gap: 3rem; align-items: flex-start;
}
.form-corporate .form-corporate-left { width: 100%; }
.form-corporate .form-corporate-right {
    width: 100%; background: white; border-radius: 1rem;
    padding: 2rem; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.form-corporate .form-corporate-left h2 { font-size: 1.75rem; font-weight: 800; line-height: 1.3; margin-bottom: 1rem; }
.form-corporate .form-corporate-left .fc-subtitle { font-size: 1rem; opacity: 0.85; margin-bottom: 2rem; }
.form-corporate .fc-icone { display: flex; flex-direction: column; gap: 1rem; }
.form-corporate .fc-icona-item {
    display: flex; align-items: center; gap: 0.75rem;
    font-size: 0.9375rem; font-weight: 500;
}
.form-corporate .fc-icona-item .fc-icona-circle {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 1.1rem;
}
@media (min-width: 768px) {
    .form-corporate .form-corporate-inner { flex-direction: row; align-items: center; }
    .form-corporate .form-corporate-left { width: 45%; }
    .form-corporate .form-corporate-right { width: 55%; }
    .form-corporate .form-corporate-left h2 { font-size: 2.25rem; }
}

/* ═══════════════════════════════════════════════════════════
   FORM CONTATTI - layout due card info + form affiancato
   ═══════════════════════════════════════════════════════════ */
.form-contatti { padding: 4rem 0; }
.form-contatti .form-contatti-inner {
    display: flex; flex-direction: column; gap: 2rem;
}
.form-contatti .form-contatti-left { width: 100%; display: flex; flex-direction: column; gap: 1.5rem; }
.form-contatti .form-contatti-right { width: 100%; }
.form-contatti .fc-card {
    background: white; border-radius: 1rem;
    padding: 1.75rem; box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
}
.form-contatti .fc-card-icon {
    width: 2.75rem; height: 2.75rem;
    background: var(--color-primary, #1a3a5c);
    border-radius: 0.75rem;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem; color: white;
    flex-shrink: 0;
}
.form-contatti .fc-card-icon svg { width: 1.375rem; height: 1.375rem; stroke: white; }
.form-contatti .fc-card h3 {
    font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem;
    padding-bottom: 0.5rem; border-bottom: 2px solid currentColor;
    opacity: 1;
}
.form-contatti .fc-card .fc-card-content {
    font-size: 0.9375rem; line-height: 1.7;
}
.form-contatti .fc-card .fc-card-content a {
    text-decoration: underline; opacity: 0.85;
}
.form-contatti .fc-card .fc-card-content a:hover { opacity: 1; }
.form-contatti .form-contatti-right .ke-form-wrapper,
.form-contatti .form-contatti-right .form-builder-wrapper {
    background: white; border-radius: 1rem;
    padding: 2rem; box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
}
@media (min-width: 768px) {
    .form-contatti .form-contatti-inner { flex-direction: row; align-items: flex-start; }
    .form-contatti .form-contatti-left { width: 40%; }
    .form-contatti .form-contatti-right { width: 60%; }
}

/* ═══════════════════════════════════════════════════════════
   BLOCCO ARTICOLI - Layout Masonry (CSS columns)
   ═══════════════════════════════════════════════════════════ */
.masonry-grid {
    column-gap: 1.5rem;
}
.masonry-grid[data-columns="2"] {
    column-count: 2;
}
.masonry-grid[data-columns="3"] {
    column-count: 3;
}
.masonry-grid[data-columns="4"] {
    column-count: 4;
}
.masonry-item {
    break-inside: avoid;
    display: inline-block;
    width: 100%;
}
/* Responsive: su mobile sempre 1 colonna, su tablet 2 */
@media (max-width: 639px) {
    .masonry-grid[data-columns="2"],
    .masonry-grid[data-columns="3"],
    .masonry-grid[data-columns="4"] {
        column-count: 1;
    }
}
@media (min-width: 640px) and (max-width: 1023px) {
    .masonry-grid[data-columns="3"],
    .masonry-grid[data-columns="4"] {
        column-count: 2;
    }
}
