
:root {
    --primary-blue: #0056b3;
    --dark-blue: #003d7e;
    --light-bg: #f4f7f9;
    --white: #ffffff;
    --border-color: #ddd;
    --text-main: #333;
    --text-muted: #666;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    color: #333;
    background-color: #f4f7f6;
}

header {
    background: #004a99; /* Blu istituzionale */
    color: white;
    padding: 1rem;
    text-align: center;
}

.container {
   /* max-width: 1100px; 
    margin: 20px auto; */
    padding: 20px;
    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h2 {
    color: #004a99;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Box Introduzione */
.intro { 
    margin-bottom: 2.5rem; 
    padding: 1.5rem; 
    background: #f8f9fa; 
    border-left: 6px solid #003d7a;; 
    border-radius: 4px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #004a99;
}

.card a {
    text-decoration: none;
    color: #004a99;
    font-weight: bold;
}

.card p {
    font-size: 0.9rem;
    color: #666;
}
/* */
/* Layout a righe orizzontali */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.card-horizontal {
    display: flex;
    flex-direction: column; /* Per mobile */
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 5px solid #004a99; /* Accento blu laterale */
    padding: 20px;
    border-radius: 4px;
    transition: background 0.2s;
}

.card-horizontal:hover {
    background: #fcfcfc;
    border-color: #004a99;
}

.card-horizontal h3 {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    color: #004a99;
}

.card-horizontal p {
    margin: 0 0 15px 0;
    color: #555;
    font-size: 0.95rem;
}

/* Stile per i link ai documenti dentro le righe */
.doc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-links li a {
    display: inline-block;
    background: #f0f4f8;
    color: #004a99;
    padding: 6px 12px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
    border: 1px solid #d1d9e0;
}

.doc-links li a:hover {
    background: #004a99;
    color: white;
}
/*  */
/* Lista documenti verticale per lungo */
.doc-links-vertical {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-links-vertical li a {
    display: flex;
    align-items: center;
    background: #fff;
    color: #333;
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.doc-links-vertical li a:hover {
    background: #f8f9fa;
    border-color: #004a99;
    color: #004a99;
    padding-left: 20px; /* Effetto spostamento al passaggio */
}

/* Icone basate sull'estensione del file tramite pseudo-elementi */

/* PDF - Icona SVG moderna e pulita */
.doc-links-vertical li a[href$=".pdf"]::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    /* Icona SVG: foglio con linee */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23d9534f' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z' /%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 13h6m-6 4h6m-6-8h1' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* RAR / ZIP - Icona SVG moderna (scatola/archivio) */
.doc-links-vertical li a[href$=".rar"]::before,
.doc-links-vertical li a[href$=".zip"]::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236c757d' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* LINK ESTERNI - Icona SVG moderna (freccia nel quadrato) */
.doc-links-vertical li a:not([href$=".pdf"]):not([href$=".rar"]):not([href$=".zip"])::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23004a99' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}
/* --- BREADCRUMB --- */
.breadcrumb {
    background: #e9ecef;
    padding: 10px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #666;
}

.breadcrumb a {
    color: #004a99;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 8px;
    color: #999;
}

/* --- TITOLI SEZIONE CLICCABILI --- */
.card-horizontal {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border-left: 6px solid #004a99;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    /* Transizione fluida per il movimento */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.card-horizontal:hover {
    /* Muove il box verso l'alto di 4 pixel */
    transform: translateY(-4px); 
    /* Rende l'ombra più profonda */
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-left-color: #d9534f; /* Cambia il colore del bordo al passaggio */
}

.card-horizontal h3 a {
    text-decoration: none;
    color: #004a99;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-horizontal h3 a:hover {
    color: #003366;
}

.card-horizontal h3 a::after {
    content: "Vedi sezione →";
    font-size: 0.75rem;
    background: #004a99;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-weight: normal;
}
/* */
/* --- STILI PER DETAILS E SUMMARY --- */
details {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    overflow: hidden;
}

details[open] {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-color: #004a99;
}

summary {
    padding: 15px 20px;
    font-weight: bold;
    color: #004a99;
    cursor: pointer;
    list-style: none; /* Rimuove freccia default */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fdfdfd;
}

summary::after {
    content: "▼";
    font-size: 0.8rem;
    transition: transform 0.3s;
}

details[open] summary::after {
    transform: rotate(180deg);
}

summary:hover {
    background: #f0f7ff;
}

.details-content {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Stili per le descrizioni e note */
.desc {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
    display: block;
    margin-top: 5px;
}

hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 15px 0;
}

/* Riutilizziamo lo stile dei link con icone se necessario, 
   o usiamo le emoji dirette come nel tuo esempio */
.details-content a {
    text-decoration: none;
    color: #333;
    font-size: 0.95rem;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.details-content a:hover {
    background: #f8f9fa;
    color: #d9534f;
}