/* Services page-specific styles. */

/* ========== Service cards ========== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.service-card {
  scroll-margin-top: 120px;
  background: var(--charcoal);
  border: 1px solid var(--line);
  padding: 2rem 1.8rem 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--t);
}
.service-card:hover {
  border-color: var(--line-blue);
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(31, 53, 100, 0.18);
}
.service-card .ico {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--blue);
  border: 1px solid var(--line-blue);
  background: rgba(59, 130, 246, 0.06);
}
.service-card .ico svg {
  width: 22px;
  height: 22px;
}
.service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.service-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}
.service-card .more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
}

/* ========== Service modal ========== */
.service-card {
  scroll-margin-top: 120px;
  cursor: pointer;
}

.service-card .more {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  width: fit-content;
}

.service-card:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.service-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.service-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.service-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
}

.service-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: min(860px, 92vh);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.95fr);
  background: linear-gradient(
    180deg,
    rgba(16, 20, 27, 0.98),
    rgba(8, 11, 16, 0.99)
  );
  border: 1px solid rgba(59, 130, 246, 0.28);
  box-shadow:
    0 35px 110px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.service-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(59, 130, 246, 0.45);
  background: rgba(0, 0, 0, 0.52);
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.service-modal-media {
  min-height: 620px;
  background: var(--graphite);
  position: relative;
}

.service-modal-main-media {
  width: 100%;
  height: 100%;
  min-height: 620px;
}

.service-modal-main-media .ph-stripes {
  width: 100%;
  height: 100%;
  min-height: 620px;
}

.service-modal-details {
  padding: clamp(1.8rem, 3vw, 3rem);
  overflow-y: auto;
}

.service-modal-details h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  margin-bottom: 1rem;
}

.service-modal-details p {
  color: var(--off);
  line-height: 1.75;
}

.service-modal-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
  margin: 1.6rem 0 1.8rem;
}

.service-modal-lists h3 {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.7rem;
}

.service-modal-lists ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-modal-lists li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.55rem;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.88rem;
}

.service-modal-lists li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  background: var(--blue);
}

.service-modal-cta {
  width: fit-content;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .service-modal-panel {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .service-modal-media,
  .service-modal-main-media,
  .service-modal-main-media .ph-stripes {
    min-height: 360px;
  }

  .service-modal {
    padding: 1rem;
  }
}

@media (max-width: 600px) {
  .service-modal {
    padding: 0.75rem;
  }

  .service-modal-panel {
    max-height: 92vh;
  }

  .service-modal-details {
    padding: 1.45rem;
  }

  .service-modal-lists {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .service-modal-details h2 {
    font-size: clamp(2.1rem, 12vw, 3.2rem);
  }
}

/* ========== Service modal cleanup fixes ========== */
.service-card {
  scroll-margin-top: 120px;
  cursor: pointer;
}

.service-card .more,
.service-more {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  width: fit-content;
}

.service-modal-panel {
  overflow: hidden;
}

.service-modal-details {
  max-height: min(860px, 92vh);
  overflow-y: auto;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.service-modal-cta {
  display: inline-flex;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .service-modal-panel {
    overflow-y: auto;
  }

  .service-modal-details {
    max-height: none;
    overflow: visible;
    padding-bottom: 2rem;
  }
}

@media (max-width: 600px) {
  .service-modal-cta {
    width: 100%;
  }
}

/* ========== Restored services page top sections ========== */
.services-page-hero {
  min-height: 560px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(8, 11, 16, 0.94), rgba(8, 11, 16, 0.72)),
    linear-gradient(180deg, rgba(28, 37, 50, 0.88), rgba(8, 11, 16, 0.96));
  border-bottom: 1px solid rgba(59, 130, 246, 0.28);
  padding: clamp(8rem, 14vh, 12rem) 0 clamp(4rem, 8vh, 7rem);
}

.services-page-hero h1 {
  max-width: 980px;
  font-size: clamp(3.6rem, 7vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  margin: 0;
}

.services-page-hero h1 .blue {
  display: block;
  color: var(--blue);
}

.services-page-hero .hero-copy {
  max-width: 720px;
  margin-top: 1.35rem;
}

.services-overview .section-heading {
  max-width: 880px;
  margin-inline: auto;
}

.services-overview .section-heading h2 {
  max-width: 850px;
  margin-inline: auto;
}

.services-overview .section-heading p {
  max-width: 760px;
  margin-inline: auto;
}

.service-more {
  font-family: inherit;
}

@media (max-width: 980px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services-page-hero {
    min-height: 500px;
  }
}

@media (max-width: 640px) {
  .services-page-hero {
    min-height: auto;
    padding-top: 7.5rem;
  }

  .services-page-hero h1 {
    font-size: clamp(3.1rem, 15vw, 4.8rem);
  }

  .service-grid {
    grid-template-columns: 1fr;
  }
}
