/* Services Section */
.services {
  position: relative;
  margin-top: -56px;
  padding: 100px 0 80px;
  background: #0a0a0a;
  overflow: hidden;
  z-index: 2;
  clip-path: polygon(
    0% 3%,
    20% 4.5%,
    50% 9%,
    80% 4.5%,
    100% 3%,
    100% 100%,
    0% 100%
  );
  -webkit-clip-path: polygon(
    0% 3%,
    20% 4.5%,
    50% 9%,
    80% 4.5%,
    100% 3%,
    100% 100%,
    0% 100%
  );
}

.services-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.services-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.services .container {
  position: relative;
  z-index: 2;
}

.services-glow {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 160px;
  background: radial-gradient(ellipse, rgba(227, 30, 36, 0.28) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.services-header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  z-index: 2;
  padding-top: 8px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  position: relative;
  z-index: 2;
}

/* Desktop — horizontal parallax for all cards in What We Offer */
@media (min-width: 901px) {
  .services {
    overflow: visible;
    padding: 100px 0 40px;
    clip-path: none;
    -webkit-clip-path: none;
  }

  .services::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: linear-gradient(180deg, #0a0a0a 0%, transparent 100%);
    z-index: 4;
    pointer-events: none;
  }

  .services .container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .services-parallax-pin {
    position: relative;
    width: 100%;
  }

  .services-parallax-sticky {
    position: sticky;
    top: 90px;
    height: calc(100vh - 100px);
    min-height: 620px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
    padding: 0 max(var(--page-padding), 48px);
  }

  .services-header {
    margin-bottom: 32px;
    flex-shrink: 0;
    padding-top: 0;
  }

  .services-parallax-viewport {
    flex: 1;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 0;
    padding-left: max(var(--page-padding), 48px);
    padding-right: max(var(--page-padding), 48px);
  }

  .services-parallax-track {
    will-change: transform;
  }

  .services-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 22px;
    width: max-content;
  }

  .service-card {
    flex: 0 0 300px;
    width: 300px;
    height: 440px;
  }

  .service-card-media img {
    transform: scale(1.15);
    will-change: transform;
  }

  .service-card-title {
    font-size: 1.12rem;
  }

  .services-parallax-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    flex-shrink: 0;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
  }

  .services-parallax-hint i {
    animation: servicesScrollHint 1.6s ease-in-out infinite;
  }
}

.services-parallax-hint {
  display: none;
}

@keyframes servicesScrollHint {
  0%, 100% { transform: translateX(0); opacity: 0.5; }
  50% { transform: translateX(6px); opacity: 1; }
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: visible;
  cursor: pointer;
  height: 450px;
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-red);
  box-shadow: 0 16px 40px rgba(227, 30, 36, 0.25), 0 8px 24px rgba(0, 0, 0, 0.35);
}

.service-card-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  z-index: 0;
}

.service-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow), filter var(--transition);
}

.service-card:hover .service-card-media img {
  transform: scale(1.1);
  filter: brightness(0.92);
}

@media (min-width: 901px) {
  .service-card:hover .service-card-media img {
    filter: brightness(0.92);
  }
}

.service-card-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin-top: 0;
  padding: 22px 14px 24px;
  background: transparent;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  z-index: 2;
  transition: background var(--transition);
}

.service-card:hover .service-card-footer {
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(255, 255, 255, 0.85) 70%,
    transparent 100%
  );
}

.service-hex {
  position: relative;
  z-index: 3;
  width: 76px;
  height: 86px;
  margin-top: 0;
  margin-bottom: 0;
  flex-shrink: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), filter var(--transition);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
}

.service-hex::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-red);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  z-index: 0;
  transition: transform var(--transition), background var(--transition);
}

.service-hex::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: #ffffff;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  z-index: 1;
  transition: inset var(--transition), background var(--transition);
}

.service-card:hover .service-hex {
  transform: scale(1.15) translateY(-8px);
  filter: drop-shadow(0 10px 22px rgba(227, 30, 36, 0.55));
}

.service-card:hover .service-hex::before {
  transform: scale(1.06);
  background: var(--color-red-dark);
}

.service-card:hover .service-hex::after {
  inset: 4px;
  background: #ffffff;
}

.service-hex-icon {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: block;
  transition: transform var(--transition);
}

.service-card:hover .service-hex-icon {
  transform: scale(1.12);
}

.service-card-title {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 1.55vw, 1.4rem);
  font-weight: 800;
  text-transform: capitalize;
  letter-spacing: 0.15px;
  line-height: 1.25;
  color: #111111;
  padding: 0 8px 0 0;
  margin: 0;
  max-width: 100%;
  text-align: left;
  flex: 1;
  align-self: center;
  transition: color var(--transition), transform var(--transition);
}

.service-card:hover .service-card-title {
  color: var(--color-red-dark);
  transform: translateX(4px);
}

@media (max-width: 900px) {
  .services {
    margin-top: -36px;
    padding-top: 84px;
    overflow: hidden;
    clip-path: polygon(
      0% 2.5%,
      50% 7%,
      100% 2.5%,
      100% 100%,
      0% 100%
    );
    -webkit-clip-path: polygon(
      0% 2.5%,
      50% 7%,
      100% 2.5%,
      100% 100%,
      0% 100%
    );
  }

  .services-parallax-pin,
  .services-parallax-sticky,
  .services-parallax-viewport,
  .services-parallax-track {
    position: static;
    height: auto;
    min-height: 0;
    overflow: visible;
    width: 100%;
    margin: 0;
    padding: 0;
    transform: none !important;
  }

  .services .container {
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
  }

  .services-header {
    margin-bottom: 32px;
    text-align: center;
  }

  .services-parallax-hint {
    display: none !important;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    overflow: visible;
    scroll-snap-type: none;
  }

  .service-card {
    width: 100%;
    min-width: 0;
    height: 300px;
  }

  .service-card-footer {
    padding: 20px 18px 22px;
    gap: 16px;
    background: linear-gradient(
      to top,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(255, 255, 255, 0.88) 55%,
      transparent 100%
    );
  }

  .service-hex {
    width: 72px;
    height: 82px;
  }

  .service-hex-icon {
    width: 44px;
    height: 44px;
  }

  .service-card-title {
    font-size: 1.15rem;
    white-space: normal;
    word-wrap: break-word;
    padding-right: 4px;
  }
}

@media (max-width: 600px) {
  .services {
    clip-path: polygon(
      0% 2%,
      50% 5%,
      100% 2%,
      100% 100%,
      0% 100%
    );
    -webkit-clip-path: polygon(
      0% 2%,
      50% 5%,
      100% 2%,
      100% 100%,
      0% 100%
    );
    padding: 72px 0 64px;
  }

  .services-header {
    margin-bottom: 32px;
  }

  .services-grid {
    gap: 18px;
  }

  .service-card {
    height: 280px;
  }

  .service-card-title {
    font-size: 1.05rem;
    line-height: 1.35;
  }
}
