/* ===========================
   RESET + BASE
=========================== */
body {
    margin: 0;
    background: #111;
    color: #e6e6e6;
    font-family: "Segoe UI", sans-serif;
    line-height: 1.6;
}

/* ===========================
   HEADER + MENU
=========================== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 50px;
    background: linear-gradient(to right, #111, #1f1f1f);
    box-shadow: 0 4px 15px rgba(0,0,0,0.35);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo img {
    height: 70px;
    width: auto;
}

.topmenu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 32px;
}

.topmenu a {
    color: #e6e6e6;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 6px;
    transition: 0.35s ease;
}

.topmenu a:hover {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(4px);
    color: #fff;
    box-shadow: 0 0 14px rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

/* ===========================
   HAMBURGER MENU
=========================== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: #e6e6e6;
    border-radius: 3px;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===========================
   CONTENT AREA
=========================== */

        .content {
            background: rgba(180, 0, 0, 0.45);
            backdrop-filter: blur(4px);
            padding: 40px 50px;
            border-radius: 14px;
            margin: 40px auto;
            max-width: 900px;
            color: #fff;
            text-align: center;
        }



h1 {
    font-size: 32px;
    margin-bottom: 20px;
    text-align: center;
}

/* ===========================
   BACK BUTTON
=========================== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 25px 0;
    padding: 10px 18px;
    background: #222;
    color: #e6e6e6;
    border: 1px solid #333;
    border-radius: 6px;
    text-decoration: none;
    font-size: 15px;
    transition: 0.25s;
}

.back-btn:hover {
    background: #333;
    border-color: #555;
    transform: translateX(-3px);
    box-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.back-btn .icon {
    width: 20px;
    height: 20px;
    stroke: #e6e6e6;
    stroke-width: 2;
    fill: none;
    transition: 0.25s ease;
}

.back-btn:hover .icon {
    stroke: #ffffff;
    transform: translateX(-3px);
}

/* ===========================
   torna menu iniziali da procedura admin
=========================== */
.back-menu {
    margin-top: 25px;
}

.back-btn {
    display: inline-block;
    padding: 10px 18px;
    background: #0066cc;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
}

.back-btn:hover {
    background: #004c99;
}

/* ===========================
   ALBUM LIST
=========================== */
.album-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 30px;
}

.album-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: #1a1a1a;
    border-radius: 10px;
    border: 1px solid #2a2a2a;
    text-decoration: none;
    color: #e6e6e6;
    font-size: 18px;
    transition: 0.3s;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeIn 0.4s forwards;
}

.album-item:hover {
    background: #222;
    transform: translateX(6px);
    box-shadow: 0 0 14px rgba(255,255,255,0.15);
}

.album-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.album-title {
    font-weight: 500;
}

        /* LIGHTBOX */
        .lightbox {
            display: none;
            position: fixed;
            z-index: 9999;
            inset: 0;
            background: rgba(0,0,0,0.92);
            justify-content: center;
            align-items: center;
        }

        .lightbox-img {
            max-width: 90%;
            max-height: 80%;
            border-radius: 8px;
            box-shadow: 0 0 25px rgba(0,0,0,0.6);
            animation: fadeIn 0.25s ease;
        }

        .lightbox .close {
            position:absolute;
            top:20px; right:30px;
            font-size:40px;
            color:white;
            cursor:pointer;
        }

        .lightbox .arrow {
            position:absolute;
            top:50%;
            font-size:60px;
            color:white;
            cursor:pointer;
            user-select:none;
        }

        .arrow.left { left:40px; }
        .arrow.right { right:40px; }

        .back-home {
            display:inline-block;
            margin-bottom:30px;
            background:#1f1f1f;
            color:#fff;
            padding:12px 22px;
            border-radius:50px;
            font-size:18px;
            cursor:pointer;
            box-shadow:0 0 12px rgba(255,255,255,0.2);
            transition:0.3s;
        }

        .back-home:hover {
            background:#333;
            transform:scale(1.08);
        }


@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   SLIDESHOW
=========================== */
.slideshow-container {
    width: 100%;
    height: 650px;
    position: relative;
    overflow: hidden;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.92);
}

.fade {
    animation-name: fade;
    animation-duration: 1.8s;
}

@keyframes fade {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

/* ===========================
   SERVICES SECTION
=========================== */
.section {
    padding: 60px 50px;
    text-align: center;
}

.section h2 {
    font-size: 32px;
    margin-bottom: 30px;
}

.services {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.service-box {
    display: block;
    background: #1a1a1a;
    padding: 25px;
    width: 260px;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0,0,0,0.3);
    transition: 0.35s ease;
    text-align: center;
    color: #e6e6e6;
    text-decoration: none;
    font-size: 20px;
}

.service-box:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 0 22px rgba(255,255,255,0.18);
}
/* ===========================
   pdf 
=========================== */

        .pdf-container {
            width: 90%;
            max-width: 1000px;
            margin: 40px auto;
            padding: 20px;
            background: #ffffff;
            border-radius: 12px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
            border: 1px solid #e0e0e0;
        }

        .pdf-container iframe {
            width: 100%;
            height: 800px;
            border: none;
            border-radius: 8px;
        }

        .documents ul {
            list-style: none;
            padding: 0;
            margin-top: 20px;
        }

        .documents li {
            margin: 12px 0;
        }

        .documents a {
            color: #e6e6e6;
            text-decoration: none;
            font-size: 18px;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: 0.25s;
        }

        .documents a:hover {
            color: #ff3b3b;
            transform: translateX(6px);
        }

/* ===========================
   FOOTER
=========================== */
footer {
    background: #0d0d0d;
    text-align: center;
    padding: 25px;
    margin-top: 50px;
    font-size: 14px;
    color: #aaa;
    border-top: 1px solid rgba(255,255,255,0.08);
}
        .rosso {
            color: #ff3b3b;
            animation: glowFlash 1.2s infinite alternate;
        }

        .testo_chiusure {
            margin: 30px 0;
            padding: 20px;
            background: #1a1a1a;
            border-left: 4px solid #444;
            border-radius: 6px;
            font-size: 18px;
            line-height: 1.6;
        }

        @keyframes glowFlash {
            from {
                text-shadow: 0 0 4px #ff3b3b, 0 0 8px #ff3b3b;
                opacity: 1;
            }
            to {
                text-shadow: 0 0 1px #ff3b3b;
                opacity: 0.6;
            }
        }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
    .header {
        flex-direction: column;
        gap: 18px;
        padding: 20px;
        text-align: center;
    }

    .hamburger {
        display: flex;
    }

    .topmenu {
        display: none;
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    .topmenu.open {
        display: block;
    }

    .topmenu ul {
        flex-direction: column;
        gap: 12px;
    }

    .slideshow-container {
        height: 380px;
    }
}

@media (max-width: 600px) {
    .topmenu a {
        font-size: 15px;
        padding: 8px 12px;
    }

    .slideshow-container {
        height: 260px;
    }

    .service-box {
        width: 80%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 55px;
    }

    .slideshow-container {
        height: 220px;
    }

    .service-box {
        width: 90%;
    }

    footer {
        font-size: 12px;
        padding: 18px;
    }
}

/* ===========================
   orario
=========================== */

        table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0 10px;
            font-size: 16px;
        }

        thead th {
            text-align: left;
            padding: 10px;
            background: #1a1a1a;
            border-bottom: 1px solid #333;
        }

        tbody td {
            padding: 8px 10px;
            border-bottom: 1px solid #222;
        }

        tbody tr:nth-child(even) {
            background: #151515;
        }

        .note {
            margin-top: 10px;
            font-size: 14px;
            color: #ccc;
        }

/* ===========================
   visualizza mappa
=========================== */
        .map-container {
            margin-top: 30px;
            box-shadow: 0 0 15px rgba(0,0,0,0.4);
            border-radius: 10px;
            overflow: hidden;
        }
/* ===========================
   visualizza team
=========================== */

        .modern-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 25px;
            max-width: 900px;
            margin: 0 auto 50px;
            position: relative;
        }

        .modern-cards .card {
            background: rgba(255, 255, 255, 0.75);
            backdrop-filter: blur(3px);
            border-radius: 14px;
            padding: 25px 30px;
            box-shadow: 0 6px 18px rgba(0,0,0,0.12);
            text-align: center;
            transition: 0.25s ease;
        }

        .modern-cards .card:hover {
            background: rgba(255, 255, 255, 1);
            transform: translateY(-6px);
            box-shadow: 0 12px 28px rgba(0,0,0,0.18);
        }

        .role {
            font-size: 1.3rem;
            font-weight: 700;
            color: #1a1a1a;
            margin-bottom: 10px;
        }

        .name {
            font-size: 1.1rem;
            font-weight: 500;
            color: #444;
        }

        .overlay-section {
            position: relative;
            padding: 50px 0;
        }

        .overlay-section::before {
            content: "";
            position: absolute;
            inset: 0;
            background: rgba(255, 255, 255, 0.4);
            backdrop-filter: blur(2px);
            z-index: 0;
        }

        .overlay-section .card {
            position: relative;
            z-index: 1;
        }

/* Contenitore generale pagina team */
.team-page main {
    padding: 60px 20px 80px;
}

/* Titolo principale */
.team-title {
    text-align: center;
    margin-bottom: 40px;
    color: #ffffff;
}

.team-title h1 {
    font-size: 2.4rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.team-subtitle {
    font-size: 1rem;
    opacity: 0.8;
}

/* Sezioni */
.team-section {
    margin: 30px auto;
    max-width: 1100px;
}

/* Titolo sezione con linea */
.team-section-title {
    color: #ffffff;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 6px;
}

.team-section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0));
}

/* Griglia responsive */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
}

/* Card glassmorphism */
.team-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

/* Hover elegante */
.team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 45px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Ruolo e nome */
/* NOMI – molto chiari, luminosi, leggibili */
.team-card .name {
    font-size: 1.08rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.98);
    letter-spacing: 0.4px;
    text-shadow:
        0 0 6px rgba(0, 0, 0, 0.65),
        0 0 10px rgba(0, 0, 0, 0.45);
}

/* RUOLI – chiari, eleganti, ma meno dominanti del nome */
.team-card .role {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.90);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 6px;
    opacity: 0.95;
    text-shadow:
        0 0 4px rgba(0, 0, 0, 0.55),
        0 0 8px rgba(0, 0, 0, 0.35);
}

/* Piccolo respiro tra più nomi nella stessa card */
.team-card .name + .name {
    margin-top: 4px;
}

.team-page {
    background: #8b0000; /* rosso scuro elegante */
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
    color: #ffffff;
}

.team-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(255,255,255,0.12), transparent 55%),
                rgba(0, 0, 0, 0.65);
    z-index: -1;
}


/* Responsive */
@media (max-width: 600px) {
    .team-page main {
        padding: 40px 14px 60px;
    }

    .team-title h1 {
        font-size: 1.9rem;
    }

    .team-section-title {
        font-size: 1.1rem;
    }
}


/* ===========================
   gallery view album
=========================== */


        .gallery {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            margin-top: 30px;
        }

        .gallery img {
            width: 300px;
            height: 200px;
            object-fit: cover;
            border-radius: 8px;
            border: 1px solid #2a2a2a;
            transition: 0.3s;
            cursor: pointer;
        }

       .close {
            position: absolute;
            top: 20px;
            right: 40px;
            font-size: 50px;
            color: #fff;
            cursor: pointer;
            user-select: none;
        }

        .nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            cursor: pointer;
            padding: 20px;
            user-select: none;
        }

        .prev { left: 40px; }
        .next { right: 40px; }

        .nav-icon {
            width: 60px;
            height: 60px;
            stroke: #fff;
            stroke-width: 2;
            fill: none;
            transition: 0.25s ease;
        }

        .nav:hover .nav-icon,
        .close:hover {
            stroke: #ccc;
        }
/* ===========================
   ACCESSIBILITÀ
=========================== */
.visually-hidden {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
/* ===========================
   LISTA DOCUMENTI GARE – VERSIONE CORRETTA
=========================== */

/* Lista documenti */
.lista-documenti {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Riga documento */
.documento-riga {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    transition: 0.25s ease;
}

/* Hover elegante */
.documento-riga:hover {
    background: rgba(255,255,255,0.06);
    transform: translateX(4px);
}

/* Contenitore testo (titolo + descrizione) */
.documento-testo {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Titolo documento */
.documento-link strong {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.3px;
}

/* Descrizione documento */
.documento-descrizione {
    font-size: 0.9rem;
    color: #d0d0d0;
    opacity: 0.9;
    font-style: italic;
    line-height: 1.35;
}

/* Hover sulla descrizione */
.documento-riga:hover .documento-descrizione {
    color: #ffffff;
    opacity: 1;
}
/* Centrare titolo e descrizione */
.documento-testo {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;   /* <— CENTRATO */
    width: 100%;          /* <— IMPORTANTE per centrare */
}

/* Titolo centrato */
.documento-link strong {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.3px;
    text-align: center;   /* <— CENTRATO */
    width: 100%;
}

/* Descrizione centrata */
.documento-descrizione {
    font-size: 0.9rem;
    color: #d0d0d0;
    opacity: 0.9;
    font-style: italic;
    line-height: 1.35;
    text-align: center;   /* <— CENTRATO */
    width: 100%;
}
.foto-box {
    display: inline-block;
    text-align: center;
    margin: 15px;
}

.nomefoto {
    margin-top: 6px;
    font-size: 14px;
    color: #ccc;
    font-family: 'Segoe UI', sans-serif;
}
