:root {
    --primary-blue: #153c5e; 
    --accent-gold: #b38b36; 
    --bg-gray: #f0f4f8;
    --text-dark: #2b3035;   
    --white: #ffffff;
    --dir-open-bg: rgba(179, 139, 54, 0.05);
}

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

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-gray);
    color: var(--text-dark);
    padding-bottom: 50px;
}

header {
    background-color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--accent-gold);
}

nav {
    display: flex;
    align-items: center; 
    max-width: 100%;
    margin: 0 auto;
    padding: 10px 50px;
}

#header-logo {
    max-height: 70px; 
    object-fit: contain;
    margin-right: 5px; 
    margin-bottom: 5px;
}

.nome-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0;
    margin-top: 10px;
    letter-spacing: -0.5px;
}

#nav-navigation {
    display: flex;
    gap: 25px;
    margin-left: auto; 
}

#nav-navigation a {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: bold;
    font-size: 0.9rem;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

#nav-navigation a:hover {
    color: var(--accent-gold);
    border-bottom: 2px solid var(--accent-gold);
}

section {
    background-color: var(--white);
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

h1 {
    color: var(--primary-blue);
    border-bottom: 2px solid var(--bg-gray);
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-size: 2.2rem;
}

h2, h3, h4, h5, h6 {
    color: var(--primary-blue);
    margin: 0;
    display: inline-block;
}

h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }


.dir-container {
    margin: 4px 0;
    transition: background-color 0.3s ease;
}

.dir-title {
    cursor: pointer;
    list-style: none;
    padding: 8px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.dir-title:hover {
    background-color: #f1f5f9;
}

.dir-container[open] > .dir-title {
    background-color: var(--dir-open-bg);
    font-weight: bold;
}

.dir-title::-webkit-details-marker {
    display: none;
}

/* Icona Chevron */
.dir-title::before {
    content: "▶";
    margin-right: 12px;
    font-size: 0.7rem;
    color: var(--accent-gold);
    transition: transform 0.2s ease;
    display: inline-block;
}

.dir-container[open] > .dir-title::before {
    transform: rotate(90deg);
}

.dir-content {
    padding-left: 25px;
    border-left: 1px solid #e2e8f0;
    margin-left: 18px;
    margin-top: 2px;
}

/* Stile per i file */
.doc p {
    margin: 6px 0;
    padding-left: 10px;
}

.doc p::before {
    content: "➤";
    margin-right: 8px;
    color: var(--accent-gold);
    font-size: 0.8rem;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

a[href$=".pdf"], 
a[href$=".md"] {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(179, 139, 54, 0.5); 
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

a[href$=".pdf"]:hover, 
a[href$=".md"]:hover {
    color: var(--accent-gold);
    text-decoration-color: var(--accent-gold);
    background-color: rgba(179, 139, 54, 0.05);
}

#last-update {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-top: 50px;
    font-style: italic;
}

@media screen and (max-width: 850px) {
    nav {
        flex-direction: column; 
        padding: 20px;
        text-align: center;
    }

    #header-logo {
        margin-right: 0; 
        margin-bottom: 5px;
    }

    .nome-logo {
        margin-top: 0;
        margin-bottom: 15px; 
    }

    #nav-navigation {
        margin-left: 0;
        justify-content: center; 
        flex-wrap: wrap; 
        gap: 15px; 
    }
}