body{
  margin: 0;
  padding: 0;
  font-family: 'Cairo', sans-serif;
}
a{
  text-decoration: none;
  color: white;
}


.img-container {
  position: relative;
  width: 1200px;
  height: 500px;
  margin: 0 auto;
  background-color: black; 
  border-radius: 0 0 10px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-container::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%; /* how much you want faded*/ 
  background: linear-gradient(to bottom, transparent, rgb(0, 0, 0)); /* or match page bg*/ 
  border-radius: 0 0 10px 10px;
}
.tm-img{
  object-fit: cover;
  width: 100%;
  height: 500px;
  border-radius: 0 0 20px 20px;
}


.title{
    position: absolute;
    bottom: 15%;
    color: black;
    font-family: 'Poppins', sans-serif;
    font-weight: 550;
    font-size: 1.6rem;
    padding: 6px 32px;
    border-radius: 22px;
    background-color: white;
    z-index: 3;

}
.title2{
    position: absolute;
    bottom: 2%;
    color: white;
    font-family: "Aref Ruqaa", serif;
    font-size: 3rem;
    z-index: 3;

}


 @media (max-width: 1024px) {
    .img-container {
     width: 100%;
     height: 500px; 
     border-radius: 0;
    }
    
    .tm-img{
     width: 100%;
     height: 500px;
     border-radius: 0;
    }
    .img-container::after {
     border-radius: 0;
    }

    .title {
      font-size: 24px; /* smaller for tablets/phones */
    }
    .title2 {
      font-size: 2rem; /* smaller for tablets/phones */
      
  }}

 @media (max-width: 906px) {

     .img-container {
    width: 100%;
    height: 450px; 
    border-radius: 0;

}
    .tm-img{
  width: 100%;
  height: 450px;
  border-radius: 0;
}
.img-container::after {
  
  border-radius: 0;
}
    .title {
      font-size: 18px; /* smaller for tablets/phones */
      padding: 4px 20px;
    }
    .title2 {
      font-size: 2rem; /* smaller for tablets/phones */
  }}

 @media (max-width: 768px) {
    .img-container {
     width: 100%;
     height: 450px; 
     border-radius: 0;
    }
    .tm-img{
     width: 100%;
     height: 450px;
     border-radius: 0;
    }
    .img-container::after {
     border-radius: 0;
    }
    .title {
     font-size: 1.2rem; /* smaller for tablets/phones */
      padding: 4px 20px;
    }
    
    .title2 {
      font-size: 1.8rem; /* smaller for tablets/phones */
  }
 }
  @media (max-width: 480px) {
    .img-container {
     width: 100%;
     height: 250px; 
     border-radius: 0;
    }
    .tm-img{
     width: 100%;
     height: 250px;
     border-radius: 0;
    }
    .img-container::after {
     border-radius: 0;
    }
    .title {
      font-size: 0.7rem; /* smallest for very small screens */
      padding: 4px 20px;
    }
     .title2 {
      font-size: 1.2rem; /* smallest for very small screens */
    }
  }



        /* Main Container */
        .squad-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: 40px; 
        }

        /* Position Section */
        .position-group {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .position-title {
            font-size: 2rem;
            font-weight: 800;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: #ffffff;
        }

        /* --- Flexbox Grid --- */
        .player-grid {
            display: flex;
            flex-wrap: wrap; 
            gap: 15px; 
        }

        /* --- Card Flip Container --- */
        .player-card {
            flex: 0 0 calc(25% - 11.25px); 
            aspect-ratio: 3 / 4; 
            perspective: 1000px; /* Required for 3D effect */
            background-color: transparent;
        }

        /* Inner wrapper that actually rotates */
        .player-card-inner {
            position: relative;
            width: 100%;
            height: 100%;
            transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
            transform-style: preserve-3d; /* Allows 3D elements inside */
        }

        /* Trigger the flip on hover */
        .player-card:hover .player-card-inner {
            transform: rotateY(180deg);
        }

        /* Base styles for both faces */
        .player-card-front, 
        .player-card-back {
            position: absolute;
            width: 100%;
            height: 100%;
            -webkit-backface-visibility: hidden; /* Safari */
            backface-visibility: hidden; /* Hides the back of the element when turned away */
            overflow: hidden;
            border-radius: 4px; /* Optional: adds a slight rounding to the cards */
        }

        /* --- Front Face Styles --- */
        .player-card-front {
            background: linear-gradient(180deg, #444 0%, #222 100%);
        }

        .player-image-placeholder {
            width: 100%;
            height: 100%;
            background-color: #555; /* Fallback color */
            background-image: url('path-to-your-player-image-with-transparent-bg.png'); 
            background-size: cover;
            background-position: center bottom;
        }

        .player-number {
            position: absolute;
            top: 10px;
            left: 10px;
            font-size: 1.2rem;
            font-weight: bold;
            z-index: 2;
        }

        .player-info {
            position: absolute;
            bottom: 10px;
            left: 20px;
            z-index: 2;
            text-align: left;
        }

        .player-name {
            font-size: 1.75rem;
            font-weight: 600;
            line-height: 1.2;
            display: block;
            text-transform: uppercase;
        }

        /* Gradient Overlay for Text Readability on Front */
        .player-card-front::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 50%;
            background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
            pointer-events: none;
        }

        /* --- Back Face Styles --- */
        .player-card-back {
            background: #ffffff;
            border: 1px solid #333;
            transform: rotateY(180deg); /* Starts already flipped so it faces away */
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Styling the data on the back */
        .player-stats {
            width: 80%;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .player-stats p {
            font-size: 0.8rem;
            color: #000000;
            display: flex;
            justify-content: space-between;
            border-bottom: 1px solid #333;
            padding-bottom: 4px;
        }

        .player-stats span {
            color: #000000;
            text-transform: uppercase;
            font-weight: 600;
            font-size: 0.7rem;
        }

        /* Responsive Adjustments for Mobile */
        @media (max-width: 768px) {
          .squad-container {
            padding: 10px 20px;
          }
            .player-card {
                flex: 0 0 calc(33.333% - 10px); /* 3 cards per row on tablets */
            }
        }

        @media (max-width: 480px) {
            .player-card {
                flex: 0 0 calc(50% - 7.5px); /* 2 cards per row on phones */
            }
        }
