.labs-section {
  padding: 80px 0;
  background: #fff;
  overflow: hidden;
}

.labs-section .section-head {
  max-width: 100%; /* Spans full container width (1280px max) */
}

.labs-carousel-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 0;
}

.labs-track {
  display: flex;
  align-items: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 20px;
  margin-left: 0;
}

.lab-slide {
  flex: 0 0 60%; /* Each slide takes 60% of width */
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(0.8);
  opacity: 0.5;
  filter: blur(2px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.lab-slide.active {
  transform: scale(1);
  opacity: 1;
  filter: blur(0);
  z-index: 10;
  box-shadow: 0 20px 50px rgba(0, 124, 157, 0.15);
}

.lab-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.labs-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 40px;
  pointer-events: none;
  z-index: 20;
}

.lab-btn {
  background: #fff;
  border: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: all 0.3s;
  color: var(--ink);
}

.lab-btn:hover {
  background: var(--teal);
  color: #fff;
  transform: scale(1.1);
}

.lab-btn::after {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
}

.lab-btn.prev::after {
  transform: rotate(135deg);
  margin-left: 4px;
}

.lab-btn.next::after {
  transform: rotate(-45deg);
  margin-right: 4px;
}

@media (max-width: 991px) {
  .lab-slide {
    flex: 0 0 80%;
  }
}

@media (max-width: 767px) {
  .labs-section {
    padding: 32px 0;
  }

  .labs-carousel-container {
    padding: 0; /* Remove top padding to bring it closer to heading */
    margin-top: -12px; /* Pull closer to the heading */
  }
  
  .lab-slide {
    flex: 0 0 70%; /* Shows neighbor parts to hint at carousel */
    height: 200px; /* Fixed height for mobile */
  }

  .lab-slide img {
    height: 100%;
    object-fit: cover;
  }
  
  .labs-controls {
    position: relative;
    top: auto;
    bottom: auto;
    transform: none;
    margin-top: 20px; /* Precise 20px spacing from images */
    justify-content: center;
    gap: 24px;
    padding-bottom: 20px;
  }
  
  .lab-btn {
    width: 48px;
    height: 48px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
  }
}
