/* steps follow-up — agent «data». Loaded after v3.css on every rea page (ReaPage::cssFiles). */

/* ======================================================================== instructors: one card per person
   The owner's «more than a name» (steps-academy follow-up, agent K): a white card on a hairline, like the article cards.
   Top: the photo the admin uploaded (a rounded square, cropped to fill) or, without one, a monogram on the brand gradient —
   never a stand-in face (owner decision 3). Beside it the name, then the field chip and the years badge. Under a thin rule:
   the courses taught, the bio, up to four points with check marks. main.js writes only the parts that have data, so an
   empty part leaves no gap and a card with no description is just its top row.
   One look for every layout variant of the section (a–h): the rules below override layouts*.css / style.css by the id. */

#instructors .sgrid.sgrid--cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(14px, 1.6vw, 22px);
  overflow: visible;
  padding: 0;
  scroll-snap-type: none;
}
#instructors .sgrid--cards .spk {
  display: flex;
  width: auto;
  min-width: 0;
  grid-column: auto;
  grid-row: auto;
  text-align: start;
}
/* the field filter hides cards with .is-hidden; the display above would otherwise win over style.css's rule */
#instructors .sgrid--cards .spk.is-hidden { display: none; }

#instructors .sgrid--cards .spk__card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding: clamp(18px, 1.7vw, 24px);
  border: 1px solid var(--c-line);
  border-radius: var(--r, 26px);
  background: var(--c-card);
}

/* ---- top row: photo or monogram, then the name and its chips */
#instructors .sgrid--cards .spk__top { display: flex; align-items: center; gap: 14px; min-width: 0; }
#instructors .sgrid--cards .spk__img {
  flex: none;
  width: 72px;
  height: 72px;
  aspect-ratio: 1;
  border-radius: 18px;
  background: var(--c-surface);
  box-shadow: none;
}
#instructors .sgrid--cards .spk__img::after { content: none; }
#instructors .sgrid--cards .spk__img img { filter: none; transform: none; object-fit: cover; }
#instructors .sgrid--cards .spk__img--mono {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue, #084887) 0%, var(--navy, #0D1940) 100%);
  box-shadow: inset 0 -3px 0 var(--orange, #F58220);
}
html[data-theme="dark"] #instructors .sgrid--cards .spk__img--mono {
  background: linear-gradient(135deg, #2F6FBF 0%, #12204F 100%);
  box-shadow: inset 0 0 0 1px var(--c-line-2), inset 0 -3px 0 var(--orange, #F58220);
}
#instructors .spk__mono {
  color: #fff;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  letter-spacing: .02em;
}
html[lang="ar"] #instructors .spk__mono { letter-spacing: .08em; font-size: 25px; }

#instructors .sgrid--cards .spk__id { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
#instructors .sgrid--cards .spk__name {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(18px, 1.35vw, 20px);
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--c-text);
  overflow-wrap: anywhere;
}
html[lang="ar"] #instructors .sgrid--cards .spk__name { letter-spacing: 0; line-height: 1.4; }
#instructors .spk__nw { white-space: nowrap; }
#instructors .spk__meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
/* chips: the field in the article cards' blue pill, the years in the light-orange flag — inline-block (not inline) so the
   reveal's y tween moves them, and not flex, which would swallow the space after the years number */
#instructors .sgrid--cards .spk__tag,
#instructors .sgrid--cards .spk__exp {
  display: inline-block;
  min-height: 26px;
  margin: 0;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
#instructors .sgrid--cards .spk__tag { background: color-mix(in srgb, var(--c-hi) 11%, var(--c-card)); color: var(--c-hi-text); }
/* #944600 (--orange-ink, visual.css) on #FFE9D4 = 5.7:1; dark: #F58220 on the orange-tinted navy, above 5:1 */
#instructors .sgrid--cards .spk__exp { background: var(--flag-soft, #FFE9D4); color: var(--orange-ink, #944600); }

/* ---- the description: courses, bio, points, under one hairline */
#instructors .spk__info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--c-line);
}
#instructors .spk__teach { margin: 0; font-size: 14px; line-height: 1.55; color: var(--c-text-2); }
#instructors .spk__teach b { font-weight: 700; color: var(--c-text); }
#instructors .spk__bio { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--c-muted); overflow-wrap: anywhere; }
html[lang="ar"] #instructors .spk__bio { line-height: 1.8; }
#instructors .spk__pts { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
#instructors .spk__pts li {
  position: relative;
  padding-inline-start: 26px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-text-2);
  overflow-wrap: anywhere;
}
/* the check: a tinted dot with the mark drawn in the theme's blue (a mask, so it follows the theme) */
#instructors .spk__pts li::before,
#instructors .spk__pts li::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: calc(.775em - 9px);
  width: 18px;
  height: 18px;
  border-radius: 50%;
}
#instructors .spk__pts li::before { background: color-mix(in srgb, var(--c-hi) 13%, var(--c-card)); }
#instructors .spk__pts li::after {
  background: var(--c-hi);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5.2 9.4l2.6 2.6 5-5.4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5.2 9.4l2.6 2.6 5-5.4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}
html[lang="ar"] #instructors .spk__pts li { line-height: 1.7; }
html[lang="ar"] #instructors .spk__pts li::before,
html[lang="ar"] #instructors .spk__pts li::after { top: calc(.85em - 9px); }

/* the field filter (shown only with photos and two fields or more): touch-sized buttons */
#instructors .filter { min-height: 44px; }

/* ---- 4 → 2 → 1 per row */
@media (max-width: 1100px) {
  #instructors .sgrid.sgrid--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  #instructors .sgrid.sgrid--cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #instructors .sgrid--cards .spk__card { gap: 14px; padding: 18px; border-radius: 20px; }
  #instructors .sgrid--cards .spk__img { width: 64px; height: 64px; border-radius: 16px; }
  #instructors .spk__mono { font-size: 22px; }
}
