/* ==========================================================================
   Section: Areas — Left list + Right content panel with hover switch
   ========================================================================== */

.section-areas {
  background-color: var(--bg-primary);
  padding-block: 120px;
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  align-items: flex-start;   /* top-align the layout in the tall section */
}
.section-areas > .container { width: 100%; }

.areas-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* right panel = 50% (2 of 4 cols) */
  gap: 60px;
  align-items: start;
}

/* ── Left: Areas list ──────────────────────────────────────────────────── */
.areas-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Header above the list: service pill + tagline */
.areas-list__head { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.areas-list__pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(28, 27, 31, 0.2);
  font-size: var(--body-xs);
  color: var(--text-title);
}
.areas-list__lead {
  font-size: var(--title-xs);
  line-height: var(--title-xs-lh);
  letter-spacing: -0.01em;
  color: var(--text-title);
}

.areas-list__item { cursor: pointer; padding: 0; }
.areas-list__row { display: flex; align-items: center; }

/* Counter pill — slides in on hover/active and pushes the title forward */
.areas-list__counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  border: 1px solid rgba(28, 27, 31, 0.35);
  border-radius: 100px;
  font-size: var(--body-xxs);
  line-height: 1;
  color: var(--text-body);
  white-space: nowrap;
  transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.4s ease, margin 0.4s ease;
}
.areas-list__item:hover .areas-list__counter,
.areas-list__item.is-active .areas-list__counter {
  max-width: 64px;
  opacity: 1;
  padding: 4px 10px;
  margin-right: 14px;
}

.areas-list__title {
  font-size: var(--title-md);
  font-weight: 400;
  line-height: var(--title-md-lh);
  color: var(--text-muted);          /* muted by default */
  margin: 0;
  transition: color 0.3s ease;
}
.areas-list__item:hover .areas-list__title,
.areas-list__item.is-active .areas-list__title { color: var(--text-title); }

/* Subtitle fades in below on hover/active */
.areas-list__subtitle {
  font-size: var(--title-xs);
  font-weight: 400;
  line-height: var(--title-xs-lh);
  letter-spacing: -0.32px;
  color: var(--text-body);
  margin: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.35s ease, margin 0.4s ease;
}
.areas-list__item:hover .areas-list__subtitle,
.areas-list__item.is-active .areas-list__subtitle {
  max-height: 140px;
  opacity: 1;

}

/* ── Right: Content panel ──────────────────────────────────────────────── */
/* Panels are stacked in one grid cell so they crossfade; the cell auto-sizes
   to the tallest panel (no clipping, no JS height needed). */
.areas-panel {
  display: grid;
  min-height: 400px;
}

.areas-panel__item {
  grid-area: 1 / 1;                 /* overlap all panels in the same cell */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}
.areas-panel__item.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Intro/description — Title XS (32/45, -0.32px) */
.areas-panel__description {
  font-size: var(--title-xs);
  font-weight: 400;
  line-height: var(--title-xs-lh);
  letter-spacing: -0.32px;
  color: var(--text-body);
  margin-bottom: 60px;
}

/* What We Do / How We Work / How It Creates Value — 2-column grid */
.areas-panel__sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 40px;
}

.areas-panel__section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Section heading — Body Large (24/36, -0.24px), dark */
.areas-panel__section-title {
  font-size: var(--body-lg);
  font-weight: 400;
  line-height: var(--body-lg-lh);
  letter-spacing: -0.24px;
  color: var(--text-title);
  margin: 0;
}

/* Section body — Body Small (16/24) */
.areas-panel__section-body {
  font-size: var(--body-sm);
  line-height: var(--body-sm-lh);
  color: var(--text-body);
  margin: 0;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .areas-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 767px) {
  .section-areas {
    padding-block: 60px;
  }

  .areas-layout {
    gap: 30px;
  }

  .areas-list {
    flex-direction: row;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }

  .areas-list__item {
    flex-shrink: 0;
    min-width: 150px;
  }

  .areas-panel {
    min-height: auto;
  }

  .areas-panel__sections {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}
