/* ============================================================
   materiali.css  –  Pagina Materiali  |  Tavola della Pace
   Stile coerente con chi-siamo / stile generale del progetto
   ============================================================ */

/* ── Icona accanto al titolo sezione ───────────────────────── */
.materiali-icona-titolo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background-color: var(--bs-danger, #dc3545);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.materiali-icona-titolo i {
    font-size: 1.5rem;
    color: #fff;
}

.materiali-icona-video {
    background-color: #ff0000;
}

/* ── Divisore tra le sezioni ────────────────────────────────── */
.divisore-sezioni {
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 0;
}

/* ── Card base materiale ────────────────────────────────────── */
.card-materiale {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--bs-body-bg, #fff);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.card-materiale:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ── Area icona grande (solo per PDF) ───────────────────────── */
.card-materiale-icona {
    background-color: #fff5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.card-materiale-icona i {
    font-size: 3.5rem;
    color: var(--bs-danger, #dc3545);
}

/* ── Anteprima video YouTube ────────────────────────────────── */
.card-video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    overflow: hidden;
}

.card-video-thumb iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ── Corpo testuale della card ──────────────────────────────── */
.card-materiale-corpo {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Badge tipo (PDF / YouTube) */
.card-materiale-tipo {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2em 0.7em;
    border-radius: 4px;
    background-color: #fee2e2;
    color: #b91c1c;
    margin-bottom: 0.6rem;
    width: fit-content;
}

.card-materiale-tipo-video {
    background-color: #ffe4e4;
    color: #cc0000;
}

.card-materiale-titolo {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.card-materiale-descrizione {
    font-size: 0.88rem;
    color: var(--bs-secondary-color, #6c757d);
    flex: 1;
    margin-bottom: 1rem;
}

/* ── Footer della card: data + bottone ─────────────────────── */
.card-materiale-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}

/* ── Bottone scarica PDF ────────────────────────────────────── */
.btn-scarica {
    background-color: var(--bs-danger, #dc3545);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.35em 0.85em;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

.btn-scarica:hover {
    background-color: #b91c1c;
    color: #fff;
}

/* ── Bottone guarda YouTube ─────────────────────────────────── */
.btn-youtube {
    background-color: #ff0000;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.35em 0.85em;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

.btn-youtube:hover {
    background-color: #cc0000;
    color: #fff;
}

/* ── Stato vuoto ────────────────────────────────────────────── */
.stato-vuoto {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--bs-secondary-color, #6c757d);
}

.stato-vuoto i {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.stato-vuoto p {
    font-size: 1rem;
    margin: 0;
}

.btn-elimina-materiale {
    background: #fcebeb;
    border: 1px solid #f5c4b3;
    color: #a32d2d;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-elimina-materiale:hover {
    background: #f5c4b3;
}
