.services-section {
  padding: 100px 8%;
  background: #111;
  color: white;
  text-align: center;
}

.services-tag {
  color: #7b00ff;
  font-size: 13px;
}

.services-title {
  font-size: 34px;
  margin: 14px 0 60px;
}

/* GRID */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  position: relative;
}

/* CARD BASE */
.service-card {
  background: #1a1a1a;
  padding: 28px;
  border-radius: 16px;
  text-align: left;
  position: relative;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
  z-index: 1;

  border:2px solid transparent;
  overflow: hidden;
}

.icon {
  width: 42px;
  height: 42px;
  background: rgba(182,255,0,0.15);
  color: #7b00ff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.short {
  color: #cfcfcf;
  font-size: 14px;
}

/* HIDDEN FULL TEXT */
.full {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: max-height 0.5s ease, opacity 0.4s ease, transform 0.4s ease;
}

/* EXPANDED CARD */
.service-card.expanded {
  transform: translateY(-70px) scale(1.15);
  z-index: 20;
  box-shadow: 0 35px 80px rgba(182,255,0,0.35);
}


.service-card:hover{
  border: 2px solid #b6ff00;
  animation: glowBlink 1s infinite;
}

.service-card.expanded .full {
  max-height: 600px;
  opacity: 1;
  transform: translateY(0);
}

/* BUTTON */
.read-more {
  background: none;
  border: none;
  color: #7b00ff;
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  margin-top: 14px;
}

/* CLOSE BUTTON */
.close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(182,255,0,0.15);
  color: #7b00ff;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 5;
}

/* Show close button only when expanded */
.service-card.expanded .close-btn {
  opacity: 1;
  transform: scale(1);
}

/* ICON ANIMATION */
.icon {
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.service-card.expanded .icon {
  transform: rotate(360deg) scale(1.2);
  box-shadow: 0 0 20px rgba(182,255,0,0.6);
}

/* SMOOTH RETURN */
.service-card:not(.expanded) .icon {
  transform: rotate(0deg) scale(1);
}



/* ===== BACKGROUND DIM OVERLAY ===== */
#service-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 15;
}

/* Show overlay when any card is expanded */
#service-overlay.active {
  opacity: 1;
  visibility: visible;
}



/* ===== SERVICE → PROJECT PROOF ===== */
.related-projects {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.related-projects h4 {
  font-size: 13px;
  color: #7b00ff;
  margin-bottom: 10px;
}

.proof-item {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  cursor: pointer;
}

.proof-item img {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
}

.proof-item strong {
  font-size: 13px;
  color: #fff;
}

.proof-item span {
  font-size: 12px;
  color: #9a9a9a;
}

.proof-item:hover strong {
  color: #7b00ff;
}

.external-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: #7b00ff;
  text-decoration: none;
}


.service-card:hover {
  transform: translateY(-8px);
  border: 1px solid #b6ff00;
  animation: glowBlink 3s ease-in-out infinite;
}

@keyframes glowBlink {

  0%{
    box-shadow: 0 0 3px rgba(182,255,0,0.4);
  }

  50%{
    box-shadow:
      0 0 10px rgba(182,255,0,0.6),
      0 0 20px rgba(182,255,0,0.4);
  }

  100%{
    box-shadow: 0 0 3px rgba(182,255,0,0.2);
  }

}