/**
 * Card Slider - Frontend Styles
 * Version: 1.0.0
 *
 * All classes are prefixed with 'cs-' to avoid conflicts
 */

.cs-slider-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 40px auto;
  font-family: "Poppins";
}

.cs-slider-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.cs-slider-track {
  display: flex;
  gap: 30px;
  will-change: transform;
  animation: cs-marquee 40s linear infinite;
  animation-play-state: paused;
}

.cs-slider-track:hover {
  animation-play-state: paused;
}

.cs-slider-track.cs-paused {
  animation-play-state: paused;
}

@keyframes cs-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-100% / 3));
  }
}

.cs-card {
  min-width: 20%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 440px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

/* Desktop: Show 4 cards at once */
@media (min-width: 1025px) {
  .cs-card {
    width: calc((100% - 60px) / 3);
    min-width: 30%;
    flex-shrink: 0;
  }
}

.cs-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(255, 215, 0, 0.3);
}

.cs-card-image {
  width: 100%;
  height: 160px;
  min-height: 160px;
  max-height: 160px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.cs-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.cs-card:hover .cs-card-image img {
  transform: scale(1.1);
}

.cs-card-content {
  padding: 30px;
  background: #ffd700;
  color: #000;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.cs-card-title {
  font-size: 16px !important;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.3;
  margin-top: 0;
  min-height: 42px;
}

.cs-card-description {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 10px;
  margin-top: 0;
  flex: 1;
}

.cs-card-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #ffd700;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px !important;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.cs-card-button:hover,
.cs-card-button:focus {
  background: #1a1a1a;
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  color: #ffd700;
  text-decoration: none;
}

.cs-card-button svg {
  transition: transform 0.3s ease;
}

.cs-card-button:hover svg {
  transform: translateX(5px);
}

.cs-nav-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ffd700;
  border: none;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  z-index: 10;
  padding: 0;
}

.cs-nav-button:hover,
.cs-nav-button:focus {
  background: #ffc700;
  transform: scale(1.1);
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.5);
  outline: none;
  color: #000 !important;
}

.cs-nav-button:active {
  transform: scale(0.95);
}

.cs-nav-button.cs-prev svg,
.cs-prev svg {
  /* No rotation needed, SVG already points left */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .cs-card {
    min-width: 30%;
    height: 440px;
  }

  .cs-card-title {
    font-size: 22px;
    min-height: 58px;
  }

  .cs-card-description {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .cs-slider-container {
    flex-direction: column;
    gap: 15px;
    margin: 20px auto;
    align-items: center;
    justify-content: center;
  }

  .cs-slider-wrapper {
    width: 100%;
    order: 1;
  }

  .cs-slider-track {
    gap: 20px;
    justify-content: flex-start;
  }

  .cs-card {
    min-width: 100%;
    width: 100%;
    height: 440px;
  }

  .cs-card-title {
    font-size: 16px;
    min-height: 42px;
  }

  .cs-card-description {
    font-size: 14px;
  }

  .cs-card-content {
    padding: 30px;
  }

  .cs-nav-button {
    width: 50px;
    height: 50px;
    position: relative;
  }

  /* Navigation buttons at bottom center */
  .cs-nav-button.cs-prev {
    order: 2;
  }

  .cs-nav-button.cs-next {
    order: 3;
  }
}

@media (max-width: 480px) {
  .cs-slider-container {
    margin: 10px auto;
    gap: 15px;
  }

  .cs-slider-wrapper {
    width: 100%;
  }

  .cs-card {
    min-width: 100%;
    width: 100%;
    height: 440px;
  }

  .cs-card-image {
    height: 160px;
    min-height: 160px;
    max-height: 160px;
  }

  .cs-card-title {
    font-size: 16px;
    min-height: 42px;
  }

  .cs-card-description {
    font-size: 14px;
  }

  .cs-card-button {
    padding: 15px 30px;
    font-size: 14px;
  }

  .cs-card-content {
    padding: 30px;
  }

  .cs-nav-button {
    width: 50px;
    height: 50px;
  }
}
