/* ==========================================================================
   06 · Services ("What We Do")
   Three pillars with a gradient-border glow on hover/focus, and three detail modals
   (Flight / MRO / Training). Behaviour: assets/js/sections/services.js
   ========================================================================== */
.services {
  position: relative;
  overflow: hidden;
  padding: 80px 0 48px;
  background: linear-gradient(to bottom, var(--white), var(--sky));
}
@media (min-width: 768px) {
  .services {
    padding: 90px 0 44px;
  }
}

/* ---- Background stage: blurred crimson/sand blurb in a 1440-wide band ---- */
.services__stage {
  position: absolute;
  top: 76px;
  bottom: 0;
  left: 50%;
  width: 1440px;
  overflow: hidden;
  translate: -50% 0;
}
.services__blurb {
  position: absolute;
  top: 70px;
  left: 124px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1856.813px;
  height: 1893.066px;
}
.services__blurb-shape {
  flex: none;
  rotate: 21.8deg;
}
.services__blurb-box {
  position: relative;
  width: 1409.83px;
  height: 1474.917px;
}
.services__blurb-img {
  position: absolute;
  inset: -6.78% 0 -3.59% -5.06%;
}

.services__inner {
  position: relative;
}

/* ---- Heading row ---- */
.services__head {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 1024px) {
  .services__head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}
.services__eyebrow {
  color: var(--royal);
}
.services__title {
  margin-top: 28px;
  font-weight: var(--fw-regular);
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--navy);
}
@media (min-width: 768px) {
  .services__title {
    font-size: 64px;
    line-height: 76px;
  }
}
.services__text {
  max-width: 406px;
  font-weight: var(--fw-news);
  font-size: 16px;
  line-height: 20px;
  color: var(--royal);
}

/* ---- Pillars grid ---- */
.services__grid {
  display: grid;
  gap: 14px;
  margin-top: 40px;
}
/* The item holds the crimson → sky gradient that shows through the pillar's border on hover. */
.services__item {
  position: relative;
  min-width: 0;
  border-radius: 20px;
}
.services__item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--crimson), var(--sky));
  opacity: 0;
  transition: opacity 0.6s var(--ease-smooth);
}
@media (min-width: 768px) {
  .services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 52px;
  }
}
@media (min-width: 1024px) {
  .services__grid {
    display: flex;
    min-height: 690px;
  }
  .services__item {
    flex: 1 1 0%;
  }
}

/* ---- Pillar card ---- */
.services__pillar {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  overflow: hidden;
  border: 6px solid #f5f5f5;
  border-radius: 20px;
  background: var(--white);
  /* Keep the white fill inside the border so the item's gradient can show through it. */
  background-clip: padding-box;
  transition:
    border-color 0.6s var(--ease-smooth),
    box-shadow 0.6s var(--ease-smooth);
}
/* Hover (mouse only, so taps don't stick) and keyboard focus: the grey border cross-fades
   into the gradient, and a soft sky glow appears. No lift, no width change. */
.services__item:focus-within::before {
  opacity: 1;
}
.services__item:focus-within .services__pillar {
  border-color: transparent;
  box-shadow: 0 28px 56px -28px rgba(0, 131, 213, 0.45);
}
@media (hover: hover) {
  .services__item:hover::before {
    opacity: 1;
  }
  .services__item:hover .services__pillar {
    border-color: transparent;
    box-shadow: 0 28px 56px -28px rgba(0, 131, 213, 0.45);
  }
}
@media (min-width: 768px) {
  .services__pillar {
    padding: 32px;
  }
}

/* Header photo (Figma crop in --l/--w/--h) faded to white (--fade-from/--fade-to) */
.services__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.services__photo {
  position: absolute;
  top: 0;
  left: var(--l);
  width: var(--w);
  height: var(--h);
}
.services__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: top;
  transition: scale 1.6s var(--ease-smooth);
}
.services__pillar:focus-within .services__photo img {
  scale: 1.06;
}
@media (hover: hover) {
  .services__pillar:hover .services__photo img {
    scale: 1.06;
  }
}
@media (prefers-reduced-motion: reduce) {
  .services__pillar:is(:hover, :focus-within) .services__photo img {
    scale: 1;
  }
}
.services__fade {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0) var(--fade-from), #fff var(--fade-to));
}

.services__icon {
  position: relative;
}
.services__icon-flight {
  position: relative;
  display: block;
  width: 60px;
  height: 60px;
}
.services__icon-ring {
  position: absolute;
  inset: 0;
}
.services__icon-plane {
  position: absolute;
  top: 18px;
  left: 17.67px;
}
.services__icon-img {
  width: 60px;
  height: 60px;
}

.services__body {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 20px;
  margin-top: 60px;
}
.services__intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.services__heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.services__chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(137, 21, 56, 0.08);
  font-size: 12px;
  line-height: 16px;
  color: var(--crimson);
}
.services__pillar-title {
  font-weight: var(--fw-regular);
  font-size: 28px;
  line-height: 34px;
  letter-spacing: -0.03em;
  color: var(--navy);
}
.services__desc {
  font-weight: var(--fw-news);
  font-size: 14px;
  line-height: 18px;
  color: #797c80;
}

.services__stats {
  display: flex;
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--white);
}
.services__stat {
  display: flex;
  flex: 1;
  flex-direction: column-reverse;
  align-items: center;
  min-width: 0;
  padding: 10px 4px;
  background: #f5f5f5;
}
.services__stat-label {
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
  color: var(--muted);
}
.services__stat-label--upper {
  text-transform: uppercase;
}
.services__stat-value {
  font-size: 20px;
  line-height: 26px;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.services__caps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.services__cap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  line-height: 20px;
  color: var(--navy);
}
.services__cap-mark {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 8.485px;
  height: 8.485px;
}
.services__cap-mark > span {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background-image: var(--gradient-brand);
  rotate: -45deg;
}
.services__action {
  margin-top: auto;
  padding-top: 20px;
}

/* ==========================================================================
   Detail modal shell (role="dialog" wrapper > backdrop + panel)
   Mobile: bottom sheet. md+: centred card.
   ========================================================================== */
.service-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.service-modal[hidden] {
  display: none;
}
@media (min-width: 768px) {
  .service-modal {
    align-items: center;
    padding: 24px;
  }
}
@media (min-width: 1280px) {
  .service-modal {
    padding: 40px;
  }
}
.service-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}
.service-modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1328px;
  max-height: calc(100dvh - 16px);
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  background: var(--white);
  box-shadow:
    0 24px 48px -32px rgba(54, 122, 229, 0.28),
    0 1px 2px 0 rgba(48, 109, 204, 0.04);
}
@media (min-width: 768px) {
  .service-modal__panel {
    max-height: calc(100dvh - 48px);
    border-radius: 20px;
  }
}
.service-modal__header {
  display: flex;
  flex-shrink: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 16px;
}
@media (min-width: 768px) {
  .service-modal__header {
    align-items: center;
    padding: 32px;
  }
}
.service-modal__heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.service-modal__eyebrow {
  font-weight: var(--fw-news);
  font-size: 12px;
  line-height: 16px;
  color: var(--royal);
}
.service-modal__title {
  font-weight: var(--fw-regular);
  font-size: 28px;
  line-height: 34px;
  letter-spacing: -0.03em;
  color: var(--navy);
}
@media (min-width: 768px) {
  .service-modal__eyebrow {
    font-size: 16px;
    line-height: 20px;
  }
  .service-modal__title {
    font-size: 40px;
    line-height: 48px;
  }
}
.service-modal__close {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
@media (min-width: 768px) {
  .service-modal__close {
    width: 60px;
    height: 60px;
  }
}
.service-modal__close-ring {
  position: absolute;
  inset: -0.83%;
  width: 101.66%;
  height: 101.66%;
  max-width: none;
}
.service-modal__close-x {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: rotate 0.5s var(--ease-out-expo);
}
.service-modal__close-x img {
  width: 16.0833px;
  height: 16.0833px;
}
.service-modal__close:hover .service-modal__close-x {
  rotate: 90deg;
}
.service-modal__body {
  flex: 1;
  min-height: 0;
  padding: 0 20px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (min-width: 768px) {
  .service-modal__body {
    padding: 0 32px 32px;
  }
}

/* ---- Shared detail pieces ---- */
.detail-text {
  font-weight: var(--fw-news);
  font-size: 14px;
  line-height: 18px;
  color: var(--muted);
}
.detail-heading {
  font-weight: var(--fw-regular);
  font-size: 20px;
  line-height: 26px;
  letter-spacing: -0.02em;
  color: var(--crimson);
}
.detail-label {
  flex-shrink: 0;
  font-weight: var(--fw-regular);
  font-size: 12px;
  line-height: 16px;
  color: var(--crimson);
  text-transform: uppercase;
}
.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-chip {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 16px;
  color: var(--navy);
}
.detail-chip--outline {
  border: 1px solid #e3e8f0;
}
.detail-chip--soft {
  background: var(--surface-soft);
}
.detail-chip--navy {
  background: var(--navy);
  color: var(--white);
}
/* Brand-gradient icon tile (22px icon) */
.detail-badge {
  display: flex;
  flex-shrink: 0;
  padding: 11px;
  border-radius: 14px;
  background: linear-gradient(90deg, #891538 0%, #204989 55%, #31b4e7 100%);
}
/* Brand-gradient stats strip */
.detail-stats {
  display: flex;
  padding-block: 8px;
  border-radius: 24px;
  background: linear-gradient(90deg, #891538 0%, #204989 55%, #31b4e7 100%);
  color: var(--white);
}
.detail-stats__item {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 12px;
}
.detail-stats__item + .detail-stats__item {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}
.detail-stats__value {
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.03em;
}
.detail-stats__label {
  font-weight: var(--fw-news);
  font-size: 12px;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.8);
}
@media (min-width: 640px) {
  .detail-stats__item {
    padding-inline: 20px;
  }
  .detail-stats__value {
    font-size: 40px;
    line-height: 48px;
  }
  .detail-stats__label {
    font-size: 14px;
    line-height: 18px;
  }
}
/* Photo card with a cover image that zooms on hover */
.detail-photo {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 24px;
}
.detail-photo__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 1.2s var(--ease-out-expo);
}
.detail-photo:hover .detail-photo__img {
  scale: 1.04;
}
.detail-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border: 1px solid #e3e8f0;
  border-radius: 24px;
}
@media (min-width: 768px) {
  .detail-card {
    padding: 32px;
  }
}
.detail-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.detail-card__head-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.detail-card__title {
  font-weight: var(--fw-regular);
  font-size: 20px;
  line-height: 26px;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.detail-card__sub {
  font-weight: var(--fw-news);
  font-size: 14px;
  line-height: 18px;
  color: var(--muted);
}

/* ---- Flight Services detail ---- */
.flight-detail {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.flight-detail__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.flight-detail__text {
  max-width: 640px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
.flight-detail__cta {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 6px 0 22px;
  border-radius: 999px;
  background: var(--navy);
  font-weight: var(--fw-news);
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--white);
  transition:
    background-color 0.5s var(--ease-smooth),
    box-shadow 0.5s var(--ease-smooth);
}
.flight-detail__cta:hover {
  background-color: #2a5697;
  box-shadow: 0 10px 24px -10px rgba(32, 73, 137, 0.7);
}
.flight-detail__cta-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: var(--white);
  transition: translate 0.5s var(--ease-smooth);
}
.flight-detail__cta:hover .flight-detail__cta-arrow {
  translate: 3px 0;
}
.flight-detail__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.flight-detail__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 32px 14px 28px;
  text-align: center;
}
.flight-detail__media {
  position: relative;
  flex-shrink: 0;
  width: 176px;
  height: 176px;
}
.flight-detail__ring {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition:
    opacity 0.7s var(--ease-out-expo),
    rotate 0.7s var(--ease-out-expo);
}
.flight-detail__item:hover .flight-detail__ring {
  opacity: 1;
  rotate: 30deg;
}
.flight-detail__photo {
  position: absolute;
  inset: 19px;
  overflow: hidden;
  border-radius: 50%;
}
.flight-detail__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.7s var(--ease-out-expo);
}
.flight-detail__item:hover .flight-detail__photo img {
  scale: 1.06;
}
.flight-detail__gap {
  height: 8px;
}
.flight-detail__tag {
  font-size: 12px;
  line-height: 16px;
  color: var(--royal);
  text-transform: uppercase;
}
.flight-detail__title {
  font-size: 16px;
  line-height: 20px;
  color: var(--navy);
}
.flight-detail__desc {
  width: 200px;
  max-width: 100%;
  font-weight: var(--fw-news);
  font-size: 14px;
  line-height: 18px;
  color: var(--muted);
}
/* 480px is an extra breakpoint used by the design for the 2-column grid. */
@media (min-width: 480px) {
  .flight-detail__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 768px) {
  .flight-detail {
    gap: 32px;
  }
  .flight-detail__intro {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .flight-detail__text {
    font-size: 17px;
  }
  .flight-detail__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .flight-detail__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* ---- MRO detail ---- */
.mro-detail,
.mro-detail__row,
.mro-detail__col,
.mro-detail__block,
.mro-detail__cards {
  display: flex;
  flex-direction: column;
}
.mro-detail {
  gap: 32px;
}
.mro-detail__top {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.mro-detail__row {
  gap: 32px;
}
.mro-detail__col {
  flex: 1;
  min-width: 0;
}
.mro-detail__col--copy {
  gap: 32px;
}
.mro-detail__col--media {
  gap: 12px;
}
.mro-detail__block {
  gap: 20px;
}
.mro-detail__block--fleet {
  padding-top: 4px;
}
.mro-detail__statement {
  max-width: 425px;
}
.mro-detail__hangar {
  gap: 4px;
  height: 240px;
  padding: 24px;
}
.mro-detail__hangar-shade {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to bottom, rgba(18, 40, 77, 0) 39.167%, rgba(18, 40, 77, 0.85));
}
.mro-detail__hangar-title,
.mro-detail__hangar-caption {
  position: relative;
  color: var(--white);
}
.mro-detail__hangar-title {
  font-size: 16px;
  line-height: 20px;
}
.mro-detail__hangar-caption {
  font-weight: var(--fw-news);
  font-size: 14px;
  line-height: 18px;
}
.mro-detail__cards {
  gap: 20px;
}
.mro-detail__maintenance {
  flex: 1;
  min-width: 0;
}
.mro-detail__groups {
  display: grid;
  gap: 24px;
}
.mro-detail__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 14px;
  border-left: 2px solid var(--sky);
}
.mro-detail__group-title {
  font-size: 16px;
  line-height: 20px;
  color: var(--navy);
}
.mro-detail__footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
}
@media (min-width: 640px) {
  .mro-detail__groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mro-detail__footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
@media (min-width: 768px) {
  .mro-detail__hangar {
    height: 300px;
  }
}
@media (min-width: 1024px) {
  .mro-detail__row {
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }
  .mro-detail__col--copy {
    gap: 40px;
  }
  .mro-detail__cards {
    flex-direction: row;
  }
  .mro-detail__groups {
    grid-template-columns: repeat(2, minmax(0, 330px));
  }
  .mro-detail__repair {
    flex-shrink: 0;
    width: 420px;
    min-height: 242px;
  }
}

/* ---- Training detail ---- */
.training-detail {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.training-detail__row {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.training-detail__overview {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.training-detail__stats {
  align-items: center;
  overflow: hidden;
}
.training-detail__stats .detail-stats__item {
  padding: 12px 8px 12px 16px;
}
.training-detail__sim {
  flex: 1;
  gap: 12px;
  min-width: 0;
  min-height: 360px;
  padding: 24px;
}
.training-detail__sim-shade {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to bottom, rgba(18, 40, 77, 0.92), rgba(18, 40, 77, 0) 60%);
}
.training-detail__sim-tags {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.training-detail__sim-tag {
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  line-height: 16px;
  color: var(--white);
}
.training-detail__sim-title {
  position: relative;
  font-weight: var(--fw-regular);
  font-size: 24px;
  line-height: 30px;
  letter-spacing: -0.03em;
  color: var(--white);
}
.training-detail__sim-body {
  position: relative;
  max-width: 600px;
  font-weight: var(--fw-news);
  font-size: 16px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.85);
}
.training-detail__programs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px 20px 12px;
  border-radius: 24px;
  background: var(--surface-soft);
}
.training-detail__program {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 16px;
}
.training-detail__program + .training-detail__program {
  border-top: 1px solid #e3e8f0;
}
.training-detail__program-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.training-detail__program-title {
  font-size: 16px;
  line-height: 20px;
  color: var(--navy);
}
.training-detail__courses {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}
.training-detail__courses .detail-chips {
  flex: 1;
}
@media (min-width: 640px) {
  .training-detail__stats .detail-stats__item {
    padding-block: 24px;
    padding-left: 28px;
  }
  .training-detail__courses {
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }
}
@media (min-width: 768px) {
  .training-detail__sim {
    padding: 32px;
  }
  .training-detail__sim-title {
    font-size: 28px;
    line-height: 34px;
  }
  .training-detail__programs {
    padding-inline: 28px;
    padding-top: 28px;
  }
}
@media (min-width: 1024px) {
  .training-detail__row {
    flex-direction: row;
  }
  .training-detail__row:first-child {
    align-items: center;
    gap: 40px;
  }
  .training-detail__stats {
    flex-shrink: 0;
    width: 560px;
    height: 92px;
  }
  .training-detail__sim {
    height: 440px;
  }
  .training-detail__programs {
    flex-shrink: 0;
    width: 480px;
  }
}
