/*
 * UAE section type `market-features` (S2, 2026-11-07): live `.section_market_features`,
 * three picture cards (dark, light, coral) under a centred heading. Used on Deposits
 * and withdrawals and Precious metals (later: DerivLife and other hubs). DS
 * FeatureCards. Linked on UAE pages only; every rule is scoped to the slot.
 *
 * Live (measured 2026-11-07, both pages, EN + AR, 4 widths): content 1280px (1328px
 * container, 24px gutters; 16px on phones). Heading 56/64 (48/56 at 768, 40/48 on
 * phones), at most 768px wide, 48px above the cards (24px on phones), start-aligned
 * on phones. Cards 16px apart: 3 columns from 992px, 2 at 768–991 (the third card
 * starts a new row), 1 on phones. Card copy padded 32px, 8px between title and text;
 * titles 32/40 (24/32 below 992), weight 800. Cards are at least 472px tall on
 * desktop, as tall as their row at 768–991 and 448px on phones (24px between copy and
 * picture); the picture keeps its own aspect ratio at the card's foot. Band padding 112 top / 148 bottom
 * (80 / 148 at 768–991, 56 / 56 on phones).
 */
[data-raven-slot$=":market-features"].raven-section-pad {
  --raven-pad-top: 56px;
  --raven-pad-bottom: 56px;
}
@media (min-width: 768px) {
  [data-raven-slot$=":market-features"].raven-section-pad {
    --raven-pad-top: 80px;
    --raven-pad-bottom: 148px;
  }
}
@media (min-width: 992px) {
  [data-raven-slot$=":market-features"].raven-section-pad {
    --raven-pad-top: 112px;
  }
}
[data-raven-slot$=":market-features"] .fc-container {
  max-width: 1328px;
  gap: 48px;
}
[data-raven-slot$=":market-features"] .fc-sectionTitle {
  max-width: 768px;
  margin-inline: auto;
  text-wrap: wrap;
}
[data-raven-slot$=":market-features"] .fc-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
[data-raven-slot$=":market-features"] .fc-grid > * {
  grid-column: auto;
}
[data-raven-slot$=":market-features"] .card-primary {
  height: auto;
  min-height: 472px;
}
[data-raven-slot$=":market-features"] .card-primary .cp-content {
  flex: 1 0 auto;
  gap: 8px;
}
/* Live sizes each picture by its own aspect ratio (height auto) at every width and
   anchors it at the card's foot (checker s2 M8: a fixed 52/35 made the coral card 26px
   taller at 768 and every card 480px tall at 1440). */
[data-raven-slot$=":market-features"] .card-primary .cp-imageSection {
  height: auto;
  aspect-ratio: auto;
  flex: 0 0 auto;
}
/* `auto 52 / 35`: the picture's own ratio once loaded, 52/35 before (lazy images have
   no size until then). */
[data-raven-slot$=":market-features"] .card-primary .cp-image {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto 52 / 35;
}
[data-raven-slot$=":market-features"] .card-primary .cp-title {
  font-size: 32px;
  line-height: 40px;
}
@media (min-width: 768px) and (max-width: 991px) {
  [data-raven-slot$=":market-features"] .fc-container {
    padding-inline: 24px;
  }
}
@media (max-width: 991px) {
  [data-raven-slot$=":market-features"] .fc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  [data-raven-slot$=":market-features"] .card-primary {
    min-height: 0;
  }
  [data-raven-slot$=":market-features"] .card-primary .cp-title {
    font-size: 24px;
    line-height: 32px;
  }
}
@media (max-width: 767px) {
  [data-raven-slot$=":market-features"] .fc-container {
    gap: 24px;
  }
  [data-raven-slot$=":market-features"] .fc-sectionTitle {
    margin-inline: 0;
  }
  [data-raven-slot$=":market-features"] .fc-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  [data-raven-slot$=":market-features"] .card-primary {
    height: 448px;
    gap: 24px;
  }
}

/*
 * A card with a link is one link as a whole, as live's `a.feature-content-card` (S9,
 * /ae/derivlife CSR cards, checker N1, 2026-11-08): the card's one "Learn more" link
 * stretches over the whole card (pointer anywhere, clicks anywhere), so there is no
 * nested link. Cards without a link (Deposits and withdrawals) are unchanged. The card
 * is the link's containing block; its picture layer stays under the text.
 */
[data-raven-slot$=":market-features"] .card-primary:has(a.link) {
  isolation: isolate;
  cursor: pointer;
}
[data-raven-slot$=":market-features"] .card-primary:has(a.link) .cp-imageOverlay {
  z-index: -1;
}
[data-raven-slot$=":market-features"] .card-primary:has(a.link) .cp-content {
  position: static;
}
[data-raven-slot$=":market-features"] .card-primary a.link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
