/* =========================================================
   CEHD Magazine Viewer — viewer.css (LEAN PLATFORM DROP-IN)
   FULL DROP-IN (consolidated + hardened)
   ========================================================= */

/* ======================
   0) Builder / body behavior
   ====================== */

/* Divi builder should scroll normally */
body.et-bfb,
body.et-fb { overflow: visible !important; }

/* Viewer mode: ONLY lock background scroll when viewer is present */
body.has-mag-viewer:not(.et-bfb):not(.et-fb) { overflow: hidden; }

/* Root viewer shell */
.mag{
  height: 100vh;     /* fallback */
  height: 100dvh;    /* modern */
  max-height: 100vh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Full-bleed viewer container (safe inside WP/Divi layout containers) */
.mag[data-mag-viewer]{
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Screen-reader-only live region */
.mag__srStatus{
  position:absolute !important;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}

/* Global focus ring */
.mag :focus-visible{
  outline: 3px solid #AF8846;
  outline-offset: 2px;
}

/* ======================
   1) Header
   ====================== */

.mag__header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: #500000;
  border-bottom: 1px solid rgba(0,0,0,0.12);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mag__skip{ position:absolute; left:-9999px; top:8px; }
.mag__skip:focus{
  left:14px;
  background:#fff;
  padding:8px 10px;
  border:2px solid #000;
  z-index:10000;
}

.mag__brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:#fff;
}
.mag__logo{ height:28px; width:auto; display:block; }
.mag__brandText{ font-weight:700; color:#fff; }

.mag__right{
  display:inline-flex;
  align-items:center;
  gap:12px;
  color:#fff;
}

.mag__counter{
  font-weight:700;
  border: 1px solid #FAF7F3;
  border-radius: 8px;
  padding: 0 6px;
}

/* Prev/next */
.mag__navBtns{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.mag__navBtn{
  appearance:none;
  border:1px solid rgba(250, 247, 243,0.22);
  background:#500000;
  border-radius:10px;
  padding:8px 10px;
  line-height:1;
  cursor:pointer;
  min-width:40px;
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  color:#fff;
}
.mag__navBtn[disabled]{ opacity:.45; cursor:not-allowed; }

/* Menu button */
.mag__menuBtn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border:1px solid rgba(250, 247, 243,0.22);
  border-radius:10px;
  padding:8px 10px;
  background:transparent;
  color:#fff;
  cursor:pointer;
}

.mag__menuIcon{
  width:18px;
  height:12px;
  display:inline-block;
  position:relative;
  color:#fff;
}
.mag__menuIcon::before,
.mag__menuIcon::after{
  content:"";
  position:absolute;
  left:0; right:0;
  height:2px;
  background:currentColor;
  border-radius:2px;
}
.mag__menuIcon::before{ top:1px; }
.mag__menuIcon::after{ top:9px; }

.mag__menuLabel{ font-weight:700; }

@media (max-width: 749px){
  .mag__menuLabel{ display:none; }
}

/* ======================
   2) Full-screen TOC
   ====================== */

.mag__tocOverlay[hidden]{ display:none !important; }
.mag__tocOverlay{
  position:fixed;
  inset:0;
  z-index:10000;
  background:#fff;
  display:flex;
  flex-direction:column;
}

.mag__tocTop{
  padding:14px 14px 10px;
  border-bottom:1px solid rgba(0,0,0,0.12);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.mag__tocTitle{ font-weight:800; font-size:18px; }

.mag__tocClose{
  border:1px solid rgba(0,0,0,0.22);
  border-radius:10px;
  padding:8px 10px;
  background:transparent;
  font-weight:800;
  cursor:pointer;
}

.mag__tocList{
  padding:12px 14px 18px;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}

.mag__tocItem{
  display:grid;
  grid-template-columns:84px 1fr;
  gap:12px;
  padding:10px 8px;
  border-radius:14px;
  text-decoration:none;
  color:inherit;
}
.mag__tocItem:hover{ background:rgba(0,0,0,0.04); }
.mag__tocItem[aria-current]{ outline:2px solid rgba(0,0,0,0.45); outline-offset:2px; }

.mag__tocThumb{
  width:84px;
  height:56px;
  border-radius:12px;
  object-fit:cover;
  border:1px solid rgba(0,0,0,0.10);
}

.mag__tocHeading{
  display:flex;
  gap:10px;
  align-items:baseline;
  flex-wrap:wrap;
}
.mag__tocIndex{ font-weight:800; opacity:0.7; }
.mag__tocName{ font-weight:800; }
.mag__tocDeck{ margin-top:4px; opacity:0.85; line-height:1.3; }

@media (max-width: 749px){
  .mag__tocItem{ grid-template-columns:72px 1fr; }
  .mag__tocThumb{ width:72px; height:52px; }
}

/* Hide floating nav when TOC is open */
body.mag-menu-open .mag__floatingNav{ display:none; }

/* ======================
   3) Horizontal rail
   ====================== */

.mag__rail{
  flex: 1 1 auto;
  display:flex;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
  touch-action: pan-x;

  margin-top: var(--mag-header-h, 64px);
  height: calc(100vh - var(--mag-header-h, 64px));
  height: calc(100dvh - var(--mag-header-h, 64px));
}

.mag__story{
  flex:0 0 100%;
  width:100%;
  height:100%;
  scroll-snap-align:start;
  box-sizing:border-box;
  position: relative;
}

.mag__storyInner{
  height:100%;
  display:flex;
  flex-direction:column;
}

/* Slide transition polish */
.mag__story .mag__storyInner{
  opacity: 0.35;
  transform: scale(0.985);
  filter: blur(1px);
  transition:
    opacity 420ms ease,
    transform 420ms ease,
    filter 420ms ease;
  will-change: opacity, transform, filter;
}
.mag__story.is-active .mag__storyInner{
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce){
  .mag__story .mag__storyInner{
    transition: none;
    transform: none;
    filter: none;
    opacity: 1;
  }
  .mag__rail{ scroll-behavior: auto !important; }
}

/* ======================
   4) Vertical reader area + typography baseline
   ====================== */

.mag__content{
  --mag-pad-top: 0px;
  --mag-pad-x: 0px;

  flex:1 1 auto;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  touch-action:pan-y;

  padding: var(--mag-pad-top) var(--mag-pad-x);
  padding-bottom: calc(var(--mag-pad-top) + 72px);
}

/* Guardrails: allow children to shrink inside scroll container */
.mag .mag__content *{ min-width: 0; }

.mag__contentInner{
  width: 100%;
  max-width: none;
  font-family: "Work Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #1a1a1a;
  font-size: 18px;
  line-height: 1.65;
}

/* Loading */
.mag__loading{ padding:18px 0; opacity:0.8; }

/* Let Divi control columns IF Divi markup appears; only uncap sections/rows */
.mag__content .et_pb_section,
.mag__content .et_pb_row{
  width: 100% !important;
  max-width: none !important;
}
.mag__content .et_pb_column{ max-width: none !important; }
.mag__content .et_pb_section{
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Typography */
.mag__contentInner h1,
.mag__contentInner h2,
.mag__contentInner h3{
  line-height: 1.15;
  margin: 0 0 0.6em;
}

.mag__contentInner p{ margin: 0 0 1em; }

.mag__contentInner h1{
  font-size: clamp(40px, 6vw, 54px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.mag__contentInner h2{
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.mag__contentInner h3{
  font-size: 18px;
  font-weight: 600;
  color: #500000;
}

.mag__contentInner p,
.mag__contentInner li{
  font-size: 18px;
  line-height: 1.7;
}

.mag__contentInner a{
  color: #500000;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mag__contentInner a:hover{ text-decoration-thickness: 2px; }

.mag__contentInner img{
  max-width: 100%;
  height: auto;
}

/* ======================
   4a) Prose helper (reusable)
   ====================== */

:root{
  --mag-prose-max: 1100px;
  --mag-prose-pad-x: clamp(16px, 3vw, 28px);
}

.mag__content .mag-prose,
.mag-prose{
  width: 100%;
  max-width: var(--mag-prose-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--mag-prose-pad-x);
  padding-right: var(--mag-prose-pad-x);
  padding-top: 24px;
  padding-bottom: 0;
}

.mag-prose.mag-prose--pad{
  padding-top: clamp(18px, 3vw, 28px);
  padding-bottom: clamp(18px, 3vw, 28px);
}

.mag-prose sup{
  font-size: 0.6em;
  line-height: 0;
  vertical-align: super;
  position: relative;
  top: -0.2em;
  letter-spacing: 0.02em;
}

/* ======================
   5) Background slide types (Featured Image as full-slide bg)
   Types: cover, stats, awards, list
   ====================== */

.mag__story[data-mag-type="cover"],
.mag__story[data-mag-type="stats"],
.mag__story[data-mag-type="awards"],
.mag__story[data-mag-type="list"]{
  background-image: var(--mag-cover-image);
  background-size: cover;
  background-repeat: no-repeat;
  --mag-cover-pos: var(--mag-cover-x, 50%) var(--mag-cover-y, 35%);
  background-position: var(--mag-cover-pos, 50% 35%);
}

.mag__story[data-mag-type="cover"] .mag__content,
.mag__story[data-mag-type="stats"] .mag__content,
.mag__story[data-mag-type="awards"] .mag__content,
.mag__story[data-mag-type="list"] .mag__content{
  padding: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.mag__story[data-mag-type="cover"] .mag-slide,
.mag__story[data-mag-type="stats"] .mag-slide,
.mag__story[data-mag-type="awards"] .mag-slide,
.mag__story[data-mag-type="list"] .mag-slide{
  height: 100%;
  min-height: 100%;
  width: 100%;
  position: relative;
  background-image: var(--mag-cover-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: var(--mag-cover-pos, 50% 35%);
  overflow: hidden;
}

@media (max-width: 768px) {
  .mag__story[data-mag-type="cover"] { --mag-cover-pos: 50% 50%; }
}

/* ======================
   6) Cover-specific scaffolding
   ====================== */

.mag__story[data-mag-type="cover"] section.mag-slide.mag-cover{
  position: relative;
  isolation: isolate;
  height: 100% !important;
  min-height: calc(100dvh - var(--mag-header-h, 64px)) !important;
}

.mag__story[data-mag-type="cover"] .mag-cover__overlay{
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(20px, 6vw, 64px);
  color: #fff;
}

.mag__story[data-mag-type="cover"] .mag-cover__overlay::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.55),
    rgba(0,0,0,0.15) 40%,
    rgba(0,0,0,0.05)
  );
}

.mag__story[data-mag-type="cover"] .mag-cover__title{
  font-family: 'Oswald';
  font-size: clamp(84px, 30vw, 200px);
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0;
  color: #fff !important;
}
.mag__story[data-mag-type="cover"] .mag-cover__deck{
  margin: 12px 0 0;
  font-family: 'Work Sans';
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  font-style: italic;
  text-transform: uppercase;
  max-width: 40ch;
  color: #fff !important;
}

/* ======================
   7) Floating nav
   ====================== */

.mag__floatingNav{
  position: fixed !important;
  right: calc(14px + env(safe-area-inset-right, 0px)) !important;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  z-index: 9998 !important;
  display: flex !important;
  gap: 10px !important;
}

.mag__floatBtn{
  appearance: none;
  border: 0;
  background: #500000;
  color: #fff;
  border-radius: 14px;
  width: 56px;
  height: 56px;
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}

.mag__floatBtn:hover{ filter: brightness(0.95); }
.mag__floatBtn:active{ transform: translateY(1px); }

.mag__floatBtn[disabled]{
  opacity: .45;
  cursor: not-allowed;
  filter: none;
  transform: none;
}

@media (max-width: 749px){
  .mag__floatingNav{
    right: calc(10px + env(safe-area-inset-right, 0px));
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .mag__floatBtn{
    width: 52px;
    height: 52px;
    font-size: 20px;
  }
}

/* ======================
   8) Lightbox (dialog)
   ====================== */

.mag-lightbox[hidden]{ display:none !important; }

.mag-lightbox{
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 3vw, 28px);
}

.mag-lightbox__dialog{
  width: min(1100px, 96vw);
  max-height: 90vh;
  background: #111;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
}

.mag-lightbox__top{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.35);
}

.mag-lightbox__close{
  appearance: none;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}

.mag-lightbox__body{
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.mag-lightbox__img{
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.mag-lightbox__video{
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.mag-lightbox__video iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

body.mag-lightbox-open{
  overflow: hidden !important;
}

.mag-lightbox__cap {
	font-family: 'Work Sans', 'Arial', sans-serif;
	color: #fff;
	font-weight: 600;
	padding: 1em;
	padding-bottom: 16px;
}

/* ======================
   9) Hide WP/Divi page title/meta while viewer active
   ====================== */

body.has-mag-viewer .entry-title,
body.has-mag-viewer h1.entry-title,
body.has-mag-viewer h1.entry-title.main_title{
  display: none !important;
}

body.has-mag-viewer .et_post_meta_wrapper{
  display: none !important;
}

body.has-mag-viewer .entry-content > .post-meta,
body.has-mag-viewer .entry-content > header,
body.has-mag-viewer article > header{
  display: none !important;
}

body.has-mag-viewer #main-content .container{
  padding-top: 0 !important;
}

body.has-mag-viewer #main-footer{
  display: none !important;
}

/* =========================================================
   STORY HERO SPLIT + FIGURE CAPTIONS
   ========================================================= */

.mag .mag-figure{ margin: 0; }
.mag .mag-figure img{ display:block; width:100%; height:auto; }

.mag .mag-figure__caption{
  margin: 10px 0 0;
  font-family: "Work Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(0,0,0,0.72);
}

.mag .mag-storyHeroSplit .mag-figure__caption{
  color: rgba(255,255,255,0.80);
  max-width: 56ch;
}

.mag .mag-storyHeroSplit{
  width: 100%;
  max-width: 100%;
  margin: 0;

  padding-left: clamp(16px, 2.8vw, 28px);
  padding-right: clamp(16px, 2.8vw, 28px);
  padding-top: clamp(16px, 2.4vw, 26px);
  padding-bottom: clamp(16px, 2.4vw, 26px);

  display: grid;
  gap: clamp(14px, 2.2vw, 24px);
  align-items: start;

  background: #500000;
  color: #fff;
}

@media (min-width: 900px){
  .mag .mag-storyHeroSplit{
    grid-template-columns: minmax(520px, 1.25fr) minmax(340px, 0.75fr);
  }
}
@media (min-width: 1200px){
  .mag .mag-storyHeroSplit{
    grid-template-columns: minmax(620px, 1.25fr) minmax(360px, 0.75fr);
  }
}

.mag .mag-storyHeroSplit__meta{ min-width: 0; }

.mag .mag-kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;

  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.55);

  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  line-height: 1;

  color: rgba(255,255,255,0.95);
  margin-bottom: 14px;
}

.mag .mag-storyHeroSplit__title{
  margin: 0 0 12px;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-size: clamp(36px, 3.2vw + 12px, 64px);
  color: #fff;
}

.mag .mag-storyHeroSplit__deck{
  margin: 0;
  font-style: italic;
  font-weight: 600;
  line-height: 1.6;
  max-width: 68ch;
  font-size: clamp(18px, 0.9vw + 14px, 24px);
  color: rgba(255,255,255,0.92);
}

.mag .mag-figure--hero{
  min-width: 0;
  justify-self: end;
  width: min(560px, 100%);
}

.mag .mag-figure--hero .mag-figure__media{
  overflow: hidden;
  height: clamp(260px, 22vw, 360px);
}

.mag .mag-figure--hero .mag-figure__media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 0;
}

.mag .mag-figure--hero .mag-figure__caption{ margin-top: 10px; }

@media (max-width: 899px){
  .mag .mag-storyHeroSplit{ grid-template-columns: 1fr; }

  .mag .mag-figure--hero{
    justify-self: start;
    width: 100%;
  }

  .mag .mag-figure--hero .mag-figure__media{
    height: clamp(220px, 42vw, 320px);
  }

  .mag .mag-storyHeroSplit__title{
    font-size: clamp(32px, 6.5vw, 46px);
  }
  .mag .mag-storyHeroSplit__deck{
    font-size: clamp(17px, 3.4vw, 20px);
  }
}

/* =========================================================
   STORY LAYOUT: main + right sidebar
   ========================================================= */

/* Base: stacked (mobile-first) */
.mag .mag-storyLayout{
  background:#fff;
  padding-top: 36px;
  padding-bottom: 28px;
}

/* Prevent overflow weirdness */
.mag .mag-storyLayout > .mag-storyMain,
.mag .mag-storyLayout > .mag-storySidebar{
  min-width: 0;
}

/* Desktop: two columns, centered as a unit */
@media (min-width: 980px){
  .mag .mag-storyLayout{
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: clamp(16px, 3vw, 40px);
    align-items: start;

    padding-left: clamp(16px, 2.8vw, 28px);
    padding-right: clamp(16px, 2.8vw, 28px);
	padding-top: 48px;
  }

  .mag .mag-storyLayout > .mag-storyMain{ grid-column: 1; }
  .mag .mag-storyLayout > .mag-storySidebar{ grid-column: 2; }

  .mag .mag-storyLayout > .mag-storyMain.mag-prose{
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .mag .mag-storyLayout > .mag-storyMain.mag-prose > *{
    max-width: var(--mag-prose-max, 72ch);
    padding-left: clamp(16px, 2.2vw, 28px);
    padding-right: clamp(16px, 2.2vw, 28px);
  }

  .mag .mag-storyLayout > .mag-storyMain.mag-prose > .mag-fullBleed,
  .mag .mag-storyLayout > .mag-storyMain.mag-prose > figure.mag-fullBleed,
  .mag .mag-storyLayout > .mag-storyMain.mag-prose > .wp-block-image.alignfull{
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }

  .mag .mag-storySidebar{
    position: sticky;
    top: calc(var(--mag-header-h, 64px) + 18px);
    align-self: start;
  }
}

@media (max-width: 979px){
  .mag .mag-storyLayout{
    padding-left: 0;
    padding-right: 0;
  }
}

/* Sidebar media safety */
.mag .mag-storySidebar{
  width: 100%;
  max-width: none;
  margin: 0;
}

.mag .mag-storySidebar img,
.mag .mag-storySidebar video,
.mag .mag-storySidebar iframe{
  max-width: 100%;
  height: auto;
  display: block;
}

.mag .mag-storySidebar figcaption{
  font-size: 0.9em;
  line-height: 1.35;
}

/* =========================================================
   SIDEBAR STACK + GRID (PHOTOS)
   ========================================================= */

.mag .mag-sideStack{
  display: grid;
  gap: 14px;
}

/* Section heading like "Photos" */
.mag .mag-sideHeading{
  margin: 0;
margin-top: 1em;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: #500000;
}

/* Grid container for tiles */
.mag .mag-sideGrid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 979px){
  .mag .mag-sideGrid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 520px){
  .mag .mag-sideGrid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.mag .mag-sideMedia{
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mag .mag-sideMedia__btn{
  appearance: none;
  border: 1px solid rgba(0,0,0,0.14);
  background: #fff;
  padding: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

/* Keep tiles visually consistent */
.mag .mag-sideMedia__img{
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;      /* square tiles */
  object-fit: cover;
}

/* Expand icon */
.mag .mag-sideMedia__icon{
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.mag .mag-sideMedia__cap{
  margin: 0;
  font-family: "Work Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(0,0,0,0.72);
}

/* Hide placeholder captions cleanly if you leave them blank later */
.mag .mag-sideMedia__cap:empty{ display:none; }

/* =========================================================
   STORY GRID SANITY: kill stray wpautop <p> nodes
   ========================================================= */

.mag .mag-storyLayout > p:empty{
  display: none !important;
}

@supports selector(p:has(br:only-child)){
  .mag .mag-storyLayout > p:has(br:only-child){
    display: none !important;
  }
}

.mag .mag-storyLayout > p{
  grid-column: 1 / -1;
  margin: 0 0 1em;
}

/* =========================================================
   OPTICAL CENTERING (SAFE)
   Centers story text within the main column without flex
   ========================================================= */

@media (min-width: 1200px){

  /* Center each direct child of the prose main column (p, h2, etc.) */
  .mag .mag-storyLayout > .mag-storyMain.mag-prose > *{
    margin-left: auto;
    margin-right: auto;
  }

}

/* ===== VOI list (one video per line) ===== */
.mag-voiList { margin: 32px 0; }
.mag-voiList__inner { max-width: 900px; margin: 0 auto; }
.mag-voiList__heading { margin: 0 0 16px; }

.mag-voiList__items { display: grid; gap: 12px; }

.mag-voiItem { margin: 0; }
.mag-voiItem__btn{
  width: 100%;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  align-items: center;
  text-align: left;
  padding: 12px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.mag-voiItem__thumb{
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.mag-voiItem__play{
  position: absolute;
  /* will be overridden by the wrapping context below */
  opacity: 0;
}

/* place play icon over thumbnail */
.mag-voiItem__btn{ position: relative; }
.mag-voiItem__btn .mag-voiItem__play{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translate(0,-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.65);
  color: #fff;
  opacity: 1;
}

/* title */
.mag-voiItem__title{
  font-weight: 600;
  line-height: 1.25;
}

/* mobile: stack thumbnail above title */
@media (max-width: 640px){
  .mag-voiItem__btn{
    grid-template-columns: 1fr;
  }
  .mag-voiItem__btn .mag-voiItem__play{
    top: 12px;
    left: 12px;
    transform: none;
  }
}

/*** OTHER SLIDE TYPES AND STYLES ***/
/* ===========================
   Stats Slide: Behind the Numbers
   - Uses featured image as background (handled elsewhere)
   - White text
   - Stat + label in Oswald + #AF8846
   =========================== */

.mag-btn--stats{
  position: relative;
  /* If your slide background is the featured image, keep text readable */
  /* Optional: add a subtle overlay so white text passes contrast on busy images */
}

/* .mag-btn--stats::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.55),
    rgba(0,0,0,.55)
  );
  pointer-events:none;
  z-index:0;
} */

/* Ensure content sits above overlay */
.mag-btn--stats .mag-btn__inner{
  position: relative;
  z-index: 1;
}

/* Make all slide text white by default */
.mag-btn--stats,
.mag-btn--stats .mag-prose,
.mag-btn--stats .mag-prose p,
.mag-btn--stats .mag-prose h1,
.mag-btn--stats .mag-prose h2,
.mag-btn--stats .mag-prose h3,
.mag-btn--stats .mag-prose h4,
.mag-btn--stats .mag-prose li{
  color: #fff;
}

/* Title + deck spacing to match story rhythm */
.mag-btn--stats .mag-btn__title{
  margin: 0 0 10px 0;
}

.mag-btn--stats .mag-btn__deck{
  margin: 0 0 22px 0;
  max-width: 70ch;
}

/* Stat + label styling (Oswald + #AF8846) */
.mag-btn--stats .mag-btn__stat,
.mag-btn--stats .mag-btn__kicker{
  font-family: "Oswald", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #AF8846;
  letter-spacing: .02em;
}

.mag-btn--stats .mag-btn__stat{
  font-size: clamp(44px, 10vw, 72px);
  line-height: 1;
  font-weight: 600;
  margin-bottom: 6px;
}

.mag-btn--stats .mag-btn__kicker{
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* Right-column headings: keep readable + consistent */
.mag-btn--stats .mag-btn__h{
  margin: 0 0 6px 0;
  font-weight: 700;
}

/* Optional: tighten right column paragraphs slightly */
.mag-btn--stats .mag-btn__p{
  margin: 0 0 14px 0;
}

/* If your grid needs help on smaller screens */
@media (max-width: 980px){
  .mag-btn--stats .mag-btn__deck{
    max-width: 100%;
  }
}

/* =========================
   Awardees cards (main column)
   ========================= */

.mag-awardees{
  margin-top: 28px;
}

.mag-awardees__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Card */
.mag-awardeeCard{
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

/* Photo */
.mag-awardeeCard__media{
  width: 92px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,.06);
}

.mag-awardeeCard__media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text */
.mag-awardeeCard__name{
  margin: 0 0 6px 0;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.2;
}

.mag-awardeeCard__blurb{
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

/* Wider screens: slightly larger avatar + tighter text rhythm */
@media (min-width: 768px){
  .mag-awardeeCard{
    grid-template-columns: 110px 1fr;
    padding: 18px;
  }
  .mag-awardeeCard__media{
    width: 110px;
  }
}

/* Ultra-wide: allow 2-up cards INSIDE main column if you ever want it
   (kept off by default so it stays readable) */
@media (min-width: 1200px){
  .mag-awardees__grid.mag-awardees__grid--twoUp{
    grid-template-columns: 1fr 1fr;
  }
}

/* Split hero without image */
.mag-storyHeroSplit--noImage{
  grid-template-columns: 1fr;
  min-height: 40vh;
}

.mag-storyHeroSplit--noImage .mag-storyHeroSplit__meta{
  max-width: 720px;
}

/* Centers & Institutes — small “card” tweak so awardeeCard style works without images */
.mag-awardeeCard--center .mag-awardeeCard__media { display: none; }

/* Keep links looking like headlines but still obviously links */
.mag-awardeeCard--center .mag-awardeeCard__name a{
  text-decoration: none;
}
.mag-awardeeCard--center .mag-awardeeCard__name a:hover,
.mag-awardeeCard--center .mag-awardeeCard__name a:focus-visible{
  text-decoration: underline;
}

/* Donor Impact: light background + dark text, Oswald stats/labels */
.mag-btn__grid--donor{
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.mag-btn__statsCol{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.mag-btn__statGroup{
  display: grid;
  gap: 8px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 16px;
  background: #fff;
}

.mag-btn__statGroup .mag-btn__stat{
  font-family: "Oswald", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .01em;
  color: #500000; /* maroon */
  font-size: clamp(34px, 4vw, 56px);
  margin: 0;
}

.mag-btn__statGroup .mag-btn__kicker{
  font-family: "Oswald", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #333;
  line-height: 1.35;
  margin: 0;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 980px){
  .mag-btn__statsCol{ grid-template-columns: 1fr; }
}

/* Faculty / Awards column list */
.mag-awardCols{
  margin: 1.25em 0;              /* match paragraph spacing */
  padding-left: 0;               /* remove browser indent */
  list-style-position: outside;
  list-style-type: disc;

  column-count: 2;
  column-gap: 48px;
}

/* Ensure bullets align with text column */
.mag-awardCols li{
  margin-left: 1.25em;           /* controlled bullet indent */
  break-inside: avoid;
  padding-left: 0;
  line-height: 1.6;
}

/* Match body text sizing */
.mag-awardCols li{
  font-size: inherit;
  color: inherit;
}

/* Mobile: single column */
@media (max-width: 768px){
  .mag-awardCols{
    column-count: 1;
  }
}

/* ===== Credits (simple + semantic) ===== */
.mag-creditsList{
  list-style: none;
  margin: 1rem 0 2rem;
  padding: 0;
  display: grid;
  gap: 14px;
}

.mag-creditsItem__name{
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.mag-creditsItem__role{
  margin: 0.25rem 0 0;
  color: #555;
  line-height: 1.4;
}

.mag-creditsDL{
  margin: 1rem 0 1.5rem;
}

.mag-creditsDL__row{
  margin: 0 0 0.75rem;
}

.mag-creditsDL dt{
  font-weight: 700;
  margin: 0;
}

.mag-creditsDL dd{
  margin: 0.25rem 0 0;
}

.mag-creditsFineprint{
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

.mag-creditsAddress{
  font-style: normal;
  line-height: 1.55;
}

.mag-creditsAddress a{
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mag-creditsHandle{
  display: inline-block;
  margin-top: 0.5rem;
  color: #555;
}

/* ===== YouTube Lightbox (VOI) ===== */
.mag-ytModal[hidden]{ display:none !important; }

.mag-ytModal{
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.mag-ytModal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.75);
}

.mag-ytModal__panel{
  position: relative;
  width: min(1000px, calc(100vw - 32px));
  margin: 6vh auto 0;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 70px rgba(0,0,0,.45);
}

.mag-ytModal__close{
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.mag-ytModal__close:focus{
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.mag-ytModal__frameWrap{
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
}

.mag-ytModal__frame{
  width: 100%;
  height: 100%;
  border: 0;
}

/* Prevent background scroll while modal open */
html.mag-ytModalOpen,
body.mag-ytModalOpen{
  overflow: hidden;
}

/** BTN STYLES ***/
.btn-container {
	display: flex;
	gap: 0.5em;
	margin-bottom: 1em;
}

.btn-card {
	width: 40%;
	max-width: 360px;
	border: 1px solid #732f2f;
	border-radius: 8px;
	font-family: 'Oswald', sans-serif;
	padding: 0.5em;
	display: flex;
	flex-direction: column;
}

.btn__stat {
	color: #AF8846;
	font-weight: 400;
	font-size: clamp(32px,20vw,48px);
}

.btn__kicker {
	color: #eaeaea;
	font-weight: 600;
	font-family: 'Work Sans';
	font-size: 18px;
}

blockquote .mag-pullquote {
	border-left: 4px solid #732f2f;
	margin-top: 2em;
	margin-bottom: 2em;
}

.mag-pullquote > p.quote {
	font-family: 'Georgia';
	font-size: 1em;
}

.mag-pullquote > p.attr-name {
	font-family: 'Work Sans';
	font-size: 15px;
	font-weight: 600;
	color: #500000;
	margin-bottom: 0;
}

.mag-pullquote > p.attr-title {
	font-style: italic;
	font-size: 14px;
}

img.mag-signature__img{
	height: 80px;
	margin-top: 1em;
	margin-bottom: 1em;
}

section.mag-sag {
	margin-top: 1.5em;
	margin-bottom: 1.5em;
	padding-left: 2em;
	padding-right: 2em;
}

.mag-facultyWidget__list{display:flex;flex-direction:column;gap:12px}
.mag-facultyWidget__card{display:flex;gap:12px;align-items:flex-start;border:1px solid rgba(0,0,0,.12);border-radius:8px;padding:10px}
.mag-facultyWidget__img{width:56px;height:56px;object-fit:cover;border-radius:8px}
.mag-facultyWidget__name{font-weight:700}
.mag-facultyWidget__title{font-size:.95rem;opacity:.9}
.mag-facultyWidget__link{font-size:.95rem;text-decoration:underline;text-underline-offset:2px}
.mag-storySidebar .mag-facultyWidget__card{padding:10px}
.mag-storySidebar .mag-facultyWidget__img{width:44px;height:44px}
.mag-storySidebar .mag-facultyWidget__name{font-size:1rem}
.mag-storySidebar .mag-facultyWidget__title{font-size:.9rem}