
:root {
    --primary-color: #505ab4;
    --primary-hover: #5715f1;
    --accent-color: #6e27e0;
    --background-dark: #111111;
    --text-light: #cfd3f6;
    --text-medium: #9ea6f3;
    --card-bg: #1a1a1a;
    --header-height: 6em;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-dark);
}

header {
    background: linear-gradient(135deg, #000000 0%, #1a1a2e 100%);
    color: white;
    padding: 1em 0;
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(94, 94, 94, 0.1);
}

.header-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

#logo {
    height: 4.5em;
    width: auto;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(94, 94, 255, 0.3));
}

#logo:hover {
    transform: scale(1.05);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5em;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1.3em;
    position: relative;
    padding: 0.5em 0;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-hover);
    text-shadow: 0 0 8px rgba(97, 33, 246, 0.4);
}

nav ul li a:hover::after {
    width: 100%;
}


#content {
    padding: calc(var(--header-height) + 2em) 0 3em 0;
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
}

#docs-container h1 {
    color: var(--primary-color);
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 0.5em;
    position: relative;
    display: inline-block;
}

#docs-container h1::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

#docs-container h2, #docs-container h3 {
    color: var(--text-medium);
    font-size: 1.8em;
    font-weight: 600;
    margin: 0 0 0.5em 0;
}

#docs-container a {
    font-size: 1.6em;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-light);
    display: block;
    padding: 0.1em 0 0.01em 1em; 
    position: relative;
    margin-bottom: 0.05em;
    border-radius: 4px;
    transition: all 0.3s ease;
    line-height: 1.3; 
}

#docs-container a:hover {
    background: linear-gradient(to right, rgba(80, 90, 180, 0.15), transparent);
    padding-left: 2.2em;
}

#CANDIDATURA, #PB, #RTB, #CHI-SIAMO, #POC {
    margin-bottom: 5em;
    scroll-margin-top: calc(var(--header-height) + 1em);
}

#section-docs-container, 
#verbali-container, 
#verbali-esterni, 
#verbali-interni {
    padding-left: 2.5em;
    border-left: 3px solid var(--accent-color);
    position: relative;
}

#section-docs-container::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent-color), transparent);
}

.mini-titolo {
    margin-bottom: 0.5em;
    margin-top: 0;
}

#docs-container a::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 10px solid var(--accent-color);
    transition: all 0.3s ease;
}

#docs-container a:hover::before {
    border-left-color: var(--primary-hover);
    transform: translateY(-50%) scale(1.1);
}

#CHI-SIAMO h1, #POC h1 {
    margin-bottom: 0.5em;
    color: var(--primary-color);
    font-size: 2.5em;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

#CHI-SIAMO h1::after, #POC h1::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

#CHI-SIAMO h2, #POC h2 {
    margin: 1.5em 0 0.8em 0;
    color: var(--primary-color);
    font-size: 2em;
    font-weight: 600;
    border-left: 3px solid var(--primary-color);
    padding-left: 0.5em;
}

#group-description, #mail-p {
    margin-top: 0;
    font-size: 1.4em;
    color: var(--text-medium);
    max-width: 800px;
    line-height: 1.7;
}

#group-email {
    color: var(--text-light);
    transition: color 0.3s ease;
    font-weight: 500;
}

#group-email:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

#profiles-list {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    justify-content: flex-start;
    gap: 30px;
}

#profiles-list li {
    list-style-type: none;
    text-align: center;
    max-width: 120px;
    transition: transform 0.3s ease;
}

#profiles-list li:hover {
    transform: translateY(-5px);
}

.profile-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#profiles-list li:hover .profile-image {
    border-color: var(--primary-color);
    box-shadow: 0 6px 15px rgba(80, 90, 180, 0.4);
}

.link-to-profile {
    text-decoration: none;
    color: var(--text-light);
    display: block;
}

.link-to-profile p {
    margin: 0.8em 0 0 0;
    font-weight: 500;
    transition: color 0.3s ease;
}

.link-to-profile:hover p {
    color: var(--primary-hover);
}

@media screen and (max-width: 768px) {
    :root {
        --header-height: 5em;
    }
    
    .container {
        gap: 1em;
    }
    
    #logo {
        height: 3.5em;
    }
    
    nav ul {
        gap: 1.5em;
    }
    
    nav ul li a {
        font-size: 1.1em;
    }
    
    #content {
        width: 90%;
        padding: calc(var(--header-height) + 1.5em) 0 2em 0;
    }
    
    #docs-container h1, #CHI-SIAMO h1 {
        font-size: 2em;
    }
    
    #docs-container h2, #CHI-SIAMO h2 {
        font-size: 1.6em;
    }
    
    #docs-container h3 {
        font-size: 1.4em;
    }
    
    #docs-container a, #group-description, #mail-p {
        font-size: 1.2em;
    }
    
    #profiles-list {
        justify-content: center;
        gap: 20px;
    }
    
    #profiles-list li {
        max-width: 100px;
    }
    
    .profile-image {
        width: 80px;
        height: 80px;
    }
}

@media screen and (max-width: 600px) {
    nav ul {
        flex-direction: column;
        gap: 0.1em;
        align-items: center;
    }

    nav ul li a {
        padding: 0.2em 0;
    }

    :root {
        --header-height: 6.5em;
    }
    
    #section-docs-container, 
    #verbali-container, 
    #verbali-esterni, 
    #verbali-interni {
        padding-left: 1.5em;
    }
    
    #docs-container a {
        padding: 0.5em 0 0.5em 1.2em;
    }
    
    #docs-container a::before {
        border-top: 5px solid transparent;
        border-bottom: 5px solid transparent;
        border-left: 8px solid var(--accent-color);
    }
}
