@font-face {
    font-family: "IBM";
    src: url("assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.singles {
    padding-left: 2em;
    display: block;
    margin: 0.50rem 0;
}

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

:root {
    --font-body: "IBM", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bg-base: #196841;
    --bg-elevated: rgba(15, 32, 19, 0.8);
    --bg-panel: rgba(20, 45, 30, 0.65);
    --accent: #2ecc71;
    --accent-soft: rgba(46, 204, 113, 0.2);
    --text-primary: #f1f5f3;
    --text-secondary: #b7c7c1;
    --border: rgba(255, 255, 255, 0.12);
    --shadow: 0 18px 40px rgba(5, 12, 8, 0.7);
    --layout-max-width: 1100px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: radial-gradient(circle at top, #0f2a1c 0%, var(--bg-base) 45%),
        linear-gradient(135deg, #051008 0%, #020503 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding: 4rem min(8vw, 6rem) 4rem;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover,
a:focus-visible {
    color: var(--accent);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    backdrop-filter: blur(16px);
    background: linear-gradient(90deg, rgba(6, 20, 13, 0.9), rgba(6, 20, 13, 0.55));
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: padding 0.3s ease, border-radius 0.3s ease, transform 0.3s ease;
    padding: 1.25rem min(8vw, 6rem);
}

.site-header.scrolled {
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(-8px);
}

.header-inner {
    width: 100%;
    max-width: var(--layout-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: 0.6px;
}

.logo img {
    width: 160px;
    height: auto;
}

.logo-text {
    font-size: 1.1rem;
    line-height: 1.1;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.50rem;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.site-nav a {
    color: var(--text-secondary);
    font-weight: 600;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(46, 204, 113, 0.4);
}

.hero {
    isolation: isolate;
    display: flex;
    justify-content: center;
    text-align: center;
    padding: 6rem clamp(1.5rem, 5vw, 3rem) 4rem;
    width: min(100%, var(--layout-max-width));
    align-self: center;
    border-radius: 36px;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.08), rgba(17, 45, 30, 0.35));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-content {
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 3.6rem);
    letter-spacing: 0.02em;
    margin: 0;
}

.subtitle {
    color: var(--accent);
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, outline 0.2s ease;
    border: 1px solid transparent;
    min-height: 44px;
    position: relative;
    flex-wrap: wrap;
    text-align: center;
    white-space: normal;
}

.button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.button.primary {
    background: linear-gradient(135deg, var(--accent) 0%, #1fa75c 100%);
    color: #04110a;
}

.button.ghost {
    border-color: rgba(46, 204, 113, 0.4);
    background: rgba(46, 204, 113, 0.08);
    color: var(--accent);
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
}

.content-area {
    width: min(100%, var(--layout-max-width));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    width: 100%;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2rem);
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.resource-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 1.50rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: left;
    transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.resource-card:hover {
    transform: translateY(-6px);
    border-color: rgba(46, 204, 113, 0.4);
}

.resource-icon {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 2rem;
}

.resource-icon img {
    width: var(--icon-size, 36px);
    height: var(--icon-size, 36px);
    display: block;
}

.resource-content {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.resource-content h3 {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    color: var(--accent);
}

.resource-content a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.resource-content a:hover,
.resource-content a:focus-visible {
    background: rgba(46, 204, 113, 0.15);
    border-color: rgba(46, 204, 113, 0.4);
    transform: translateY(-1px);
}

.documentation {
    flex: 1 1 100%;
    width: 100%;
    min-width: min(100%, 680px);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 2.5rem clamp(1.5rem, 5vw, 3rem);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

#hero,
#documentation,
#team {
    scroll-margin-top: 120px;
}

@media (max-width: 600px) {
    #hero,
    #documentation,
    #team {
        scroll-margin-top: 90px;
    }
}

.candidatura-letter {
    margin: 0.75rem 0;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(6, 20, 13, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease;
}

.tablist {
    display: flex;
    gap: 1rem;
    background: rgba(5, 15, 10, 0.65);
    padding: 0.75rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tablist .content-selector {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.tablist .content-selector:hover,
.tablist .content-selector:focus-visible {
    color: var(--text-primary);
    background: rgba(46, 204, 113, 0.12);
}

.tablist .content-selector.active {
    color: var(--bg-base);
    background: var(--accent);
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.35);
}

.tab-panels {
    display: grid;
    gap: 1.5rem;
}

.tab-panels article {
    display: none;
    background: rgba(5, 15, 10, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.50rem clamp(1rem, 4vw, 2rem);
}

.tab-panels article:first-of-type {
    display: block;
}

details {
    margin: 0.75rem 0;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    background: rgba(6, 20, 13, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease;
}

details:hover {
    background: rgba(6, 20, 13, 0.8);
}

details summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding: 0.5rem 0.5rem 0.5rem 1.50rem;
    color: var(--text-primary);
    min-height: 44px;
    display: flex;
    align-items: center;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::before {
    content: "›";
    position: absolute;
    left: 0.25rem;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    font-size: 1.4rem;
    color: var(--accent);
    transition: transform 0.2s ease;
}

details[open] summary::before {
    transform: translateY(-50%) rotate(90deg);
}

details a {
    display: block;
    padding: 0.75rem 0.5rem 0.75rem 1.50rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-radius: 8px;
    margin: 0.25rem 0;
    transition: background 0.2s ease, color 0.2s ease;
}

details a:hover,
details a:focus-visible {
    color: var(--accent);
    background: rgba(46, 204, 113, 0.08);
}

.pdf-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.5rem;
    margin: 0.25rem 0;
}

.pdf-item .pdf-link {
    min-width: 0;
}

.pdf-item.pdf-item--single {
    padding-left: 2em;
}

.pdf-item.pdf-item--single .pdf-link.singles {
    padding-left: 0;
}

.pdf-open-button {
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    padding: 0.35rem 0.9rem 0.35rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 34px;
    line-height: 1.1;
}

.pdf-open-button:hover,
.pdf-open-button:focus-visible {
    color: var(--accent);
    border-color: rgba(46, 204, 113, 0.4);
    background: rgba(46, 204, 113, 0.12);
}

.pdf-open-button__icon {
    width: 18px;
    height: 18px;
}

.pdf-open-button__label {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .pdf-open-button {
        border-radius: 50%;
        padding: 0.25rem;
        width: 34px;
        min-width: 34px;
        height: 34px;
        gap: 0;
    }

    .pdf-open-button__label {
        display: none;
    }
}

.team {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.team-grid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scroll-snap-type: x proximity;
}

.member-card {
    background: rgba(6, 18, 12, 0.7);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.50rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
    flex: 0 0 220px;
    scroll-snap-align: start;
}

.member-card:hover {
    transform: translateY(-6px);
    border-color: rgba(46, 204, 113, 0.4);
    box-shadow: 0 16px 40px rgba(8, 25, 16, 0.7);
}

.member-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(46, 204, 113, 0.3);
}

.member-card h3 {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
}

footer {
    margin-top: auto;
    text-align: center;
    color: var(--text-secondary);
    padding: 2.5rem 1.5rem;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(5, 15, 10, 0.8);
    letter-spacing: 0.04em;
}

@media (max-width: 960px) {
    .site-nav {
        gap: 1.2rem;
        font-size: 0.85rem;
    }

    .tablist {
        flex-direction: column;
    }

    .tablist .content-selector {
        width: 100%;
    }

    .team-grid {
        gap: 1.2rem;
    }

    .resource-card {
        padding: 1.5rem;
        gap: 1.25rem;
        flex: 1 1 260px;
    }

    .resource-icon {
        width: 56px;
        height: 56px;
        border-radius: 16px;
        font-size: 1.6rem;
    }
}

@media (max-width: 720px) {
    .content-area {
        gap: 1.5rem;
    }

    .site-header {
        padding: 1rem 1.5rem;
    }

    .header-inner {
        flex-direction: column;
        justify-content: center;
    }

    .site-nav {
        width: 100%;
        justify-content: center;
    }

    main {
        padding: 5rem 1.5rem 3rem;
    }

    .hero::before {
        inset: 0rem;
    }
}

@media (max-width: 520px) {
    .content-area {
        gap: 1.25rem;
    }

    .resource-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.35rem 1.5rem;
    }

    .resource-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        font-size: 1.4rem;
    }

    .logo img {
        width: 135px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .hero {
        padding: 5rem 2rem 3rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .button {
        width: 100%;
        padding: 0.75rem 1.2rem;
        font-size: 0.9rem;
    }

    .team-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        padding: 0.5rem;
    }

    .member-card {
        flex: 1 1 auto;
        min-width: 0;
        padding: 1rem;
    }

    .member-card img {
        width: 80px;
        height: 80px;
    }

    .member-card h3 {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .documentation {
        padding: 1.5rem 1rem;
    }

    details {
        margin: 0.5rem 0;
    }

    .tablist {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .tablist .content-selector {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}

@media (min-width: 900px) {
    .team-grid {
        overflow: visible;
        flex-wrap: wrap;
        justify-content: center;
    }

    .member-card {
        flex: 1 0 calc(33.333% - 1.5rem);
        max-width: 260px;
    }
}

#pdf-viewer-wrapper {
    margin-top: 2rem;
    border-radius: 28px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 2rem;
}

.pdf-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

#pdf-title {
    color: var(--accent);
    font-size: 1.5rem;
    margin: 0;
}

#pdf-close-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

#pdf-close-button:hover {
    color: var(--accent);
}
/* ============================================================
   GLOSSARIO
   ============================================================ */

/* Contenitore principale del glossario */
.glossary-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Barra di ricerca del glossario */
.glossary-search {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 1.5rem 2rem;
}

.glossary-search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-family: var(--font-body);
    background: rgba(5, 15, 10, 0.6);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.glossary-search-input::placeholder {
    color: var(--text-secondary);
}

.glossary-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.15);
}

/* Navigazione alfabetica */
.glossary-alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 1.5rem;
    justify-content: center;
}

.glossary-letter-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 15, 10, 0.6);
    border: 1px solid var(--border);
    border-radius: 50%;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
    cursor: pointer;
}

.glossary-letter-link:hover:not(.disabled) {
    background: var(--accent);
    color: var(--bg-base);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.glossary-letter-link.active {
    background: var(--accent);
    color: var(--bg-base);
    border-color: var(--accent);
}

.glossary-letter-link.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Contenuto del glossario */
.glossary-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.glossary-section {
    opacity: 0;
    animation: glossaryFadeIn 0.4s ease forwards;
}

@keyframes glossaryFadeIn {
    to {
        opacity: 1;
    }
}

.glossary-section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--accent);
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent);
    letter-spacing: 0.05em;
}

/* Cards dei termini */
.glossary-terms {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.glossary-term-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem 2rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.glossary-term-card:hover {
    transform: translateY(-4px);
    border-color: rgba(46, 204, 113, 0.4);
    box-shadow: 0 8px 24px rgba(8, 25, 16, 0.5);
}

.glossary-term-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 0.75rem 0;
    letter-spacing: 0.04em;
}

.glossary-term-definition {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

/* Nessun risultato */
.glossary-no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 22px;
}

.glossary-no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.glossary-no-results h3 {
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.glossary-no-results p {
    color: var(--text-secondary);
    margin: 0;
}

/* Evidenziazione ricerca */
.glossary-highlight {
    background: linear-gradient(135deg, var(--accent) 0%, #1fa75c 100%);
    color: var(--bg-base);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 720px) {
    .glossary-alphabet-nav {
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .glossary-letter-link {
        width: 38px;
        height: 38px;
        font-size: 0.85rem;
    }
    
    .glossary-section-title {
        font-size: 2rem;
    }
    
    .glossary-term-card {
        padding: 1.25rem 1.5rem;
    }
    
    .glossary-term-name {
        font-size: 1.15rem;
    }
    
    .glossary-search {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 520px) {
    .glossary-alphabet-nav {
        gap: 0.4rem;
        padding: 0.75rem;
    }
    
    .glossary-letter-link {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }
    
    .glossary-term-card {
        padding: 1rem 1.25rem;
    }
}