/* "Our Solutions Offering" on the home page. Scoped to #services.osx-solutions; loaded only by templates/index.html. */

#services.osx-solutions {
  --osx-maroon: #9d2f2f;
  --osx-maroon-dark: #802626;
  --osx-ink: #1b232b;
  --osx-body: #5b6570;
  --osx-line: #e3ddd7;
  --osx-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

#services.osx-solutions .osx-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 6px 15px 0;
  text-align: left;
}

#services.osx-solutions .osx-card {
  position: relative;
  display: flex;
  min-width: 0;
  border: 1px solid var(--osx-line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: transform 0.35s var(--osx-ease), box-shadow 0.35s ease, border-color 0.35s ease;
}

#services.osx-solutions .osx-card:hover,
#services.osx-solutions .osx-card:focus-within {
  transform: translateY(-6px);
  border-color: rgba(157, 47, 47, 0.32);
  box-shadow: 0 26px 44px -30px rgba(27, 35, 43, 0.55);
}

/* The whole card is one link. */
#services.osx-solutions .osx-card > .osx-inner {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  color: inherit !important;
  text-decoration: none !important;
  outline: none;
}

#services.osx-solutions .osx-cta:focus-visible {
  outline: 3px solid var(--osx-maroon, #9d2f2f);
  outline-offset: 3px;
}

/* Image panel, fixed 16:9 so every card lines up. */
#services.osx-solutions .osx-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #f3efeb;
  overflow: hidden;
}

#services.osx-solutions .osx-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--osx-ease);
}

#services.osx-solutions .osx-card:hover .osx-media img { transform: scale(1.05); }

/* Accent line that sweeps under the image on hover. */
#services.osx-solutions .osx-media::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--osx-maroon), #d9a441);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--osx-ease);
}

#services.osx-solutions .osx-card:hover .osx-media::after,
#services.osx-solutions .osx-card:focus-within .osx-media::after { transform: scaleX(1); }

#services.osx-solutions .osx-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 22px 24px 24px;
}

#services.osx-solutions .osx-body h4 {
  margin: 0 0 10px !important;
  color: var(--osx-ink) !important;
  font-size: 19px !important;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-align: left;
  text-transform: none;
  transition: color 0.3s ease;
}

#services.osx-solutions .osx-card:hover h4 { color: var(--osx-maroon) !important; }

#services.osx-solutions .osx-body p {
  flex: 1 1 auto;
  margin: 0 0 20px !important;
  color: var(--osx-body) !important;
  font-size: 15px !important;
  line-height: 1.65;
  text-align: left;
}

#services.osx-solutions .osx-body p span { color: inherit; }

/* View: underlined link that turns into a filled pill on hover. */
#services.osx-solutions .osx-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  min-height: 42px;
  margin-top: auto !important;
  padding: 10px 20px;
  border: 1px solid rgba(157, 47, 47, 0.35);
  border-radius: 999px;
  color: var(--osx-maroon) !important;
  font-size: 13.5px !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

#services.osx-solutions .osx-cta i {
  font-size: 12px;
  transition: transform 0.3s var(--osx-ease);
}

#services.osx-solutions .osx-card:hover .osx-cta,
#services.osx-solutions .osx-card:focus-within .osx-cta {
  background: var(--osx-maroon);
  border-color: var(--osx-maroon);
  color: #fff !important;
  box-shadow: 0 12px 22px -14px rgba(157, 47, 47, 0.95);
}

#services.osx-solutions .osx-card:hover .osx-cta i { transform: translateX(4px); }


/* Reveal on scroll (only when the page's script adds the class). */
#services.osx-solutions.osx-ready .osx-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--osx-ease), transform 0.7s var(--osx-ease), box-shadow 0.35s ease, border-color 0.35s ease;
  transition-delay: calc(var(--i, 0) * 110ms);
}

#services.osx-solutions.osx-ready .osx-card.is-in { opacity: 1; transform: none; }

@media (max-width: 991px) {
  #services.osx-solutions .osx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}

@media (max-width: 640px) {
  #services.osx-solutions .osx-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  #services.osx-solutions .osx-body { padding: 18px 18px 20px; }
  #services.osx-solutions .osx-body h4 { font-size: 18px !important; }
}

@media (prefers-reduced-motion: reduce) {
  #services.osx-solutions *,
  #services.osx-solutions *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  #services.osx-solutions.osx-ready .osx-card { opacity: 1; transform: none; }
}

/* ---------- Phones: swipeable card rail ----------
   Stacking every card makes the page very long, so on small screens the grid
   becomes a horizontal rail: swipe, each card snaps, and the next one peeks.
   Native scrolling only - no JavaScript, and all cards stay in the markup. */
@media (max-width: 640px) {
  #services.osx-solutions .osx-grid {
    display: flex;
    grid-template-columns: none;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 16px;
    padding: 4px 16px 10px;
    margin: 0 -15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  #services.osx-solutions .osx-grid::-webkit-scrollbar { display: none; }

  #services.osx-solutions .osx-card {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }
}
/* The card body is not clickable - only this button navigates. */
#services.osx-solutions .osx-cta { text-decoration: none !important; cursor: pointer; }
#services.osx-solutions .osx-card { cursor: default; }
