:root {
  --gradient-1: linear-gradient(180deg, #d0ff40, #3edef8);
  --gradient-2: linear-gradient(180deg, #e63ff9, #569ffe);
  --gradient-3: linear-gradient(180deg, #34d6ff, #8c2fd6);
  --gradient-4: linear-gradient(180deg, #f618a5, #50a3fa);
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: #000;
  overflow-y: scroll;
  scroll-behavior: smooth;
}

body {
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
  }

.fullscreen {
  height: 100vh;
  scroll-snap-align: start;
    overflow-y: auto;
}

.glass {
  background: rgba(255, 255, 255, 0.08); /* trasparenza */
  border-radius: 1rem;                   /* angoli arrotondati */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25); /* ombra diffusa */
  backdrop-filter: blur(6px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.2); /* bordo semitrasparente */
  padding: 1.5rem;
  color: #fff; /* testo leggibile su sfondi scuri */
}


.hero {
  position: relative; /* importante: canvas assoluto dietro e overlay centrato */
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  overflow: hidden;

  /* Versione chiara
  background:
    radial-gradient(circle at 20% 30%, rgba(233,30,99,0.35), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(106,27,154,0.35), transparent 60%),
    linear-gradient(180deg, #0d0b1a 0%, #1a237e 35%, #6a1b9a 70%, #0d0b1a 100%);
  */

  /* Versione scura */
  background:
    radial-gradient(circle at 20% 30%, rgba(233,30,99,0.25), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(63,81,181,0.25), transparent 60%),
    #050510;
  }

/* Canvas di three.js (viene aggiunto dinamicamente da tappeto.js) */
.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none; /* permette di interagire con l'overlay sopra */
}

.hero-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
}

.hero-img {
  display: block;
  margin: 0 auto;
  width: auto;
  max-width: 50vw;
  max-height: 60vh;
  height: auto;
}

.unict-logo{
  position: absolute;
  top: 0;
  left: 0;
  width: 20vw;
}

@media (orientation: portrait) {
  .unict-logo {
    width: 50vw;
  }
}

.hero-overlay h2 {
  margin: 0;
  max-width: 70ch;
  font-weight: 400;
  line-height: 1.15;

  color: #3edef8;
}

.txt-gradient{
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.gradient-1{background: var(--gradient-1);}
.gradient-2{background: var(--gradient-2);}
.gradient-3{background: var(--gradient-3);}
.gradient-4{background: var(--gradient-4);}

.img3{
  border-radius: 20px;
}

.info{
  background-color: rgba(153, 195, 197, 0.7);
  padding: 5px;
  color: indigo;
  border-radius: 20px;
  margin: 5px;
}

.info h2, .info p{
  margin: 10px;
  margin-top: 20px;
  margin-bottom: 30px;
}

.scroll-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

@media (orientation: landscape) {
  .hero-img { max-width: 40vw; max-height: 75vh; }
}
@media (orientation: portrait) {
  .hero-img { width: 80vw; max-width: 500px; max-height: 50vh; }
}


.onde_glass{
  margin-top: 0;
}

/* Sfondo scuro animato (three.js) della seconda sezione:
   tono scuro vicino a quello delle forme, per ridurne il contrasto */
#onde {
  position: relative;
  background:
    radial-gradient(circle at 18% 20%, rgba(80, 110, 150, 0.20), transparent 58%),
    radial-gradient(circle at 82% 80%, rgba(120, 90, 135, 0.18), transparent 58%),
    linear-gradient(165deg, #262a36 0%, #20232e 55%, #232631 100%);
}

/* Il canvas three.js (aggiunto dinamicamente da onde.js) sta dietro al contenuto */
#onde canvas {
  z-index: 0;
}

/* ============================================================
   Terza sezione — solo sfondo: quadratini gialli che scendono
   (three.js, cascata.js). Stesso sfondo scuro dell'hero.
   ============================================================ */
#cascata {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;

  /* Stesso sfondo scuro dell'hero */
  background:
    radial-gradient(circle at 20% 30%, rgba(233,30,99,0.25), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(63,81,181,0.25), transparent 60%),
    #050510;
}

/* Canvas three.js (aggiunto dinamicamente da cascata.js) */
#cascata canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}

/* Sopra lo sfondo chiaro la card diventa un "vetro fumé":
   mantiene leggibili testo bianco e accenti neon */
#onde .onde_glass {
  position: relative;
  z-index: 2;
  background: rgba(72, 72, 72, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

/* ============================================================
   Sezione "onde" — hub dei contenuti del laboratorio
   (Web Lab / Comunicazione social DISUM / Partecipa).
   Stessa famiglia visiva dell'hero (glass + gradienti), layout proprio.
   ============================================================ */

.section-pad {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 1rem;
}

.section-card {
  width: 100%;
  max-width: 1100px;
}

.section-head {
  margin-bottom: 1.75rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .35rem .85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  margin-bottom: 1rem;
}

.section-title {
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 .5rem;
  color: #fff;
}

.section-sub {
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  max-width: 60ch;
}

/* --- Pannelli tematici --- */
.theme-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  padding: 1.5rem;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.theme-panel:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.theme-media {
  position: relative;
  margin-bottom: 1.6rem;
}

.theme-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.theme-icon {
  position: absolute;
  left: 12px;
  bottom: -18px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: 14px;
  background: var(--gradient-1);
  color: #0d0b1a;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.theme-panel h3 {
  color: #fff;
  font-size: 1.2rem;
  margin: 0 0 .5rem;
}

.theme-panel p {
  color: rgba(255, 255, 255, 0.82);
  font-size: .95rem;
  margin: 0 0 1rem;
}

/* --- Lista di link interna al pannello --- */
.panel-links {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.panel-links a {
  position: relative;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .8rem;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background .2s ease, border-color .2s ease;
}

.panel-links a:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

.panel-links .bi-arrow-right {
  margin-left: auto;
  color: #3edef8;
}

.panel-links .link-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

/* Badge "riservato": piccolo tag ancorato all'angolo in alto a sinistra del bottone */
.badge-reserved {
  position: absolute;
  top: -.45rem;
  left: .6rem;
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .08rem .35rem;
  border-radius: 999px;
  background: #d6ff0a;
  border: 1px solid #d6ff0a;
  color: #0a1a0a;
}

/* --- Blocco con etichetta + chip (progetti in corso / partner) --- */
.panel-block {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.panel-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: .6rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.chip {
  padding: .3rem .7rem;
  border-radius: 999px;
  font-size: .82rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- CTA --- */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  align-self: flex-start;
  background: var(--gradient-1);
  color: #0d0b1a;
  font-weight: 700;
  border: none;
  padding: .6rem 1.3rem;
  border-radius: 999px;
  text-decoration: none;
  margin-bottom: 1rem;
}

.btn-cta:hover {
  filter: brightness(1.05);
  color: #0d0b1a;
}
