/* Copied from tamkeen-awards/assets/option5.css (awards page, option 1): the shared card design. Page changes go in stories.css. */
.main:has(.awards-cards) { background: #1b1833; }
.awards-cards { --navy: #1b1833; --red: #ef434d; --ink-2: #55536e; --soft: #f1f2f6; background: #fff; color: var(--navy); }
.awards-cards ::selection { background: var(--red); color: #fff; }

/* Inside the site's own container, so the title shares its edges with the header and the cards. */
.cards-head { position: relative; isolation: isolate; overflow: hidden; padding: 18rem 0 7rem; background: var(--navy); color: #fff; }
.cards-bg { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.55); pointer-events: none; }
/* Solid header colour down to where the header ends (it overlaps the band by up to 5.5rem), then an eased fade, so no line shows between them. */
.cards-head::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(#1d1b34 5.6rem, rgba(29, 27, 52, .86) 9rem, rgba(29, 27, 52, .62) 14rem, rgba(29, 27, 52, .34) 20rem, rgba(29, 27, 52, .12) 27rem, rgba(29, 27, 52, 0) 34rem), linear-gradient(rgba(29, 27, 52, .42), rgba(29, 27, 52, .42)); }
.cards-intro h1 { margin: 0 0 1.4rem; font-size: clamp(4.4rem, 5.6vw, 8.4rem); line-height: 1.08; font-weight: 700; color: #fff; text-wrap: balance; }
.cards-intro p { max-width: 62rem; margin: 0; font-size: 1.9rem; line-height: 1.5; color: #dce8fb; text-wrap: balance; }

.cards-body { padding: 3.2rem 0 8rem; }
.cards-filter { display: flex; flex-wrap: wrap; gap: .8rem; margin: 0 0 3rem; padding: 0; list-style: none; }
.cards-filter li { margin: 0; padding: 0; }
.cards-filter li::before { content: none; }
.cards-filter button { appearance: none; height: 4.4rem; padding: 0 2rem; border: 0; border-radius: 99rem; background: var(--soft); font: inherit; font-size: 1.5rem; font-weight: 500; color: var(--navy); cursor: pointer; transition: background .2s, color .2s; }
.cards-filter button span { margin-inline-start: .6rem; font-size: 1.3rem; opacity: .65; font-variant-numeric: tabular-nums; }
.cards-filter button:hover { background: #e3e6ee; }
.cards-filter button:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.cards-filter button[aria-pressed="true"] { background: var(--navy); color: #fff; }

/* Equal columns and rows: the photo is always the same size, and the top panels stretch to the fullest. */
.cards-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 1.6rem; }
.card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 2.4rem; background: var(--soft); }
.card[hidden] { display: none; }
.card-top { flex: 1; display: flex; flex-direction: column; min-height: 25rem; padding: 2rem 2.2rem 3.2rem; }
.pills { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 2.8rem; padding: 0; list-style: none; }
.pills li { display: flex; align-items: center; height: 3rem; margin: 0; padding: 0 1.3rem; border-radius: 99rem; background: #fff; font-size: 1.3rem; font-weight: 500; color: var(--navy); font-variant-numeric: tabular-nums; }
.pills li::before { content: none; }
.card h2 { margin: 0; font-size: 2.3rem; line-height: 1.28; font-weight: 700; letter-spacing: -.005em; color: var(--navy); text-wrap: pretty; }
/* The issuer: one line, at the foot of the panel, level across each row. */
.card p { margin: auto 0 0; padding-top: 1.6rem; overflow: hidden; font-size: 1.4rem; line-height: 1.45; color: var(--ink-2); white-space: nowrap; text-overflow: ellipsis; }

/* English titles run longer, and one long title would stretch every card. */
body:not(.rtl) .card h2 { font-size: 2rem; line-height: 1.25; }

.card-photo { position: relative; flex: none; overflow: hidden; border-radius: 2.4rem; }
.card-photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.card:hover .card-photo img { transform: scale(1.03); }

.card-more { position: absolute; bottom: 1.6rem; inset-inline-start: 1.6rem; display: inline-flex; align-items: center; gap: .8rem; height: 3rem; padding-block: 0; padding-inline: 1.3rem .4rem; border-radius: 99rem; background: rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 1.3rem; font-weight: 700; color: #fff; text-decoration: none; }
.card-photo.light .card-more { background: rgba(27, 24, 51, .1); color: var(--navy); }
.card-more span { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: #fff; color: var(--navy); }
.card:hover .card-more { text-decoration: underline; text-underline-offset: .3rem; }
.card-more:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.card-more svg { width: 1.2rem; height: .9rem; }
.rtl .card-more svg { transform: scaleX(-1); }

/* Review only: moves between the two options. */
.cards-switch { position: fixed; z-index: 90; top: 50%; left: 1.6rem; transform: translateY(-50%); display: flex; flex-direction: column; gap: .4rem; padding: .5rem; border-radius: 99rem; background: var(--navy); box-shadow: 0 .8rem 2.4rem rgba(27, 24, 51, .35); }
.cards-switch a { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; font-size: 1.6rem; font-weight: 500; color: #fff; text-decoration: none; font-variant-numeric: tabular-nums; transition: background .2s; }
.cards-switch a:hover { background: rgba(255, 255, 255, .14); }
.cards-switch a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cards-switch a[aria-current="page"] { background: #fff; font-weight: 700; color: var(--navy); }

.cards-note { margin: 2.4rem 0 0; font-size: 1.3rem; line-height: 1.5; color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  .card-photo img { transition: none; }
  .card:hover .card-photo img { transform: none; }
}
@media (max-width: 1099px) {
  .cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-top { padding-inline: 1.6rem; }
  .card p { font-size: 1.3rem; }
}
@media (max-width: 799px) { .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 559px) {
  .cards-head { padding: 11rem 0 2.4rem; }
  .cards-body { padding: 2rem 0 5rem; }
  .cards-filter { flex-wrap: nowrap; overflow-x: auto; margin-inline: -1.5rem; padding-inline: 1.5rem; scrollbar-width: none; }
  .cards-filter button { white-space: nowrap; }
  .cards-switch { left: .6rem; }
  .cards-switch a { width: 3.4rem; height: 3.4rem; font-size: 1.4rem; }
  .cards-grid { grid-template-columns: minmax(0, 1fr); }
  .card-top { min-height: 0; }
  .card h2 { font-size: 2.6rem; }
}
