/* Home, direction C: the formats (boards and faces per type), the campaigns carousel,
   the coverage by region and the section for media sellers. Loaded after home.css.
   Tokens: site.css :root. Logical properties, so Arabic (dir=rtl) mirrors. */

/* Hairline grids (formats, seller figures): each cell draws its end and bottom rule and
   overlaps its neighbour by 1 px; the frame clips the outer ones. A missing cell leaves
   no stray rule behind. */
.formats, .figs {
  display: grid; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-card);
}
.fmt, .figs > div {
  border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-inline-end: -1px; margin-bottom: -1px;
}

/* ---- Formats: the board count as a numeral, the name, the faces ---- */
.formats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .formats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .formats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.fmt {
  position: relative; isolation: isolate; display: flex; min-height: 220px; overflow: hidden;
  background: var(--night); text-decoration: none; color: inherit;
  transition: background-color var(--t);
}
/* The type's photo, a low tint behind the figures, brought up on hover. */
.fmt-photo {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover;
  opacity: .2; filter: grayscale(.35) saturate(.7); transform: scale(1.02);
  transition: opacity .6s var(--ease), transform 1.4s var(--ease);
}
.fmt::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10, 37, 64, .3) 0%, rgba(10, 37, 64, .92) 88%);
}
.fmt:hover { background: var(--night-3); }
.fmt:hover .fmt-photo { opacity: .55; transform: scale(1.08); }
.fmt-body { display: flex; flex-direction: column; width: 100%; padding: 30px 24px 24px; }
.fmt-num { margin-bottom: auto; font-family: var(--serif); font-weight: 400; font-size: clamp(3rem, 4.6vw, 3.5rem); line-height: 1; }
.fmt-name { margin-top: 32px; font-weight: 600; font-size: .9375rem; }
.fmt-faces { margin-top: 2px; color: var(--mute); font-size: var(--fs-small); }

/* ---- Campaigns carousel: a scroll-snap track, so swipe works without script ---- */
.carousel { position: relative; }
.carousel-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  border-radius: var(--r-card); scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.story {
  position: relative; scroll-snap-align: start; overflow: hidden; border-radius: var(--r-card);
  aspect-ratio: 4 / 5; display: flex; align-items: flex-end; border: 1px solid var(--line);
}
@media (min-width: 720px) { .story { aspect-ratio: 16 / 7; } }
.story-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.8); }
.story-text { position: relative; width: 100%; padding: 72px clamp(24px, 4vw, 44px) clamp(24px, 4vw, 40px); background: linear-gradient(transparent, rgba(10, 37, 64, .88)); }
.story-text h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
.story-text p { margin: 10px 0 0; max-width: 40rem; color: var(--pearl); }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--glass); color: var(--ivory); font-size: 1.5rem; line-height: 1;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: border-color var(--t-fast);
}
.carousel-btn:hover { border-color: var(--cyan); }
.carousel-btn.prev { inset-inline-start: 16px; }
.carousel-btn.next { inset-inline-end: 16px; }
[dir="rtl"] .carousel-btn { transform: translateY(-50%) scaleX(-1); }
.dots { display: flex; justify-content: center; gap: 2px; margin-top: 18px; }
.dot { width: 36px; height: 28px; border: 0; background: none; padding: 13px 4px; }
.dot::before { content: ""; display: block; height: 2px; border-radius: 1px; background: var(--line-strong); transition: background-color var(--t-fast); }
.dot[aria-current="true"]::before { background: var(--cyan); }

/* ---- Coverage: one card per region, its count, its areas and a meter of its share ---- */
.cov-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cov {
  display: flex; flex-direction: column; gap: 14px; padding: 28px;
  border: 1px solid var(--line); border-radius: var(--r-card);
  background: linear-gradient(160deg, var(--night-2), var(--night));
  text-decoration: none; color: inherit;
  transition: transform .5s var(--ease), border-color .5s var(--ease);
}
.cov:hover { transform: translateY(-4px); border-color: var(--cyan-line); }
.cov-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.cov-name { font-family: var(--serif); font-size: 1.875rem; line-height: 1.1; }
html[lang="ar"] .cov-name { font-weight: 500; }
.cov-count { display: flex; flex-direction: column; align-items: flex-end; text-align: end; flex: none; }
.cov-count b { font-family: var(--serif); font-weight: 400; font-size: 2.5rem; line-height: 1; color: var(--pearl); }
.cov-count span { margin-top: 6px; color: var(--mute); font-size: .625rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
html[lang="ar"] .cov-count span { letter-spacing: 0; font-size: .75rem; }
.cov-areas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; color: var(--mute); font-size: var(--fs-small); line-height: 1.7; }
.cov-areas li + li::before { content: "·"; margin-inline: 8px; color: var(--line-strong); }
.cov-meter { display: block; height: 2px; margin-top: auto; background: var(--line); }
.cov-meter i {
  display: block; height: 100%; background: var(--cyan);
  transform: scaleX(var(--share, 0)); transform-origin: left; transition: transform 1.2s var(--ease);
}
[dir="rtl"] .cov-meter i { transform-origin: right; }
.cov-go {
  display: flex; align-items: center; gap: 10px; color: var(--pearl);
  font-size: .6875rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
}
html[lang="ar"] .cov-go { letter-spacing: 0; font-size: .8125rem; }
.cov-go::after { content: "→"; font-size: .875rem; letter-spacing: 0; transition: transform var(--t); }
[dir="rtl"] .cov-go::after { content: "←"; }
.cov:hover .cov-go { color: #fff; }
.cov:hover .cov-go::after { transform: translateX(4px); }
[dir="rtl"] .cov:hover .cov-go::after { transform: translateX(-4px); }

/* ---- For media sellers: the statement, the text and actions, the figures ---- */
.sellers {
  scroll-margin-top: var(--header-h);
  border-block: 1px solid var(--line);
  background: radial-gradient(1200px 500px at 80% 0%, rgba(23, 105, 201, .10), transparent 60%);
}
[dir="rtl"] .sellers { background: radial-gradient(1200px 500px at 20% 0%, rgba(23, 105, 201, .10), transparent 60%); }
.sellers-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 960px) { .sellers-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px 80px; } }
.trust-statement {
  margin: 22px 0 0; max-width: 15em; font-family: var(--serif);
  font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1.1; letter-spacing: -.01em;
}
html[lang="ar"] .trust-statement { font-weight: 500; line-height: 1.45; letter-spacing: 0; font-size: clamp(1.75rem, 3vw, 2.75rem); }
.sellers-text { margin: 24px 0 0; max-width: 30rem; color: var(--mute); line-height: 1.75; }
.sellers .acts { margin-top: 36px; }
.figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .figs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.figs > div { padding: 28px 24px; background: rgba(10, 37, 64, .62); }
.figs b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(2.5rem, 4vw, 2.875rem); line-height: 1.05; }
.figs span { display: block; margin-top: 10px; color: var(--mute); font-size: .6875rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
html[lang="ar"] .figs span { letter-spacing: 0; font-size: .8125rem; }
.trust-facts {
  grid-column: 1 / -1; list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.trust-facts li { display: flex; align-items: baseline; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); color: var(--pearl); overflow-wrap: anywhere; }
.trust-facts li::before { content: ""; flex: none; width: 14px; height: 1px; background: var(--cyan); transform: translateY(-.3em); }

/* Identity E: the format tiles are light (the photo shows through a pale wash); the campaign
   captions sit on the photo's dark gradient, so they keep white text. */
.fmt::after { background: linear-gradient(180deg, rgba(242, 246, 250, .55) 0%, rgba(242, 246, 250, .97) 85%); }
.fmt-num { font-weight: 700; font-stretch: 112%; }
.cov-count b, .figs b { font-weight: 700; font-stretch: 112%; }
.story-text { --ivory: #ffffff; --pearl: #e3edf7; color: #ffffff; }
.carousel-btn { background: rgba(255, 255, 255, .9); }
.sellers { background: radial-gradient(1200px 500px at 80% 0%, rgba(92, 192, 240, .16), transparent 60%), #0a2540; }
[dir="rtl"] .sellers { background: radial-gradient(1200px 500px at 20% 0%, rgba(92, 192, 240, .16), transparent 60%), #0a2540; }
.figs > div { background: rgba(255, 255, 255, .06); }
