*, ::after, ::before {
    box-sizing: border-box;
}
:root{
  --yellow: #fff200;
  --black: #000000;
  --radius: 14px;    /* raggio bordo */
}

/* ----------  https://gwfh.mranftl.com/fonts --------- */
/* roboto-slab-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/roboto-slab-v36-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* roboto-slab-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 700;
  src: url('fonts/roboto-slab-v36-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* montserrat-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/montserrat-v31-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* montserrat-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  src: url('fonts/montserrat-v31-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* ---------------------------------------------------- */

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* === BODY e LAYOUT PRINCIPALE === */
body {
  font-family: "Roboto Slab", sans-serif, Arial;
  font-size: 1rem;
  text-align: center!important;
  background-color: var(--black);
  color: #fff;
  min-height: 100vh;         /* altezza minima = finestra */
  display: flex;             /* flex verticale */
  flex-direction: column;
  margin:0;
  padding-top: 80px;
}
h2 {
  text-align:left;
  font-size: 1.4rem;
}
a {
  color: #FFF;
}
/* Contenitore principale: cresce per spingere il footer in basso */
.cover-container {
  flex: 1 0 auto;            /* espande per occupare spazio */
  max-width: 70em;
  margin: 0 auto;
  display: flex!important;
  justify-content: center!important;
  align-items: center!important;
  flex-direction: column!important;
  border: 0px solid var(--yellow);
  margin-top:100px;
}
@media (max-width: 470px) {
  .cover-container {margin:0px;}
}

/* === MAIN === */
main {
  padding-right: 1rem!important;
  padding-left: 1rem!important;
  display: flex!important;
  flex-direction: column!important;
  justify-content: center!important;
  align-items: center!important;
  flex-grow: 1;
    min-width: 0;
    max-width: 100%;
}

/* --- LOGO ANIMATO ------------------------------ */
.logo {
margin: 1rem auto;
flex: 0 0 auto;
width: 100%;
max-width: 900px;
display: flex;
justify-content: center;
align-items: center;
}
.logo img {
opacity: 0.3;
/*transform: scale(0.9); non serve perchè poi c'è anche l'animazione che parte da 0.X */
transform-origin: center center;
animation:
  logoFadeIn 5s ease forwards,
  logoBreath 5s ease-in-out infinite 5s;
}
/* Comparsa e ingrandimento iniziale */
@keyframes logoFadeIn {
from {opacity: 0.3;transform: scale(0.9);}
to {opacity: 1;transform: scale(1);}
}
/* Effetto respiro */
@keyframes logoBreath {
0%, 100% {opacity: 1;}
50% {opacity: 0.6;}
}


/* === 2 COLONNE === ----------------------------------*/
.col2-contatainer {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
    min-width: 0;
}
.col2 {
  flex: 1 1 calc(50% - 20px);
    min-width: 0;
  box-sizing: border-box;
  align-items: center;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
/* Riquadro immagine */
.col2 .img-wrapper {
  overflow: hidden;              /* serve per il radius */
  border-radius: var(--radius);  /* angoli arrotondati */
}
/* Immagine */
.col2 img {
  width: 100%;
  max-width: 100%;  
  display: block;
  transition: transform 0.6s ease;
}
/* Effetto zoom */
.col2:hover img {
  transform: scale(1.05);
}
.col2 p {
  text-align: center;
  margin-top: 5px;
}
@media (max-width: 900px) {
  .col2{
    flex: 1 1 100%;
  }
}

/* === 4 COLONNE === -------------------------------*/
.col4-contatainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.col4 {
  flex: 1 1 calc(25% - 10px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.col4 img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  padding: 5px;
  border-radius: var(--radius);
  transition: transform 0.6s ease;
}
/* Effetto zoom */
.col4:hover img {
  transform: scale(1.05);
}
.col4 p {
  margin:0px;
  font-size: 0.8rem;
}
@media (max-width: 900px) {
  .col4 {
    flex: 1 1 calc(50% - 20px);
  }
}
@media (max-width: 400px) {
  .col4 {
    flex: 1 1 100%;
  }
}

/* =========================================================
   FOTO GIOCATORI - CAMBIO FOTO AL PASSAGGIO DEL MOUSE
   ========================================================= */
.ruolo-numero .image-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
}
/* Entrambe le fotografie */
.ruolo-numero .image-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  padding: 5px;
  transition:
    opacity 0.5s ease,
    transform 0.6s ease;
}
/* Foto simpatica inizialmente nascosta */
.ruolo-numero .image-wrapper .foto-simpatica {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}
/* Passaggio del mouse:
   foto normale scompare */
.ruolo-numero .image-wrapper:hover .foto-normale {
  opacity: 0;
  /*transform: none; se si toglie il commento si evita l'ingrandimento*/
}
/* ...e foto simpatica compare */
.ruolo-numero .image-wrapper:hover .foto-simpatica {
  opacity: 1;
  /*transform: none; se si toglie il commento si evita l'ingrandimento*/ 
}
/* =========================================================
   SIGLA RUOLO
   ========================================================= */
.ruolo-numero .sigla {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--yellow);
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
  letter-spacing: 1px;
}
/* =========================================================
   NUMERO
   ========================================================= */
.ruolo-numero .numero {
  position: absolute;
  top: 10px;
  left: 15px;
  font-size: 3rem;
  font-weight: 900;
  color: var(--yellow);
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
}

/* === SOCIAL === -----------------------------------*/
.social {
    font-size: 1.25rem;
    font-weight: 300;
    display: flex;
    flex-flow: row wrap; 
    justify-content: center;
    align-items: center;
}
.social-btn {
  width: 70px;
  height: 70px; 
  border-radius: 100rem;
  padding: 0;
  margin: 0.3rem;
  display: flex; 
  justify-content: center; 
  text-decoration: none;
  color: var(--black);
  background-color: var(--yellow);
}
.social-btn:hover,
.social-btn:focus {
  background-color: #fff;
}

/* === YELLOW BOX === -------------------------------------------*/
.yellow-box {
  /*max-width: 700px;*/
  border: 1px solid var(--yellow);
  padding: 1rem;
  /*margin: 1rem 0;*/
  font-size: 1.0rem !important;
  line-height: 1.5rem;
  border-radius: var(--radius);
  background-color: #1F1F1F;
  transition: background-color 0.5s ease, color 0.5s ease;
}
.yellow-box:hover {
  background-color: #2F2F2F;
}

/* === FOOTER === ---------------------------------------------------*/
footer {
  flex-shrink: 0;            /* non si riduce */
  width: 100%;               /* tutta larghezza */
  background-color: var(--yellow);
  color: var(--black);
  display: flex;             
  flex-direction: column;    
  justify-content: center;   
  align-items: center;       
  padding: 0.5em 0.5em;          
  font-size: 0.9em;
  height: 100px;
}
footer p {
  margin: 0.2em 0;           
}
footer p a {
  color: var(--black);        
  text-decoration: none;
}
footer p a:hover {
  text-decoration: underline;  
}


/* --- GALLERIA QUADRATA CON ANIMAZIONE SCROLL ---------------------------------------------- */
.square-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.square {
  width: 250px;
  height: 250px;
  overflow: hidden;
  border-radius: 5px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
/* Immagine */
.square img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
/* Leggero zoom al passaggio */
.square:hover img {
  transform: scale(1.05);
}
/* Direzione di entrata alternata */
.square:nth-child(odd) {
  transform: translateX(-40px);
}
.square:nth-child(even) {
  transform: translateX(40px);
}
/* Quando diventa visibile */
.square.visible {
  opacity: 1;
  transform: translateX(0);
}
/* --- Effetto ritardo sequenziale --- */
.square:nth-child(1) {
  transition-delay: 0.5s;
}
.square:nth-child(2) {
  transition-delay: 1.0s;
}
.square:nth-child(3) {
  transition-delay: 1.5s;
}
.square:nth-child(4) {
  transition-delay: 2.0s;
}
/* Tablet (fino a 900px): 2 foto per riga */
@media (max-width: 900px) {
  .square {
    width: 45%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}
/* Smartphone (fino a 600px): 1 foto per riga */
@media (max-width: 400px) {
  .square {
    width: 90%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}
.lightbox {
  cursor: pointer;
}

/* ---------- SPONSOR STRIP ----------------------------- */
.sponsor-strip {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #111; /* colore di sfondo a piacere */
  padding: 4px 0;         
  margin-top: 30px;
}
.sponsor-track {
  display: flex;
  width: max-content;
  animation: scrollSponsors 100s linear infinite;
}
.sponsor-strip a {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sponsor-strip img {
  height: 50px;
  width: auto;
  object-fit: contain;
  filter: brightness(0.9);
  transition: transform 0.3s ease, filter 0.3s ease;
  padding: 0 2px; /* spazio orizzontale tra loghi */
}
.sponsor-strip img:hover {
  transform: scale(1.05);
  filter: brightness(1);
}
@keyframes scrollSponsors {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* --- FADE IN ----------------------------------*/
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 2.0s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* IMG ENTRY*/
.imgEntry {
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.8s ease, transform 0.8s ease;
}
/* Immagine */
.imgEntry img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /*transition: transform 0.6s ease;*/
}
/* Direzione di entrata da Sx e Dx
.imgEntrySx {
  transform: translateX(-600px);
}
.imgEntryDx {
  transform: translateX(600px);
} */
/* Direzione di entrata alternata */
.imgEntry:nth-child(odd) {
  transform: translateX(-40px);
}
.imgEntry:nth-child(even) {
  transform: translateX(40px);
}
/* Quando diventa visibile */
.imgEntry.visible {
  opacity: 1;
  transform: translateX(0);
}
/* --- Effetto ritardo sequenziale ---*/
.imgEntry:nth-child(odd) {
  transition-delay: 0.5s;
}
.imgEntry:nth-child(even) {
  transition-delay: 1.0s;
}
.imgEntry:nth-child(1) {
  transition-delay: 0.5s;
}
.imgEntry:nth-child(2) {
  transition-delay: 1.0s;
}
.imgEntry:nth-child(3) {
  transition-delay: 1.5s;
}
.imgEntry:nth-child(4) {
  transition-delay: 2.0s;
}


/* IMPIANTI */
.col2-grid-smart {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 20px;
  align-items: start;
}
.col2-grid-smart div {
  width: 100%;
  height: 100%;
  align-content: center;
}
/* --- MOBILE --- */
@media (max-width: 900px) {
  .col2-grid-smart {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  /* ordine specifico per il tuo pattern attuale */
  .col2-grid-smart .col2:nth-child(1) { order: 1; } /* foto1 */
  .col2-grid-smart .col2:nth-child(2) { order: 2; } /* desc1 */
  .col2-grid-smart .col2:nth-child(3) { order: 4; } /* desc2 → dopo foto2 */
  .col2-grid-smart .col2:nth-child(4) { order: 3; } /* foto2 → prima di desc2 */
  .col2-grid-smart .col2:nth-child(5) { order: 5; } /* foto3 */
  .col2-grid-smart .col2:nth-child(6) { order: 6; } /* desc3 */
  /* se aggiungi altri blocchi, continua così */
  /* .col2-grid-smart .col2:nth-child(7) { order: 7; } */
  /* .col2-grid-smart .col2:nth-child(8) { order: 8; } */
}