main {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin: 2rem 0;
}

section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

section:last-child {
  margin-bottom: 2rem;
}

section h2 {
  font-size: 2rem;
  font-weight: 500;
}

.carousel {
  position: relative;
  width: 100%;
  display: flex;
  gap: 1rem;
}

.carousel-track-container {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  transition: transform 0.3s ease-in-out;
  list-style: none;
  gap: 1.25rem;
  align-items: stretch;
  touch-action: pan-y;
}

.carousel-slide {
  flex: 0 0 calc((100% / 3) - (2 * 1.25rem / 3));
  box-sizing: border-box;
  display: flex;
}

.carousel-slide > * {
  flex: 1;
}

.carousel-button {
  position: absolute;
  width: 3rem;
  color: var(--text-color);
  border-radius: 1rem;
  opacity: 0.5;
  font-size: 4rem;
  cursor: pointer;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
  user-select: none;
}

.carousel-button:hover {
  opacity: 1;
}

.carousel-button.prev {
  left: -3.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.carousel-button.next {
  right: -3.5rem;
  top: 50%;
  transform: translateY(-50%);
}

/* 2K Resolution Styles */
@media (min-width: 2560px) {
  main {
    gap: 3.5rem;
    margin: 3rem 0;
  }

  section h2 {
    font-size: 2.5rem;
  }

  .carousel-track {
    gap: 2rem;
  }

  .carousel-slide {
    flex: 0 0 calc((100% / 3) - (2 * 2rem / 3));
  }

  .carousel-button {
    font-size: 5rem;
    width: 4rem;
  }

  .carousel-button.prev {
    left: -4.5rem;
  }

  .carousel-button.next {
    right: -4.5rem;
  }
}

/* Large Desktop */
@media (min-width: 1920px) {
  main {
    gap: 3rem;
    margin: 2.5rem 0;
  }

  section h2 {
    font-size: 2.25rem;
  }

  .carousel-track {
    gap: 1.75rem;
  }

  .carousel-slide {
    flex: 0 0 calc((100% / 3) - (2 * 1.75rem / 3));
  }

  .carousel-button.prev {
    left: -4rem;
  }

  .carousel-button.next {
    right: -4rem;
  }
}

/* Medium Desktop */
@media (max-width: 1400px) {
  .carousel-button.prev {
    left: -3rem;
  }

  .carousel-button.next {
    right: -3rem;
  }
}

@media (max-width: 1199px) {
  .carousel-slide {
    flex: 0 0 calc(50% - 0.625rem);
  }

  .carousel-button {
    font-size: 3.5rem;
  }

  .carousel-button.prev {
    left: -2.5rem;
  }

  .carousel-button.next {
    right: -2.5rem;
  }
}

@media (max-width: 1200px) {
  .carousel-button.prev {
    left: -2rem;
  }

  .carousel-button.next {
    right: -2rem;
  }
}

@media (max-width: 992px) {
  main {
    gap: 2rem;
  }

  section h2 {
    font-size: 1.75rem;
  }

  .carousel-button {
    font-size: 3rem;
  }

  .carousel-button.prev {
    left: -1.5rem;
  }

  .carousel-button.next {
    right: -1.5rem;
  }
}

@media (max-width: 768px) {
  main {
    margin: 1.5rem 0;
    gap: 1.75rem;
  }

  section {
    gap: 1rem;
  }

  section h2 {
    font-size: 1.5rem;
  }

  .carousel {
    overflow: hidden;
  }

  .carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
  }

  .carousel-button {
    display: none;
  }

  .carousel-track-container {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) rgba(255, 255, 255, 0.15);
    padding-bottom: 0.75rem;
  }

  .carousel-track-container::-webkit-scrollbar {
    height: 6px;
  }

  .carousel-track-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    margin-top: 0.35rem;
  }

  .carousel-track-container::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.15);
  }

  .carousel-track-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
  }

  .carousel-track {
    gap: 1rem;
    transform: none !important;
    transition: none !important;
    touch-action: pan-x;
  }
}

@media (max-width: 576px) {
  main {
    margin: 1rem 0;
    gap: 1.5rem;
  }

  section {
    gap: 0.75rem;
  }

  section h2 {
    font-size: 1.35rem;
  }

  .carousel-track {
    gap: 0.75rem;
  }
}
