* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

html {
  overflow-x: hidden;
}

/* Page Header */
.page-header {
  background: white;
  color: black;
  text-align: center;
  padding: 150px 20px 80px;
  margin-bottom: 60px;
}

.page-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  margin-bottom: 20px;
  color: #333;
  font-weight: 700;
}

.page-header p {
  font-size: clamp(16px, 2.5vw, 18px);
  opacity: 0.8;
  color: #666;
}

/* Team Section */
.team-section {
  padding: 80px 20px;
  text-align: center;
  position: relative;
  margin-bottom: 60px;
  overflow: hidden;
  width: 100%;
}

.team-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  overflow: hidden;
  width: 100%;
}

.team-section h2 {
  font-size: clamp(28px, 4vw, 36px);
  color: #333;
  margin-bottom: 30px;
  position: relative;
  font-weight: 700;
}

.team-section h2::after {
  content: "";
  display: block;
  width: 100px;
  height: 3px;
  background-color: var(--red);
  margin: 20px auto;
}

.team-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
  margin-top: 50px;
  width: 100%;
  max-width: 100%;
  visibility: hidden;
}

.team-content.animate__animated {
  visibility: visible;
}

.team-content.reverse {
  grid-template-columns: 2fr 1fr;
}

.team-images {
  text-align: center;
  position: relative;
  padding: 0 20px;
  margin-bottom: 40px;
}

.reverse .team-images {
  order: 2;
}

.carousel-container {
  width: 100%;
  max-width: 350px;
  height: 260px;
  margin: 0 auto;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  position: relative;
}

.carousel-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center;
}

.letter-text {
  text-align: left;
  padding: 0 15px;
}

.letter-text p {
  font-size: clamp(14px, 1.8vw, 16px);
  line-height: 1.8;
  color: #555;
  margin-bottom: 20px;
}

.signature {
  margin-top: 30px;
  font-style: italic;
  color: #333;
}

.signature strong {
  font-size: clamp(16px, 2vw, 18px);
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.3s ease;
  opacity: 0.7;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.carousel-control-prev {
  left: 5px;
}

.carousel-control-next {
  right: 5px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 18px;
  height: 18px;
}

.carousel-indicators {
  bottom: -40px;
  margin-bottom: 0;
}

.carousel-indicators [data-bs-target] {
  background-color: var(--red);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 4px;
  border: none;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.carousel-indicators [data-bs-target].active {
  background-color: #333;
  opacity: 1;
  transform: scale(1.2);
}

/* Tablet Responsive (768px - 991px) */
@media (max-width: 991px) {
  .page-header {
    padding: 130px 20px 60px;
  }

  .team-content {
    grid-template-columns: 1fr;
    gap: 30px;
    visibility: visible;
  }

  .team-content.reverse {
    grid-template-columns: 1fr;
  }

  .reverse .team-images {
    order: 0;
  }

  .carousel-container {
    max-width: 400px;
    height: 300px;
  }

  .carousel-item img {
    height: 300px;
  }

  .letter-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
  }

  .team-section {
    padding: 60px 20px;
    margin-bottom: 40px;
  }

  .carousel-indicators {
    bottom: -35px;
  }
  
  /* Mobil için animasyon hazırlığı */
  .team-images {
    visibility: hidden;
  }
  
  .team-images.animate__animated {
    visibility: visible;
  }
  
  .letter-text {
    visibility: hidden;
  }
  
  .letter-text.animate__animated {
    visibility: visible;
  }
}

/* Mobile Responsive (576px - 767px) */
@media (max-width: 767px) {
  .page-header {
    padding: 110px 15px 50px;
    margin-bottom: 40px;
  }

  .team-section {
    padding: 50px 15px;
    margin-bottom: 30px;
  }

  .team-content {
    margin-top: 30px;
    gap: 20px;
  }

  .carousel-container {
    max-width: 320px;
    height: 240px;
  }

  .carousel-item img {
    height: 240px;
  }

  .team-images {
    padding: 0 10px;
    margin-bottom: 30px;
  }

  .letter-text {
    padding: 0 10px;
  }

  .carousel-control-prev,
  .carousel-control-next {
    width: 35px;
    height: 35px;
  }

  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    width: 16px;
    height: 16px;
  }
}

/* Extra Small Mobile (max 575px) */
@media (max-width: 575px) {
  .page-header {
    padding: 100px 10px 40px;
  }

  .team-section {
    padding: 40px 10px;
  }

  .carousel-container {
    max-width: 280px;
    height: 210px;
  }

  .carousel-item img {
    height: 210px;
  }

  .team-section h2::after {
    width: 70px;
    margin: 15px auto;
  }

  .carousel-indicators {
    bottom: -30px;
  }

  .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    margin: 0 3px;
  }
}

/* Very Small Devices (max 375px) */
@media (max-width: 375px) {
  .carousel-container {
    max-width: 250px;
    height: 190px;
  }

  .carousel-item img {
    height: 190px;
  }

  .navbar-brand img {
    height: 35px;
  }

  .letter-text p {
    font-size: 14px;
  }
}

/* Landscape Orientation on Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .page-header {
    padding: 80px 15px 30px;
  }

  .team-section {
    padding: 30px 15px;
  }
}