/* Page Header */
body {
  padding-top: 75px;
}
.entry-title {
  background-color: #ed6a18;
  text-align: center;
  font-weight: 700;
  font-size: 2rem;
  padding: 20px 0;
  margin: 0 0 40px 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  border-bottom: 1px solid #783e02;
  color: #fefefc;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Carousel*/
.team-section {
  position: relative;
  padding: 2rem 0;
}

.carousel-container {
  position: relative;
  max-width: 1050px;
  margin: 0 auto;
  overflow: hidden; 
  display: block; 
  min-height: 500px;
}

.team-carousel {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  gap: 2rem;
  padding: 1rem;
  will-change: transform;
  align-items: center;
}

/*Front cards*/

.team-card {
  flex: 0 0 300px;
  height: 400px;
  perspective: 1000px;
  cursor: pointer;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  border-radius: 15px;
}

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

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 15px;
  overflow: hidden;
}

.card-front {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.team-card:hover .card-front img {
  transform: scale(1.05);
}

/*Card Back*/
.card-back {
  position: relative;
  background: transparent;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  padding: 0;
  text-align: left;
  overflow: hidden;
}

.card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.card-back-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.card-back-overlay h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  text-shadow: 0px 2px 5px rgba(0, 0, 0, 0.55);
  line-height: 1.2;
  flex-shrink: 0;
}

.card-back-overlay p {
  color: #fefefc;
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 300;
  margin: 0 0 1rem 0;
  text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.55);
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-height: 0;
}

/* Carousel Controls */
.carousel-controls {
    position: relative;
  display: flex;
  justify-content: center; 
  align-items: center;
  gap: 1rem;
  z-index: 10;
  margin-top: 2rem;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.carousel-btn {
  background: rgba(237, 106, 2, 0.7);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-btn:hover {
  background: rgba(237, 106, 24, 1);
  transform: scale(1.1);
}

.carousel-indicators {
  display: flex;
  gap: 0.5rem;
  order: 3;
  flex: 1;
  justify-content: center;
}

.prev-btn {
  order: 1;
  display: flex !important;
}

.next-btn {
  order: 4;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(120, 62, 2, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background:rgba(237, 106, 24, 1); 
  transform: scale(1.2);
}

/* Toggle Button */
.toggle-btn {
  background: rgba(237, 106, 24, 1); 
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  order: 2;
  margin: 0 1rem;
}



/* Auto Play Toggle */
.auto-play-toggle {
    position: relative;
  z-index: 10;
  margin-top: 1rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auto-play-toggle input[type="checkbox"] {
  appearance: none;
  width: 50px;
  height: 26px;
  background: rgba(120, 62, 2, 0.4);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}

.auto-play-toggle input[type="checkbox"]:checked {
  background: rgba(237, 106, 24, 1); 
}

.auto-play-toggle input[type="checkbox"]::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
}

.auto-play-toggle input[type="checkbox"]:checked::before {
  transform: translateX(24px);
}

.auto-play-toggle label {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
}

/*Responsive Layout*/
@media (max-width: 1024px) {
  .carousel-container {
    max-width: 95%;
    min-height: 450px;
  }
  
  .card-inner{
    width :350px;
    margin-right: 32px;
  }
  .team-card {
    flex: 0 0 280px !important;
    height: 380px !important;
  }
  
  .card-back-overlay {
    padding: 1.5rem 1.2rem;
  }
  
  .card-back-overlay h2 {
    font-size: 1.2rem;
  }
  
  .card-back-overlay p {
    font-size: 0.5rem;
    -webkit-line-clamp: 5;
  }
}

/* Large Mobile */
@media (max-width: 768px) {
  .carousel-container {
    max-width: 98%;
    min-height: 400px;
  }
  
  .team-card {
    flex: 0 0 240px !important;
    height: 340px !important;
  }
  
  .card-back-overlay {
    padding: 1.2rem 1rem;
  }
  
  .card-back-overlay h2 {
    font-size: 1.1rem;
  }
  
  .card-back-overlay p {
    font-size: 0.8rem;
    -webkit-line-clamp: 4;
  }
  
 
  .carousel-controls {
    gap: 0.8rem;
    max-width: 400px;
  }
  
  .toggle-btn {
    margin: 0 0.5rem;
    padding: 10px 18px;
    font-size: 0.85rem;
  }
}


@media (max-width: 480px) {
  body {
    padding-top: 0px;
  }


  
  .entry-title {
    font-size: 1.6rem;
    padding: 15px 0;
    margin-bottom: 30px;
  }
  
  .carousel-container {
    min-height: 350px;
  }
  
  .team-carousel {
    gap: 1.1rem;
    padding: -0.5px;
  }
  
  .team-card {
    flex: 0 0 200px !important;
    height: 500px !important;
  }
  
  .card-back-overlay {
    padding: 1rem 0.8rem;
  }
  
  .card-back-overlay h2 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
  }
  
  .card-back-overlay p {
    font-size: 0.75rem;
    -webkit-line-clamp: 3;
    line-height: 1.3;
  }
  .card-back-overlay h2 {
    font-size: 1.5rem;
    padding: 30px;
  }


  .card-back-overlay p{
    font-size: 1rem;
    padding: 30px;
  }

  .carousel-controls {
    flex-direction: column;
    gap: 1rem;
    max-width: 300px;
  }
  
  .carousel-indicators {
    order: 1;
  }
  
  .toggle-btn {
    order: 2;
    margin: 0;
  }
  
  .prev-btn, .next-btn {
    order: 3;
  }
  
  .carousel-btn {
    width: 45px;
    height: 45px;
  }
  
  .toggle-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

@media (max-width: 375px) {
  .team-card {
    flex: 0 0 180px !important;
    height: 280px !important;
  }
  
  .card-back-overlay {
    padding: 0.8rem 0.7rem;
  }
  
  .card-back-overlay p {
    -webkit-line-clamp: 3;
    font-size: 0.72rem;
  }
}

@media (hover: none) and (pointer: coarse) {
  .carousel-btn,
  .toggle-btn,
  .indicator {
    min-height: 44px;
    min-width: 44px;
  }
  
  .team-card:active {
    transform: scale(0.98);
  }
}

