:root {
  color-scheme: dark;
  --bg: #080808;
  --panel: #141414;
  --panel-strong: #1f1f1f;
  --text: #f7f7f7;
  --muted: #b7b7b7;
  --soft: #777;
  --red: #e50914;
  --red-dark: #aa0710;
  --gold: #e8b85f;
  --green: #4db07c;
  --blue: #4b81c8;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #050505;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px clamp(14px, 3vw, 42px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.08));
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--red);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--red);
  color: white;
  box-shadow: 0 10px 30px rgba(229, 9, 20, 0.35);
}

.main-nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.main-nav a:hover,
.section-heading a:hover {
  color: white;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.search input {
  width: min(30vw, 330px);
  min-width: 210px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  outline: none;
  padding: 0 14px;
}

.search input:focus {
  border-color: rgba(255, 255, 255, 0.55);
}

.profile-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 4px;
  background: linear-gradient(135deg, #4158d0, #c850c0);
  color: white;
  cursor: pointer;
  font-weight: 700;
}

.hero {
  --hero-image: url("assets/Portada00.webp");
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding: 96px clamp(18px, 4vw, 58px) 82px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.72) 35%, rgba(0, 0, 0, 0.2) 70%),
    var(--hero-image) center/cover;
  transition: background-image 260ms ease;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 190px;
  background: linear-gradient(180deg, rgba(8, 8, 8, 0), var(--bg));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-controls {
  position: absolute;
  z-index: 5;
  right: clamp(18px, 4vw, 58px);
  bottom: 78px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot,
.hero-arrow {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.45);
  color: white;
  cursor: pointer;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border-radius: 999px;
  padding: 0;
}

.hero-dot.is-active {
  background: var(--red);
  border-color: var(--red);
}

.hero-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.9rem;
  line-height: 1;
}

.hero-arrow:hover,
.hero-dot:hover {
  background: rgba(255, 255, 255, 0.18);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5.2vw, 5.5rem);
  line-height: 0.96;
  max-width: 780px;
}

.hero-copy {
  max-width: 620px;
  margin: 24px 0 0;
  color: #e8e8e8;
  font-size: clamp(1rem, 1.7vw, 1.23rem);
  line-height: 1.65;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  color: var(--muted);
}

.hero-meta span {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.07);
  font-weight: 600;
}

.hero-meta .cc-badge,
.preview-badge.cc-badge {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
  color: #f2f2f2;
  cursor: help;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

.has-tooltip {
  position: relative;
}

.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 80;
  left: 50%;
  bottom: calc(100% + 12px);
  width: max-content;
  max-width: min(360px, calc(100vw - 34px));
  transform: translateX(-50%) translateY(6px);
  opacity: 0;
  pointer-events: none;
  border-radius: 4px;
  background: #fff;
  color: #171717;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
  transition: opacity 150ms ease, transform 150ms ease;
}

.has-tooltip::before {
  content: "";
  position: absolute;
  z-index: 81;
  left: 50%;
  bottom: calc(100% + 5px);
  width: 14px;
  height: 14px;
  transform: translateX(-50%) rotate(45deg);
  opacity: 0;
  pointer-events: none;
  background: #fff;
  transition: opacity 150ms ease;
}

.has-tooltip:hover::after,
.has-tooltip:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.has-tooltip:hover::before,
.has-tooltip:focus-visible::before {
  opacity: 1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border: 0;
  border-radius: 4px;
  padding: 0 24px;
  cursor: pointer;
  font-weight: 800;
}

.primary-action svg,
.secondary-action svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-action svg path {
  fill: currentColor;
  stroke: none;
}

.primary-action {
  background: white;
  color: #111;
}

.secondary-action {
  background: rgba(109, 109, 110, 0.72);
  color: white;
}

.primary-action:hover {
  background: rgba(255, 255, 255, 0.8);
}

.secondary-action:hover {
  background: rgba(109, 109, 110, 0.95);
}

.quick-filters {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 clamp(14px, 3vw, 42px) 12px;
  margin-top: -54px;
  position: relative;
  z-index: 4;
}

.filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  padding: 10px 16px;
  white-space: nowrap;
}

.filter.is-active,
.filter:hover {
  border-color: var(--red);
  background: var(--red);
}

.content-section {
  padding: 12px clamp(14px, 3vw, 42px);
  overflow: visible;
}

.is-hidden {
  display: none;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1rem, 1.45vw, 1.35rem);
}

.section-heading a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.sermon-row,
.series-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(155px, 15vw, 232px);
  gap: 7px;
  overflow-x: auto;
  padding: 3px 0 10px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.sermon-row::-webkit-scrollbar,
.series-row::-webkit-scrollbar,
.ranked-list::-webkit-scrollbar {
  display: none;
}

.carousel-shell {
  position: relative;
  margin-inline: calc(clamp(14px, 3vw, 42px) * -1);
  padding-inline: clamp(14px, 3vw, 42px);
  overflow: hidden;
}

.carousel-shell::before,
.carousel-shell::after {
  content: "";
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  width: clamp(34px, 6vw, 86px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.carousel-shell::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), rgba(8, 8, 8, 0));
}

.carousel-shell::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), rgba(8, 8, 8, 0));
}

.carousel-shell:hover::before,
.carousel-shell:hover::after,
.carousel-shell.is-sweeping-left::before,
.carousel-shell.is-sweeping-right::after {
  opacity: 1;
}

.carousel-shell.is-sweeping-right .sermon-row,
.carousel-shell.is-sweeping-right .series-row,
.carousel-shell.is-sweeping-right .ranked-list {
  animation: row-sweep-right 460ms ease;
}

.carousel-shell.is-sweeping-left .sermon-row,
.carousel-shell.is-sweeping-left .series-row,
.carousel-shell.is-sweeping-left .ranked-list {
  animation: row-sweep-left 460ms ease;
}

.row-arrow {
  position: absolute;
  z-index: 6;
  top: 3px;
  bottom: 16px;
  width: clamp(34px, 4vw, 58px);
  border: 0;
  background: rgba(0, 0, 0, 0.54);
  color: white;
  cursor: pointer;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, background 160ms ease;
}

.row-arrow-left {
  left: 0;
}

.row-arrow-right {
  right: 0;
}

.carousel-shell:hover .row-arrow,
.row-arrow:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.row-arrow:hover,
.row-arrow:focus-visible {
  background: rgba(0, 0, 0, 0.78);
  outline: none;
}

.row-arrow[hidden] {
  display: none;
}

@keyframes row-sweep-right {
  0% {
    filter: brightness(0.92);
    transform: translateX(0);
  }
  45% {
    filter: brightness(1.08);
    transform: translateX(-10px);
  }
  100% {
    filter: brightness(1);
    transform: translateX(0);
  }
}

@keyframes row-sweep-left {
  0% {
    filter: brightness(0.92);
    transform: translateX(0);
  }
  45% {
    filter: brightness(1.08);
    transform: translateX(10px);
  }
  100% {
    filter: brightness(1);
    transform: translateX(0);
  }
}

.sermon-card,
.series-card,
.rank-card {
  background: transparent;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: none;
}

.sermon-card {
  min-width: 0;
  display: block;
  width: 100%;
  border: 0;
  color: white;
  cursor: pointer;
  padding: 0;
  text-align: left;
  background: transparent;
  transition: box-shadow 160ms ease, outline-color 160ms ease, transform 180ms ease;
  scroll-snap-align: start;
}

.sermon-card::after {
  content: attr(data-title);
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: none;
}

.sermon-card:hover,
.sermon-card:focus-visible {
  box-shadow: none;
  outline: none;
  z-index: 10;
}

.series-card:hover,
.series-card:focus-visible {
  transform: scale(1.06);
  transform-origin: center center;
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.78);
  outline: none;
  z-index: 10;
}

.thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}

.preview-card {
  position: fixed;
  z-index: 40;
  width: min(360px, calc(100vw - 32px));
  overflow: hidden;
  border-radius: 6px;
  background: #181818;
  color: white;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.78);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
  transform-origin: center center;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.85, 0.25, 1);
}

.preview-card.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.preview-image {
  position: relative;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}

.preview-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(24, 24, 24, 0.9));
}

.preview-title {
  margin: 0;
  color: #fff;
  font-size: clamp(1rem, 2.8vw, 1.22rem);
  line-height: 1.12;
  font-weight: 800;
  margin-bottom: 10px;
}

.preview-body {
  padding: 14px 18px 17px;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
}

.preview-action {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  background: rgba(32, 32, 32, 0.72);
  color: white;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  padding: 0;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.preview-action svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.preview-action.play svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  stroke: none;
  transform: translateX(1px);
}

.preview-action.play {
  border-color: white;
  background: white;
  color: #111;
}

.preview-action.more {
  margin-left: auto;
}

.preview-action.is-active {
  border-color: white;
  background: white;
  color: #111;
}

.preview-action:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.14);
  transform: scale(1.04);
}

.preview-action.play:hover {
  background: rgba(255, 255, 255, 0.82);
  color: #111;
}

@media (hover: none) {
  .series-card:hover,
  .series-card:focus-visible,
  .series-row .series-card:hover,
  .series-row .series-card:focus-visible,
  .library-series-card:hover,
  .library-series-card:focus-within,
  .series-strip-card:hover,
  .series-strip-card:focus-within,
  .related-card:hover,
  .related-card:focus-visible {
    transform: none;
    filter: none;
    box-shadow: none;
    outline: none;
  }

  .library-series-card.is-touch-active,
  .series-strip-card.is-touch-active,
  .related-card.is-touch-active,
  .list-series-card.is-touch-active {
    filter: brightness(1.12);
    outline: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.72);
    transform: scale(1.035);
  }
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.preview-badge {
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 3px;
  padding: 1px 5px;
  color: #e8e8e8;
  font-size: 0.74rem;
}

.preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #f0f0f0;
  font-size: 0.9rem;
  font-weight: 700;
}

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.76);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  color: rgba(255, 255, 255, 0.94);
  font-size: 1.08rem;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.85, 0.25, 1);
}

.play-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
  transform: translateX(1px);
}

.episode-card:hover .play-icon,
.episode-card:focus-visible .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.sermon-card .play-icon {
  display: none;
}

.card-body {
  display: none;
}

.card-body h3 {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.18;
}

.list-series-card {
  min-width: 0;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  background: #242424;
  color: white;
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: filter 160ms ease;
}

.list-series-card:hover,
.list-series-card:focus-visible {
  filter: brightness(1.12);
  outline: none;
}

.list-series-body {
  min-height: 78px;
  padding: 10px 11px 12px;
}

.list-series-body h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  line-height: 1.16;
}

.list-series-body p {
  margin: 0;
  color: #cfcfcf;
  font-size: 0.78rem;
}

.progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.18);
}

.progress span {
  display: block;
  height: 100%;
  background: var(--red);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.series-card {
  min-height: 0;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: flex-end;
  width: 100%;
  border: 0;
  padding: 18px;
  color: white;
  cursor: pointer;
  text-align: left;
  background-size: cover;
  background-position: center;
  position: relative;
  isolation: isolate;
}

.series-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.9));
  z-index: -1;
}

.series-card h3 {
  margin: 0 0 7px;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
}

.series-card p {
  margin: 0;
  color: #e2e2e2;
  line-height: 1.35;
  font-size: 0.94rem;
}

.series-strip-card,
.library-series-card {
  overflow: hidden;
  border-radius: 4px;
  background: #202020;
  color: white;
  scroll-snap-align: start;
}

.series-card-face {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.series-thumb {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}

.series-thumb.is-sermonaudio-placeholder,
.related-thumb.is-sermonaudio-placeholder {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.1), transparent 42%),
    linear-gradient(135deg, #030303, #151515);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.series-thumb.is-sermonaudio-placeholder::before,
.related-thumb.is-sermonaudio-placeholder::before {
  content: "SermonAudio";
  color: #efefef;
  font-size: clamp(0.72rem, 1.3vw, 0.96rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.series-card-copy {
  min-height: 76px;
  padding: 10px 12px 12px;
}

.series-card-copy h3 {
  margin: 0 0 7px;
  color: white;
  font-size: 0.95rem;
  line-height: 1.16;
}

.series-card-copy p {
  margin: 0 0 4px;
  color: #d2d2d2;
  font-size: 0.78rem;
  line-height: 1.28;
}

.series-strip-card {
  background: transparent;
}

.series-strip-card .series-card-copy {
  min-height: 42px;
  padding: 8px 2px 0;
}

.series-strip-card .series-card-copy h3 {
  font-size: 0.86rem;
}

.library-series-card {
  display: grid;
  align-content: start;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.library-series-card:hover,
.library-series-card:focus-within,
.series-strip-card:hover,
.series-strip-card:focus-within {
  filter: brightness(1.1);
}

.library-series-card.is-touch-active,
.series-strip-card.is-touch-active,
.related-card.is-touch-active,
.list-series-card.is-touch-active {
  position: relative;
  z-index: 12;
  filter: brightness(1.12);
  outline: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.72);
  transform: scale(1.035);
  transform-origin: center center;
}

.series-card-actions {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
}

.series-card-button,
.series-card-save {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  cursor: pointer;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.series-card-button {
  background: white;
  color: #111;
}

.series-card-save.is-active {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.16);
}

.series-library {
  padding: 54px clamp(14px, 3vw, 42px) 20px;
  scroll-margin-top: 92px;
}

.library-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 420px);
  gap: 22px;
  align-items: end;
  margin-bottom: 18px;
}

.library-head h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.95;
}

.library-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.library-search input,
.sort-control select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  outline: none;
  padding: 0 14px;
}

.library-search input:focus,
.sort-control select:focus {
  border-color: rgba(255, 255, 255, 0.65);
}

.library-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.library-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.sort-control {
  display: grid;
  gap: 6px;
  min-width: 190px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.series-row .series-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  min-width: 0;
  aspect-ratio: auto;
  box-shadow: none;
  scroll-snap-align: start;
  background-image: none !important;
}

.series-row .series-card:hover,
.series-row .series-card:focus-visible {
  transform: none;
  box-shadow: none;
}

.series-row .series-card::before {
  display: none;
}

.series-row .series-card > div {
  display: block;
  position: relative;
  padding-top: calc(56.25% + 9px);
}

.series-row .series-card > div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  background-image: inherit;
  background-size: cover;
  background-position: center;
}

.series-row .series-card h3 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.2;
}

.series-row .series-card p {
  display: none;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.topic {
  display: flex;
  align-items: flex-end;
  min-height: 150px;
  border-radius: 8px;
  padding: 18px;
  font-size: 1.2rem;
  font-weight: 800;
  background: var(--panel);
  overflow-wrap: anywhere;
}

.topic.faith {
  background: linear-gradient(135deg, #5b1f2a, #c31d28);
}

.topic.family {
  background: linear-gradient(135deg, #23462e, #4db07c);
}

.topic.prayer {
  background: linear-gradient(135deg, #263b6a, #4b81c8);
}

.topic.healing {
  background: linear-gradient(135deg, #6a3c16, #e8b85f);
}

.ranked-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(170px, 18vw, 255px);
  gap: 14px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.rank-card {
  position: relative;
  display: block;
  --rank-offset: clamp(46px, 4.7vw, 72px);
  min-height: clamp(92px, 10vw, 138px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: white;
  cursor: pointer;
  text-align: left;
  overflow: visible;
  scroll-snap-align: start;
}

.rank-number {
  position: absolute;
  z-index: 2;
  left: var(--rank-offset);
  top: 50%;
  transform: translateY(-50%);
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.58);
  text-align: left;
  font-size: clamp(5.3rem, 8.6vw, 8.4rem);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: 0;
  pointer-events: none;
}

.rank-thumb {
  position: relative;
  z-index: 1;
  display: block;
  margin-left: calc(var(--rank-offset) + clamp(22px, 2.2vw, 34px));
  width: calc(100% - var(--rank-offset) - clamp(22px, 2.2vw, 34px));
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  background-size: cover;
  background-position: center;
  box-shadow: none;
  transition: filter 180ms ease;
}

.rank-card:hover,
.rank-card:focus-visible {
  transform: none;
  box-shadow: none;
  outline: none;
}

.rank-card:hover .rank-thumb,
.rank-card:focus-visible .rank-thumb {
  filter: brightness(1.08);
}

.series-detail {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  justify-items: center;
  align-items: start;
  overflow-y: auto;
  padding: 18px 0 42px;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease, background 220ms ease;
}

.series-detail.is-visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  background: rgba(0, 0, 0, 0.76);
}

.series-detail-backdrop {
  position: fixed;
  inset: 0;
}

.series-detail-panel {
  position: relative;
  z-index: 1;
  width: min(780px, calc(100vw - 34px));
  overflow: hidden;
  border-radius: 8px;
  background: #181818;
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.86);
  transform: translateY(18px) scale(0.98);
  transition: transform 220ms cubic-bezier(0.2, 0.85, 0.25, 1);
}

.series-detail.is-visible .series-detail-panel {
  transform: translateY(0) scale(1);
}

.series-detail-hero {
  --series-detail-image: url("assets/Portada00.webp");
  position: relative;
  min-height: 390px;
  display: flex;
  align-items: flex-end;
  padding: 90px clamp(20px, 4vw, 42px) 38px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.42) 50%, rgba(0, 0, 0, 0.04)),
    var(--series-detail-image) center/cover;
}

.series-detail-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  background: linear-gradient(180deg, rgba(24, 24, 24, 0), #181818);
}

.back-button {
  position: absolute;
  z-index: 4;
  top: 16px;
  right: 16px;
  left: auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: white;
  cursor: pointer;
  padding: 0;
  font-size: 1.9rem;
  font-weight: 800;
}

.back-button:hover,
.back-button:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.series-detail-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.series-detail-copy h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4.7vw, 4.2rem);
  line-height: 0.98;
}

.series-detail-copy p:not(.eyebrow) {
  max-width: 650px;
  color: #e8e8e8;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.6;
}

.series-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.series-detail-actions .primary-action {
  min-height: 42px;
  padding-inline: 20px;
}

.circle-action {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(35, 35, 35, 0.76);
  color: white;
  cursor: pointer;
  padding: 0;
  line-height: 0;
}

.circle-action svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.circle-action:hover,
.circle-action.is-active {
  border-color: white;
  background: white;
  color: #111;
}

.series-detail-content {
  padding: 24px clamp(20px, 4vw, 42px) 58px;
}

.series-detail-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 34px;
  margin-bottom: 30px;
}

.series-detail-overview .hero-meta {
  margin-top: 0;
  margin-bottom: 16px;
}

.series-detail-overview p {
  margin: 0;
  color: #f0f0f0;
  line-height: 1.55;
  font-weight: 600;
}

.series-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px 8px;
  margin: 0;
  color: #e8e8e8;
  font-size: 0.86rem;
  line-height: 1.35;
}

.series-facts dt {
  color: var(--soft);
}

.series-facts dd {
  margin: 0;
  font-weight: 700;
}

.series-detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 28px 0 12px;
}

.series-detail-section-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.season-pill {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: #242424;
  color: white;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
}

.episode-list {
  display: grid;
  gap: 0;
}

.episode-card {
  display: grid;
  grid-template-columns: 42px 132px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  padding: 14px 18px 14px 0;
  text-align: left;
  box-shadow: none;
}

.episode-card:hover,
.episode-card:focus-visible {
  transform: none;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  z-index: 2;
}

.episode-number {
  display: block;
  color: var(--muted);
  font-size: 1.5rem;
  font-weight: 500;
  text-align: center;
}

.episode-thumb {
  position: relative;
  width: 132px;
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.episode-info {
  padding: 0;
}

.episode-info h3 {
  margin: 0 0 5px;
  font-size: 0.94rem;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
}

.episode-duration {
  align-self: start;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding-top: 4px;
  padding-right: 6px;
}

.related-series {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.related-card {
  overflow: hidden;
  border: 0;
  border-radius: 5px;
  background: #2a2a2a;
  color: white;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.related-card:hover,
.related-card:focus-visible {
  background: #333;
  outline: 1px solid rgba(255, 255, 255, 0.28);
}

.related-thumb {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}

.related-body {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 158px;
  padding: 12px;
}

.related-body h3 {
  margin: 10px 0 6px;
  font-size: 0.98rem;
  line-height: 1.12;
}

.related-body p {
  margin: 0 0 12px;
  color: #d4d4d4;
  font-size: 0.78rem;
  line-height: 1.45;
}

.related-body strong {
  align-self: end;
  color: #fff;
  font-size: 0.78rem;
  cursor: pointer;
}


.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  transform: translateY(90px);
  opacity: 0;
  border-radius: 4px;
  background: white;
  color: #111;
  padding: 12px 16px;
  font-weight: 800;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, opacity 180ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  background: black;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: black;
  opacity: 0;
  transition: opacity 260ms ease;
}

.lightbox.is-open .lightbox-backdrop {
  opacity: 1;
}

.player-panel {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: black;
  box-shadow: none;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 320ms ease, transform 420ms ease;
}

.lightbox.is-open .player-panel {
  opacity: 1;
  transform: scale(1);
}

.player-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  padding: 22px clamp(20px, 3vw, 44px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.player-topbar h2 {
  margin: 0;
  max-width: min(760px, 62vw);
  overflow: hidden;
  color: white;
  font-size: clamp(1rem, 2.1vw, 1.8rem);
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.close-player {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  color: white;
  cursor: pointer;
  font-size: 2.3rem;
  line-height: 1;
  pointer-events: auto;
}

.close-player:hover {
  background: rgba(255, 255, 255, 0.16);
}

.player-flag {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  color: white;
  font-size: 2rem;
  opacity: 0.92;
}

.player-frame-wrap {
  position: absolute;
  inset: 0;
  background: black;
}

.player-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity 360ms ease;
}

.mobile-video-preview {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  place-items: center;
  background: #000;
  overflow: hidden;
}

.mobile-video-preview img {
  display: block;
  width: 100vw;
  height: 100dvh;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center;
}

.mobile-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 74px;
  height: 54px;
  border: 0;
  border-radius: 14px;
  background: #ff0000;
  color: white;
  transform: translate(-50%, -50%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
  cursor: pointer;
}

.mobile-video-play svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
  transform: translateX(2px);
}

.lightbox.is-open.is-loaded .player-frame-wrap iframe {
  opacity: 1 !important;
}

.player-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: black;
  opacity: 1;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.lightbox.is-open.is-loaded .player-loader {
  opacity: 0 !important;
  visibility: hidden;
}

.player-loader span {
  width: 58px;
  height: 58px;
  border: 4px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: player-spin 900ms linear infinite;
}

@keyframes player-spin {
  to {
    transform: rotate(360deg);
  }
}

.site-footer {
  margin-top: 46px;
  padding: 44px clamp(18px, 4vw, 58px) 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(16, 16, 16, 0.96) 22%),
    #101010;
  color: var(--muted);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(240px, 1.15fr) minmax(220px, 0.95fr) auto;
  gap: 34px;
  align-items: start;
}

.footer-brand .brand {
  display: inline-flex;
  margin-bottom: 14px;
}

.footer-brand p {
  max-width: 420px;
  margin: 0;
  color: #b9b9b9;
  line-height: 1.55;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px;
}

.footer-nav a,
.footer-social a {
  color: #c8c8c8;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: #fff;
}

.footer-social {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.footer-social a:hover,
.footer-social a:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.12);
}

.footer-social svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-social a:first-child svg {
  fill: currentColor;
  stroke: none;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #8d8d8d;
  font-size: 0.9rem;
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    gap: 14px;
  }

  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .top-actions {
    flex: 1;
  }

  .search {
    flex: 1;
  }

  .search input {
    width: 100%;
    min-width: 0;
  }

  .hero {
    min-height: 72vh;
    padding-top: 170px;
  }

  .hero-controls {
    left: clamp(18px, 4vw, 58px);
    right: auto;
    bottom: 32px;
  }

  .feature-grid,
  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-number {
    font-size: 4.7rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-social {
    justify-content: flex-start;
  }

  .library-head,
  .library-toolbar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .sort-control {
    min-width: 0;
  }
}

@media (max-width: 620px) {
  .brand {
    font-size: 1.2rem;
  }

  .profile-button {
    display: none;
  }

  .hero {
    min-height: 74vh;
    padding-bottom: 86px;
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.96) 72%),
      var(--hero-image) center/cover;
  }

  .hero-controls {
    bottom: 28px;
  }

  .hero-dot {
    width: 26px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .primary-action,
  .secondary-action {
    padding: 0 12px;
  }

  .quick-filters {
    margin-top: -34px;
  }

  .sermon-row {
    grid-auto-columns: minmax(150px, 45%);
  }

  .series-row {
    grid-auto-columns: minmax(165px, 48%);
  }

  .series-library {
    padding-top: 40px;
  }

  .library-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .series-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .series-card-copy {
    min-height: 92px;
    padding: 9px;
  }

  .series-card-actions {
    display: grid;
    padding: 0 9px 10px;
  }

  .preview-card {
    max-height: calc(100dvh - 24px);
    border-radius: 8px;
  }

  .preview-body {
    padding: 12px 14px 14px;
  }

  .preview-actions {
    gap: 7px;
    margin-bottom: 11px;
  }

  .preview-action {
    width: 38px;
    height: 38px;
  }

  .preview-title {
    font-size: 1rem;
    line-height: 1.14;
  }

  .preview-meta,
  .preview-tags {
    font-size: 0.8rem;
  }

  .lightbox.has-mobile-preview .player-loader,
  .lightbox.has-mobile-preview .player-frame-wrap iframe {
    display: none;
  }

  .lightbox.has-mobile-preview .mobile-video-preview {
    display: grid;
  }

  .lightbox.has-mobile-preview .player-panel,
  .lightbox.has-mobile-preview .player-frame-wrap,
  .lightbox.has-mobile-preview .mobile-video-preview {
    width: 100vw;
    height: 100dvh;
  }

  .ranked-list {
    grid-auto-columns: minmax(185px, 62%);
  }

  .feature-grid,
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .series-detail-hero {
    min-height: 360px;
    padding-top: 128px;
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.96) 76%),
      var(--series-detail-image) center/cover;
  }

  .series-detail-overview,
  .related-series {
    grid-template-columns: 1fr;
  }

  .episode-card {
    grid-template-columns: 28px 104px minmax(0, 1fr);
    gap: 10px;
  }

  .episode-thumb {
    width: 104px;
  }

  .episode-duration {
    display: none;
  }

  .rank-number {
    font-size: 4.2rem;
  }

  .site-footer {
    padding-inline: 18px;
  }

  .footer-nav {
    grid-template-columns: 1fr;
  }
}
