/* ========================================
   CSS COMUNE PER TUTTO IL SITO
   ======================================== */

/* Reset e variabili */
:root {
    --primary-color: #0066cc;
    --primary-dark: #004d99;
    --secondary-color: #FFA500;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f9f9f9;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-border: #ddd;
    --success: #28a745;
    --warning: #ffc107;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

 /* Avviso "sito in costruzione" */
    .construction-notice {
        display: flex;
        align-items: center;
        gap: 1.5rem;
        margin-bottom: 2rem;
        padding: 1.5rem 2rem;
        background: #fff3cd;                 /* giallo un po' più saturo */
        border: 3px dashed #b36b00;          /* bordo più scuro e spesso */
        border-radius: 8px;
        box-shadow: var(--shadow);
    }    

    
    .construction-notice .notice-icon {
        font-size: 4.5rem;                   /* era 2.5rem */
        line-height: 1;
    }

    .construction-notice h2 {
        margin: 0 0 0.5rem 0;
        font-size: clamp(1.6rem, 4vw, 2.2rem);   /* era 1.3rem */
        color: #5c3a00;                      /* marrone scuro */
    }

    .construction-notice p {
        margin: 0;
        font-size: 1.2rem;                   /* era ereditato (~1rem) */
        font-weight: 500;
        color: #3d2700;
    }


    @media (max-width: 768px) {
        .construction-notice {
            flex-direction: column;
            text-align: center;
        }
    }
/* Accessibilità - Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover, a:focus {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Layout containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: var(--shadow);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: larger;
}


.logo-area {
    display: flex;
    justify-content: space-between; /* titolo a sinistra, logo a destra */
    align-items: center; /* centratura verticale */
    flex-wrap: wrap; /* permette di andare a capo su schermi piccoli */
    gap: 1rem; /* spazio tra titolo e immagine */
}

.logo-area h1 {
    flex: 1;
    font-size: clamp(2rem, 5vw, 3rem);   /* era 1.5rem */
    margin: 0;
    color: white;
}

.logo-area img {
    max-width: 150px; /* limita la dimensione su desktop */
    height: auto;
}

/* Responsive: su schermi piccoli impila titolo e logo */
@media (max-width: 768px) {
    .logo-area {
        flex-direction: column;
        text-align: center;
    }
    .logo-area h1 {
        font-size: 1.75rem;              /* era 1.2rem */
    }

    .logo-area img {
        max-width: 120px;
    }
}
/* Navigazione */
.main-nav {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 1rem;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    left: 0;
    transition: var(--transition);
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.nav-list {
    list-style: none;
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-list li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.nav-list li a:hover,
.nav-list li a:focus {
    background: var(--gray-light);
    border-bottom-color: var(--primary-color);
    text-decoration: none;
}

.nav-list li a.active {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom-color: var(--primary-color);
}

/* Main content */
.main-content {
    padding: 3rem 0;
    min-height: calc(100vh - 400px);
}

/* Sections */
.intro-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.lead {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

.documents-section {
    margin: 3rem;
}

.documents-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.document-card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.document-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--gray-border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-icon {
    font-size: 2.5rem;
}

.card-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.card-date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card-highlights {
    list-style: none;
    margin-top: 1rem;
    padding: 0;
}

.card-highlights li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-border);
}

.card-highlights li:last-child {
    border-bottom: none;
}

.card-highlights li::before {
    content: '✓ ';
    color: var(--success);
    font-weight: bold;
    margin-right: 0.5rem;
}

.card-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-border);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Info section */
.info-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.info-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-box {
    padding: 1.5rem;
    background: var(--gray-light);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.info-box h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Footer */
.site-footer {
    background: var(--text-color);
    color: white;
    padding: 1rem 0;
    margin-top: 1rem;
    text-align: center;
}

.site-footer .container {
    padding: 0px;
}

.site-footer p {
    margin: 0;           
    margin-bottom: 0.5rem;
}


.credits {
    font-style: italic;
    opacity: 0.8;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    font-size: 1.5rem;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover,
.back-to-top:focus {
    background: var(--primary-dark);
    transform: scale(1.1);
    text-decoration: none;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .nav-list.active {
        display: flex;
    }

    .nav-list li {
        width: 100%;
    }

    .nav-list li a {
        border-bottom: 1px solid var(--gray-border);
        border-left: none;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* Focus visible per accessibilità */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}