/* =========================================================
   RESET & VARIABILI GLOBALI
   ========================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: #08080a;
  --accent: #ffffff;
  --text-main: #f0f0f0;
  --text-muted: #a0a0ab;
  
  /* Font Rotondo Principale */
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Outfit', sans-serif;

  /* Glassmorphism Variables */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-hover: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-hover: rgba(255, 255, 255, 0.35);
  --glass-blur: blur(16px);
  --glass-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

/* =========================================================
   SFONDO GLOBALE E PARALLAX PERFORMANTE
   ========================================================= */

/* Body trasparente per far passare la luce dello sfondo */
body {
  background-color: #08080a; /* Colore di sicurezza sul fondo */
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Sfondo parallax fisso a tutto schermo */
.global-parallax-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 130vh; /* Altezza maggiorata per coprire lo spostamento verso l'alto */
  
  background-image: url('images/background/12background.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: -2;
  will-change: transform; /* Ottimizza la fluidità del movimento */
}

/* Rimuovi la vecchia classe dal CSS */
.parallax-bg {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   HEADER & NAVBAR GLASS
   ========================================================= */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 12, 0.60);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  padding: 18px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  /*text-transform: uppercase;*/
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

nav a {
  font-family: var(--font-title);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

nav a:hover {
  color: #d4af37;
}

/* =========================================================
   SEZIONE HERO ARTISTICA CON PARALLAX
   ========================================================= */
.opera-hero-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #ffffff;
  text-align: center;
  padding: 120px 20px 60px 20px;
  box-sizing: border-box;
}


/* Overlay Scuro */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(18, 18, 18, 0.3) 0%, rgba(8, 8, 10, 0.85) 100%);
  z-index: 2;
}

/* Contenuto Hero */
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  margin: 0 auto;
  animation: fadeInHero 1.5s ease-out forwards;
}

.opera-subtitle {
  display: block;
  font-family: var(--font-title);
  font-size: 1.2rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #d4af37;
  margin-bottom: 15px;
}

.opera-title {
  font-family: var(--font-title);
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 2px;
  margin: 0 0 20px 0;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  color: #f8f8f8;
}

.title-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);
  margin: 20px auto 25px auto;
}

.opera-description {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.6;
  color: #e0e0e0;
  margin-bottom: 35px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.opera-btn {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #ffffff;
  padding: 14px 32px;
  border: 1px solid rgba(212, 175, 55, 0.6);
  background: rgba(18, 18, 18, 0.4);
  backdrop-filter: blur(4px);
  transition: all 0.4s ease;
}

.opera-btn:hover {
  background: #d4af37;
  color: #121212;
  border-color: #d4af37;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
  transform: translateY(-2px);
}

@keyframes fadeInHero {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   BLOCCHI GLASSMOPRHISM A TUTTA LARGHEZZA
   ========================================================= */

.glass-block {
  width: 100%;
  margin: 100px 0;
  padding: 40px 0;
  
  /* Effetto Vetro Scuro traslucido su fondo scuro */
  background: rgba(20, 20, 28, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.glass-block section {
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px 20px;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-family: var(--font-title);
  font-size: 1.8rem;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-subtitle {
  font-family: var(--font-title);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: #d4af37;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

/* CARDS INTERNE AI BLOCCHI */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: var(--glass-shadow);
}

.glass-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--glass-border-hover);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.card-img-container {
  overflow: hidden;
  position: relative;
}

.card-img {
  width: 100%;
  height: 260px;
  background-size: cover;
  background-position: center;
  filter: grayscale(20%);
  transition: filter 0.5s ease, transform 0.5s ease;
}

.glass-card:hover .card-img {
  filter: grayscale(0%);
  transform: scale(1.08);
}

.card-info {
  padding: 28px;
}

.card-category {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #d4af37;
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.7;
}

/* =========================================================
   FOOTER GLASS
   ========================================================= */
.glass-footer {
  width: 100%;
  margin-top: 60px;
  background: rgba(12, 12, 16, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border);
  padding: 50px 20px;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 25px;
}

.social-links a {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.social-links a:hover {
  color: #d4af37;
  border-color: #d4af37;
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

.copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* =========================================================
   RESPONSIVE MOBILE
   ========================================================= */
/* =========================================================
   OTTIMIZZAZIONE RESPONSIVE PER CELLULARI E TABLET
   ========================================================= */

@media (max-width: 768px) {
  /* Header Mobile */
  header {
    padding: 12px 20px;
    flex-direction: column;
    gap: 12px;
  }

  nav ul {
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Spaziatura blocchi ridotta su schermi piccoli */
  .glass-block {
    margin: 40px 0;
    padding: 20px 0;
  }

  .glass-block section {
    padding: 30px 15px;
  }

  .grid {
    grid-template-columns: 1fr; /* Forzatura colonna singola su smartphone */
    gap: 20px;
  }

  /* Parallax Mobile Optimization (Disattiva scroll rigido per evitare scatti su iOS) */
  .global-parallax-bg {
    height: 100vh;
  }
}
    /* --- PULSANTE BACK HOME --- */
.back-home-btn {
  display: inline-block;
  margin: 20px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
}
.back-home-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-5px);
}

/* --- GLASSCARD PRESENTAZIONE --- */
.presentation-card {
  margin-bottom: 40px;
  text-align: center;
  padding: 30px;
}
.presentation-card h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #fff;
}
.presentation-card p {
  color: #ddd;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
}

/* --- GRIGLIA MASONRY (Adattamento automatico SENZA tagli) --- */
.masonry-gallery {
  column-count: 4;
  column-gap: 20px;
  padding-bottom: 50px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
  /* Effetto scheda per ogni foto (opzionale, protegge anche i bordi) */
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 6px;
  backdrop-filter: blur(5px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.masonry-item:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.masonry-item img {
  width: 100%;
  height: auto; /* Mantiene le proporzioni naturali (niente tagli) */
  display: block;
  border-radius: 10px;
  cursor: zoom-in;
  object-fit: contain; /* Assicura che la foto sia visibile per intero */
  -webkit-user-drag: none;
}

/* Responsive per schermi più piccoli */
@media (max-width: 1200px) { .masonry-gallery { column-count: 3; } }
@media (max-width: 768px)  { .masonry-gallery { column-count: 2; } }
@media (max-width: 480px)  { .masonry-gallery { column-count: 1; } }


/* --- LIGHTBOX MAXI CON ZOOM 2X --- */
.lightbox {
  position: fixed;
  top: 0; 
  left: 0; 
  width: 100vw; 
  height: 100vh;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  overflow: auto; /* Permette di scorrere la foto quando è zoomata 2X */
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
  cursor: zoom-in;
  /* Rende il movimento dell'immagine morbido durante lo scorrimento del mouse */
  transition: transform 0.3s ease, transform-origin 0.1s ease-out; 
  pointer-events: auto;
}

/* Stato Zoom 2X */
.lightbox img.zoomed {
  transform: scale(2); /* Raddoppia la dimensione dell'immagine */
  cursor: zoom-out;    /* Cursore per rimpicciolire */
}

.close-lightbox {
  position: fixed; /* Mantiene la X sempre visibile in alto a destra */
  top: 20px; 
  right: 35px;
  font-size: 3.5rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  z-index: 10000;
  transition: color 0.2s ease, transform 0.2s ease;
}

.close-lightbox:hover { 
  color: #ff4757; 
  transform: scale(1.1);
}
/* --- SEZIONE BIOGRAFIA / CHI SONO --- */
.bio-card {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 40px;
  margin-top: 20px;
}

.bio-img-container {
  flex-shrink: 0;
}

/* Foto Circolare con bordo Glass e ombra */
.bio-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.bio-img:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.8);
}

.bio-content {
  flex: 1;
}

.bio-text {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  font-size: 1.05rem;
}

/* Responsive per schermi piccoli */
@media (max-width: 768px) {
  .bio-card {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 25px;
  }
  
  .bio-img {
    width: 140px;
    height: 140px;
  }
}