.founder-section,
.team-section {
  padding: 5rem 0;
}

.team-section {
  background-color: var(--bg-light);
  text-align: center;
  background: linear-gradient(135deg, var(--bg) 0%, #ffffff 100%);
}

.team-section h2 {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  color: var(--primary);
  position: relative;
  display: inline-block;
}
.team-section p{
  font-size: 1.1rem;
  color: #555;
  max-width: 600px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
}

.team-section h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--primary);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.team-section h3 {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.team-slider-wrapper {
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

/* Carousel Track with scroll-snap */
.team-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1rem;
  scroll-behavior: smooth;
  padding-bottom: 1rem;
  cursor: grab;
  user-select: none;
  margin-bottom: 2rem;
  -webkit-overflow-scrolling: touch;
}

/* Each card snaps */
.team-card {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: 300px; /* fixed width */
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  border-radius: 16px;
  box-shadow: var(--muted);
  padding: 24px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  margin: 0 auto;
  backdrop-filter: blur(6px);
  color: var(--text);
}

.team-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.team-card img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  margin: 0 auto 15px;
  border: 3px solid var(--accent);
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.team-card h3 {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 1.1rem;
}

.team-role {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  margin: 6px 0 10px 0; /* top + bottom spacing */
  display: block;
  font-style: italic;
}

/* Carousel Arrows */
.team-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--green);
  color: var(--white);
  border: none;
  padding: 12px;
  cursor: pointer;
  border-radius: 50%;
  font-size: 18px;
  transition: background 0.3s,opacity 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  opacity: 0;
}


.team-arrow[style*="block"] {
  opacity: 1;
  pointer-events: auto;
}


.team-arrow:hover {
  background: #004d2a; /* slightly darker green for hover */
}

.team-arrow.left {
  left: -5px;
}

.team-arrow.right {
  right: -5px;
}

.founder-section {
  background: linear-gradient(to right, var(--primary), #0b1a6e);
  color: white;
}

.founder-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  align-items: center;
}

/* Image */
.founder-image img {
  width: 100%;
  max-width: 350px;
  border-radius: 16px;
  margin: 0 auto;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

/* Content */
.founder-content {
  max-width: 550px;
}

/* Small label */
.section-tag {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.7;
}

/* Name */
.founder-content h3 {
  font-size: 1.5rem;
  margin-top: 10px;
}

/* Role */
.founder-role {
  color: var(--accent);
  margin-bottom: 15px;
}

/* Text */
.founder-content p {
  line-height: 1.7;
  opacity: 0.95;
}

/*Infrastructure Images*/
.infra-carousel {
  overflow: hidden;
  padding-left: 20px;
  margin-bottom: 35px;
}

.infra-track {
  display: flex;
  gap: 14px;

  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;

  -webkit-overflow-scrolling: touch;

  padding-bottom: 10px;
}

.infra-track::-webkit-scrollbar {
  display: none;
}

.infra-card-img {
  flex: 0 0 260px;
  scroll-snap-align: start;

  border-radius: 12px;
  overflow: hidden;

  cursor: pointer;
  transition: transform 0.3s ease;

  opacity: 0.85;
}

.infra-card-img img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.infra-card-img:hover {
  transform: scale(1.05);
  opacity: 1;
}

.infra-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);

  display: none;
  align-items: center;
  justify-content: center;

  z-index: 9999;
  overflow: hidden;
}

.infra-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 26px;
  
  padding: 10px 14px;
  border-radius: 50%;
  cursor: pointer;

  backdrop-filter: blur(6px);
  transition: 0.3s;
}

.infra-nav:hover {
  background: rgba(255,255,255,0.3);
}

.infra-nav.left {
  left: 20px;
}

.infra-nav.right {
  right: 20px;
}

/* Counter */
.infra-counter {
  position: absolute;
  bottom: 20px;
  color: white;
  font-size: 14px;
  background: rgba(0,0,0,0.5);
  padding: 6px 12px;
  border-radius: 20px;
}

.infra-modal img {
  max-width: 92%;
  max-height: 80vh;
  border-radius: 10px;

  transition: transform 0.3s ease;
  cursor: zoom-in;

  animation: zoomIn 0.3s ease;
}

.infra-modal img.zoomed {
  transform: scale(1.8);
  cursor: zoom-out;
  cursor: grab;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.infra-close {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 28px;
  color: white;
  cursor: pointer;
}

/*Media*/

@media (max-width: 768px) {

  .team-slider {
    gap: 0.8rem;
    padding-left: 10px;
    scroll-padding-left: 10px;
  }

  .team-card {
    flex: 0 0 85%;
    margin: 0 auto;
  }

  .team-arrow.left { left: 5px; }
  .team-arrow.right { right: 5px; }

  .founder-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 25px;
  }

  .founder-image img {
    max-width: 250px;
  }

  .founder-content h2 {
    font-size: 1.6rem;
  }

  .founder-content {
    margin: 0 auto;
  }
  .infra-card {
    flex: 0 0 75%;
  }

  .infra-card-click img {
    height: 180px;
  }
    .infra-nav {
    display: none;
  }

}

@media (max-width: 900px) {
  .team-card {
    flex: 0 0 250px;
  }
}