 body {
 margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  background-color: black;
  color: white;
}

.main-content {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 3.2rem;
}

.background-image {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url("img/campo.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
}

.footer-content {
  z-index: 1000;
}

.hero-title {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 3.5rem;
  font-family: 'Bebas Neue', sans-serif;
  padding-top: 6rem;
  margin-bottom: 4rem;
  line-height: 1.1;
}
.hero-title .white {
  color: white;
}
.hero-title .red {
  color: #e91922;
}
.title-desktop {
  display: inline;
}
.title-mobile {
  display: none;
}

.grid-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
}

.left-content {
  flex: 3;
  order: 1;
}

.widget-section {
  flex: 1;
  order: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 0;
  order: 0;
}

.team-section {
  margin-bottom: 2rem;
}
.team-section h2 {
  font-size: 1.7rem;
  color: white;
  margin-bottom: 0.5rem;
  background-color: #e91922;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.widget-box {
  width: 580px;
  margin: 0 auto;
  background-color: white;
  padding: 1rem;
  border: 3px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  align-items: center;
  justify-content: center;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  justify-content: center;
}


.flip-card {
  width: 240px;
  height: 320px;
  perspective: 1000px;
}

.flip-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: none;  /* transform 0.6s ease; */
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: none; /* rotateY(180deg);*/
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border: 3px solid white;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  box-sizing: border-box;
}

.flip-card-front {
  background-color: white;
  z-index: 2;
}

.flip-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.card-caption {
  position: relative;
  width: 100%;
  background-color: #e91922;
  color: white;
  z-index: 3;
  padding: 0.5rem;
  text-align: center;
  font-family: 'Bebas Neue', sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-caption .name {
  font-size: 1.2rem;
  margin: 0;
}

.card-caption .role {
  font-size: 0.9rem;
  margin: 0;
  font-family: 'Open Sans', sans-serif;
}

.flip-card-back {
  background-color: #e91922;
  color: white;
  transform: rotateY(180deg);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 0.8rem;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.player-info {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 90%;
}
.player-info li {
  margin-bottom: 1rem;
  line-height: 1.8;
  margin-bottom: 0.3rem;
}
.player-info .label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  display: block;
  margin-bottom: 0rem;
  color: white;
}
.player-info .value {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.8rem;
  display: block;
  color: white;
}

.storia-box p {
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  color: black;
  line-height: 1.6;
  margin: 0.5rem 0 0.5rem 0;
}

.storia-image {
  width: 100%;
  height: auto;
  margin: 0rem 0;
  border-radius: 8px;
  border: 2px solid #ccc;
}

.storia-image-box {
  text-align: center;
  margin: 1rem 0;
}

.storia-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 2px solid #ccc;
}

.storia-caption {
  font-size: 1.1rem;
  color: #ccc;
  margin-top: 0.2rem;
  font-style: italic;
}

@media (max-width: 768px) {
 .main-content {
  padding-left: 16px;
  padding-right: 16px;
}
  .grid-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .widget-section,
  .left-content {
    width: 100%;
  }

  .widget-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .widget-box {
    width: 100%;
    max-width: 339px;
    height: auto;
    background-color: white;
    border: 2px solid #ccc;
    border-radius: 12px;
  }

  .card-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .flip-card {
    width: 280px; 
    height: 393px;
    perspective: 1000px;
    margin: 0 auto;
  } 


  .flip-card-inner {
    width: 100%;
    height: 100%;
    transition: none; /*transform 0.6s ease*/
    transform-style: preserve-3d;
    position: relative;
  }

  .flip-card:hover .flip-card-inner {
    transform: none; /* transform: rotateY(180deg); */
  }

  .flip-card-front,
  .flip-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    box-sizing: border-box;
  }

  .flip-card-front {
    background-color: white;
    z-index: 2;
  }

  .flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
/*
  .flip-card-back {
    background-color: #e91922;
    color: white;
    transform: rotateY(180deg);
    padding: 1rem;
    font-family: 'Open Sans', sans-serif;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    font-size: 1rem;
    box-sizing: border-box;
  }

  .player-info {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 85%;
  text-align: center;
}

.player-info li {
  margin-bottom: 1rem;
  line-height: 1.3;
}

.player-info .label {
  display: block;
  font-weight: bold;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  color: white;
}

.player-info .value {
  display: block;
  font-family: 'Open Sans', sans-serif;
  font-size: 1.1rem;
  color: white;
}
  
*/
  .team-section {
    margin-bottom: 2rem;
  }

  .team-section h2 {
    font-size: 1.7rem;
    color: white;
    background-color: #e91922;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.5rem;
  }

.comitato-title {
  margin-left: 40px;
}
  
  .widget-box.storia-box {
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 12px;
    box-sizing: border-box;
    overflow: hidden;
    padding: 1rem;
  }

}