/* Inherit header height variables */
:root {
  --dh: 80px;     /* desktop header (for reference) */
  --mh: 90px;     /* mobile header height from base */
  --header-h: var(--mh, var(--dh));
}

/* ================== Main Section ================== */
.services-section {
  background: #000; /* pure black page background */
  color: #e9eef6;
  min-height: 100vh;
  padding: calc(var(--header-h) + clamp(2rem, 5vh, 4rem)) clamp(1rem, 4vw, 2rem);
  box-sizing: border-box;
  display: flex;
}

.services-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.services-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  text-align: center;
  margin: 0 0 clamp(2.5rem, 6vh, 4rem) 0;
  color: #fff;
}

/* ================== Services Grid ================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 380px));
  gap: clamp(1.5rem, 2.5vw, 2rem);
  justify-content: center;
}

/* ================== Card Styling ================== */
.service-card {
  --glow-color: #0078ff;
  background: #10141a;
  border-radius: 16px;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  border: 1px solid #222831;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
  animation: card-fade-in 600ms ease-out forwards;
  width: 100%;
}

.service-card:nth-child(1) { animation-delay: 100ms; }
.service-card:nth-child(2) { animation-delay: 200ms; }
.service-card:nth-child(3) { animation-delay: 300ms; }
.service-card:nth-child(4) { animation-delay: 400ms; }

@keyframes card-fade-in {
  to { opacity: 1; transform: translateY(0); }
}

.card-content {
  padding: 1.75rem;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Glow Effect on Hover */
.service-card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(300px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(0, 120, 255, 0.15), transparent 80%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.service-card:hover::before { opacity: 1; }

.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 120, 255, 0.5);
}

.service-tag {
  background-color: rgba(0, 120, 255, 0.15);
  color: #82c3ff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  align-self: flex-start;
  margin-bottom: 1rem;
}
.service-tag.coming-soon {
  background-color: rgba(255, 180, 0, 0.15);
  color: #ffd582;
}

.service-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.75rem 0;
}
.service-description {
  color: #cfd7e6;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  margin-top: auto;
  padding-top: 1rem;
}

/* ================== Mobile adjustments ==================*/
@media (max-width: 1050px) {
  /* How much to move content upward beyond the default 90px */
  :root { --lift-up: 0px; } /* change this value to move further up */

  /* Reduce the default mobile top padding (var(--mh)) by --lift-up */
  main#shell {
    /* clamp keeps it from going negative */
    padding-top: clamp(0px, calc(var(--mh) - var(--lift-up)), 200px);
  }

  /* Keep the section’s own padding simple on mobile (no header offset here) */
  .services-section {
    padding: 1rem 1rem 2rem; /* content padding inside the section */
  }
}
