/* =========================
   Press Scroller (ml-ps)
   ========================= */

/* Palette defaults (only used if your global vars aren't present) */
:root{
  --merlot: #38151c;
  --merlot-deep: #2a0f14;
  --peony: #f48a96;
  --blush: #fcd8d9;
  --gold: #e1af26;
  --champagne: #fce796;
  --cloud: #fbf6ea;
}

.ml-ps{
  --ps-card-bg: #f7f2ea;
  --ps-ink: #2b1e22;

  --ps-head-bg: var(--merlot-deep, #2a0f16);
  --ps-border: rgba(43,30,34,.55);

  --ps-radius: 15px;
  --ps-card-w: 300px;
  --ps-card-h: 240px;
  --ps-gap: 18px;

  --ps-scroll-line: rgba(43,30,34,.55);
  --ps-scroll-accent: var(--peony, #e79aa4);
  --ps-scroll-underline: 3px;

  /* CTA button (iconlink-ish) */
  --ps-btn-icon: 22px;
  --ps-btn-gap: 10px;
  --ps-btn-text: 12px;
  --ps-btn-underline: 2px;
  --ps-btn-pad-b: 3px;

  /* CTA colors */
  --ps-btn-bg: var(--peony, #f48a96);
  --ps-btn-fg: var(--blush, #fcd8d9);
  --ps-btn-bg-h: var(--gold, #e1af26);
  --ps-btn-fg-h: var(--cloud, #fbf6ea);

  /* Podcast card sizing */
  --ps-podcast-w: min(600px, 72vw);
  --ps-podcast-h: 210px;
}

/* Tighten spacing ONLY for the Podcasts scroller */
.ml-ps[data-ps-type="podcast"]{
  --ps-gap: 18px;
  --ps-card-h: 300px;
}

/* Tighten spacing for Courses scroller (matches Podcast density) */
.ml-ps[data-ps-type="courses"]{
  --ps-gap: 8px;
}

@media (max-width: 480px){
  .ml-ps[data-ps-type="podcast"]{
  --ps-gap: 18px;
  --ps-card-h: 300px;
}
}
  .ml-ps[data-ps-type="courses"]{
    --ps-gap: 8px;
  }
}

.ml-ps,
.ml-ps *{ box-sizing: border-box; }

/* ===== Viewport ===== */

.ml-ps__viewport{
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;

  /* IMPORTANT: no snap (custom scrollbar + drag stays smooth) */
  scroll-snap-type: none;

  padding: 0 2px 3em;
  outline: none;
  cursor: grab;
}
.ml-ps__viewport.is-dragging{ cursor: grabbing; }

/* Hide native scrollbar */
.ml-ps__viewport::-webkit-scrollbar{ height: 0; }
.ml-ps__viewport{ scrollbar-width: none; }

.ml-ps__track{
  display: flex;
  gap: var(--ps-gap);
  width: max-content;
  align-items: stretch;
}

/* While dragging the row, prevent accidental clicks on normal content */
.ml-ps--dragging-row .ml-ps__card{ user-select: none; }

/* ===== Cards (Press default) ===== */

.ml-ps__card{
  width: var(--ps-card-w);
  height: var(--ps-card-h);
  background: var(--ps-card-bg);
  border: 2px solid var(--merlot);
  border-radius: var(--ps-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ml-ps__card-head{
  background: var(--merlot);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  min-height: 54px;
}

.ml-ps__logo-wrap{
  width: 100%;
  display: flex;
  align-items: center;
}

/* Publication logos */
.ml-ps__logo{
  max-height: 21px;
  width: auto;
  max-width: 115px;
  object-fit: contain;
  display: block;
}

.ml-ps__card-body{
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 10px;
}

.ml-ps__title{
  margin: 0;
  font-size: 14px;
  font-family: 'Jost', sans-serif;
  line-height: 1.25;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ps-ink);
  max-height: calc(1.25em * 3);
  overflow: hidden;
  font-weight: 500;
}

.ml-ps__cta{
  display: flex;
  align-items: flex-end;
}

/* ===== CTA button (scoped + collision-proof) ===== */

.ml-ps__btn{
  display: inline-flex;
  align-items: center;
  gap: var(--ps-btn-gap);
  text-decoration: none !important;
  color: var(--merlot, #38151c) !important;
}

/* Force builders not to recolor on hover/visited */
.ml-ps__btn,
.ml-ps__btn:hover,
.ml-ps__btn:visited,
.ml-ps__btn:active,
.ml-ps__btn:focus,
.ml-ps__btn:focus-visible{
  color: var(--merlot, #38151c) !important;
}

.ml-ps__btn-icon{
  width: var(--ps-btn-icon);
  height: var(--ps-btn-icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.ml-ps__btn-svg{
  width: 100%;
  height: 100%;
  display: block;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  transition: transform 260ms ease;
}

/* Unique SVG classes to avoid collisions anywhere else */
.ml-ps__btn .ml-ps__btn-bg-7{ fill: var(--ps-btn-bg) !important; transition: fill 260ms ease; }
.ml-ps__btn .ml-ps__btn-mark-7{ fill: var(--ps-btn-fg) !important; transition: fill 260ms ease; }

.ml-ps__btn-text{
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  font-size: var(--ps-btn-text);
  color: inherit !important;
  display: inline-block;
  padding-bottom: var(--ps-btn-pad-b);
  border-bottom: var(--ps-btn-underline) solid var(--ps-btn-bg) !important;
  transition: border-color 220ms ease;
}

.ml-ps__btn:hover .ml-ps__btn-svg{ transform: rotate(45deg); }
.ml-ps__btn:hover .ml-ps__btn-bg-7{ fill: var(--ps-btn-bg-h) !important; }
.ml-ps__btn:hover .ml-ps__btn-mark-7{ fill: var(--ps-btn-fg-h) !important; }
.ml-ps__btn:hover .ml-ps__btn-text{ border-bottom-color: var(--ps-btn-bg-h) !important; }

.ml-ps__btn:focus-visible{
  outline: 2px solid var(--ps-btn-bg-h);
  outline-offset: 5px;
  border-radius: 8px;
}


/* ===== Courses cards (CPT: courses) ===== */

.ml-ps[data-ps-type="courses"] .ml-ps__card{
  /* a touch taller for the body box */
  height: 260px;
}

.ml-ps[data-ps-type="courses"] .ml-ps__card-head{
  justify-content: flex-start;
}

.ml-ps__course-head{
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding:1em;
}

.ml-ps__course-diamond{
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  display: inline-block;
}

.ml-ps__course-diamond--peony{ background: var(--peony, #f48a96); }
.ml-ps__course-diamond--gold{ background: var(--gold, #e1af26); }
.ml-ps__course-diamond--blush{ background: var(--blush, #fcd8d9); }
.ml-ps__course-diamond--champagne{ background: var(--champagne, #fce796); }
.ml-ps__course-diamond--cloud{ background: var(--cloud, #fbf6ea); }

.ml-ps__course-head-title{
  margin: 0;
  text-align: left;
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cloud, #fbf6ea);
}

.ml-ps__course-desc{
  margin: 0;
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ps-ink);
}


/* ===== Podcast cards (unstyled embeds) ===== */


/* ===== Podcast cards (no iframe) ===== */

.ml-ps__card--podcast{
  width: var(--ps-card-w);
  height: var(--ps-card-h);

  background: var(--ps-card-bg);
  border: 2px solid var(--merlot);
  border-radius: var(--ps-radius);
  overflow: hidden;

  display: flex;
  flex-direction: column;
}

.ml-ps__podcast-head{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ml-ps__podcast-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* icon sits in a light pill like the screenshot */
  width: 38px;
  height: 30px;
  border-radius: 10px;
  background: rgba(251, 246, 234, 0.12); /* cloud w/ opacity */

  color: var(--cloud);
}

.ml-ps__podcast-svg{
  width: 22px;
  height: 22px;
  display: block;
}

.ml-ps__podcast-length{
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--champagne);
  white-space: nowrap;
}

.ml-ps__podcast-title{
  margin: 0;
  font-size: 14px;
  font-family: 'Jost', sans-serif;
  line-height: 1.25;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--merlot-deep);
  font-weight: 600;
}

.ml-ps__podcast-desc{
  margin: 0;
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(43,30,34,.78);

  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Custom Scrollbar ===== */

.ml-ps__scrollbar{
  margin-top: 22px;
  display: flex;
  justify-content: center;
}

.ml-ps__bar{
  position: relative;
  height: 2px;
  background: var(--ps-scroll-line);
  border-radius: 999px;
  width: 100%;
  max-width: 800px;
}

/* Handle (moves) */
.ml-ps__thumb{
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);

  height: 56px;
  min-width: 80px;

  display: inline-flex;
  align-items: flex-start;
  gap: 12px;

  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;

  color: var(--merlot-deep);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;

  box-shadow: none;
  
}
.ml-ps__thumb:active{ cursor: grabbing; }
.ml-ps__thumb:hover{ background: transparent; box-shadow: none;  }

.ml-ps__thumb:hover .ml-ps__diamond {
  transform:rotate(90deg)
}
.ml-ps__thumb:focus{
  outline: 2px solid rgba(231,154,164,.55);
  outline-offset: 3px;
  border-radius: 10px;
}

.ml-ps__diamond{
  width: 9px;
  height: 9px;
  background: var(--ps-scroll-accent);
  transform: rotate(45deg);
  display: inline-block;
  border-radius: 0; /* crisp diamond */
  flex: 0 0 auto;
  margin-top: 2px;
  transition: 0.6s all ease;
}

.ml-ps__thumb-text{
  color: var(--merlot-deep);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  white-space: nowrap;
  font-family: 'Jost', sans-serif;
  line-height: 1;
}

/* underline segment on the rail */
.ml-ps__thumb::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: var(--ps-scroll-underline);
  background: var(--ps-scroll-accent);
  border-radius: 999px;
  box-shadow: none;
}

/* ===== Responsive ===== */
/* IMPORTANT: keep cards from ballooning to 62vw/78vw (your complaint). */

@media (max-width: 980px){
  .ml-ps{
    --ps-card-w: 280px;
    --ps-card-h: 220px;
    --ps-gap: 14px;
    --ps-podcast-h: 200px;
  }
  .ml-ps__logo{
    max-width: 110px;
    max-height: 20px;
  }
  .ml-ps__thumb{ min-width: 170px; }
}

@media (max-width: 480px){
  .ml-ps{
    --ps-card-w: 260px;
    --ps-card-h: 215px;
    --ps-podcast-h: 190px;
  }
  .ml-ps__thumb{ min-width: 160px; }
}

/* ===== Video cards (CPT video/videos) ===== */

.ml-ps[data-ps-type="video"]{
  /* roomy, wide cards like your screenshot */
  --ps-video-w: min(320px, 42vw);
  --ps-video-radius: 15px;
  --ps-video-pad: 15px;

  /* LIGHT theme defaults */
  --ps-video-shell: #fbf6ea; /* cloud */
  --ps-video-border: rgba(244,138,150,.55); /* peony-ish */
  --ps-video-ink: var(--merlot, #38151c);

  --ps-video-sub: rgba(56,21,28,.75);

  /* DEFAULT play colors */
  --ps-video-play-bg: var(--peony, #f48a96);
  --ps-video-play-fg: var(--blush, #fcd8d9);

  /* Play sizing (half-size) */
  --ps-video-play-size: 24px;
  --ps-video-tri-h: 5px;
  --ps-video-tri-w: 8px;
  --ps-video-tri-shift: 1px;
}

/* Dark variant like your left example */
.ml-ps[data-ps-type="video"][data-ps-theme="dark"]{
  --ps-video-shell: var(--merlot-deep, #2a0f14);
  --ps-video-border: transparent;
  --ps-video-ink: #fbf6ea; /* cloud */
  --ps-video-sub: rgba(252,216,217,.86); /* blush */
  --ps-video-play-bg: var(--gold, #e1af26);
  --ps-video-play-fg: var(--merlot-deep, #2a0f14);
}

.ml-ps__card--video{
  width: var(--ps-video-w);
  height: auto;

  background: var(--ps-video-shell);
  border: 2px solid var(--ps-video-border);
  border-radius: var(--ps-video-radius);
  overflow: hidden;

  display: flex;
  flex-direction: column;

  /* Image should hit the edges; padding belongs to the footer area */
  padding: 1em;
  gap: 0;

  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

/* Hover = the dark style from your screenshot */
.ml-ps__card--video:hover,
.ml-ps__card--video:focus-within{
  --ps-video-shell: var(--merlot-deep, #2a0f14);
  --ps-video-border: rgba(43,30,34,.55);
  --ps-video-ink: var(--cloud, #fbf6ea);
  --ps-video-sub: rgba(251,246,234,.88);

  --ps-video-play-bg: var(--gold, #e1af26);
  --ps-video-play-fg: var(--merlot-deep, #2a0f14);

  transform: translateY(-1px);
}

/* Big thumbnail (TV still) */
.ml-ps__video-media{
  display: block;
  text-decoration: none;
  border-radius: calc(var(--ps-video-radius) - 2px);
  overflow: hidden;
  line-height: 0;
}

.ml-ps__video-img{
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ml-ps__video-img--empty{
  background: rgba(0,0,0,.08);
}

/* Footer text + play button */
.ml-ps__video-foot{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;

  padding:1em 0 0;
}

.ml-ps__video-text{
  flex: 1 1 auto;
  min-width: 0;
}

.ml-ps__video-show{
  margin: 0 0 6px 0;
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ps-video-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ml-ps__video-title{
  margin: 0;
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.05;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ps-video-sub);
}

/* Play button */
.ml-ps__video-play{
  flex: 0 0 auto;
  width: var(--ps-video-play-size);
  height: var(--ps-video-play-size);
  border-radius: 999px;
  padding:8px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: var(--ps-video-play-bg);
  color: var(--ps-video-play-fg);

  position: relative;
  text-decoration: none !important;
  border: 0;
}

/* Always render a play triangle (even if the inline SVG is missing/blocked) */
.ml-ps__video-play::before{
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: var(--ps-video-tri-h) 0 var(--ps-video-tri-h) var(--ps-video-tri-w);
  border-color: transparent transparent transparent currentColor;
  transform: translateX(var(--ps-video-tri-shift));
}

/* Hide the inline SVG (we're using the CSS triangle above) */
.ml-ps__video-play-svg{ display: none; }

.ml-ps__video-play:hover{
  filter: brightness(0.98);
}

/* Responsive tweaks */
@media (max-width: 980px){
  .ml-ps[data-ps-type="video"]{
    --ps-video-w: min(620px, 88vw);
    --ps-video-pad: 18px;

    --ps-video-play-size: 14px;
    --ps-video-tri-h: 4px;
    --ps-video-tri-w: 7px;
    --ps-video-tri-shift: 1px;
  }
  .ml-ps__video-show{ font-size: 22px; }
  .ml-ps__video-title{ font-size: 19px; }
}

@media (max-width: 480px){
  .ml-ps[data-ps-type="video"]{
    --ps-video-w: min(520px, 92vw);

    --ps-video-play-size: 14px;
    --ps-video-tri-h: 4px;
    --ps-video-tri-w: 7px;
    --ps-video-tri-shift: 1px;
  }
  .ml-ps__video-show{ font-size: 18px; }
  .ml-ps__video-title{ font-size: 16px; line-height: 1.15; }
}

/* ===== Topics (manual nested cards) ===== */

.ml-ps[data-ps-type="topics"]{
  --ps-topics-starter-w: min(460px, 54vw);
  --ps-topic-w: 360px;
  --ps-topic-radius: 22px;

  --ps-topic-border: rgba(56,21,28,.55);
  --ps-topic-head-bg: var(--merlot-deep, #2a0f14);
  --ps-topic-body-bg: var(--cloud, #fbf6ea);

  --ps-topic-ink: var(--cloud, #fbf6ea);
  --ps-topic-body-ink: var(--merlot, #38151c);

  --ps-topic-accent: var(--peony, #f48a96);

  /* "half-scale" knobs for header/body (kept readable) */
  --ps-topic-head-pad-y:16px;
  --ps-topic-head-pad-x: 24px;
  --ps-topic-diamond: 5px;
  --ps-topic-diamond-gap: 7px;
  --ps-topic-title: 16px;
  --ps-topic-body-pad-y: 24px;
  --ps-topic-body-pad-x: 24px;
  --ps-topic-body-size: 16px;
}

/* Starter = wide, “unstyled” holder for an H3 */
.ml-ps[data-ps-type="topics"] .ml-ps__card--starter{
  width: var(--ps-topics-starter-w);
  height: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0 2em;
}

/* Starter H3 typography */
.ml-ps[data-ps-type="topics"] .ml-ps__card--starter h3{
  font-family: "Charnoir", serif;
  font-size: 48px;
  line-height: 0.95;
  color: var(--merlot, #38151c);
}

/* Topic card */
.ml-ps[data-ps-type="topics"] .ml-ps__card--topic{
  width: var(--ps-topic-w);
  height: auto;

  background: transparent;
  border: 2px solid var(--ps-topic-border);
  border-radius: var(--ps-topic-radius);
  overflow: hidden;

  display: flex;
  flex-direction: column;
}

/* Optional full-card click target if href="" is provided */
.ml-ps__topic-hit{
  display: block;
  color: inherit;
  text-decoration: none !important;
}

.ml-ps__topic-head{
  background: var(--ps-topic-head-bg);
  color: var(--ps-topic-ink);
  padding: var(--ps-topic-head-pad-y) var(--ps-topic-head-pad-x);
  position: relative;
}

.ml-ps__topic-diamond{
  width: var(--ps-topic-diamond);
  height: var(--ps-topic-diamond);
  background: var(--ps-topic-accent);
  transform: rotate(45deg);
  display: inline-block;
  margin-bottom: var(--ps-topic-diamond-gap);
}

.ml-ps__topic-title{
  margin: 0;
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: var(--ps-topic-title);
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.1;
}

.ml-ps__topic-title strong{
  font-weight: 700;
}

.ml-ps__topic-body{
  background: var(--ps-topic-body-bg);
  color: var(--ps-topic-body-ink);
  padding: var(--ps-topic-body-pad-y) var(--ps-topic-body-pad-x);
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--ps-topic-body-size);
  line-height: 1.55;
}

/* Accent mapping */
.ml-ps__card--topic[data-accent="peony"]{ --ps-topic-accent: var(--peony, #f48a96); }
.ml-ps__card--topic[data-accent="gold"]{ --ps-topic-accent: var(--gold, #e1af26); }
.ml-ps__card--topic[data-accent="blush"]{ --ps-topic-accent: var(--blush, #fcd8d9); }
.ml-ps__card--topic[data-accent="champagne"]{ --ps-topic-accent: var(--champagne, #fce796); }
.ml-ps__card--topic[data-accent="cloud"]{ --ps-topic-accent: var(--cloud, #fbf6ea); }
.ml-ps__card--topic[data-accent="merlot"]{ --ps-topic-accent: var(--merlot, #38151c); }

/* Responsive */
@media (max-width: 980px){
  .ml-ps[data-ps-type="topics"]{
    --ps-topics-starter-w: min(520px, 80vw);
    --ps-topic-w: min(520px, 80vw);

    --ps-topic-title: 15px;
    --ps-topic-body-size: 13px;
  }

  .ml-ps[data-ps-type="topics"] .ml-ps__card--starter h3{
    font-size: 56px;
  }
}

@media (max-width: 480px){
  .ml-ps[data-ps-type="topics"]{
    --ps-topics-starter-w: min(520px, 92vw);
    --ps-topic-w: min(520px, 92vw);

    --ps-topic-title: 14px;
    --ps-topic-body-size: 13px;
  }

  .ml-ps[data-ps-type="topics"] .ml-ps__card--starter h3{
    font-size: 44px;
  }
}
/* =========================
   Static mode (<= 5 cards)
   ========================= */

.ml-ps.ml-ps--static .ml-ps__viewport{
  overflow: visible;
  cursor: default;
  padding-bottom: 0;
}

.ml-ps.ml-ps--static .ml-ps__track{
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

.ml-ps.ml-ps--static .ml-ps__scrollbar{
  display: none !important;
}
