.portfolioSlider {
}

.portfolioSlider__container {
  max-width: 1440px;
  width: 90%;
  margin: 0 auto;
  position: relative;
}

.portfolioSlider__slider {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  gap: 20px;
  padding: 20px 0;
  /* Hide scrollbar for webkit browsers */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  user-select: none; /* Prevent text selection while dragging */
  -webkit-user-select: none;
  -ms-user-select: none;
  touch-action: pan-y; /* Allow horizontal drag, prevent vertical interference */
}

.portfolioSlider__slider::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

.portfolioSlider__slide {
  flex: 0 0 600px;
  min-width: 600px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  text-decoration: none;
  display: block;
  cursor: pointer;
}

.portfolioSlider__image {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.portfolioSlider__featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolioSlider__slide:hover .portfolioSlider__featured-image {
  transform: scale(1.05);
}

.portfolioSlider__placeholder {
  width: 100%;
  height: 100%;
  background-color: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-family: "Helvetica Neue", sans-serif;
  font-size: 14px;
}

.portfolioSlider__overlay {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  color: white;
  padding: 30px;
  transition: transform 0.3s ease;
}

.portfolioSlider__title {
  color: #fff;
  font-family: "Helvetica Neue", sans-serif;
  font-size: 56px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  text-transform: uppercase;
  margin-bottom: 0px;
  margin-top: auto;
}

.portfolioSlider__excerpt {
  font-family: "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 20px;
  opacity: 0.9;
}

/* Scroll indicator */
.portfolioSlider__scroll-indicator {
  text-align: center;
  margin-top: 20px;
  color: #666;
  font-family: "Helvetica Neue", sans-serif;
  font-size: 14px;
  opacity: 0.7;
}

.portfolioSlider__scroll-indicator::before {
  content: "← Skrolla för att se mer →";
  display: inline-block;
  animation: scrollHint 2s ease-in-out infinite;
}

/* Arrows */
.portfolioSlider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 36px;
  line-height: 14px;
  padding-bottom: 5px;
  padding-left: 10px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.portfolioSlider__arrow:hover {
  background: rgba(0, 0, 0, 0.8);
}

.portfolioSlider__prev {
  left: -22px; /* half arrow width to sit flush outside */
}

.portfolioSlider__next {
  right: -22px;
}

.portfolioSlider__arrow[disabled] {
  opacity: 0.4;
  cursor: default;
}

@keyframes scrollHint {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(10px);
  }
}

/* Empty state */
.portfolioSlider__empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-family: "Helvetica Neue", sans-serif;
}

/* Responsive styles */
@media (max-width: 1200px) {
  .portfolioSlider__slide {
    flex: 0 0 500px;
    min-width: 500px;
  }

  .portfolioSlider__image {
    height: 300px;
  }

  .portfolioSlider__overlay {
    padding: 25px;
  }

  .portfolioSlider__title {
    font-size: 42px;
  }

  .portfolioSlider__excerpt {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .portfolioSlider {
    padding: 1.5rem 0;
  }

  .portfolioSlider__container {
    width: 100%;
    padding: 0;
  }

  .portfolioSlider__slider {
    gap: 15px;
    padding: 15px 0;
  }

  .portfolioSlider__slide {
    flex: 0 0 350px;
    min-width: 350px;
  }

  .portfolioSlider__image {
    height: 250px;
  }

  .portfolioSlider__overlay {
    padding: 20px;
  }

  .portfolioSlider__title {
    font-size: 28px;
  }

  .portfolioSlider__excerpt {
    font-size: 14px;
  }

  .portfolioSlider__scroll-indicator {
    margin-top: 15px;
    font-size: 13px;
  }

  .portfolioSlider__arrow {
    width: 38px;
    height: 38px;
  }

  .portfolioSlider__prev {
    left: -19px;
  }

  .portfolioSlider__next {
    right: -19px;
  }
}

@media (max-width: 480px) {
  .portfolioSlider {
    padding: 1rem 0;
  }

  .portfolioSlider__container {
    width: 100%;
    padding: 0;
  }

  .portfolioSlider__slider {
    gap: 10px;
    padding: 10px 0;
  }

  .portfolioSlider__slide {
    flex: 0 0 300px;
    min-width: 300px;
  }

  .portfolioSlider__image {
    height: 200px;
  }

  .portfolioSlider__overlay {
    padding: 15px;
  }

  .portfolioSlider__title {
    font-size: 24px;
  }

  .portfolioSlider__excerpt {
    font-size: 13px;
    margin-bottom: 15px;
  }

  .portfolioSlider__scroll-indicator {
    margin-top: 10px;
    font-size: 12px;
  }

  .portfolioSlider__arrow {
    width: 34px;
    height: 34px;
    background: rgba(0, 0, 0, 0.7);
  }

  .portfolioSlider__prev {
    left: -17px;
  }

  .portfolioSlider__next {
    right: -17px;
  }
}
