body {
  margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  background-color: black;
}

.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("/primasquadra/img/campo.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
  z-index: -1;
}

.footer-content {
  z-index: 1000;
}

.team-photo {
  width: 100%;
  max-width: 1100px; 
  margin: 1rem auto 0.8rem auto;
}
.team-photo img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 3px solid white;
  display: block;
}

.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;
}

.team-photo {
  display: flex;
  justify-content: center;
  margin-bottom: 0.8rem;
  margin-top: 1rem;
}

.team-photo img {
  width: 80%;
  height: auto;
  border-radius: 12px;
  border: 3px solid white;
}

.grid-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
}

.left-content {
  flex: 3;
  order: 0;
}

.widget-section {
  flex: 1;
  order: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 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: 100%;
  background-color: white;
  padding: 0.8rem;
  border: 3px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  min-height: 720px;   
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.widget-box iframe {
  width: 100%;
  min-height: 700px;
  border: none;
}

.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: flex-start;
}

.flip-card {
  width: 240px;
  height: 320px;
  perspective: 1000px;
}
.flip-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner {
  transform: 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.3rem;
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  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;
}

.main-content,
.team-section,
.widget-box,
h2,
h3 {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {

  .main-content {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0 1rem;
  }

  .grid-wrapper {
    display: flex;
    flex-direction: column-reverse;
    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 {
  height: auto !important;
  margin: 0;
  width: 100%;
  border-radius: 12px;
  box-sizing: border-box;
  overflow: hidden;
}


.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  justify-content: center;
}


.flip-card {
    width: 280px; 
    height: 393px;
    perspective: 1000px;
    margin: 0 auto;
  } 


  .flip-card-inner {
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
    position: relative;
  }

  .flip-card:hover .flip-card-inner {
    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;
  object-position: center top;
  transform: scale(1.5); 
  transform-origin: center top;
  display: block;
}


.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: 90%;
  text-align: center;
}

.player-info li {
  margin-bottom: 1rem;
  line-height: 1.8;
  margin-bottom: 0.3rem;
}
    .team-section.team h2 {
    margin-left: 41px;
  } 
  
.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: 0.9rem;
  color: white;
}

  .team-section {
    margin-bottom: 2rem;
  }
    .team-photo img {
    display: none;
  }

}