/* ============================================================================
   PECB Conference 2026 -- Speakers (template-speakers.php)
   ========================================================================== */

.pecb-spk-root { background: #000000; overflow-x: clip; }

/* ------------------------------------------------- 01 page header / crumb */

.pecb-spk-masthead {
  position: relative;
  background: #000000;
  overflow: hidden;
  padding: 70px 28px 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pecb-spk-masthead-bg { position: absolute; inset: 0; opacity: 0.5; }
.pecb-spk-masthead-bg--image {
  background-image: var(--pecb-img);
  background-size: cover;
  background-position: center 30%;
  opacity: 0.28;
}
.pecb-spk-masthead-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, #000000 100%);
}
.pecb-spk-masthead-inner { position: relative; max-width: 1240px; margin: 0 auto; }
.pecb-spk-crumb { font-size: 13px; font-weight: 500; color: #9aa0c9; margin-bottom: 16px; }
.pecb-spk-crumb a { color: #9aa0c9; }
.pecb-spk-crumb-sep { margin: 0 8px; opacity: 0.5; }
.pecb-spk-crumb-current { color: #fff; }
.pecb-spk-title {
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin: 0;
  text-transform: uppercase;
  color: #fff;
}

/* ---------------------------------------------------- 02 leading voices */

.pecb-spk-lineup {
  background:
    radial-gradient(85% 65% at 50% -6%, rgba(46,68,240,0.42) 0%, rgba(28,45,181,0.16) 34%, transparent 62%),
    radial-gradient(70% 65% at 102% 104%, rgba(224,11,34,0.36) 0%, rgba(187,8,18,0.14) 38%, transparent 64%),
    linear-gradient(180deg, #0a0c1f 0%, #05060f 45%, #0b0713 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pecb-spk-lineup-inner { max-width: 1240px; margin: 0 auto; padding: 100px 28px; }
.pecb-spk-head { text-align: center; margin-bottom: 54px; }
.pecb-spk-eyebrow {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #ff5663;
  font-weight: 600;
  margin-bottom: 12px;
}
.pecb-spk-heading {
  font-size: clamp(27px, 5.4vw, 44px);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.5px;
  color: #fff;
  line-height: 1.2;
}
/* Columns adapt continuously rather than jumping 4 -> 2 at 1024px, which left
   awkward half-empty rows between 900 and 1200px. auto-fill also stops the
   track from being forced wider than the space available, which was clipping
   the fourth card against the root's overflow-x: clip. */
.pecb-spk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 24px;
}

.spk-front.has-photo {
  background-image: var(--pecb-img);
  background-size: cover;
  background-position: center top;
}
.spk-front.no-photo {
  background: #06060d;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pecb-spk-initials { font-size: 52px; font-weight: 800; color: rgba(255,255,255,0.55); }
.pecb-spk-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  padding: 40px 18px 24px;
  background: linear-gradient(0deg,#06060d 0%, #06060d 42%, rgba(6,6,13,0.6) 74%, rgba(6,6,13,0) 100%);
}
.pecb-spk-name { font-size: 17px; font-weight: 600; }
.pecb-spk-role { font-size: 12.5px; color: #c9cee0; margin-top: 6px; line-height: 1.45; }
.pecb-spk-co { font-weight: 700; color: #ffffff; }

.pecb-spk-back {
  background: linear-gradient(40deg, #d40b22 0%, #3a0a2a 27%, #0b0a1e 50%, #14207a 73%, #1c2db5 100%);
  border: none;
}
.pecb-spk-country {
  align-self: flex-start;
  font-size: 10px;
  letter-spacing: 1px;
  padding: 4px 9px;
  border-radius: 20px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.3);
  color: #FFFFFF;
  margin-bottom: 12px;
}
.pecb-spk-bname { font-size: 21px; font-weight: 700; color: #FFFFFF; line-height: 1.15; }
.pecb-spk-brole {
  font-size: 12.5px;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}
.pecb-spk-bco { font-weight: 800; color: #ffffff; }
.pecb-spk-bio {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255,255,255,0.9);
  margin: auto 0;
}
.pecb-spk-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 28px;
  background: #FFFFFF;
  color: #192a9c!important;
  font-weight: 700;
  font-size: 13px;
}
.pecb-spk-more {
  text-align: center;
  margin-top: 40px;
  font-size: 15px;
  color: #8a90a6;
  font-style: italic;
}

/* -------------------------------------------------------------- 03 alumni */

.pecb-spk-alumni { background: #04040A; padding: 100px 28px; }
.pecb-spk-alumni-inner { max-width: 1240px; margin: 0 auto; }
.pecb-spk-alumni-head { text-align: center; margin-bottom: 16px; }
.pecb-spk-alumni-eyebrow {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #e00b22;
  font-weight: 600;
  margin-bottom: 12px;
}
.pecb-spk-alumni-heading {
  font-size: clamp(27px, 5.4vw, 44px);
  font-weight: 700;
  margin: 0 0 20px;
  letter-spacing: -0.5px;
  color: #fff;
  line-height: 1.2;
}
.pecb-spk-alumni-body {
  max-width: 820px;
  margin: 0 auto 52px;
  text-align: center;
  font-size: 15.5px;
  line-height: 1.7;
  color: #9aa3c4;
}
.pecb-spk-alumni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 18px;
}
.pecb-spk-alumni-card {
  background: #111426;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 18px;
  padding: 22px 20px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.pecb-spk-alumni-avatar {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--pecb-avatar, #1c2db5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.pecb-spk-alumni-copy { min-width: 0; }
.pecb-spk-alumni-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
}
.pecb-spk-alumni-country {
  font-size: 11.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #8ba0ff;
  margin-bottom: 4px;
}
.pecb-spk-alumni-role { font-size: 12.5px; line-height: 1.4; color: #9aa3c4; }

/* ------------------------------------------------------------- responsive */

/* No forced column count here on purpose -- auto-fill above already yields
   3 columns around 900-1100px and 2 below that. */

/* ============================================================================
   Flip-card overflow

   The back face is a fixed-size box, so a long bio was simply cut off at the
   bottom edge. It now scrolls once the card is flipped -- while the card is
   face-down the overflow stays hidden so no scrollbar shows through the front.
   Scrolling the face never changes the card size, so the grid never reflows.
   ========================================================================== */

.spk-back { overflow: hidden; }

/* Kept unconditional on purpose: if the measuring script never runs, or a bio
   is edited longer without a resize, this is the only thing stopping the text
   being cut off. It costs nothing when the content already fits. */
.spk-card:hover .spk-back,
.spk-card:focus-within .spk-back,
.spk-card.flipped .spk-back {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.45) transparent;
}
.spk-back::-webkit-scrollbar { width: 4px; }
.spk-back::-webkit-scrollbar-track { background: transparent; }
.spk-back::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.45);
  border-radius: 4px;
}

/* The LinkedIn button is pinned to the bottom by margin-top:auto. In a
   scrolling column that would strand it below the fold, so it sits directly
   after the bio with a little breathing room instead. */
.pecb-spk-link { margin-top: auto }

/* ============================================================================
   Mobile -- two cards per row

   grid-auto-rows:1fr keeps both halves of a row the same height and each card
   fills that row. Card faces are absolutely positioned, so the row needs a
   definite height to stretch from: that is what min-height provides.
   ========================================================================== */

@media (max-width: 640px) {
  .pecb-spk-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  /* Height comes from aspect-ratio below, not from stretching to a row that
     has nothing to size itself from. */
  .pecb-spk-alumni-grid { grid-template-columns: 1fr; }
  .pecb-spk-lineup-inner,
  .pecb-spk-alumni {padding: 64px 16px; }

  /* 36px is a lot of radius on a card this narrow. */
  .spk-front,
  .spk-back { border-radius: 18px; }
  .spk-back { padding: 10px; }
}

/* Two-up cards are roughly 160px wide, so the face text has to come down with
   them or it overruns the card. */
@media (max-width: 560px) {
  .pecb-spk-overlay { padding: 26px 12px 14px; }
  .pecb-spk-name { font-size: 13.5px; line-height: 1.25; }
  .pecb-spk-role { font-size: 10.5px; margin-top: 4px; line-height: 1.35; }
  .pecb-spk-initials { font-size: 34px; }
  .pecb-spk-bname { font-size: 15px; line-height: 1.15; }
  .pecb-spk-brole { font-size: 10.5px; margin-top: 5px; }
  .pecb-spk-bio { font-size: 10px; line-height: 1.4; margin-top: 8px; }
  .pecb-spk-country {
    font-size: 9px;
    padding: 2px 7px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
  }
  .pecb-spk-link {
    padding: 8px 10px;
    font-size: 10.5px;
    gap: 4px;
    margin-top: 12px;
  }
}

/* Very narrow phones -- one column reads better than two 130px cards. */
@media (max-width: 360px) {
  .pecb-spk-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   Speaker card height

   .spk-card has no height of its own -- both flip faces are position:absolute,
   so they contribute nothing, and the fixed 400px in pecb-components.css is
   commented out. Without a height here the cards collapse.

   aspect-ratio gives them one that follows the column width, so they stay in
   proportion at every breakpoint instead of needing a height per breakpoint.
   Cards in the same row share a width, so they end up the same height.
   ========================================================================== */

/* --pecb-card-h is published by pecb-scripts.js: the content height of the
   tallest .spk-back in this grid, so every card clears the longest bio and the
   rows stay level. The aspect-ratio is the no-JavaScript fallback -- a definite
   height wins over it, so it only applies before the measurement lands. */
.pecb-spk-grid > .spk-card,
.pecb-home-speakers-grid > .spk-card {
  min-width: 0;              /* never let content widen the grid track */
  /* height: var(--pecb-card-h, auto); */
  aspect-ratio: 2 / 3;
  min-height: 260px;
}

@media (max-width: 640px) {
  /* Two narrow cards per row -- 2/3 would make them very tall. */
  .pecb-spk-grid > .spk-card {
    aspect-ratio: 5 / 7;
    min-height: 260px;
  }
}

@media (max-width: 360px) {
  /* Single column: full width at 2/3 would be taller than the screen. */
  .pecb-spk-grid > .spk-card {
    aspect-ratio: 4 / 5;
    min-height: 0;
  }
}
