/* ==========================================================================
   SERVICES PAGE — styles specific to services/index.html only.
   The tab pills themselves (.services-tabs__nav/__btn/__slider/__panel)
   are already fully styled in home.css and are reused as-is; the only
   new thing here is the sticky wrapper, plus the detailed row layout
   which the homepage's compact service cards don't need.
   ========================================================================== */

/* ==========================================================================
   1. STICKY CATEGORY SWITCHER
   ========================================================================== */
/* Services Tabs */
.services-tabs {
  max-width: 1100px;
  margin: 0 auto;
}

.services-tabs__nav {
  position: relative;
  display: flex;
  width: fit-content;
  max-width: 100%;
  background: var(--color-green-200);
  border-radius: var(--radius-full);
  padding: 4px;
  margin: 0 auto var(--space-xl);
}

.services-tabs__btn {
  position: relative;
  z-index: 2;
  padding: .65rem 2rem;
  border: none;
  background: transparent;
  color: var(--color-ink-soft);
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: color var(--duration-fast) ease;
  white-space: nowrap;
}

.services-tabs__btn:hover {
  color: var(--color-ink);
}

.services-tabs__btn.active {
  color: var(--color-white);
}

.services-tabs__slider {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: calc(50% - 4px);
  background: var(--gradient-brand);
  border-radius: var(--radius-full);
  transition: transform var(--duration-medium) var(--ease-default);
  z-index: 1;
}

.services-tabs__slider[data-active="operations"] {
  transform: translateX(100%);
}

.services-tabs__panels {
  position: relative;
}

.services-tabs__panel {
  display: none;
}

.services-tabs__panel.active {
  display: block;
}

.services-tabs__panel-content {
  padding: 0 .5rem;
}

@media (max-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-tabs__nav {
    display: flex;
    width: fit-content;
    max-width: 100%;
    border-radius: var(--radius-lg);
  }

  .services-tabs__btn {
    flex: 1;
    text-align: center;
    font-size: .8rem;
    padding: .6rem 1rem;
  }

  .services-tabs__slider {
    width: calc(50% - 4px);
  }
}

@media (max-width: 768px) {
  .services-tabs__nav {
    flex-direction: column;
    align-items: center;
    width: min(100%, 22rem);
    background: transparent;
    padding: 0;
    gap: .5rem;
    border-radius: 0;
  }

  .services-tabs__slider {
    display: none;
  }

  .services-tabs__btn {
    width: 100%;
    background: var(--color-mint-100);
    border-radius: var(--radius-sm);
    padding: .6rem 1rem;
    color: var(--color-ink-soft);
    text-align: center;
  }

  .services-tabs__btn.active {
    background: var(--gradient-brand);
    color: var(--color-white);
  }

  .services-tabs__description {
    font-size: var(--fs-body-sm);
    text-align: left;
  }
}


.services-detail {
  padding-top: 2rem;
}

.services-switcher {
  position: sticky;
  top: 3.6rem;
  z-index: 90;
  padding-block: 1rem;
  background: rgba(231, 251, 241, .32);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  border-bottom: 1px solid var(--color-border);
}

/* the pill nav is normally centred with auto margins on the homepage;
   keep it centred here too */
.services-switcher .services-tabs__nav {
  margin: 0 auto;
}

@media (max-width:768px) {
  .services-switcher {
    padding-block: .75rem;
    top: 3.2rem;
  }

}

/* ==========================================================================
   2. DETAILED SERVICE ROWS — icon left, content right
   ========================================================================== */
.service-detail-list {
  display: flex;
  flex-direction: column;
  max-width: 920px;
  margin-inline: auto;
  padding: 4rem 0 1rem;
}

.service-detail {
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding-block: clamp(2rem, 3.5vw, 2.75rem);
  border-bottom: 1px solid var(--color-border);
  scroll-margin-top: calc(var(--header-h) + 4.5rem);
}

.service-detail:first-child {
  padding-top: 0
}

.service-detail:last-child {
  border-bottom: none;
  padding-bottom: 0
}

.service-detail__icon {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--color-mint-100);
  color: var(--color-green-600);
}

.service-detail__icon svg {
  width: 3rem;
  height: 3rem
}

.service-detail__content {
  min-width: 0
}

.service-detail__content h3 {
  margin-bottom: .6rem
}

.service-detail__content>p {
  max-width: 62ch;
  margin-bottom: 1rem;
}

.service-detail__points {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.service-detail__points li {
  position: relative;
  padding-left: 1.1rem;
  font-size: var(--fs-body-sm);
  color: var(--color-ink-soft);
}

.service-detail__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-green-500);
}

/* brief highlight flash when a service is deep-linked to (see services.js) */
.service-detail.is-highlighted .service-detail__icon {
  background: var(--gradient-brand);
  color: var(--color-white);
  transition: background-color .6s ease, color .6s ease;
}

@media (max-width:600px) {
  .service-detail {
    flex-direction: column;
    gap: 1rem
  }
}