/* =====================================================
   SERVICES PAGE MAIN WRAPPER
===================================================== */
.services-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: 2%;
  row-gap: 30px;
  margin-top: 30px;
  width: 100%;
}

/* =====================================================
   SERVICE CARD (3 per row on desktop)
===================================================== */
.service-box {
  width: 32%; /* EXACT 3 per row */
  background: linear-gradient(145deg, #ffffff, #f0f4ff);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border 0.35s ease;
  opacity: 0;
  animation: fadeInUp 0.9s ease forwards;
  box-sizing: border-box;
}

/* Animation alternation */
.service-box:nth-child(odd) { animation-name: slideLeft; }
.service-box:nth-child(even) { animation-name: slideRight; }

/* Animation delays */
.service-box:nth-child(1) { animation-delay: 0.1s; }
.service-box:nth-child(2) { animation-delay: 0.2s; }
.service-box:nth-child(3) { animation-delay: 0.3s; }
.service-box:nth-child(4) { animation-delay: 0.4s; }
.service-box:nth-child(5) { animation-delay: 0.5s; }
.service-box:nth-child(6) { animation-delay: 0.6s; }

/* Glow border */
.service-box::before {
  content: "";
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(135deg,
    rgba(0, 115, 230, 0.35),
    rgba(0, 212, 255, 0.35),
    rgba(0, 68, 170, 0.35)
  );
  z-index: -1;
  border-radius: 18px;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.service-box:hover::before { opacity: 1; }

/* Hover effect */
.service-box:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 15px 35px rgba(0,0,0,0.18);
}


/* =====================================================
   IMAGE
===================================================== */
.service-box img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 0;
  transition: transform 0.4s ease, filter 0.4s ease;
}
.service-box:hover img {
  transform: scale(1.04);
  filter: brightness(1.22);
}

/* =====================================================
   TEXT
===================================================== */
.service-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 5px;
  color: #222;
}

.service-desc {
  font-size: 15px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 10px;
}

/* Remove bottom padding */
.service-box { padding-bottom: 0 !important; }

/* =====================================================
   HEADING
===================================================== */
.services-heading-wrapper {
  text-align: center !important;
  width: 100%;
  margin-bottom: 30px;
}

.services-heading {
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, #000000, #00c6ff);
  -webkit-background-clip: text;
  color: transparent;
  display: inline-block;
  position: relative;
}

/* Underline animation */
.services-heading::after {
  content: "";
  width: 160px;
  height: 4px;
  background: linear-gradient(135deg, #0066ff, #00c6ff);
  margin: 10px auto 0;
  border-radius: 10px;
  animation: underlineGrow 1.2s ease-out forwards;
  display: block;
  position: relative;
}


@keyframes underlineGrow {
  0% { width: 0; opacity: 0; }
  100% { width: 160px; opacity: 1; }
}

/* =====================================================
   ANIMATIONS
===================================================== */
@keyframes slideLeft {
  0% { opacity: 0; transform: translateX(-30px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes slideRight {
  0% { opacity: 0; transform: translateX(30px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(25px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 1024px) {
  .service-box { width: 48%; } /* 2 per row */
}

@media (max-width: 768px) {
  .service-box { width: 100%; } /* 1 per row */
}

/* =====================================================
   WORDPRESS EXTRA P <p> FIX
===================================================== */
.services-container > p {
  display: none !important;
}

/* =====================================================
   FORCE NO OVERFLOW ON THIS PAGE
===================================================== */
.page-id-4527 {
  overflow-x: hidden !important;
}
