/* =====================================================================
   W.I. Freight — "Explore Our Services" section (lively version)
   Scoped under .wex so old page CSS can't clash.
   ===================================================================== */

.wex {
  --wx-primary: var(--color-primary, #2e3192);
  --wx-accent: var(--color-secondary, #be0119);
  --wx-font: "Grotesk", "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --wx-ease: cubic-bezier(.2, .8, .2, 1);

  position: relative;
  overflow: hidden;
  padding: 5.5rem 0 6rem;
  color: #fff;
  background:
    radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(160deg, var(--wx-primary) 0%, #1d1f6b 100%);
}
.wex *, .wex *::before, .wex *::after { box-sizing: border-box; }
.wex *:not(.bi) { font-family: var(--wx-font); }
.wex a { text-decoration: none; }

.wex-container { position: relative; z-index: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* Drifting colour blobs */
.wex-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  pointer-events: none;
  animation: wex-drift 18s ease-in-out infinite alternate;
}
.wex-blob-1 { width: 420px; height: 420px; left: -120px; top: -80px; background: #4b50ff; }
.wex-blob-2 { width: 380px; height: 380px; right: -100px; bottom: -120px; background: var(--wx-accent); animation-duration: 22s; animation-direction: alternate-reverse; }
@keyframes wex-drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-30px, 70px) scale(.95); }
}

/* Heading */
.wex-head { text-align: center; margin: 0 auto 3rem; max-width: 40rem; }
.wex-eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .4rem .95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: #fff;
}
.wex-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff4d63;
  animation: wex-ping 1.8s infinite;
}
@keyframes wex-ping {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 99, .7); }
  70% { box-shadow: 0 0 0 10px rgba(255, 77, 99, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 99, 0); }
}
.wex-head h2 {
  margin: 1rem 0 .6rem;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: #fff;
}
.wex-head p { margin: 0; font-size: 1.08rem; color: rgba(255, 255, 255, .78); }

/* Cards */
.wex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }

.wex-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 440px;
  padding: 1.75rem;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
  transition: transform .45s var(--wx-ease), box-shadow .45s var(--wx-ease);
}
.wex-card::after { /* glowing border on hover */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  border: 1.5px solid rgba(255, 255, 255, .18);
  transition: border-color .4s, box-shadow .4s;
  pointer-events: none;
}
.wex-card:hover { color: #fff; transform: translateY(-10px); box-shadow: 0 45px 80px -35px rgba(0, 0, 0, .85); }
.wex-card:hover::after { border-color: rgba(255, 255, 255, .55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }

.wex-media { position: absolute; inset: 0; z-index: -2; }
.wex-media picture, .wex .wex-media img { display: block; width: 100%; height: 100%; }
.wex .wex-media img {
  object-fit: cover;
  object-position: center;
  animation: wex-kenburns 16s ease-in-out infinite alternate;
  transition: filter .5s;
}
.wex-card:nth-child(2) .wex-media img { animation-delay: -8s; }
.wex-card:hover .wex-media img { filter: saturate(1.15) brightness(1.05); }
@keyframes wex-kenburns {
  from { transform: scale(1.02) translate(0, 0); }
  to   { transform: scale(1.14) translate(-2%, -2%); }
}

.wex-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(14, 16, 50, .96) 0%, rgba(20, 22, 70, .75) 38%, rgba(20, 22, 70, .1) 70%, rgba(20, 22, 70, .25) 100%);
  transition: opacity .4s;
}

/* Floating icon badge */
.wex-badge {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  display: grid; place-items: center;
  width: 86px; height: 86px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, .18), 0 18px 30px -12px rgba(0, 0, 0, .6);
  animation: wex-bob 4s ease-in-out infinite;
}
.wex-card:nth-child(2) .wex-badge { animation-delay: -2s; }
.wex .wex-badge img { width: 58px; height: 58px; object-fit: contain; transition: transform .4s var(--wx-ease); }
.wex-card:hover .wex-badge img { transform: rotate(-8deg) scale(1.08); }
@keyframes wex-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.wex-tag {
  position: absolute;
  top: 1.75rem; left: 1.75rem;
  padding: .4rem .85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .25);
  font-size: .82rem;
  font-weight: 600;
}

.wex-body { display: block; }
.wex-title {
  display: block;
  max-width: 22ch;
  margin-bottom: .6rem;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.wex-text {
  display: block;
  max-width: 34ch;
  margin-bottom: 1.3rem;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, .8);
}
.wex-cta {
  display: inline-flex; align-items: center; gap: .6rem;
  height: 48px;
  padding: 0 1.3rem;
  border-radius: 999px;
  background: #fff;
  color: var(--wx-primary);
  font-weight: 700;
  font-size: .98rem;
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .6);
  transition: background .3s, color .3s, padding .3s var(--wx-ease);
}
.wex-cta .bi {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  margin-right: -.6rem;
  border-radius: 50%;
  background: var(--wx-accent);
  color: #fff;
  font-size: .9rem;
  transition: transform .3s var(--wx-ease);
}
.wex-card:hover .wex-cta { background: var(--wx-accent); color: #fff; padding-right: 1.6rem; }
.wex-card:hover .wex-cta .bi { background: #fff; color: var(--wx-accent); transform: translateX(4px); }

.wex-card:focus-visible { outline: 3px solid rgba(255, 255, 255, .7); outline-offset: 4px; }

/* Scroll reveal */
.wex-reveal { opacity: 0; transform: translateY(40px); }
.wex-reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .8s var(--wx-ease) var(--d, 0s), transform .8s var(--wx-ease) var(--d, 0s);
}
.wex-card.wex-reveal.is-in:hover { transform: translateY(-10px); transition-delay: 0s; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .wex { padding: 4.5rem 0 4.5rem; }
  .wex-card { min-height: 400px; }
}
@media (max-width: 767px) {
  .wex-container { padding: 0 16px; }
  .wex { padding: 3.5rem 0; }
  .wex-head { margin-bottom: 2rem; }
  .wex-head p { font-size: 1rem; }
  .wex-grid { grid-template-columns: 1fr; gap: 1.1rem; }
  .wex-card { min-height: 360px; padding: 1.35rem; border-radius: 22px; }
  .wex-badge { width: 68px; height: 68px; top: 1.1rem; right: 1.1rem; }
  .wex .wex-badge img { width: 44px; height: 44px; }
  .wex-tag { top: 1.35rem; left: 1.35rem; font-size: .76rem; }
  .wex-text { margin-bottom: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .wex *, .wex *::before, .wex *::after { animation: none !important; transition-duration: .01ms !important; }
  .wex-reveal { opacity: 1; transform: none; }
}
