/* Teams Section Styling */
#team {
  padding: 100px 20px;
  background-color: #f9f9f9;
}

#team .container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

#team h2 {
  font-size: 2.8rem;
  color: #333;
  margin-bottom: 40px;
  font-family: 'Gotham', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

#team .team-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 25px;
}

#team .team-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  width: 320px;
  height: 420px;
  text-align: center;
  perspective: 1000px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

#team .team-card:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#team .team-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

#team .team-card:hover .team-card-inner {
  transform: rotateY(180deg);
}

#team .team-card-front, 
#team .team-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  border-radius: 12px;
  box-sizing: border-box;
}

#team .team-card-front {
  background-color: #fff;
}

#team .team-card-back {
  background-color: #f1f1f1;
  transform: rotateY(180deg);
  padding: 30px;
}

#team .team-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-top: 15px;
  transition: transform 0.3s ease;
}

#team .team-card-front h4, 
#team .team-card-back h4 {
  margin: 15px 0;
  font-size: 1.7rem;
  color: #800000;
  font-family: 'Gotham', sans-serif;
}

#team .team-card-front p, 
#team .team-card-back p {
  color: #555;
  font-size: 1rem;
  line-height: 1.6;
}

#team .team-card button {
  padding: 10px 25px;
  background-color: #800000;
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-family: 'Gotham', sans-serif;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

#team .team-card button:hover {
  background-color: #d80101;
}

/* Modal Styling for Team Section */
#team-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

#team-modal .modal-content {
  display: flex;
  flex-direction: row; /* Align image and details horizontally */
  max-width: 80%;
  margin: 50px auto;
  padding: 20px;
  background-color: #fff;
  color: #333;
  border-radius: 10px;
  overflow-y: auto;
}

#team-modal .modal-image {
  width: auto;
  height: auto;
  margin-right: 20px; /* Space between image and description */
  border-radius: 8px;
}

#team-modal .modal-details {
  text-align: left;
  max-width: calc(100% - 220px);
}

#team-modal .modal-details h3 {
  font-size: 2rem;
  margin-bottom: 10px;
}

#team-modal .modal-details h4 {
  font-size: 1.4rem;
  color: #800000;
  margin-bottom: 15px;
}

#team-modal .modal-details p {
  font-size: 1rem;
  line-height: 1.5;
  color: #555;
}

#team-modal .close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #ffffff;
  font-size: 40px;
  cursor: pointer;
  transition: color 0.3s;
}

#team-modal .close:hover {
  color: #cccccc;
}
/* Specific Responsive Adjustments for Services Section */
@media (max-width: 768px) {
  /* Target only the services section */
  .services-section .services-container {
      flex-direction: column;
      align-items: center;
      gap: 20px; /* Adjust spacing between service boxes */
  }
  .services-section .service-box {
      width: 90%; /* Full-width for small screens */
      text-align: center;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  /* Target only the services section */
  .services-section .services-container {
      gap: 30px; /* Adjust spacing between service boxes */
  }
  .services-section .service-box {
      width: calc(50% - 10px); /* Two service boxes per row for tablets */
  }
}

