/*
 * Optional homepage service-card layouts.
 * All rules are scoped to the existing services grid so other sections remain unchanged.
 */

.services-layout.services-gap--0 { gap: 0 !important; }
.services-layout.services-gap--8 { gap: 8px !important; }
.services-layout.services-gap--12 { gap: 12px !important; }
.services-layout.services-gap--16 { gap: 16px !important; }
.services-layout.services-gap--24 { gap: 24px !important; }

/* Keep each card's existing accent when its position changes. */
.services-layout .services-card--business .primary-button,
.services-layout .services-card--government .primary-button {
  border-color: rgba(255, 255, 255, 0.88) !important;
  background: rgba(4, 17, 34, 0.34) !important;
  color: #fff !important;
}

.services-layout .services-card--business .primary-button:hover,
.services-layout .services-card--business .primary-button:focus-visible,
.services-layout .services-card--government .primary-button:hover,
.services-layout .services-card--government .primary-button:focus-visible {
  border-color: #fff !important;
  background: #fff !important;
  color: var(--navy) !important;
}

.services-layout .services-card--luxury .primary-button {
  border-color: #d9a441 !important;
  background: rgba(0, 0, 0, 0.3) !important;
  color: var(--gold-2) !important;
}

.services-layout .services-card--luxury .primary-button:hover,
.services-layout .services-card--luxury .primary-button:focus-visible {
  border-color: #d9a441 !important;
  background: #d9a441 !important;
  color: var(--navy) !important;
}

.services-layout .services-card--crew .primary-button {
  border-color: #2d78c5 !important;
  background: rgba(8, 48, 88, 0.34) !important;
  color: #fff !important;
}

.services-layout .services-card--crew .primary-button:hover,
.services-layout .services-card--crew .primary-button:focus-visible {
  border-color: #2d78c5 !important;
  background: #2d78c5 !important;
  color: #fff !important;
}

.services-layout.services-width--standard {
  width: min(100%, 1180px) !important;
  margin-inline: auto !important;
}

/* The featured composition uses the available page width by default. */
.services-layout--featured-3.services-width--wide {
  width: min(calc(100vw - 48px), 1920px) !important;
  max-width: none !important;
  margin-left: 50% !important;
  margin-right: 0 !important;
  transform: translateX(-50%);
}

.services-layout.services-width--full,
.services-layout.services-layout--edge-to-edge {
  width: 100vw !important;
  max-width: none !important;
  margin-left: 50% !important;
  margin-right: 0 !important;
  transform: translateX(-50%);
}

/* The legacy/default choice deliberately preserves the current 2 x 2 presentation. */
.services-layout.services-layout--grid-2x2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* New variants show complete descriptions and grow safely with their content. */
.services-layout--featured-3 .service-body p,
.services-layout--four-columns .service-body p,
.services-layout--edge-to-edge .service-body p {
  display: block !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  -webkit-box-orient: initial !important;
  -webkit-line-clamp: unset !important;
}

.services-layout--featured-3 .service-card,
.services-layout--four-columns .service-card,
.services-layout--edge-to-edge .service-card {
  height: auto !important;
  min-height: 478px !important;
}

@media (min-width: 1181px) {
  /* Crop the soft left edge of the aviation photo in the panoramic featured card. */
  .services-layout--featured-3 .services-card--crew.is-featured .service-image img {
    object-position: 65% 50% !important;
    transform: scale(1.18) !important;
  }

  .services-layout--featured-3 .services-card--crew.is-featured:hover .service-image img {
    transform: scale(1.21) !important;
  }

  .services-layout.services-layout--featured-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .services-layout--featured-3 .service-card.is-featured {
    grid-column: 1 / -1;
    min-height: 540px !important;
  }

  .services-layout.services-layout--four-columns,
  .services-layout.services-layout--edge-to-edge {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .services-layout--four-columns .service-card,
  .services-layout--edge-to-edge .service-card {
    min-height: 450px !important;
  }

  .services-layout--edge-to-edge.services-gap--0 .service-card {
    border-radius: 0 !important;
  }

  .services-layout--edge-to-edge.services-gap--0 .service-card:first-child {
    border-radius: 9px 0 0 9px !important;
  }

  .services-layout--edge-to-edge.services-gap--0 .service-card:last-child {
    border-radius: 0 9px 9px 0 !important;
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .services-layout--featured-3.services-width--wide {
    width: calc(100vw - 32px) !important;
  }

  .services-layout.services-layout--featured-3,
  .services-layout.services-layout--four-columns,
  .services-layout.services-layout--edge-to-edge {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .services-layout--featured-3 .service-card.is-featured,
  .services-layout--featured-3 .service-card:last-child {
    grid-column: 1 / -1;
  }

  .services-layout--featured-3 .service-card.is-featured {
    min-height: 520px !important;
  }

  .services-layout--edge-to-edge.services-gap--0 .service-card {
    border-radius: 0 !important;
  }

  .services-layout--edge-to-edge.services-gap--0 .service-card:nth-child(1) {
    border-radius: 9px 0 0 0 !important;
  }

  .services-layout--edge-to-edge.services-gap--0 .service-card:nth-child(2) {
    border-radius: 0 9px 0 0 !important;
  }

  .services-layout--edge-to-edge.services-gap--0 .service-card:nth-child(3) {
    border-radius: 0 0 0 9px !important;
  }

  .services-layout--edge-to-edge.services-gap--0 .service-card:nth-child(4) {
    border-radius: 0 0 9px 0 !important;
  }
}

@media (max-width: 760px) {
  .services-layout.services-layout--grid-2x2,
  .services-layout.services-layout--featured-3,
  .services-layout.services-layout--four-columns,
  .services-layout.services-layout--edge-to-edge {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 440px !important;
    margin-inline: auto !important;
    transform: none;
  }

  .services-layout--featured-3 .service-card.is-featured,
  .services-layout--featured-3 .service-card:last-child {
    grid-column: auto;
  }

  .services-layout--featured-3 .service-card,
  .services-layout--four-columns .service-card,
  .services-layout--edge-to-edge .service-card {
    min-height: 478px !important;
  }

  .services-layout--edge-to-edge.services-gap--0 .service-card {
    border-radius: 0 !important;
  }

  .services-layout--edge-to-edge.services-gap--0 .service-card:first-child {
    border-radius: 9px 9px 0 0 !important;
  }

  .services-layout--edge-to-edge.services-gap--0 .service-card:last-child {
    border-radius: 0 0 9px 9px !important;
  }
}
