/* =====================================
   TEAM SECTION STYLES
   ===================================== */

.team-section {
  position: relative;
  padding: 100px 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  overflow: hidden;
}

/* Dark Overlay */
.team-section .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1;
}

.team-section .container {
  position: relative;
  z-index: 2;
}

/* Section Title */
.team-section .section-title h2 {
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 60px;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
}

.team-section .section-title h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: #2563eb;
}

/* ============ BARIS PERTAMA: 3 ORANG BESAR ============ */
.team-row-large {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 60px;
  margin-bottom: 80px;
  flex-wrap: wrap;
}

.team-member-large {
  flex: 0 0 280px;
  text-align: center;
}

.team-member-large .team-inner {
  position: relative;
}

.team-member-large .team-image-circle {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto 25px;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid #2563eb;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transition: all 0.4s ease;
}

.team-member-large .team-image-circle:hover {
  transform: scale(1.05);
  border-color: #1d4ed8;
  box-shadow: 0 15px 50px rgba(37, 99, 235, 0.6);
}

.team-member-large .team-image-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.team-member-large .team-image-circle:hover img {
  transform: scale(1.1);
}

/* ============ BARIS KEDUA: 4 ORANG KECIL ============ */
.team-row-small {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 50px;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
}

.team-member-small {
  flex: 0 0 200px;
  text-align: center;
}

.team-member-small .team-inner {
  position: relative;
}

.team-member-small .team-image-circle {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid #2563eb;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.4s ease;
}

.team-member-small .team-image-circle:hover {
  transform: scale(1.05);
  border-color: #1d4ed8;
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.5);
}

.team-member-small .team-image-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.team-member-small .team-image-circle:hover img {
  transform: scale(1.1);
}

/* ============ OVERLAY INFO (Hover Effect) ============ */
.team-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(37, 99, 235, 0.95), rgba(29, 78, 216, 0.85));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  padding: 20px;
}

.team-image-circle:hover .team-overlay {
  opacity: 1;
}

.team-overlay-content h3 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  transform: translateY(20px);
  transition: transform 0.4s ease 0.1s;
}

.team-overlay-content p {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  transform: translateY(20px);
  transition: transform 0.4s ease 0.2s;
}

.team-image-circle:hover .team-overlay-content h3,
.team-image-circle:hover .team-overlay-content p {
  transform: translateY(0);
}

/* ============ TEXT INFO DIBAWAH FOTO ============ */
.team-info {
  padding: 0 15px;
}

.team-info h3 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.team-info p {
  color: #bbb;
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  transition: color 0.3s ease;
}

.team-member-large:hover .team-info h3,
.team-member-small:hover .team-info h3 {
  color: #2563eb;
}

.team-member-large:hover .team-info p,
.team-member-small:hover .team-info p {
  color: #fff;
}

/* Small size info text for smaller members */
.team-member-small .team-info h3 {
  font-size: 17px;
}

.team-member-small .team-info p {
  font-size: 13px;
}

.team-member-small .team-overlay-content h3 {
  font-size: 17px;
}

.team-member-small .team-overlay-content p {
  font-size: 13px;
}

/* ============ RESPONSIVE DESIGN ============ */

/* Tablet */
@media (max-width: 992px) {
  .team-section {
    padding: 80px 0;
  }

  .team-row-large {
    gap: 40px;
    margin-bottom: 60px;
  }

  .team-member-large {
    flex: 0 0 240px;
  }

  .team-member-large .team-image-circle {
    width: 240px;
    height: 240px;
  }

  .team-row-small {
    gap: 35px;
  }

  .team-member-small {
    flex: 0 0 180px;
  }

  .team-member-small .team-image-circle {
    width: 180px;
    height: 180px;
  }
}

/* Mobile Landscape */
@media (max-width: 768px) {
  .team-section .section-title h2 {
    font-size: 32px;
    margin-bottom: 40px;
  }

  .team-row-large {
    gap: 30px;
    margin-bottom: 50px;
  }

  .team-member-large {
    flex: 0 0 200px;
  }

  .team-member-large .team-image-circle {
    width: 200px;
    height: 200px;
    border-width: 5px;
  }

  .team-row-small {
    gap: 25px;
    max-width: 100%;
  }

  .team-member-small {
    flex: 0 0 150px;
  }

  .team-member-small .team-image-circle {
    width: 150px;
    height: 150px;
    border-width: 4px;
  }

  .team-info h3 {
    font-size: 18px;
  }

  .team-info p {
    font-size: 13px;
  }

  .team-member-small .team-info h3 {
    font-size: 15px;
  }

  .team-member-small .team-info p {
    font-size: 12px;
  }
}

/* Mobile Portrait */
@media (max-width: 576px) {
  .team-section {
    padding: 60px 0;
  }

  .team-section .section-title h2 {
    font-size: 28px;
    margin-bottom: 30px;
  }

  /* Stack vertically on mobile */
  .team-row-large,
  .team-row-small {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .team-row-large {
    margin-bottom: 40px;
  }

  .team-member-large {
    flex: 0 0 auto;
  }

  .team-member-large .team-image-circle {
    width: 220px;
    height: 220px;
  }

  .team-member-small {
    flex: 0 0 auto;
  }

  .team-member-small .team-image-circle {
    width: 180px;
    height: 180px;
  }

  /* Show overlay info always on mobile */
  .team-overlay {
    opacity: 0;
  }
  
  .team-info {
    display: block;
  }
}

/* Extra Small Mobile */
@media (max-width: 400px) {
  .team-member-large .team-image-circle {
    width: 200px;
    height: 200px;
  }

  .team-member-small .team-image-circle {
    width: 160px;
    height: 160px;
  }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.team-member-large,
.team-member-small {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.team-member-large:nth-child(1) {
  animation-delay: 0.1s;
}

.team-member-large:nth-child(2) {
  animation-delay: 0.2s;
}

.team-member-large:nth-child(3) {
  animation-delay: 0.3s;
}

.team-member-small:nth-child(1) {
  animation-delay: 0.4s;
}

.team-member-small:nth-child(2) {
  animation-delay: 0.5s;
}

.team-member-small:nth-child(3) {
  animation-delay: 0.6s;
}

.team-member-small:nth-child(4) {
  animation-delay: 0.7s;
}

/* Accessibility */
.team-image-circle:focus {
  outline: 3px solid #2563eb;
  outline-offset: 4px;
}