/* Base container for services-items */
.services-items {
  position: relative;
  height: auto;
  color: #fff;
  overflow: hidden;
  padding: 20px 50px;
  display: flex;
  align-items: center;
  z-index: 1;
  background-color: black; /* Black background */
  flex-direction: column;
  justify-content: center;
}


/* Pseudo-element for background image and parallax effect */
.services-items::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* Parallax effect */
  z-index: -1;
  opacity: 0.4;
}

/* Background for first services block */
.bg-graphic::before {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.9), transparent),
    url('../img/slider/slider_img01.jpg');
}

.bg-print::before {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.9), transparent),
    url('../img/slider/slider_img02.jpg');
}

/* Background for second services block */
.bg-web::before {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.8), transparent),
    url('../img/slider/slider_img03.jpg');
}

.bg-shop::before {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.8), transparent),
    url('../img/slider/slider_img05.jpg');
}

/* Content styling */
.services-items .services-content {
  z-index: 2;
  position: relative;
}

.services-items .services-content h2 {
  color: #fff;
  font-size: 50px;
  font-weight: 700;
}

.services-items .services-content a{
  color: #fff;
}

/* === ensuring the content in vertically centered ===*/
@media (min-width: 992px) {
  .row.gy-4 {
    align-items: center;
  }
}



@media (max-width: 768px) {
  .services-items {
    padding: 20px;
    height: auto;
    flex-direction: column;
  }

  .bg-graphic::before {
    background-image:
      linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent),
      url('../img/slider/slider_img01.jpg');
    background-attachment: scroll; /* Prevent parallax on mobile */
  }

  .bg-print::before {
    background-image:
      linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent),
      url('../img/slider/slider_img02.jpg');
    background-attachment: scroll; /* Prevent parallax on mobile */
  }

  .bg-web::before {
    background-image:
      linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent),
      url('../img/slider/slider_img03.jpg');
    background-attachment: scroll;
  }

  .bg-shop::before {
    background-image:
      linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent),
      url('../img/slider/slider_img05.jpg');
    background-attachment: scroll;
  }

  .services-items .services-content h2 {
    font-size: 40px;
    font-weight: 600;
  }
}

/*===== Images ========*/
/* Wrapper for images and captions */
.services-image-wrapper {
  display: flex;
  gap: 10px; /* Reduced gap */
  flex-wrap: wrap;
  justify-content: space-between;
  position: relative;
}

/* Box around each image and caption */
.services-image-box {
  position: relative;
  overflow: hidden;
  flex: 1 1 18%;
  max-width: 18%;
  height: 350px;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Image styling */
.services-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.4s ease;
}

/* Shine effect using pseudo-element */
.services-image-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -65%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
  transform: skewX(-25deg);
  transition: left 0.4s ease;
  z-index: 2;
}

/* Caption styling */
.services-caption {
  position: absolute;
  bottom: -50px;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 8px 12px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 14px;
  transition: bottom 0.4s ease;
  z-index: 3;
}

/* Hover effects */
.services-image-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.services-image-box:hover::before {
  left: 130%;
}

.services-image-box:hover .services-caption {
  bottom: 0;
}

/* Mobile view: horizontal scroll */
@media (max-width: 768px) {
  .services-image-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    flex-wrap: nowrap;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
  }

  .services-image-box {
    flex: 0 0 45%;
    max-width: 42%;
    height: 200px;
  }

  .services-image {
    height: 100%;
    object-fit: cover;
  }

  /* Hide scrollbar (optional) */
  .services-image-wrapper::-webkit-scrollbar {
    display: none;
  }

  .services-image-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  /* Hide caption on mobile for simplicity */
  .services-caption {
    display: none;
  }
}

/* ==== read button ---*/
.services-read-button {
  position: relative;
  display: inline-block;
  padding: 10px 20px;
  background: transparent;
  color: #ffbf00 !important;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
}

.services-read-button::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0%;
  background-color: #ffbf00;
  transition: width 0.4s ease;
}

.services-read-button:hover::after,
.services-read-button:focus::after {
  width: 100%;
}

.services-read-button:hover,
.services-read-button:focus,
.services-read-button:active {
  color: #ffbf00;
  transform: scaleX(1.05);
}


