/* Product and Service Slider - Responsive Complete Solution */
.products,
.services,
.product-header,
.service-header {
  text-align: center;
}

.product-header p,
.service-header p {
  font-size: 28px;
  margin-bottom: 20px;
  font-weight: bold;
  color: #f4f4f4;
}

/* Main container styling (reduced vertical padding for visibility of controls) */
.slider-container,
.service-slider-container {
  position: relative;
  width: 100%;
  max-width: 1800px;
  margin: auto;
  overflow: hidden;
  border-radius: 25px;
  padding: 24px 14px; /* reduced from 50px 20px */
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background: linear-gradient(to right, #2C5364, #203A43, #0F2027);
}

.service-slider-container {
  border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Add space between sections */
.services {
  margin-top: 50px;
}

/* Track (now safe to add small visual gap; JS uses pixel translate) */
.slider-track,
.service-slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
  gap: 12px; /* visual space between cards */
}

/* Cards (tighter padding) */
.productSlide,
.serviceSlide {
  flex: 0 0 calc(33.333% - 10px);
  padding: 10px; /* was 15px */
  margin: 0;
  box-sizing: border-box;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  transition: background 0.4s ease;
}

.productSlide:hover,
.serviceSlide:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Images (shorter to reduce overall card height) */
.productSlide img,
.serviceSlide img {
  height: 140px; /* was 200px */
  object-fit: cover;
  border-radius: 10px;
  transition: opacity 0.3s ease;
}

.productSlide:hover img,
.serviceSlide:hover img {
  opacity: 0.5;
}

/* Description styling */
.serviceDescription,
.description {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  padding: 10px;
  line-height: 1.6;
  min-height: 60px;
  overflow-wrap: break-word;
}

/* Headings/descriptions (slightly tighter spacing) */
.serviceDescription h1,
.description h1 {
  font-size: 1.25rem;
  margin: 8px 0 6px; /* tighter */
  font-weight: bold;
  color: #2c86ff;
  text-align: center;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Description text styling */
.serviceDescription p,
.description p {
  font-size: 0.95rem;
  color: #e0e0e0;
  margin: 0 0 8px;
  text-align: center;
  line-height: 1.4; /* tighter */
  font-weight: normal;
}

/* Button styling */
.desc-btn {
  display: inline-block;
  width: 90%;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  background-color: #062536;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 8px;
}

.desc-btn a {
  color: inherit;
  text-decoration: none;
}

.desc-btn:hover {
  background-color: #2e76a2;
  color: #080808;
  transform: scale(1.05);
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

/* Control buttons area (ensure space above) */
.slider-buttons,
.service-slider-buttons {
  text-align: center;
  margin-top: 14px; /* ensure visible below shorter containers */
}

.slider-buttons button,
.service-slider-buttons button {
  background-color: #1100cc;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.3);
  margin: 0 10px;
}

.slider-buttons button:hover,
.service-slider-buttons button:hover {
  background-color: #004d99;
  transform: scale(1.05);
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .productSlide,
  .serviceSlide {
    flex: 0 0 calc(50% - 10px);
    padding: 10px;
  }
  
  .slider-track,
  .service-slider-track {
    gap: 10px;
  }
  .slider-container,
  .service-slider-container {
    padding: 20px 12px; /* less padding on tablet */
  }
  .productSlide img,
  .serviceSlide img {
    max-width: 200px;
    height: 120px; /* shorter on tablet */
  }
  .serviceDescription h1,
  .description h1 {
    font-size: 1.15rem;
    margin: 6px 0 4px;
  }
  .serviceDescription p,
  .description p {
    font-size: 0.9rem;
    line-height: 1.35;
  }
}

@media (max-width: 768px) {
  .product-header p,
  .service-header p {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .slider-container,
  .service-slider-container {
    padding: 16px 10px; /* compact */
    border-radius: 16px;
  }

  .slider-track,
  .service-slider-track {
    gap: 8px;
  }

  /* Important: Single slide per view on mobile */
  .productSlide,
  .serviceSlide {
    flex: 0 0 100%;
    padding: 10px;
    border-radius: 12px;
  }

  .productSlide img,
  .serviceSlide img {
    width: 100%;
    max-width: 100%;
    height: auto; /* natural */
    object-fit: contain;
  }

  .serviceDescription,
  .description {
    max-width: 100%;
    font-size: 14px;
  }

  .serviceDescription h1,
  .description h1 {
    font-size: 1.1rem;
    margin: 6px 0 4px;
  }

  .serviceDescription p,
  .description p {
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .desc-btn {
    width: 80%;
    padding: 10px 16px;
    font-size: 13px;
  }

  .slider-buttons button,
  .service-slider-buttons button {
    padding: 8px 12px;
    font-size: 12px;
  }

  .services {
    margin-top: 30px;
  }
}

@media (max-width: 480px) {
  .product-header p,
  .service-header p {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .slider-container,
  .service-slider-container {
    padding: 14px 8px;
  }

  .productSlide,
  .serviceSlide {
    max-width: 300px;
    padding: 8px;
  }

  .productSlide img,
  .serviceSlide img {
    max-width: 180px;
  }

  .serviceDescription h1,
  .description h1 {
    font-size: 1.02rem;
  }

  .serviceDescription p,
  .description p {
    font-size: 0.85rem;
    line-height: 1.3;
  }

  .desc-btn {
    width: 85%;
    padding: 8px 12px;
    font-size: 12px;
  }

  .slider-buttons button,
  .service-slider-buttons button {
    padding: 8px 12px;
    font-size: 12px;
    margin: 0 5px;
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.3);
  }

  .services {
    margin-top: 30px;
  }
}

@media (max-width: 360px) {
  .slider-container,
  .service-slider-container {
    padding: 15px 10px;
    margin: 0 5px;
  }

  .productSlide,
  .serviceSlide {
    max-width: 280px;
    padding: 12px;
  }

  .productSlide img,
  .serviceSlide img {
    max-width: 160px;
  }

  .serviceDescription h1,
  .description h1 {
    font-size: 1rem;
  }

  .serviceDescription p,
  .description p {
    font-size: 0.75rem;
  }

  .desc-btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  .slider-buttons button,
  .service-slider-buttons button {
    padding: 6px 10px;
    font-size: 11px;
    margin: 0 3px;
  }
}