/* ================================================================
   DS Comunicati Stampa — widget.css  v1.1.0
   ================================================================ */

/* ── Variabili ──────────────────────────────────────────────────── */
.dsc-wrapper {
    --dsc-accent:       #1a4480;
    --dsc-accent-light: #e8edf5;
    --dsc-text:         var(--foxiz-main-color, #111827);
    --dsc-text-muted:   #6b7280;
    --dsc-border:       #e5e7eb;
    --dsc-bg:           var(--foxiz-box-bg, #ffffff);
    --dsc-radius:       6px;
    --dsc-shadow:       0 2px 12px rgba(0,0,0,.08);
    --dsc-shadow-hover: 0 6px 24px rgba(0,0,0,.13);
    width: 100%;
}

/* ── Header sezione ─────────────────────────────────────────────── */
.dsc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--dsc-border);
}
.dsc-header-line {
    display: block;
    width: 4px;
    height: 22px;
    background-color: var(--dsc-accent);
    border-radius: 2px;
    flex-shrink: 0;
}
.dsc-header-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--dsc-text);
    margin: 0;
    line-height: 1;
}

/* ── Badge ──────────────────────────────────────────────────────── */
.dsc-badge {
    display: inline-block;
    background-color: var(--dsc-accent);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 8px 3px;
    border-radius: 2px;
    line-height: 1.5;
    flex-shrink: 0;
    white-space: nowrap;
}
.dsc-badge-sm {
    font-size: 8px;
    padding: 2px 6px;
}

/* ── Meta (data, mittente) ──────────────────────────────────────── */
.dsc-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--dsc-text-muted);
    flex-wrap: wrap;
    line-height: 1;
}
.dsc-meta-sm { font-size: 11px; }
.dsc-date    { font-weight: 500; }
.dsc-sep     { color: #d1d5db; font-size: 10px; }
.dsc-mittente { font-style: italic; }

/* ── Card-top (badge + meta) ────────────────────────────────────── */
.dsc-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Card body ──────────────────────────────────────────────────── */
.dsc-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    flex: 1;
}

/* ── Titolo ─────────────────────────────────────────────────────── */
.dsc-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}
.dsc-title a {
    color: var(--dsc-text);
    text-decoration: none;
    transition: color .15s ease;
}
.dsc-title a:hover { color: var(--dsc-accent); }

.dsc-title-featured { font-size: 20px; line-height: 1.25; }
.dsc-title-sm       { font-size: 13px; font-weight: 600; line-height: 1.35; margin-top: 2px; }

/* ── Riassunto ──────────────────────────────────────────────────── */
.dsc-excerpt {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--dsc-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Immagine comune ────────────────────────────────────────────── */
.dsc-img-wrap {
    display: block;
    overflow: hidden;
    position: relative;
    background: var(--dsc-border);
    text-decoration: none;
}
.dsc-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.dsc-img-wrap:hover img { transform: scale(1.04); }

.dsc-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.35) 100%);
    pointer-events: none;
}

/* Placeholder senza immagine */
.dsc-placeholder-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    font-size: 36px;
    opacity: .3;
}

/* ── Link "Leggi" ───────────────────────────────────────────────── */
.dsc-leggi {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--dsc-accent);
    text-decoration: none;
    letter-spacing: .5px;
    text-transform: uppercase;
    border-bottom: 1.5px solid var(--dsc-accent);
    padding-bottom: 1px;
    width: fit-content;
    transition: opacity .15s ease;
    margin-top: 4px;
}
.dsc-leggi:hover { opacity: .65; }

/* ── Footer ─────────────────────────────────────────────────────── */
.dsc-footer {
    margin-top: 18px;
    text-align: right;
    border-top: 1px solid var(--dsc-border);
    padding-top: 12px;
}
.dsc-archivio-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--dsc-accent);
    text-decoration: none;
    letter-spacing: .5px;
    transition: opacity .15s ease;
}
.dsc-archivio-link:hover { opacity: .7; text-decoration: underline; }


/* ================================================================
   LAYOUT FEATURED
   ================================================================ */
.dsc-featured-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

/* Card featured principale */
.dsc-card-featured {
    display: flex;
    flex-direction: column;
    background-color: var(--dsc-bg);
    border-radius: var(--dsc-radius);
    overflow: hidden;
    box-shadow: var(--dsc-shadow);
    transition: box-shadow .25s ease, transform .25s ease;
}
.dsc-card-featured:hover {
    box-shadow: var(--dsc-shadow-hover);
    transform: translateY(-2px);
}
.dsc-card-featured .dsc-img-wrap {
    width: 100%;
    border-radius: 0;
}
.dsc-card-featured .dsc-card-body { padding: 18px; }
.dsc-card-featured .dsc-excerpt { -webkit-line-clamp: 3; }

/* Lista laterale */
.dsc-side-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Card lista (featured side + layout lista) */
.dsc-card-list {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--dsc-border);
    background-color: var(--dsc-bg);
    transition: background-color .15s ease;
}
.dsc-card-list:first-child { border-top: 1px solid var(--dsc-border); }
.dsc-card-list:hover { background-color: var(--dsc-accent-light); }

.dsc-list-img-wrap {
    flex-shrink: 0;
    width: 90px;
    height: 68px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--dsc-border);
    position: relative;
    text-decoration: none;
}
.dsc-list-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.dsc-list-img-wrap:hover img { transform: scale(1.06); }

.dsc-list-placeholder {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    font-size: 22px;
    opacity: .3;
}

.dsc-list-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}


/* ================================================================
   LAYOUT GRIGLIA
   ================================================================ */
.dsc-grid {
    display: grid;
    gap: 16px;
}
.dsc-cols-2 { grid-template-columns: repeat(2, 1fr); }
.dsc-cols-3 { grid-template-columns: repeat(3, 1fr); }

.dsc-card-grid {
    display: flex;
    flex-direction: column;
    background-color: var(--dsc-bg);
    border-radius: var(--dsc-radius);
    overflow: hidden;
    box-shadow: var(--dsc-shadow);
    transition: box-shadow .25s ease, transform .25s ease;
}
.dsc-card-grid:hover {
    box-shadow: var(--dsc-shadow-hover);
    transform: translateY(-2px);
}
.dsc-card-grid .dsc-img-wrap { width: 100%; border-radius: 0; }
.dsc-card-grid .dsc-excerpt  { -webkit-line-clamp: 2; }


/* ================================================================
   LAYOUT LISTA FULL
   ================================================================ */
.dsc-list-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.dsc-card-list-full .dsc-list-img-wrap {
    width: 120px;
    height: 86px;
    border-radius: 4px;
}
.dsc-card-list-full .dsc-list-body { gap: 6px; }
.dsc-card-list-full .dsc-excerpt   { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }


/* ================================================================
   DARK MODE (Foxiz)
   ================================================================ */
.is-dark .dsc-wrapper,
[data-theme="dark"] .dsc-wrapper,
.dark-mode .dsc-wrapper {
    --dsc-text:         #f1f5f9;
    --dsc-text-muted:   #94a3b8;
    --dsc-border:       #2d3748;
    --dsc-bg:           #1e2433;
    --dsc-accent-light: #1e2d45;
    --dsc-shadow:       0 2px 12px rgba(0,0,0,.3);
    --dsc-shadow-hover: 0 6px 24px rgba(0,0,0,.4);
}


/* ================================================================
   MOBILE
   ================================================================ */
@media (max-width: 767px) {
    .dsc-featured-wrap    { grid-template-columns: 1fr; }
    .dsc-side-list        { margin-top: 0; }
    .dsc-cols-2,
    .dsc-cols-3           { grid-template-columns: 1fr; }
    .dsc-title-featured   { font-size: 17px; }
    .dsc-card-body        { padding: 14px; }
    .dsc-list-img-wrap    { width: 80px; height: 60px; }
    .dsc-card-list-full .dsc-list-img-wrap { width: 100px; height: 72px; }
    .dsc-header-title     { font-size: 12px; }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .dsc-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ================================================================
   BANNER CTA — Invia comunicato
   ================================================================ */
.dsc-cta-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    padding: 16px 20px;
    background: var(--dsc-accent-light);
    border: 1px solid rgba(26, 68, 128, 0.15);
    border-left: 4px solid var(--dsc-accent);
    border-radius: var(--dsc-radius);
}
.dsc-cta-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    opacity: .85;
}
.dsc-cta-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.dsc-cta-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--dsc-text);
    font-weight: 500;
}
.dsc-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    background-color: var(--dsc-accent);
    padding: 7px 16px;
    border-radius: 3px;
    text-decoration: none;
    transition: opacity .15s ease, transform .15s ease;
    white-space: nowrap;
}
.dsc-cta-btn:hover {
    opacity: .85;
    transform: translateY(-1px);
}

/* Dark mode CTA */
.is-dark .dsc-cta-banner,
[data-theme="dark"] .dsc-cta-banner,
.dark-mode .dsc-cta-banner {
    background: rgba(26, 68, 128, 0.15);
    border-color: rgba(26, 68, 128, 0.4);
}

/* Mobile CTA */
@media (max-width: 767px) {
    .dsc-cta-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 16px;
    }
    .dsc-cta-icon { font-size: 24px; }
}
