/* ==================================================================
   Services page
   Desktop follows the Figma "Services" frame; tablet and mobile reuse
   the homepage/About patterns (same margins, type scale and card
   treatment as the homepage services catalog).
   Header, banner, buttons, CTA and footer come from site.css.
   ================================================================== */

.services-page {
  --page-margin: 6rem;    /* side margin, same as the other pages */
  --section-gap: 7.5rem;  /* space between sections */
  background-color: var(--color-aliceblue);
  color: var(--blue-grey);
  font-family: var(--Body);
  overflow-x: clip;
}

/* Banner photo (component styles in site.css). The exported photo
   already fades to light blue on the left, so the shared wash only
   reinforces it behind the text. */
.page-banner--services {
  --banner-photo: url('./assets/services-banner.webp');
}

/* ------------------------------------------------------------------
   Shared text styles for this page
   ------------------------------------------------------------------ */
.section-eyebrow {
  margin: 0;
  font-family: var(--Headlines);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--Blue-dark);
}
.section-title {
  margin: 0;
  font-family: var(--Headlines);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--Blue-dark);
}

/* ------------------------------------------------------------------
   Page body
   ------------------------------------------------------------------ */
.services-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--section-gap);
  padding: 4.5rem var(--page-margin) var(--section-gap);
}

/* Intro */
.services-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  max-width: 60rem;
  text-align: center;
}
.services-intro__lead {
  margin: 0;
  font-family: var(--Headlines);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--Blue-dark);
}
.services-intro__text {
  margin: 0;
  max-width: 47rem;
  font-size: 1.375rem;
  line-height: 1.925rem;
}

/* One group per category (Vascular, Echocardiography, General) */
.services-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
  width: 100%;
  max-width: 88rem;
}
.services-group__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  width: 100%;
}

/* Card: photo fills the card; translucent white panel on top of it.
   Cards in a row stretch to the tallest one and their buttons align. */
.service-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 6.25rem 1.75rem 1.75rem;
  border-radius: 14px;
  background-color: var(--blue-grey);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card__photo {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.service-card__panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 3rem;
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.9);
}
.service-card__eyebrow {
  margin: 0;
  font-family: var(--Headlines);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--Blue-dark);
}
.service-card__title {
  margin: -0.625rem 0 0; /* eyebrow and title sit close together, as in Figma */
  font-family: var(--Headlines);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--Blue-dark);
}
.service-card__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4rem;
}
.service-card__cta {
  margin-top: auto;   /* pin to the bottom so buttons line up across a row */
  width: 18.9rem;
  max-width: 100%;
}

/* Footer wrapper: same side margins as the page body */
.page-footer {
  padding: 0 var(--page-margin);
}

@media (hover: hover) {
  .service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(9, 128, 247, 0.18);
  }
  .service-card:hover .service-card__photo {
    transform: scale(1.04);
  }
}

/* ------------------------------------------------------------------
   Tablet
   ------------------------------------------------------------------ */
@media screen and (max-width: 1024px) {
  .services-page {
    --page-margin: 2.5rem;
    --section-gap: 5rem;
  }
  .services-body {
    padding-top: 3.5rem;
  }
  .services-intro__lead {
    font-size: 1.625rem;
  }
  .services-intro__text {
    font-size: 1.125rem;
    line-height: 1.6;
  }
  .services-grid {
    gap: 1.5rem;
  }
  .service-card {
    padding: 5rem 1rem 1rem;
  }
  .service-card__panel {
    padding: 2rem 1.75rem;
  }
  .service-card__title {
    font-size: 1.5rem;
  }
}

/* One column once two cards would get too narrow */
@media screen and (max-width: 860px) {
  .services-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .service-card {
    padding-top: 10rem; /* show more of the photo when cards are full width */
  }
}

/* ------------------------------------------------------------------
   Mobile (same treatment as the homepage services catalog)
   ------------------------------------------------------------------ */
@media screen and (max-width: 600px) {
  .services-page {
    --page-margin: 1.25rem;
    --section-gap: 3.75rem;
  }
  .services-body {
    padding-top: 3rem;
  }
  .section-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
  }
  .section-title {
    font-size: 1.5625rem;
  }
  .services-intro {
    gap: 1.5rem;
  }
  .services-intro__lead {
    font-size: 1.375rem;
  }
  .services-intro__text {
    font-size: 1rem;
    line-height: 1.625rem;
  }
  .services-group {
    gap: 1.75rem;
  }
  .services-grid {
    gap: 2rem;
  }
  .service-card {
    padding: 9rem 0.75rem 0.75rem;
  }
  .service-card__panel {
    padding: 1.75rem 1.25rem;
  }
  .service-card__title {
    font-size: 1.375rem;
  }
  .service-card__cta {
    width: 100%;
    margin-top: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-card,
  .service-card__photo {
    transition: none;
    transform: none !important;
  }
}
