﻿/* Page-specific styles for solution-aviation-cargo */
/* Add overrides here — never edit compat.css for page-specific changes */

/* --------------------------------------------------------------------------
   "Learn More About Our Service" (#Programs)

   The legacy markup put a portrait photo (660x742) in a `col-md-4` that was
   inline-styled `align-self: center`, next to a `col-md-8` holding four
   `col-md-5` cards laid out with `justify-content: space-around`. Neither the
   two columns nor the four cards shared a height, the photo was unconstrained
   (it grew to the full column width and towered over the copy), and the fourth
   icon carried an inline `width: 22%` that shrank it to ~10px against its
   46px siblings.

   Rebuilt here as two CSS grids: one for the photo/copy split, one for the
   2x2 card set. Both stretch, so the photo frame and the card block end on the
   same line. `!important` appears only where it has to beat an inline style.
   -------------------------------------------------------------------------- */

#Programs > .container-fluid {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

/* photo | copy+cards */
#Programs > .container-fluid > .row {
  display: grid !important;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: stretch;
  gap: clamp(1.25rem, .9rem + 1.4vw, 2.25rem);
  margin-inline: 0;
}

#Programs > .container-fluid > .row > [class*="col-"] {
  width: auto;
  min-width: 0;
  padding-inline: 0;
  align-self: stretch !important;
}

/* the photo: a fixed frame, cropped, wearing the site's card border */
#Programs .col-md-4 > img {
  width: 100%;
  height: 100%;
  min-height: clamp(260px, 30vw, 440px);
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin: 0;
}

#Programs .col-md-8 {
  display: flex;
  flex-direction: column;
}

#Programs .col-md-8 > h2 {
  margin-bottom: clamp(1rem, .8rem + .6vw, 1.5rem);
}

/* the 2x2 card set */
#Programs .col-md-8 > .row {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: clamp(1rem, .8rem + 1vw, 1.6rem);
  align-items: stretch;
  margin-inline: 0;
  flex: 1;
}

#Programs .col-md-8 > .row > [class*="col-"] {
  width: auto;
  min-width: 0;
  padding-inline: 0;
  margin-bottom: 0;
  display: flex;
}

#Programs .col-md-8 .card {
  flex: 1;
  width: 100%;
  padding: clamp(1.1rem, .95rem + .7vw, 1.5rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}

#Programs .col-md-8 .card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* one icon box for all four — the inline width on icon10 needs !important */
#Programs .card .service-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-bottom: .9rem;
}

#Programs .card .service-icon > img {
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: contain;
}

#Programs .col-md-8 .card h5 {
  font-size: 1rem;
  letter-spacing: .02em;
  margin-bottom: .45rem;
}

#Programs .col-md-8 .card p {
  font-size: .95rem;
  margin-bottom: 0;
}

/* one column on narrow viewports; the photo becomes a landscape band */
@media (max-width: 860px) {
  #Programs > .container-fluid > .row {
    grid-template-columns: minmax(0, 1fr);
  }

  #Programs .col-md-4 > img {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}
