    /* ---- RESET GENERALE & VARIABILI COLORE ---- */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    html {
      scroll-behavior: smooth; /* Scorrimento morbido e fluido quando si clicca il pulsante */
    }
    :root {
      --primary-color: #1a325a; /* Blu scuro Fondazione ACRAB */
      --secondary-color: #3b5d9a; /* Blu chiaro d'accento */
      --bg-light: #f4f7f6; /* Sfondo leggero per le card */
      --text-dark: #222222;
      --text-muted: #555555;
    }
    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      line-height: 1.6;
      color: var(--text-dark);
      background-color: #ffffff;
    }

    /* ---- INTESTAZIONE (HEADER) CON BANNER VETTORIALE ---- */
    /* ---- INTESTAZIONE (HEADER) CON LOGHI ISTITUZIONALI ---- */
    .main-header {
      position: relative;
      /* Fotografia d'autore: 'Illumina le tenebre de lo core mio' */
      background-image: url('Img/illumina le tenebre de lo core mio.jpg');
      background-size: cover;
      background-position: center 38%;
      min-height: 480px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: center;
      text-align: center;
      overflow: hidden;
    }

    /* Velo protettivo scuro calibrato e trasparente per far risplendere i colori e i dettagli dell'opera */
    .main-header .overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(180deg, rgba(8, 12, 22, 0.28) 0%, rgba(12, 18, 30, 0.42) 55%, rgba(6, 9, 16, 0.68) 100%);
      z-index: 1;
    }

    /* BARRA SUPERIORE DEI LOGHI ISTITUZIONALI IN RISALTO */
    .logo-container {
      position: relative;
      z-index: 5;
      width: calc(100% - 40px);
      max-width: 1100px;
      margin: 20px auto 0;
      display: flex;
      justify-content: space-between; /* Distribuisce i tre loghi: sinistra, centro, destra */
      align-items: center;
      padding: 14px 28px;
      background: rgba(255, 255, 255, 0.94);
      backdrop-filter: blur(20px) saturate(160%);
      -webkit-backdrop-filter: blur(20px) saturate(160%);
      border: 1px solid rgba(255, 255, 255, 0.7);
      border-radius: 20px;
      box-shadow: 
        0 15px 35px -5px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
      transition: all 0.35s ease;
    }

    .logo-container:hover {
      box-shadow: 
        0 20px 45px -5px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.8),
        inset 0 1px 2px rgba(255, 255, 255, 1);
    }

    .logo-item {
      height: 62px;
      max-width: 220px;
      object-fit: contain;
      filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.12));
      padding: 4px 10px;
      border-radius: 10px;
      transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
      cursor: pointer;
    }

    .logo-item:hover {
      transform: translateY(-2px) scale(1.05);
      filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.2));
    }

    /* CONTENUTO CENTRALE DEL TESTO */
    .main-header .header-content {
      position: relative;
      z-index: 2;
      color: #ffffff;
      padding: 40px 20px;
      margin-top: auto;
      margin-bottom: auto; /* Centra perfettamente il titolo nello spazio residuo */
    }
    .main-header h1 {
      font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
      font-size: 3.3rem;
      font-weight: 700;
      letter-spacing: 3px;
      text-transform: uppercase;
      margin-bottom: 12px;
      color: #ffffff;
      background: linear-gradient(180deg, #ffffff 30%, #fef08a 85%, #fbbf24 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 25px rgba(212, 175, 55, 0.35));
      position: relative;
    }
    .main-header p {
      font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
      font-size: 1.25rem;
      font-weight: 400;
      letter-spacing: 0.5px;
      color: #f1f5f9;
      opacity: 0.95;
    }

    /* ---- CONTENITORE PRINCIPALE LAYOUT ---- */
    .container {
      max-width: 1100px;
      margin: 0 auto;
      padding: 40px 20px;
    }

    /* ---- BLOCCO DATI STUDENTE ---- */
    .student-info {
      background-color: var(--bg-light);
      border-left: 5px solid var(--primary-color);
      padding: 20px;
      margin-bottom: 40px;
      border-radius: 0 8px 8px 0;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 15px;
    }
    .info-item strong {
      color: var(--primary-color);
      display: block;
    }

    /* ---- SEZIONI DI TESTO COERENTI ---- */
    section {
      margin-bottom: 50px;
    }
    h2 {
      color: var(--primary-color);
      font-size: 1.8rem;
      margin-bottom: 20px;
      border-bottom: 2px solid var(--bg-light);
      padding-bottom: 8px;
    }
    p {
      margin-bottom: 15px;
      text-align: justify;
      color: #333;
    }

    /* ---- COSTRUZIONE TIMELINE DELLE TRE FASI ---- */
    .timeline {
      position: relative;
      margin: 30px 0;
      padding-left: 20px;
      border-left: 3px solid var(--secondary-color);
    }
    .phase-card {
      position: relative;
      background: var(--bg-light);
      padding: 20px;
      border-radius: 8px;
      margin-bottom: 25px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    .phase-card::before {
      content: '';
      position: absolute;
      left: -28px;
      top: 22px;
      background: var(--primary-color);
      width: 13px;
      height: 13px;
      border-radius: 50%;
    }
    .phase-title {
      color: var(--primary-color);
      font-weight: 700;
      margin-bottom: 8px;
      font-size: 1.15rem;
    }

    /* ---- GRIGLIA PER LE COMPETENZE (CARDS) ---- */
    .skills-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 20px;
      margin-top: 20px;
    }
    .skill-box {
      border: 1px solid #e0e0e0;
      padding: 20px;
      border-radius: 8px;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .skill-box:hover {
      transform: translateY(-3px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    .skill-box h3 {
      color: var(--secondary-color);
      margin-bottom: 10px;
      font-size: 1.2rem;
    }

    /* ---- FOOTER DI CHIUSURA ---- */
    footer {
      background-color: var(--primary-color);
      color: #ffffff;
      text-align: center;
      padding: 20px;
      font-size: 0.9rem;
      margin-top: 60px;
    }
/* Regola per centrare gli elementi */
.container-centrato {
    display: flex;
    justify-content: center;  
    align-items: center;      
    padding: 20px;
    width: 100%;
}

/* Stile compatto e più piccolo per il bottone */
.btn-pdf-piccolo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #e43a46, #c21d24); 
    color: #ffffff;
    text-decoration: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
    font-size: 14px;
    border-radius: 40px;
    box-shadow: 0 4px 10px rgba(228, 58, 70, 0.15);
    transition: all 0.3s ease; 
    cursor: pointer;
}

/* Effetto al passaggio del mouse (Hover) */
.btn-pdf-piccolo:hover {
    background: linear-gradient(135deg, #c21d24, #a01318);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(228, 58, 70, 0.25); 
}

/* Icona più piccola */
.pdf-logo-piccolo {
    width: 18px;
    height: 18px;
    display: block;
}

/* ----------------------------------------------------------
   PULSANTE FLUTTUANTE IN BASSO A DESTRA (QUICK JUMP ALLA MOSTRA)
   ---------------------------------------------------------- */
.floating-gallery-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 24px;
    background: linear-gradient(135deg, rgba(26, 50, 90, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    text-decoration: none;
    border-radius: 50px;
    border: 1.5px solid rgba(241, 196, 15, 0.7);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(241, 196, 15, 0.35);
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    animation: pulse-floating-btn 3s infinite;
}

.floating-gallery-btn:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55), 0 0 30px rgba(241, 196, 15, 0.6);
    border-color: #fef08a;
}

/* Classe aggiunta quando si raggiunge il fondo della pagina */
.floating-gallery-btn.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    animation: none;
}

.floating-badge-icon {
    width: 32px;
    height: 32px;
    background: #f1c40f;
    color: #1a325a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.floating-badge-text {
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #ffffff;
}

.floating-arrow {
    font-size: 13px;
    color: #f1c40f;
    animation: bounce-arrow 1.5s infinite;
}

.floating-gallery-btn:hover {
    transform: translateY(-5px) scale(1.04);
    box-shadow: 0 15px 30px rgba(26, 50, 90, 0.6), 0 0 25px rgba(241, 196, 15, 0.6);
    background: linear-gradient(135deg, #234275 0%, #1a325a 100%);
}

@keyframes bounce-arrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

@keyframes pulse-floating-btn {
    0%, 100% { box-shadow: 0 10px 25px rgba(26, 50, 90, 0.4), 0 0 15px rgba(241, 196, 15, 0.35); }
    50% { box-shadow: 0 12px 30px rgba(26, 50, 90, 0.55), 0 0 24px rgba(241, 196, 15, 0.6); }
}

/* ---- RESPONSIVE MOBILE ACCORTEZZE ---- */
@media (max-width: 768px) {
    .main-header { min-height: 380px; }
    .logo-container { padding: 12px; gap: 10px; justify-content: center; flex-wrap: wrap; }
    .logo-item { height: 46px; }
    .main-header h1 { font-size: 1.85rem; letter-spacing: 1px; }
    .main-header p { font-size: 1rem; }
    .container { padding: 20px 16px; }
    .student-info { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
    .timeline { padding-left: 15px; }
    .phase-card { padding: 16px; }
    .phase-card::before { left: -22px; width: 11px; height: 11px; }
    .skills-grid { grid-template-columns: 1fr; }
    .film-button { width: 100%; max-width: 260px; }
    
    .floating-gallery-btn {
        bottom: 18px;
        right: 18px;
        padding: 10px 16px;
        gap: 8px;
    }
    .floating-badge-icon {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    .floating-badge-text {
        font-size: 12px;
    }
}

/* ----------------------------------------------------------
   MODALE SCELTA VISTA GALLERIA (POP-UP GLASSMORPHISM MUSEALE)
   ---------------------------------------------------------- */
.film-button {
    cursor: pointer;
    border: none;
    outline: none;
}

.choice-modal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeInModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.choice-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 20, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.choice-modal-window {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 660px;
    background: rgba(18, 22, 32, 0.92);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    padding: 34px 30px;
    box-shadow: 
        0 30px 70px -15px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.35);
    color: #ffffff;
    animation: scaleInModal 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.choice-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    color: #cbd5e1;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.choice-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: scale(1.08);
}

.choice-modal-header {
    text-align: center;
    margin-bottom: 26px;
}

.choice-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 9999px;
    color: #fbbf24;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.choice-modal-header h3 {
    margin: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 23px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.choice-modal-header p {
    margin: 8px 0 0;
    font-size: 13.5px;
    color: #94a3b8;
    line-height: 1.5;
}

.choice-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.choice-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.choice-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 
        0 18px 40px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(212, 175, 55, 0.2);
}

.choice-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
    transition: transform 0.3s ease;
}

.choice-card:hover .choice-icon-wrap {
    transform: scale(1.1) rotate(4deg);
}

.icon-3d {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(245, 158, 11, 0.15));
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #fbbf24;
}

.icon-grid {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(99, 102, 241, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.choice-tag {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 4px;
}

.choice-content h4 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
}

.choice-content p {
    margin: 0;
    font-size: 12.5px;
    color: #cbd5e1;
    line-height: 1.5;
}

.choice-cta {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fbbf24;
    transition: gap 0.2s ease;
}

.choice-card-grid .choice-cta {
    color: #93c5fd;
}

.choice-card:hover .choice-cta {
    gap: 12px;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleInModal {
    from { transform: scale(0.92) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

@media (max-width: 600px) {
    .choice-modal-window {
        padding: 24px 18px;
    }
    .choice-options-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .choice-modal-header h3 {
        font-size: 19px;
    }
}

