/* ══ HUB PAGE STYLES ════════════════════════════════════════════
   Shared between Podcast Hub and Articles Hub templates.
   Enqueued via wp_enqueue_style('rem-hub') in both templates
   and in inc/helpers.php (belt-and-suspenders).
   ════════════════════════════════════════════════════════════════ */

/* Hero */
.rem-ph-hero {
  position: relative;
  background-color: var(--authority);
  background-size: cover;
  background-position: center 30%;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.rem-ph-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13,27,42,0.97) 0%, rgba(13,27,42,0.6) 50%, rgba(13,27,42,0.2) 100%),
              linear-gradient(180deg, rgba(13,27,42,0) 0%, rgba(13,27,42,0.85) 100%);
  z-index: 1;
}
.rem-ph-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 40px 56px;
}
.rem-ph-hero__back {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color .15s;
}
.rem-ph-hero__back:hover { color: var(--accent); }
.rem-ph-hero__identity {
  display: flex;
  align-items: flex-end;
  gap: 28px;
}
.rem-ph-hero__photo {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid var(--accent);
}
.rem-ph-hero__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rem-ph-hero__eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.rem-ph-hero__name {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -.02em;
  margin: 0 0 8px;
}
.rem-ph-hero__meta {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  margin: 0 0 10px;
}
.rem-ph-hero__count {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  letter-spacing: .04em;
}

/* Main */
.rem-ph-main {
  background: var(--background);
  padding: 56px 0 72px;
}
.rem-ph-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Episode / Article grid */
.rem-ph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Episode / Article card */
.rem-ph-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid #eef0f3;
  transition: box-shadow .2s, transform .2s;
}
.rem-ph-card:hover {
  box-shadow: 0 12px 40px rgba(13,27,42,0.12);
  transform: translateY(-4px);
}
.rem-ph-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--authority);
  overflow: hidden;
}
.rem-ph-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease, opacity .2s;
}
.rem-ph-card:hover .rem-ph-card__thumb img {
  transform: scale(1.04);
  opacity: .85;
}
.rem-ph-card__thumb-fallback {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.2);
}
.rem-ph-card__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(13,27,42,0.72);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background .2s, transform .2s;
}
.rem-ph-card:hover .rem-ph-card__play {
  background: var(--primary);
  border-color: var(--primary);
  transform: translate(-50%, -50%) scale(1.08);
}
.rem-ph-card__type {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(13,27,42,0.85);
  padding: 3px 8px;
  border-radius: 2px;
}
.rem-ph-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.rem-ph-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.rem-ph-card__num {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  background: #EFF9FF;
  padding: 2px 8px;
  border-radius: 3px;
}
.rem-ph-card__dur, .rem-ph-card__date {
  font-family: var(--font-body);
  font-size: 12px;
  color: #8a939e;
}
.rem-ph-card__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--authority);
  line-height: 1.3;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rem-ph-card__excerpt {
  font-family: var(--font-body);
  font-size: 13px;
  color: #5a6774;
  line-height: 1.6;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}
.rem-ph-card__cta {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary);
  transition: color .15s;
}
.rem-ph-card:hover .rem-ph-card__cta { color: var(--authority); }

/* Pagination */
.rem-ph-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(13,27,42,0.1);
}
.rem-ph-pagination .page-numbers {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: rgba(13,27,42,0.5);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 3px;
  transition: all .15s;
}
.rem-ph-pagination .page-numbers:hover { color: var(--authority); border-color: rgba(13,27,42,0.2); }
.rem-ph-pagination .page-numbers.current { color: #fff; background: var(--authority); border-color: var(--authority); }

/* Empty state */
.rem-ph-empty { text-align: center; padding: 80px 0; }
.rem-ph-empty p { font-family: var(--font-body); color: #8a939e; margin-bottom: 16px; }
.rem-ph-empty a { color: var(--primary); text-decoration: none; font-weight: 600; }

/* Host strip */
.rem-ph-host {
  background: var(--authority);
  padding: 56px 0;
}
.rem-ph-host__inner {
  display: flex;
  align-items: center;
  gap: 32px;
}
.rem-ph-host__photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--accent);
}
.rem-ph-host__photo img { width: 100%; height: 100%; object-fit: cover; }
.rem-ph-host__eyebrow {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 6px;
}
.rem-ph-host__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}
.rem-ph-host__bio {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin: 0 0 14px;
  max-width: 640px;
}
.rem-ph-host__cta {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--authority);
  background: var(--accent);
  padding: 10px 20px;
  border-radius: 2px;
  text-decoration: none;
  transition: background .2s;
  display: inline-block;
}
.rem-ph-host__cta:hover { background: #b8923e; color: #fff; }

/* ── Sidebar layout ── */
.rem-ph-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}
.rem-ph-sidebar {
  position: sticky;
  top: calc(var(--band-h, 3px) + var(--nav-h, 92px) + 24px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: start;
}

/* Sidebar host card */
.rem-ph-sb-host {
  position: relative;
  background: var(--authority);
  border-radius: 10px;
  padding: 32px 24px 28px;
  text-align: center;
  overflow: hidden;
}
.rem-ph-sb-host__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(193,158,67,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.rem-ph-sb-host__photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.rem-ph-sb-host__name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  position: relative;
  z-index: 1;
}
.rem-ph-sb-host__meta {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin: 0 0 16px;
  position: relative;
  z-index: 1;
}
.rem-ph-sb-host__cta {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--authority);
  background: var(--accent);
  padding: 8px 18px;
  border-radius: 2px;
  text-decoration: none;
  transition: background .2s;
  position: relative;
  z-index: 1;
}
.rem-ph-sb-host__cta:hover { background: #b8923e; color: #fff; }

/* Sidebar Elfsight slot */
.rem-ph-sb-elfsight {
  border-radius: 10px;
  overflow: hidden;
}

/* Sidebar article rows (podcast hub sidebar) */
.rem-ph-sb-articles {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #eef0f3;
  overflow: hidden;
}
.rem-ph-sb-articles__title {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(13,27,42,0.4);
  padding: 16px 16px 12px;
  margin: 0;
  border-bottom: 1px solid #eef0f3;
}
.rem-ph-sb-art-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #eef0f3;
  transition: background .15s;
}
.rem-ph-sb-art-row:last-child { border-bottom: 0; }
.rem-ph-sb-art-row:hover { background: #f7f8fa; }
.rem-ph-sb-art-row__thumb {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.rem-ph-sb-art-row__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rem-ph-sb-art-row__headline {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--authority);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rem-ph-sb-art-row__date {
  font-family: var(--font-body);
  font-size: 11px;
  color: #8a939e;
}

/* Sidebar episode grid — articles hub sidebar (2-col) */
.rem-ah-sb-episodes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #eef0f3;
}
.rem-ah-sb-ep-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: background .15s;
}
.rem-ah-sb-ep-card:hover { background: #f7f8fa; }
.rem-ah-sb-ep-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--authority);
  overflow: hidden;
}
.rem-ah-sb-ep-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.rem-ah-sb-ep-card__fallback {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.2);
}
.rem-ah-sb-ep-card__body {
  padding: 10px 12px 12px;
}
.rem-ah-sb-ep-card__num {
  display: block;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}
.rem-ah-sb-ep-card__title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--authority);
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Mobile ── */
@media (max-width: 960px) {
  .rem-ph-layout {
    display: block !important;
    padding: 0 20px !important;
  }
  .rem-ph-sidebar {
    position: static !important;
  }
}
@media (max-width: 768px) {
  .rem-ph-hero__inner { padding: 32px 20px 40px; }
  .rem-ph-hero__identity { flex-direction: column; align-items: flex-start; gap: 16px; }
  .rem-ph-inner { padding: 0 20px; }
  .rem-ph-grid { grid-template-columns: 1fr; }
  .rem-ph-host__inner { flex-direction: column; align-items: flex-start; gap: 20px; }
}
@media (min-width: 640px) and (max-width: 960px) {
  .rem-ph-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Podcast hub color overrides (slate/blue) ── */
.rem-podcast-hub-page .rem-ph-sb-host { background: #4A5568; }
.rem-podcast-hub-page .rem-ph-sb-host__glow { background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(41,171,226,0.25) 0%, transparent 70%); }
.rem-podcast-hub-page .rem-ph-sb-host__photo { border-color: #29ABE2; }
.rem-podcast-hub-page .rem-ph-sb-host__cta { background: #29ABE2; color: #fff; }
.rem-podcast-hub-page .rem-ph-sb-host__cta:hover { background: #1d8ab5; color: #fff; }
.rem-podcast-hub-page .rem-ph-hero__eyebrow { color: #29ABE2; }
.rem-podcast-hub-page .rem-ph-hero__photo { border-color: #29ABE2; }
.rem-podcast-hub-page .rem-ph-hero__scrim {
  background: linear-gradient(90deg, rgba(74,85,104,0.92) 0%, rgba(74,85,104,0.50) 55%, rgba(74,85,104,0.08) 100%),
              linear-gradient(180deg, rgba(13,27,42,0) 0%, rgba(13,27,42,0.85) 100%);
}
.rem-podcast-hub-page .rem-ph-host__photo { border-color: #29ABE2; }
.rem-podcast-hub-page .rem-ph-host__eyebrow { color: #29ABE2; }
.rem-podcast-hub-page .rem-ph-host__cta { background: #29ABE2; color: #fff; }
.rem-podcast-hub-page .rem-ph-host__cta:hover { background: #1d8ab5; color: #fff; }
