/* SETTINGS & VARIABILI */
:root {
  --bg: #127288; 
  --text: #ffffff;
  --accent: #0a4654; 
  --line: rgba(255, 255, 255, 0.2);
  --font-title: 'Montserrat', sans-serif;
  --font-body: 'Frank Ruhl Libre', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg); color: var(--text); font-family: var(--font-body); overflow-x: hidden;
}
a { color: inherit; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
h1, h2, h3, h4, .btn-primary, .btn-fixed { font-family: var(--font-title); text-transform: uppercase; }

/* PRELOADER INTRO */
.loader {
  position: fixed; inset: 0; background: var(--bg); z-index: 99999;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.loader-text {
  font-family: var(--font-title); font-size: clamp(2rem, 6vw, 5rem); font-weight: 900;
  text-transform: uppercase; color: var(--text); overflow: hidden; line-height: 1.1;
}
.loader-subtext {
  font-family: var(--font-title); font-size: clamp(1.2rem, 3vw, 2.5rem); font-weight: 700;
  text-transform: uppercase; color: var(--text); overflow: hidden; margin-top: 3vh;
}
.loader-date {
  font-family: var(--font-title); font-size: clamp(0.9rem, 1.5vw, 1.2rem); font-weight: 600;
  text-transform: uppercase; color: var(--accent); overflow: hidden; margin-top: 1.5vh; letter-spacing: 2px;
}
.loader-text span, .loader-subtext span, .loader-date span {
  display: inline-block; transform: translateY(100%);
}

/* FIXED INFO BUTTON */
.btn-fixed {
  position: fixed; top: 3vh; right: 4vw; z-index: 9000;
  background: var(--text); color: var(--accent); border: none;
  padding: 12px 25px; font-size: 0.9rem; font-weight: 800; border-radius: 50px;
  cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,0.2); transition: transform 0.3s ease;
}
.btn-fixed:hover { transform: scale(1.05); }

/* HEADER BAR (Contatti Fissi BOTTOM) */
.fixed-bottom-bar {
  position: fixed; bottom: 0; left: 0; width: 100%;
  background: var(--accent); color: var(--text);
  padding: 15px 4vw; display: flex; justify-content: space-between; align-items: center;
  z-index: 9000; font-family: var(--font-title); font-size: 0.75rem; letter-spacing: 1px;
}
.fixed-bottom-bar span { margin-right: 20px; }
.mobile-contacts { display: none; }

/* HERO - MANIFESTO */
.hero-poster {
  width: 100%; min-height: 100svh; padding: 0;
  display: flex; justify-content: center; align-items: center;
  background: var(--bg);
  overflow: hidden;
  aspect-ratio: 1920 / 960;
}
.hero-poster picture,
.hero-poster img {
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;
}

/* SPONSOR */
.sponsors-section {
  padding: 8vh 5vw; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  text-align: center; background: var(--text);
}
.sponsors-section h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 900; margin-bottom: 5vh; color: var(--bg) }
.sponsor-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; }
.sponsor-grid img { height: 125px; object-fit: contain; }

/* BIOGRAFIA (Sidebar sticky Sx con Titolo e Immagine, Testo lungo a Dx) */
.biography-section {
  padding: 15vh 5vw; max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8vw;
  align-items: start;
}
.bio-sidebar {
  position: sticky; top: 10vh;
}
.bio-sidebar h2 { 
  font-size: clamp(3rem, 6vw, 5rem); font-weight: 900; margin-bottom: 4vh; line-height: 1; 
}
.bio-img-wrap { 
  width: 100%; overflow: hidden;
}
.bio-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.bio-content { font-size: 1.2rem; line-height: 1.8; text-align: justify; }
.bio-content p { margin-bottom: 2rem; }

/* CALL TO ACTIONS */
.cta-section {
  padding: 10vh 5vw; display: flex; flex-wrap: wrap; justify-content: center; gap: 4vw;
}
.btn-primary {
  background: var(--text); border: 2px solid var(--text); color: var(--bg);
  padding: 20px 40px; font-size: 1.2rem; font-weight: 700; cursor: pointer;
  transition: all 0.3s ease; position: relative;
}
.btn-primary:hover { background: var(--accent); color: var(--text); border-color: var(--accent); }

/* GALLERIA 7 OPERE / 4 CITAZIONI */
/* height, opacity e padding sono gestiti interamente da GSAP */
.gallery-wrap {
  overflow: hidden;
  height: 0;
  opacity: 0;
}

.quote-divider { padding: 5vh 5vw; text-align: center; margin: 0 auto; max-width: 1100px; }
.quote-divider .title {
  font-family: var(--font-body); font-size: clamp(1.2rem, 2vw, 2rem); text-transform: none;
  font-weight: 300; font-style: italic; line-height: 1.3; margin-bottom: 30px;
}
.quote-divider p {
  font-family: var(--font-title); font-size: 1.2rem; font-weight: 700; letter-spacing: 2px; color: var(--accent); margin-bottom: 5vh;
}

.art-row { display: flex; justify-content: center; align-items: center; gap: 5vw; padding: 0 5vw; margin-bottom: 5vh; }
.art-item { position: relative; width: 100%; }
.art-item img { width: 100%; height: auto; display: block; filter: drop-shadow(0 15px 30px rgba(0,0,0,0.2)); }
.art-title { margin-top: 20px; font-family: var(--font-title); font-size: 1.5rem; letter-spacing: 1px; text-align: center; }
.art-title span { display: block; font-size: 1rem; margin-top: 10px; }

/* Varianti griglia asimmetrica */
.row-2-cols .art-item { width: 45%; }
.row-2-cols .art-item:nth-child(2) { margin-top: 15vh; } 
.row-1-col .art-item { width: 70%; max-width: 900px; }
.row-2-cols-alt .art-item { width: 45%; }
.row-2-cols-alt .art-item:nth-child(1) { margin-top: 15vh; }

/* ── STRISCIA ── */
.opere-strip-section {
  position: relative;
  max-width: 1400px;
  margin: 0 auto 4rem auto;
  padding: 0 5vw;
}
.opere-strip-section h2 {
  font-family: var(--font-title);
  font-size: clamp(1rem, 2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--text);
  text-align: center;
}
.strip-container {
  display: flex;
  align-items: center;
  gap: 12px;
}
.opere-strip-wrap {
  flex: 1;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0.5rem 0 1rem;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.opere-strip-wrap::-webkit-scrollbar {
  display: none;
}
.opere-strip {
  display: flex;
  gap: 12px;
  width: max-content;
  align-items: center;
}
/* ── SINGOLA OPERA ── */
.opera-item {
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}
.opera-item img {
  height: 340px;
  width: auto;
  display: block;
  transition: opacity 0.2s ease;
}
.opera-item:hover img {
  opacity: 0.82;
}
.strip-arrow {
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  user-select: none;
}
.strip-arrow:hover {
  background: rgba(255,255,255,0.22);
}
.strip-arrow:disabled {
  opacity: 0.15;
  cursor: default;
}
/* ── LIGHTBOX ── */
.opere-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  padding: 2rem;
  box-sizing: border-box;
}
.opere-lightbox.aperto {
  display: flex;
}
.opere-lightbox img {
  max-width: 90vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  display: block;
}
.lb-chiudi {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}
.lb-chiudi:hover {
  color: #ffffff;
}
.lb-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.lb-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background 0.15s;
}
.lb-btn:hover { background: rgba(255,255,255,0.12); }
.lb-btn:disabled { opacity: 0.2; cursor: default; }
.lb-counter {
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  min-width: 40px;
  text-align: center;
}

/* FOOTER */
footer {
  background: #062b34; padding: 8vh 5vw calc(8vh + 60px) 5vw; 
  border-top: 1px solid rgba(255,255,255,0.1); display: grid; grid-template-columns: 1fr 1fr; gap: 5vw;
}
.footer-col h4 { font-size: 1.5rem; margin-bottom: 20px; }
.footer-col p { font-size: 1.2rem; line-height: 1.6; color: rgba(255,255,255,0.7); }
.footer-bottom { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.1); margin-top: 5vh; padding-top: 3vh; display: flex; justify-content: space-between; font-size: 0.8rem; color: rgba(255,255,255,0.5); font-family: var(--font-title); text-transform: uppercase; }

/* MODALE INFORMAZIONI */
.info-modal {
  position: fixed; inset: 0; background: rgba(18, 114, 136, 0.98); backdrop-filter: blur(15px);
  z-index: 99999; display: flex; flex-direction: column; opacity: 0; pointer-events: none;
  transition: opacity 0.5s ease; overflow-y: auto; padding: 5vh 5vw 15vh 5vw;
  overscroll-behavior: contain;
}
.info-modal.active { opacity: 1; pointer-events: all; }

.modal-header-sticky {
  position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 20px 0;
  z-index: 10;
}
.close-modal {
  font-size: 3rem; font-family: var(--font-title); cursor: pointer; color: var(--text);
  background: var(--accent); border: none; width: 60px; height: 60px; border-radius: 50%;
  display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.modal-content { max-width: 800px; margin: 0 auto; color: var(--text); }
.modal-content h2 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 5vh; border-bottom: 1px solid var(--line); padding-bottom: 20px; line-height: 1.1; }
.modal-content h3 { font-size: 1.8rem; margin: 6vh 0 2vh 0; color: var(--accent); background: #fff; padding: 5px 15px; display: inline-block; }
.modal-content p { font-size: 1.2rem; line-height: 1.8; margin-bottom: 25px; text-align: justify; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-poster {
    height: auto;
    min-height: unset;
	aspect-ratio: 768 / 1086;
  }
  .hero-poster img {
    max-height: none;
  }
  .sponsor-grid img { width: 100px; }
  .fixed-bottom-bar { flex-direction: column; align-items: center; gap: 10px; padding: 15px; text-align: center; }
  .desktop-contacts { display: none; }
  .mobile-contacts { display: block; line-height: 1.5; }
  .sponsors-section, .biography-section { padding: 5vh 5vw; }
  .cta-section { padding: 0 5vw 5vh 5vw; }
  .biography-section { grid-template-columns: 1fr; gap: 5vh; }
  .bio-sidebar { position: relative; top: 0; margin-bottom: 2vh; }
  .opera-item img { height: 220px; }
  .opere-strip-section { padding: 0 4vw; }
  .opere-strip-section button { display: none; }
  .art-row { margin-bottom: 0; }
  .row-2-cols, .row-2-cols-alt, .row-1-col { flex-direction: column; gap: 5vh; }
  .row-2-cols .art-item, .row-2-cols-alt .art-item, .row-1-col .art-item { width: 100%; margin-top: 0 !important; }
  footer { grid-template-columns: 1fr; gap: 5vh; margin-top: 5vh;}
  .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
}