/* ==========================================================================
   SECTION-SERVICES.CSS — Scroll-driven tabs
   ========================================================================== */

.services {
  height: 100vh;
  overflow: hidden;
  padding: var(--space-section-v) var(--space-section-h);
}

.services > .container-fluid {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0;
}

.services__layout {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 80vh;
  margin: auto 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  background-color: #154de8;
  background: linear-gradient(102deg, #00FFEA -39.45%, #004CEF 83.06%);
}

.services__left-panel {
  padding: clamp(32px, 3.5vw, 52px) clamp(48px, 8vw, 128px) clamp(28px, 3.5vw, 44px) clamp(40px, 5vw, 80px);
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: start;
  gap: clamp(16px, 2vw, 24px);
  overflow: hidden;
}

.services__eyebrow {
  font-family: var(--font-base);
  font-weight: 700;
  font-size: 14px;
  line-height: 32px;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: -0.07px;
}

/* --------------------------------------------------------------------------
   Tabs container: active heading + inactive pill buttons
   -------------------------------------------------------------------------- */
.services__tabs-container {
  display: flex;
  flex-direction: column;
  justify-content: start;
  gap: 14px;
  min-height: 0;
  margin-top: 0;
}

.services__tabs {
  display: flex;
  flex-direction: column;
  align-content: start;
  gap: 6px;
}

/* Each inactive tab is a pill button */
.services__tab {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid #1a1a1a;
  border-radius: var(--radius-tag); /* 11px */
  font-family: var(--font-base);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.2;
  color: #252525;
  cursor: pointer;
  user-select: none;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease, font-size 0.28s ease, line-height 0.28s ease, padding 0.28s ease, border-color 0.28s ease;
  transform-origin: left center;
  will-change: transform, opacity;
}

.services__tab:hover {
  background: rgba(0, 0, 0, 0.08);
}

.services__tab--active {
  min-height: auto;
  padding: 0;
  border-color: transparent;
  border-radius: 0;
  font-weight: 700;
  font-size: clamp(44px, 5.2vw, 68px);
  line-height: 0.92;
  color: #1a1a1a;
  background: transparent;
  pointer-events: none;
}

.services__tab--active:hover {
  background: transparent;
}

/* --------------------------------------------------------------------------
   Case studies box
   -------------------------------------------------------------------------- */
.services__cases {
  border: 1px solid var(--color-white);
  border-radius: var(--radius-stat-outer); /* 20px */
  padding: clamp(18px, 2vw, 28px) clamp(28px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: min(100%, 760px);
  margin-top: 0;
  min-height: 0;
  justify-content: flex-start;
  background: transparent;
}

.services__cases-title {
  font-family: var(--font-base);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  color: var(--color-white);
  letter-spacing: -0.32px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.services__cases-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(100%, 420px);
}

/* Per-tab panels: all content lives in HTML, only the active group shows */
.services__cases-list:not(.is-active),
.services__description:not(.is-active),
.services__project-img:not(.is-active) {
  display: none;
}

.services__case-item {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.services__case-name {
  font-family: var(--font-base);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  color: var(--color-white);
  letter-spacing: -0.32px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.services__case-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-base);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.2;
  color: var(--color-white);
  text-decoration: underline;
  letter-spacing: -0.28px;
  white-space: nowrap;
  text-decoration-skip-ink: none;
}

/* First case: link text uses dark color per Figma (#07192a) */
.services__case-item:first-child .services__case-link {
  color: #07192a;
}

.services__case-arrow {
  flex-shrink: 0;
  display: inline-block;
}

.services__right-panel {
  position: relative;
  height: 100%;
  overflow: clip;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
}

/* Image — displayed in flow, z-index 2 so it sits above blue card */
.services__project-img-wrap {
  position: absolute;
  z-index: 2;
  top: 0;
  right: clamp(24px, 4vw, 56px);
  margin-top: clamp(-64px, -4vw, -24px);
  width: min(100%, 820px);
  pointer-events: none;
  will-change: transform;
}

.services__project-img {
  width: 100%;
  height: clamp(320px, 40vw, 560px);
  object-fit: contain;
  object-position: right top;
  display: block;
  background: transparent;
}

/* Blue card — taller than the panel, anchored to bottom, z-index 1 */
.services__blue-card {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100%;
  padding: clamp(300px, 34vw, 460px) clamp(36px, 9vw, 120px) clamp(48px, 6vw, 72px) clamp(40px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  background: transparent;
}

.services__description-wrap {
  width: 100%;
  margin-top: auto;
}

.services__description {
  font-family: var(--font-base);
  font-weight: 400;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.15;
  color: var(--color-white);
  letter-spacing: -0.08px;
  max-width: 560px;
  margin-left: auto;
}

.services__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 0;
  width: 100%;
}

.services__actions .btn-tuatara--outlined {
  box-shadow: none;
}

@media (max-width: 1199px) {
  .services {
    padding-top: 96px;
    padding-bottom: 96px;
  }

  .services__left-panel {
    padding-top: 36px;
    padding-right: 64px;
    padding-bottom: 28px;
  }

  .services__blue-card {
    padding-right: 64px;
    padding-left: 40px;
  }
}

@media (max-width: 991px) {
  .services {
    height: auto;
    padding: 72px 24px;
  }

  .services > .container-fluid {
    display: block;
    height: auto;
  }

  .services__layout {
    height: auto;
  }

  .services__left-panel {
    order: 1;
    padding: 40px 24px;
    grid-template-rows: auto auto auto;
  }

  .services__tabs {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

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

  .services__tab {
    flex: 0 0 auto;
    align-self: auto;
    min-height: 38px;
    padding: 9px 16px;
    font-size: 15px;
    line-height: 1.2;
    border-radius: var(--radius-tag);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }

  .services__tab--active {
    min-height: 38px;
    padding: 9px 16px;
    border-radius: var(--radius-tag);
    border: 1px solid transparent;
    font-size: 15px !important;
    line-height: 1.2 !important;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.15) !important;
    color: #1a1a1a !important;
  }

  .services__tab--active:hover {
    background: rgba(0, 0, 0, 0.15) !important;
  }

  .services__cases {
    width: 100%;
    min-height: 0;
  }

  .services__cases-list {
    width: 100%;
  }

  .services__right-panel {
    order: 2;
    background: transparent;
    /* margin-top: 32px; */
  }

  .services__project-img-wrap {
    position: relative;
    top: auto;
    right: auto;
    margin-top: -24px;
    width: 100%;
    padding: 24px 24px 0;
  }

  .services__project-img {
    height: 280px;
    object-position: center top;
  }

  .services__blue-card {
    min-height: auto;
    padding: 24px 24px 40px;
  }

  .services__description {
    max-width: none;
    margin-left: 0;
  }

  .services__actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .services__layout {
    display: flex;
    flex-direction: row;
  }

  .services__left-panel {
    width: 50%;
  }

  .services__right-panel {
    width: 50%;
    margin-top: 0;
  }

  .services__project-img {
    height: clamp(240px, 30vw, 320px);
  }
}

@media (max-width: 767.98px) {
  .services__tab {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 14px;
  }

  .services__tab--active {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 14px !important;
  }

  .services__case-name,
  .services__cases-title,
  .services__case-link,
  .services__description {
    font-size: 16px;
  }

  .services__right-panel {
    /* margin-top: 24px; */
  }

  .services__project-img-wrap {
    margin-top: 0;
    padding: 16px 16px 0;
  }

  .services__project-img {
    height: 200px;
  }

  .services__blue-card {
    padding: 20px 16px 32px;
  }

  .services__description {
    font-size: 15px;
  }

  .services__actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .services__actions .btn-tuatara {
    width: 100%;
    justify-content: center;
  }
}
