* {
  box-sizing: border-box;
}

/* ==========================
   Services - Mobile First
========================== */

#services {
  padding: var(--space-xl) var(--space-sm);
}

.services-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 1200px;
  margin: 0 auto;
}

.services-container h2 {
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: 1px;
  margin: 0;
  position: relative;
  display: inline-block;
}

/* Center headings */
h2,
h3 {
  text-align: center;
}

/* Animated underline */
.services-container h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(-1 * var(--space-xs));
  transform: translateX(-50%) scaleX(0);
  transform-origin: right;
  width: 50%;
  height: 3px;
  background: linear-gradient(to right, #7499ff, #5a7ce6);
  border-radius: 2px;
  transition: transform 0.8s ease 0.15s;
}

.services-container h2.animate::after {
  transform: translateX(-50%) scaleX(1);
}

/* ==========================
   Slideshow (FINAL FIX)
========================== */

.graphicslides-container,
.webslides-container {
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  position: relative;

  /* stable height */
  min-height: 400px;

  text-align: center;
}

/* Tablet */
@media (min-width: 768px) {
  .graphicslides-container,
  .webslides-container {
    min-height: 450px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .graphicslides-container,
  .webslides-container {
    min-height: 500px;
  }
}

/* Slides */
.graphicSlides,
.webSlides {
  display: none;
}

/* Images (NO cropping, properly centered) */
.graphicSlides img,
.webSlides img {
  max-width: 100%;
  max-height: 500px;

  width: auto;
  height: auto;

  display: block;
  margin: 0 auto;
}

/* ==========================
   Controls
========================== */

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 16px;
  color: rgb(0, 0, 0);
  font-weight: bold;
  font-size: 18px;
  transition: 0.3s ease;
  user-select: none;
}

/* Position buttons */
.prev {
  left: 0;
}

.next {
  right: 0;
}

/* Hover effect */
.prev:hover,
.next:hover {
  background-color: rgba(90, 124, 230, 0.8);
}

/* ==========================
   Text + Indicators
========================== */

/* Caption text */
.text {
  color: #f2f2f2;
  font-size: 15px;
  padding: 8px 12px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
}

/* Number text */
.numbertext {
  color: #f2f2f2;
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
}

/* Dots */
.dot {
  cursor: pointer;
  height: 12px;
  width: 12px;
  margin: 0 4px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.dot.active,
.dot:hover {
  background-color: #717171;
}

/* ==========================
   Animation
========================== */

.fade {
  animation: fade 0.8s ease;
}

@keyframes fade {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}
