/*
* ========================================================================
* NEW RESPONSIVE SLIDER STYLES
* Smooth left-to-right animation for all devices
* ========================================================================
*/

/* ===== SLIDER SECTION STYLES ===== */

.new-slider-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  position: relative;
  overflow: hidden;
}

.new-slider-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23000" opacity="0.02"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
  pointer-events: none;
}

.slider-heading {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.slider-description {
  font-size: 1.1rem;
  color: #6c757d;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== SLIDER CONTAINER ===== */

.new-slider-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  padding: 30px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.new-slider-track {
  display: flex;
  width: calc(250px * 10); /* 5 slides * 2 for seamless loop */
  animation: slideLeftToRight 25s linear infinite;
  align-items: center;
  will-change: transform;
}

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

/* ===== SLIDE STYLES ===== */

.new-slide {
  width: 250px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: transform 0.3s ease;
}

.slide-content {
  text-align: center;
  background: white;
  border-radius: 15px;
  padding: 25px 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.slide-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(42, 134, 46, 0.1), transparent);
  transition: left 0.5s ease;
}

.slide-content:hover::before {
  left: 100%;
}

.slide-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  border-color: var(--color-one);
}

.slide-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.slide-content:hover .slide-image {
  transform: scale(1.1);
}

.slide-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
  transition: color 0.3s ease;
}

.slide-content:hover .slide-title {
  color: var(--color-one);
}

/* ===== ANIMATION KEYFRAMES ===== */

@keyframes slideLeftToRight {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-250px * 5));
  }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet Styles */
@media (max-width: 1024px) {
  .slider-heading {
    font-size: 2.2rem;
  }
  
  .new-slider-track {
    animation-duration: 20s;
  }
  
  .new-slide {
    width: 220px;
    padding: 15px;
  }
  
  .slide-content {
    padding: 20px 15px;
  }
  
  .slide-image {
    width: 70px;
    height: 70px;
  }
}

/* Mobile Styles */
@media (max-width: 768px) {
  .new-slider-section {
    padding: 3rem 0;
  }
  
  .slider-heading {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }
  
  .slider-description {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .new-slider-container {
    border-radius: 15px;
    padding: 20px 0;
    margin: 0 10px;
  }
  
  .new-slider-track {
    animation-duration: 30s; /* Slower on mobile for better visibility */
    width: calc(200px * 10);
  }
  
  .new-slide {
    width: 200px;
    padding: 10px;
  }
  
  .slide-content {
    padding: 20px 15px;
    border-radius: 12px;
  }
  
  .slide-image {
    width: 60px;
    height: 60px;
    margin-bottom: 12px;
  }
  
  .slide-title {
    font-size: 0.9rem;
  }
  
  /* Touch-friendly interactions */
  .new-slider-track {
    -webkit-overflow-scrolling: touch;
  }
  
  .slide-content:active {
    transform: scale(0.95);
  }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
  .new-slider-section {
    padding: 2.5rem 0;
  }
  
  .slider-heading {
    font-size: 1.5rem;
  }
  
  .slider-description {
    font-size: 0.95rem;
    padding: 0 15px;
  }
  
  .new-slider-container {
    margin: 0 5px;
    padding: 15px 0;
  }
  
  .new-slider-track {
    width: calc(180px * 10);
    animation-duration: 35s; /* Even slower for small screens */
  }
  
  .new-slide {
    width: 180px;
    padding: 8px;
  }
  
  .slide-content {
    padding: 15px 10px;
  }
  
  .slide-image {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
  }
  
  .slide-title {
    font-size: 0.8rem;
  }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */

@media (prefers-reduced-motion: reduce) {
  .new-slider-track {
    animation: none;
  }
  
  .slide-content {
    transition: none;
  }
  
  .slide-image {
    transition: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .slide-content {
    border: 2px solid #000;
  }
  
  .slide-title {
    color: #000;
  }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

.new-slider-track {
  transform: translateZ(0); /* Enable hardware acceleration */
  backface-visibility: hidden;
}

.slide-content {
  transform: translateZ(0);
}

/* ===== DARK MODE SUPPORT ===== */

@media (prefers-color-scheme: dark) {
  .new-slider-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  }
  
  .slider-heading {
    color: #ffffff;
  }
  
  .slider-description {
    color: #b0b0b0;
  }
  
  .new-slider-container {
    background: rgba(40, 40, 40, 0.8);
  }
  
  .slide-content {
    background: #2a2a2a;
    border-color: #404040;
  }
  
  .slide-title {
    color: #ffffff;
  }
  
  .slide-content:hover {
    background: #333333;
  }
}

/* ===== PRINT STYLES ===== */

@media print {
  .new-slider-section {
    page-break-inside: avoid;
  }
  
  .new-slider-track {
    animation: none;
    display: block;
    width: auto;
  }
  
  .new-slide {
    display: inline-block;
    width: auto;
    margin: 10px;
  }
  
  .slide-content {
    box-shadow: none;
    border: 1px solid #000;
  }
}