/* ANOPY SERVICES PAGE STYLES */
/* Individual, Group, Corporate wellness services */

/* ============================================
   PAGE INTRO
   ============================================ */

.services__intro {
  padding: var(--space-lg) var(--container-pad);
  background: var(--cream-bg);
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.services__intro h1 {
  font-size: 30px;
  color: var(--navy);
  margin-bottom: var(--space-sm);
  font-family: var(--font-serif);
}

.services__intro p {
  font-size: var(--size-read-lg);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

.services__intro p + p {
  margin-top: var(--space-sm);
}

/* ============================================
   SERVICE TILES
   Side-by-side interactive cards (desktop), collapsing to a
   swipeable, snap-to-card horizontal scroller on mobile — the same
   pattern .why__portraits uses on the homepage.
   ============================================ */

.services__tiles {
  padding: var(--space-lg) var(--container-pad);
  max-width: 1200px;
  margin: 0 auto;
}

.tiles__track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  align-items: stretch;
}

/* Same navy + white treatment as "Why Anopy" on the homepage. */
.service-tile {
  display: flex;
  flex-direction: column;
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 16px;
  overflow: hidden;
  transition: transform var(--dur-hover) var(--ease-slow),
              box-shadow var(--dur-hover) var(--ease-slow);
}

.service-tile:hover,
.service-tile:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(41, 50, 62, 0.14);
}

.service-tile__media {
  aspect-ratio: 4 / 3;
  background: var(--warm-beige);
  overflow: hidden;
}

.service-tile__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-tile__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-md);
  text-align: center;
}

.service-tile__name {
  font-size: var(--size-body-sm);
  color: var(--text-on-dark);
  font-family: var(--font-serif);
  margin-bottom: var(--space-xs);
  /* Reserve two lines so a one-line title (e.g. "Group music
     therapy") and a two-line one (e.g. "Specialized music
     programs") still leave the rest of the card aligned. */
  min-height: calc(1.7em * 2);
  text-wrap: balance;
}

.service-tile__desc {
  font-size: var(--size-read);
  color: var(--text-on-dark);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.service-tile__points {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-md);
  text-align: left;
}

.service-tile__points li {
  font-size: var(--size-read);
  color: var(--text-on-dark);
  padding-left: 24px;
  position: relative;
  margin-bottom: var(--space-xs);
  line-height: 1.5;
}

/* forest-green reads as too low-contrast on navy; terracotta is the
   token palette's designated "small spark" accent and clears the
   3:1 bar WCAG allows for a small graphical glyph like this. */
.service-tile__points li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--terracotta);
  font-weight: 600;
}

.service-tile__body .btn {
  /* Full-width and centered-text rather than shrink-to-fit, so all
     three CTAs match regardless of label length — a shrink-to-fit
     button whose text wraps (e.g. "Book an individual session")
     would otherwise grow to the full card width anyway, while
     shorter single-line labels stayed narrow. */
  margin-top: auto;
  width: 100%;
  text-align: center;
}

/* Below 768px the grid becomes a swipeable, snap-to-card carousel
   instead of stacking the three tiles full-width. */
@media (max-width: 768px) {
  .tiles__track {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: calc(-1 * var(--container-pad));
    margin-right: calc(-1 * var(--container-pad));
    padding: 0 var(--container-pad);
  }

  .tiles__track::-webkit-scrollbar {
    display: none;
  }

  .service-tile {
    flex: 0 0 82%;
    scroll-snap-align: center;
  }
}

/* ============================================
   CTA SECTION
   ============================================ */

.services__cta {
  padding: var(--space-lg) var(--container-pad);
  background: var(--warm-beige);
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.services__cta h2 {
  font-size: var(--size-body-sm);
  color: var(--navy);
  margin-bottom: var(--space-sm);
  font-family: var(--font-serif);
}

.services__cta p {
  font-size: var(--size-read);
  color: var(--text-dark);
  margin-bottom: var(--space-lg);
}

/* Button styles now live in reset.css (shared across every page). */

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .services__intro,
  .services__tiles,
  .services__cta {
    padding: var(--space-md) var(--container-pad);
  }

  .services__intro h1 {
    font-size: 22px;
  }

  .services__cta h2 {
    font-size: var(--size-body-sm);
  }

  .services__intro p,
  .services__cta p {
    font-size: var(--size-read);
  }
}
