/* ===== 1. Services section ===== */
/* Colors come from style.css tokens. Brand accents use --theme-color. */

.btb-services {
  padding: var(--btb-section-pad) 0;
  position: relative;
  z-index: 1;
}

/* Offset for the floating hero card overlap */
.hero-b2b + .btb-services {
  padding-top: calc(var(--btb-section-pad) + 4rem);
}

/* ===== 2. Section head ===== */

.btb-services__head {
  text-align: center;
  max-width: 38rem;
  margin: 0 auto 2.5rem;
}

.btb-services__eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-color) 5%, var(--surface-card));
  color: var(--theme-color);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 0.75rem;
  animation: btb-pulse 2.4s ease-in-out infinite;
}

.btb-services__eyebrow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 0.5px solid color-mix(in srgb, var(--theme-color) 25%, transparent);
  animation: btb-halo 2.4s ease-out infinite;
  pointer-events: none;
}

@keyframes btb-pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--theme-color) 30%, transparent);
  }
  70% {
    box-shadow: 0 0 0 8px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btb-services__eyebrow,
  .btb-services__eyebrow::after {
    animation: none;
  }
}

.btb-services__head h2 {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 700;
  line-height: var(--btb-lh-title);
  color: var(--text-heading);
  margin-bottom: 0.6rem;
}

.btb-services__head p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin: 0;
}

/* ===== 3. Grid ===== */

.btb-services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* ===== 4. Card ===== */

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 2rem 1.5rem 2.5rem;
  text-decoration: none;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

/* Top accent bar, revealed on hover */
.service-card::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(270deg, var(--theme-color), var(--theme-color2));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(
    in srgb,
    var(--theme-color) 35%,
    var(--border-subtle)
  );
  box-shadow: 0 18px 40px -18px
    color-mix(in srgb, var(--ds-shadow-color) 35%, transparent);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 0.9rem;
  color: var(--theme-color);
  background: color-mix(in srgb, var(--theme-color) 9%, var(--surface-card));
  margin-bottom: 1.1rem;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.service-card:hover .service-card__icon {
  background: var(--theme-color);
  color: var(--text-white);
}

.service-card__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 220px;
  margin-bottom: 1.5rem;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface-background);
}

.service-card__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-card:hover .service-card__image img {
  transform: scale(1.05);
}

.service-card h3,
.service-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.7;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.service-card p,
.service-card__desc {
  flex: 1 1 auto;
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.service-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--theme-color);
}

.service-card__cta svg {
  transition: transform 0.3s ease;
}

.service-card:hover .service-card__cta svg {
  transform: translateX(-4px);
}

/* ===== 5. Responsive ===== */

@media (max-width: 1199.98px) {
  .btb-services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .btb-services__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .service-card {
    padding: 1.5rem 1.25rem 1.25rem;
  }
}
