/* TMS process — Ahead Mind "How Care Works" layout, Westwood theme */
:root {
  --how-accent: #33b8b3;
  --how-accent-deep: #2a9e9a;
  --how-accent-soft: rgba(51, 184, 179, 0.14);
  --how-surface: #ffffff;
  --how-ink: #1c1c22;
  --how-text-muted: #6b6b6b;
  --how-border: rgba(28, 28, 34, 0.08);
  --how-shadow-card: 0 1px 2px rgba(38, 36, 31, 0.04), 0 12px 32px rgba(38, 36, 31, 0.06);
  --how-radius-lg: 28px;
  --how-radius-card: 1.6rem;
  --how-font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
  --how-font-body: 'DM Sans', 'Geist', Inter, system-ui, sans-serif;
  --how-max-width: 1180px;
  --how-gutter: clamp(1rem, 4vw, 3.5rem);
}

#services.how-tms-section {
  padding: 5rem 0;
  font-family: var(--how-font-body);
  color: var(--how-ink);
  background: #fff;
}

#services.how-tms-section .how-tms-container {
  width: min(var(--how-max-width), 100% - var(--how-gutter) * 2);
  margin-inline: auto;
}

#services.how-tms-section .pricing-visual {
  position: relative;
  height: 38rem;
  max-width: 72rem;
  margin-inline: auto;
}

#services.how-tms-section .pricing-visual .split-image {
  position: absolute;
  inset: 0;
  border-radius: var(--how-radius-lg);
  overflow: hidden;
  aspect-ratio: auto;
  background: #e8eef0;
}

#services.how-tms-section .pricing-visual .split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

#services.how-tms-section .pricing-visual .split-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(28, 28, 34, 0.55) 0%, rgba(28, 28, 34, 0.2) 45%, rgba(28, 28, 34, 0.35) 100%);
  pointer-events: none;
}

#services.how-tms-section .pricing-how-overlay {
  position: relative;
  z-index: 2;
  padding: 1.25rem;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

#services.how-tms-section .pricing-how-overlay .section-label,
#services.how-tms-section .pricing-how-overlay .section-title,
#services.how-tms-section .pricing-how-overlay .section-lead {
  pointer-events: auto;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

#services.how-tms-section .section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--how-accent);
  margin: 0 0 0.75rem;
}

#services.how-tms-section .section-title {
  font-family: var(--how-font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 350;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

#services.how-tms-section .section-lead {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 28rem;
  margin: 0;
  line-height: 1.55;
}

#services.how-tms-section .how-float-cards {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: auto;
  pointer-events: auto;
  width: 100%;
  flex: 0 0 auto;
  height: 22.5rem;
  max-height: 22.5rem;
  overflow: hidden;
}

#services.how-tms-section .how-step-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  height: 100%;
}

#services.how-tms-section .how-step-item {
  background: var(--how-surface);
  border: 1px solid var(--how-border);
  border-radius: var(--how-radius-card);
  box-shadow: var(--how-shadow-card);
  transition: border-color 0.18s ease;
  overflow: hidden;
  flex-shrink: 0;
}

#services.how-tms-section .how-step-item.open {
  border-color: rgba(51, 184, 179, 0.45);
}

#services.how-tms-section .how-step-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

#services.how-tms-section .how-step-trigger-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

#services.how-tms-section .how-step-title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--how-ink);
  transition: color 0.15s;
}

#services.how-tms-section .how-step-trigger:hover .how-step-title,
#services.how-tms-section .how-step-item.open .how-step-title {
  color: var(--how-accent-deep);
}

#services.how-tms-section .how-float-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--how-accent-soft);
  color: var(--how-accent-deep);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

#services.how-tms-section .how-step-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--how-text-muted);
  transition: transform 0.28s ease, color 0.15s;
}

#services.how-tms-section .how-step-item.open .how-step-icon {
  transform: rotate(180deg);
  color: var(--how-accent-deep);
}

#services.how-tms-section .how-step-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

#services.how-tms-section .how-step-item.open .how-step-panel,
#services.how-tms-section .how-step-panel.is-active {
  grid-template-rows: 1fr;
}

#services.how-tms-section .how-step-panel-inner {
  overflow: hidden;
  min-height: 0;
}

#services.how-tms-section .how-step-panel p {
  font-size: 0.9375rem;
  color: var(--how-text-muted);
  line-height: 1.55;
  padding: 0 1.25rem 1.15rem;
  margin: 0;
}

#services.how-tms-section .how-tms-faq {
  margin-top: 4rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.tms-faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tms-faq-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
}

.tms-faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  font-family: 'Geist', 'DM Sans', Inter, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  color: #0f172a;
  cursor: pointer;
  transition: color 0.15s ease;
}

.tms-faq-trigger:hover {
  color: #2a9e9a;
}

.tms-faq-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: #64748b;
  transition: transform 0.28s ease, color 0.15s ease;
}

.tms-faq-item.open .tms-faq-icon {
  transform: rotate(180deg);
  color: #2a9e9a;
}

.tms-faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.35s ease, opacity 0.28s ease;
}

.tms-faq-panel-inner {
  overflow: hidden;
  min-height: 0;
}

.tms-faq-panel-inner p {
  margin: 0;
  padding: 0 1.5rem 1rem;
  font-family: 'Geist', 'DM Sans', Inter, system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #475569;
}

.tms-faq-item.open .tms-faq-panel {
  grid-template-rows: 1fr;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .tms-faq-panel,
  .tms-faq-icon {
    transition: none;
  }
}

@media (min-width: 768px) {
  #services.how-tms-section .pricing-visual {
    height: 40rem;
  }

  #services.how-tms-section .pricing-how-overlay {
    padding: 2rem;
    justify-content: space-between;
  }

  #services.how-tms-section .how-float-cards {
    gap: 0.75rem;
    padding-top: 2rem;
    max-width: 26rem;
    height: 23rem;
    max-height: 23rem;
  }

  #services.how-tms-section .how-step-list {
    gap: 0.75rem;
  }

  #services.how-tms-section .how-step-trigger {
    padding: 1.2rem 1.35rem;
  }

  #services.how-tms-section .how-step-title {
    font-size: 1.125rem;
  }

  #services.how-tms-section .how-float-step {
    width: 2.125rem;
    height: 2.125rem;
    font-size: 0.8125rem;
  }

  #services.how-tms-section .how-step-panel p {
    font-size: 1rem;
  }
}

@media (max-width: 767px) {
  #services.how-tms-section {
    padding: 3.5rem 0;
  }

  #services.how-tms-section .pricing-how-overlay .section-lead {
    line-height: 1.6;
    max-width: none;
  }

  #services.how-tms-section .how-float-cards {
    margin-top: 0;
    gap: 1rem;
    height: 23.5rem;
    max-height: 23.5rem;
  }

  #services.how-tms-section .how-step-list {
    gap: 0.875rem;
  }

  #services.how-tms-section .how-step-item {
    border-radius: 1.25rem;
  }

  #services.how-tms-section .how-step-trigger {
    padding: 1.1rem 1.15rem;
  }

  #services.how-tms-section .how-step-title {
    font-size: 1rem;
  }

  #services.how-tms-section .how-step-panel p {
    font-size: 0.9375rem;
    line-height: 1.65;
  }
}

@media (prefers-reduced-motion: reduce) {
  #services.how-tms-section .how-step-panel {
    transition: none;
  }

  #services.how-tms-section .how-step-icon {
    transition: none;
  }
}
