/* =====================================================================
   Speakers page design: Option 6 (Committee Cards)
   Emirates Burn & Wound Conference 2026
   Used by: speakers.php
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ===== Palette: warm sand. Light tones, soft contrast. =====
   ink   = headings            muted = roles and body text
   band  = card top band       band2 = band on hover / active
   accent= links, icons, labels  soft = pale accent fill
   bg    = page background     side  = modal sidebar background
   Scoped to .cm and .cbm so they never clash with the site's own variables. */
.cm,
.cbm {
  --bg: #faf7f2;
  --card: #fff;
  --band: #f1e9dc;
  --band2: #9a7a4a;
  --ink: #2d2924;
  --muted: #7a7169;
  --accent: #8f7042;
  --soft: #f6efe3;
  --side: #f5f0e8;
  --line: rgba(45, 41, 36, .08);
  --shadow: 45, 41, 36;
}

/* Stop the page scrolling behind the open modal */
html.cbm-open {
  overflow: hidden;
}

/* ===== Option 6: Committee Cards ===== */
.cm {
  --out: cubic-bezier(.16, 1, .3, 1);
  --font: 'Plus Jakarta Sans', sans-serif;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  padding: clamp(56px, 6.4vw, 96px) 0 clamp(64px, 7.4vw, 116px);
}

.cm *,
.cm *::before,
.cm *::after {
  box-sizing: border-box;
}

.cm-wrap {
  width: min(1180px, 100% - clamp(32px, 7vw, 120px));
  margin-inline: auto;
}

.cm-head {
  text-align: center;
  margin-bottom: clamp(36px, 4vw, 56px);
}

.cm-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.cm-title {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(30px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0;
  color: var(--ink);
}

.cm-sub {
  margin: 14px auto 0;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.cm-none {
  text-align: center;
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

.cm-grid {
  --gap: clamp(16px, 2vw, 28px);
  --w: clamp(210px, 19vw, 236px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
}

.cm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 var(--w);
  min-width: 0;
  padding: 0 16px 24px;
  margin: 0;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line), 0 18px 36px -26px rgba(var(--shadow), .35);
  transition: transform .7s var(--out), box-shadow .7s var(--out);
}

.cm-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--line);
}

.cm-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.cm-band {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 78px;
  background: linear-gradient(120deg, var(--band) 0%, color-mix(in srgb, var(--band) 80%, var(--band2)) 100%);
}

/* Hover overlay fades in over the band, as on the committee page. */
.cm-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, color-mix(in srgb, var(--band2) 80%, #000) 0%, var(--band2) 58%, color-mix(in srgb, var(--band2) 65%, #fff) 100%);
  opacity: 0;
  transition: opacity .7s ease;
}

.cm-go {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--card);
  color: var(--accent);
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(var(--shadow), .12);
  transition: transform .6s var(--out), color .3s, background .3s;
}

.cm-go svg,
.cbm-chip svg,
.cbm-nav svg,
.cbm-x svg {
  width: 1em;
  height: 1em;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cm-photo {
  position: relative;
  display: block;
  width: 130px;
  aspect-ratio: 1;
  margin-top: 24px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--soft);
  box-shadow: 0 0 0 4px var(--card), 0 12px 24px -14px rgba(var(--shadow), .45);
}

.cm-zoom {
  position: absolute;
  inset: 0;
}

.cm-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.cm-name {
  display: block;
  margin-top: 18px;
  font-size: 15.5px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--ink);
  transition: color .4s;
}

.cm-role {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

@media (hover: hover) {
  .cm-grid .cm-card.rv-in:is(:hover, :focus-visible) {
    transform: translateY(-5px);
    box-shadow: 0 22px 46px rgba(var(--shadow), .16);
  }

  .cm-card:is(:hover, :focus-visible) .cm-band::before {
    opacity: 1;
  }

  .cm-card:is(:hover, :focus-visible) .cm-name {
    color: var(--accent);
  }

  .cm-card:is(:hover, :focus-visible) .cm-go {
    background: var(--band2);
    color: #fff;
    transform: rotate(45deg);
  }
}

/* Scroll reveal */
[data-rv] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .85s var(--out) var(--d, 0s), transform .85s var(--out) var(--d, 0s);
}

[data-rv].rv-in {
  opacity: 1;
  transform: none;
}

/* Once revealed, the card's own hover transition takes over from the reveal one. */
.cm-grid .cm-card.rv-in {
  transition: transform .7s var(--out), box-shadow .7s var(--out);
}

@media (max-width: 560px) {
  .cm-grid {
    --w: calc(50% - var(--gap) / 2);
  }

  .cm-card {
    padding: 0 10px 18px;
  }

  .cm-photo {
    width: 104px;
  }

  .cm-band {
    height: 66px;
  }
}

@media (max-width: 360px) {
  .cm-grid {
    --w: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cm * {
    transition: none !important;
  }

  [data-rv] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== Bio modal with speaker sidebar ===== */
.cbm {
  --out: cubic-bezier(.16, 1, .3, 1);
  --font: 'Plus Jakarta Sans', sans-serif;
  font-family: var(--font);
  color: var(--ink);
  box-sizing: border-box;
  padding: 0;
  border: 0;
  background: transparent;
  margin: auto;
  overflow: visible;
  max-width: none;
  max-height: none;
  width: min(1040px, 100vw - 32px);
  height: min(640px, 100dvh - 32px);
}

.cbm *,
.cbm *::before,
.cbm *::after {
  box-sizing: border-box;
}

.cbm[open] {
  animation: cbm-in .6s var(--out) both;
}

.cbm.is-closing {
  animation: cbm-out .25s ease both;
}

.cbm::backdrop {
  background: rgba(31, 44, 58, .45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: cbm-fade .4s ease both;
}

.cbm.is-closing::backdrop {
  animation: cbm-fade .25s ease reverse both;
}

@keyframes cbm-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(.97);
  }
}

@keyframes cbm-out {
  to {
    opacity: 0;
    transform: translateY(12px) scale(.98);
  }
}

@keyframes cbm-fade {
  from {
    opacity: 0;
  }
}

.cbm-panel {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line), 0 40px 90px -30px rgba(var(--shadow), .5);
}

/* Sidebar */
.cbm-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--side);
  border-right: 1px solid var(--line);
}

.cbm-side-head {
  padding: 18px 18px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

.cbm-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 10px 14px;
  margin: 0;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--shadow), .25) transparent;
}

.cbm-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 8px 10px;
  margin: 0 0 2px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background .3s var(--out), box-shadow .3s var(--out);
}

.cbm-item:hover {
  background: rgba(255, 255, 255, .7);
}

.cbm-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.cbm-item[aria-current="true"] {
  background: var(--card);
  box-shadow: 0 6px 16px -10px rgba(var(--shadow), .5);
  color: var(--accent);
  font-weight: 600;
}

.cbm-thumb {
  flex: none;
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--soft);
  box-shadow: 0 0 0 2px var(--card);
}

.cbm-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
}

.cbm-item span:last-child {
  font-size: 13px;
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Main */
.cbm-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.cbm-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px 14px 28px;
  border-bottom: 1px solid var(--line);
}

.cbm-brand {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

.cbm-count {
  margin-left: auto;
  flex: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.cbm-x {
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  transition: background .3s var(--out), color .3s var(--out), border-color .3s var(--out);
}

.cbm-x:hover {
  background: var(--band2);
  border-color: var(--band2);
  color: #fff;
}

.cbm-x:focus-visible,
.cbm-nav:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cbm-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 32px 28px 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--shadow), .25) transparent;
}

.cbm-scroll:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -4px;
}

.cbm-hero {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.cbm-photo {
  position: relative;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  background: var(--soft);
  box-shadow: 0 0 0 1px var(--line), 0 14px 26px -16px rgba(var(--shadow), .45);
  animation: cbm-up .6s var(--out) both;
}

.cbm-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.cbm-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

.cbm-name {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 8px 0 8px;
  color: var(--ink);
}

.cbm-role {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.cbm-role b {
  font-weight: 600;
  color: var(--ink);
}

.cbm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.cbm-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
}

.cbm-chip svg {
  font-size: 14px;
}

.cbm-bio {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.cbm-bio p {
  margin: 0 0 12px;
}

.cbm-bio p:last-child {
  margin-bottom: 0;
}

.cbm-empty {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--soft);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.cbm-scroll>* {
  animation: cbm-up .6s var(--out) both;
}

.cbm-scroll>:nth-child(2) {
  animation-delay: .05s;
}

.cbm-scroll>:nth-child(3) {
  animation-delay: .1s;
}

@keyframes cbm-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* Footer prev / next */
.cbm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--card);
}

.cbm-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 48%;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: background .3s var(--out);
}

.cbm-nav:hover {
  background: var(--soft);
}

.cbm-nav svg {
  flex: none;
  font-size: 16px;
  color: var(--accent);
}

.cbm-nav .cbm-thumb {
  width: 30px;
  height: 30px;
  box-shadow: none;
}

.cbm-nav span:not(.cbm-thumb) {
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cbm-nav[data-next] {
  flex-direction: row-reverse;
  margin-left: auto;
}

@media (max-width: 860px) {
  .cbm {
    width: 100vw;
    height: 100dvh;
  }

  .cbm-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    border-radius: 0;
  }

  .cbm-side {
    min-width: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .cbm-side-head {
    padding: 12px 16px 6px;
  }

  .cbm-list {
    display: flex;
    gap: 4px;
    min-width: 0;
    padding: 0 10px 10px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .cbm-item {
    flex: none;
    width: auto;
    padding: 6px;
  }

  .cbm-item span:last-child {
    display: none;
  }

  .cbm-item[aria-current="true"] {
    box-shadow: 0 0 0 2px var(--accent);
  }

  .cbm-top {
    padding: 12px 14px 12px 18px;
  }

  .cbm-scroll {
    padding: 20px 18px;
  }

  .cbm-hero {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
  }

  .cbm-photo {
    width: 88px;
  }

  .cbm-foot {
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .cbm-nav span:not(.cbm-thumb) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {

  .cbm,
  .cbm *,
  .cbm::backdrop {
    animation: none !important;
    transition: none !important;
  }
}

.cbm-brand img {
  height: 34px;
  width: auto;
  display: block;
}