/* Kinoportal redesign — Stage 3: cinematic home page */

.home-page--stage3 {
  --home-gutter: clamp(16px, 3vw, 34px);
  --home-section-gap: clamp(52px, 7vw, 92px);
  --home-card-width: 206px;
  background: var(--kp-bg) !important;
}

.home-page--stage3 .site-header,
.home-page--stage3 .kp-site-header {
  position: relative;
  z-index: 1200;
}

.home-main {
  min-height: 60vh;
  overflow: clip;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.home-container {
  width: min(100% - (var(--home-gutter) * 2), 1380px);
  margin-inline: auto;
}

.home-content {
  position: relative;
  z-index: 2;
  padding: clamp(20px, 3vw, 38px) 0 var(--home-section-gap);
}

.home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--kp-cyan);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.home-kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--kp-primary), var(--kp-cyan));
  box-shadow: 0 0 18px rgba(34, 211, 238, .35);
}

/* HERO */
.home-hero {
  position: relative;
  min-height: clamp(600px, 78vh, 820px);
  background: #05070d;
  isolation: isolate;
  /* Обрізаємо збільшене фонове зображення точно по нижній межі слайдера. */
  overflow: hidden;
  overflow: clip;
}

/* 4.0.26: all slides share one grid cell. The tallest slide reserves
   the space for the entire carousel, including invisible slides. */
.home-hero__slides {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: inherit;
}

.home-hero__slide {
  position: relative;
  grid-area: 1 / 1;
  min-width: 0;
  min-height: inherit;
  display: grid;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.018);
  transition: opacity .65s ease, visibility .65s ease, transform 1s cubic-bezier(.2, .8, .2, 1);
}

.home-hero__slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
}

.home-hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: -4;
  background-image: var(--home-hero-image);
  background-position: center 24%;
  background-repeat: no-repeat;
  background-size: cover;
  filter: saturate(1.12) contrast(1.05);
  transform: scale(1.035);
  transition: transform 9s linear;
}

.home-hero__slide.is-active .home-hero__backdrop {
  transform: scale(1.09);
}

.home-hero__slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(4, 7, 14, .97) 0%, rgba(4, 7, 14, .86) 34%, rgba(4, 7, 14, .36) 68%, rgba(4, 7, 14, .72) 100%),
    linear-gradient(180deg, rgba(4, 7, 14, .20) 0%, rgba(4, 7, 14, .10) 48%, var(--kp-bg) 100%);
}

.home-hero__slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -2;
  height: 42%;
  background: linear-gradient(180deg, transparent, var(--kp-bg));
}

.home-hero__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

.home-hero__content {
  min-height: inherit;
  padding-top: clamp(74px, 10vh, 116px);
  padding-bottom: clamp(116px, 16vh, 170px);
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(210px, 300px);
  align-items: center;
  gap: clamp(42px, 8vw, 120px);
}

.home-hero__copy {
  max-width: 760px;
  animation: homeHeroCopy .7s both cubic-bezier(.2, .8, .2, 1);
}

.home-hero__slide:not(.is-active) .home-hero__copy {
  animation: none;
}

@keyframes homeHeroCopy {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-hero__eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 17px;
}

.home-type-badge,
.home-age-badge {
  display: inline-flex;
  min-height: 27px;
  padding: 0 10px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  color: #fff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.home-hero__title {
  max-width: 760px;
  min-width: 0;
  overflow-wrap: anywhere;
  margin: 0;
  color: #fff !important;
  font-size: clamp(3.2rem, 7vw, 6.8rem) !important;
  font-weight: 900;
  line-height: .93 !important;
  letter-spacing: -.065em !important;
  text-shadow: 0 18px 58px rgba(0, 0, 0, .48);
}

.home-hero__original {
  margin: 13px 0 0;
  color: rgba(255, 255, 255, .66);
  font-size: clamp(.9rem, 1.2vw, 1.05rem);
  font-weight: 700;
  letter-spacing: .05em;
}

.home-hero__meta {
  margin-top: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 15px;
  color: rgba(255, 255, 255, .82);
  font-size: .92rem;
  font-weight: 800;
}

.home-hero__meta > span:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-left: 15px;
  display: inline-block;
  vertical-align: middle;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
}

.home-hero__meta .home-rating strong {
  color: #ffe083;
}

.home-hero__meta .home-age-badge::after {
  display: none;
}

.home-hero__genres {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-hero__genres span {
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(5, 9, 17, .34);
  color: rgba(255, 255, 255, .78);
  font-size: .78rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.home-hero__plot {
  max-width: 680px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: clamp(.98rem, 1.3vw, 1.11rem);
  line-height: 1.72;
  text-shadow: 0 4px 16px rgba(0, 0, 0, .4);
}

.home-hero__actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
}

.home-button {
  min-height: 48px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  color: #fff !important;
  font: inherit;
  font-size: .9rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform var(--kp-transition-fast), box-shadow var(--kp-transition), background-color var(--kp-transition), border-color var(--kp-transition);
}

.home-button svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.home-button:hover {
  transform: translateY(-2px);
}

.home-button--primary {
  background: linear-gradient(135deg, var(--kp-primary), var(--kp-secondary));
  box-shadow: 0 14px 32px rgba(76, 29, 149, .34);
}

.home-button--primary:hover {
  box-shadow: 0 18px 38px rgba(76, 29, 149, .48);
}

.home-button--glass {
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.home-button--glass:hover {
  background: rgba(255, 255, 255, .16);
}

.home-save-button {
  width: 46px;
  height: 46px;
  min-width: 46px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 15px;
  background: rgba(255, 255, 255, .10);
  color: #fff !important;
  text-decoration: none !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform var(--kp-transition-fast), background-color var(--kp-transition), border-color var(--kp-transition), color var(--kp-transition);
}

.home-save-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-save-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .16);
}

.home-save-button.is-active {
  border-color: rgba(139, 92, 246, .72);
  background: var(--kp-primary);
  color: #fff !important;
}

.home-save-button.is-active svg {
  fill: currentColor;
}

.home-watchlist-form,
.home-watchlist-native {
  margin: 0;
  display: inline-flex;
}

.home-hero__poster {
  position: relative;
  align-self: center;
  justify-self: end;
  width: min(100%, 280px);
  aspect-ratio: 2 / 3;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 28px;
  box-shadow: 0 28px 78px rgba(0, 0, 0, .52), 0 0 0 1px rgba(139, 92, 246, .20);
  transform: perspective(1200px) rotateY(-7deg) rotateX(1deg);
  transition: transform .55s cubic-bezier(.2, .8, .2, 1), box-shadow .55s ease;
}

.home-hero__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .14) 46%, transparent 65%);
  transform: translateX(-120%);
  transition: transform .8s ease;
}

.home-hero__poster:hover {
  transform: perspective(1200px) rotateY(0) rotateX(0) translateY(-7px);
  box-shadow: 0 34px 88px rgba(0, 0, 0, .58), 0 0 0 1px rgba(34, 211, 238, .28);
}

.home-hero__poster:hover::after {
  transform: translateX(120%);
}

.home-hero__poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.home-hero__controls {
  position: absolute;
  left: 50%;
  bottom: 35px;
  z-index: 7;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}

.home-hero__dots {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.home-hero__dot {
  position: relative;
  width: 46px;
  height: 4px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, .25);
  cursor: pointer;
  transition: width .25s ease, background-color .25s ease;
}

.home-hero__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--kp-primary), var(--kp-cyan));
  transform: scaleX(0);
  transform-origin: left;
}

.home-hero__dot.is-active {
  width: 82px;
  background: rgba(255, 255, 255, .17);
}

.home-hero__dot.is-active::after {
  transform: scaleX(1);
  transition: transform 7s linear;
}

.home-hero__dot span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.home-hero__arrows {
  display: flex;
  gap: 8px;
}

.home-hero__arrows button,
.home-rail-arrow {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(7, 10, 18, .48);
  color: #fff;
  font: inherit;
  font-size: 1.8rem;
  line-height: 1;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform var(--kp-transition-fast), background-color var(--kp-transition), opacity var(--kp-transition);
}

.home-hero__arrows button:hover,
.home-rail-arrow:hover {
  transform: scale(1.06);
  background: rgba(139, 92, 246, .82);
}

.home-empty-hero {
  min-height: 520px;
  display: grid;
  align-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(139, 92, 246, .32), transparent 34rem),
    radial-gradient(circle at 76% 24%, rgba(34, 211, 238, .17), transparent 30rem),
    linear-gradient(180deg, #070a12, var(--kp-bg));
}

.home-empty-hero h2 {
  max-width: 760px;
  margin: 14px 0 0;
  font-size: clamp(3rem, 7vw, 6rem) !important;
}

.home-empty-hero p {
  max-width: 650px;
  color: var(--kp-text-muted);
  font-size: 1.08rem;
}

/* SECTIONS */
.home-section {
  padding: calc(var(--home-section-gap) / 2) 0;
}

.home-section + .home-section {
  border-top: 1px solid rgba(148, 163, 184, .08);
}

.home-section__head {
  margin-bottom: 26px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
}

.home-section__head h2 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 3.45rem) !important;
  font-weight: 900;
  letter-spacing: -.05em !important;
}

.home-section__head p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--kp-text-muted);
  font-size: .98rem;
}

.home-section__more {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--kp-border);
  border-radius: 13px;
  color: var(--kp-text) !important;
  background: rgba(255, 255, 255, .035);
  font-size: .84rem;
  font-weight: 900;
  text-decoration: none !important;
  transition: border-color var(--kp-transition), background-color var(--kp-transition), transform var(--kp-transition-fast);
}

.home-section__more:hover {
  border-color: var(--kp-border-strong);
  background: var(--kp-primary-soft);
  transform: translateY(-2px);
}

.home-section__more span {
  color: var(--kp-cyan);
  font-size: 1.15rem;
}

/* POSTER RAILS */
.home-rail-wrap {
  position: relative;
}

.home-title-rail,
.home-people-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--home-card-width);
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 3px 2px 14px;
}

.home-title-rail::-webkit-scrollbar,
.home-people-rail::-webkit-scrollbar {
  display: none;
}

.home-title-card {
  min-width: 0;
  scroll-snap-align: start;
}

.home-title-card__poster {
  position: relative;
  aspect-ratio: 2 / 3;
  display: block;
  overflow: hidden;
  border: 1px solid var(--kp-border);
  border-radius: 20px;
  background: var(--kp-surface-2);
  box-shadow: var(--kp-shadow-xs);
  text-decoration: none !important;
  transform: translateZ(0);
  transition: transform .36s cubic-bezier(.2, .8, .2, 1), border-color var(--kp-transition), box-shadow .36s ease;
}

.home-title-card__poster img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2, .8, .2, 1), filter .4s ease;
}

.home-title-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 7, 14, .08) 42%, rgba(4, 7, 14, .92) 100%);
  opacity: .54;
  transition: opacity var(--kp-transition);
}

.home-title-card__rating,
.home-title-card__type {
  position: absolute;
  top: 11px;
  z-index: 2;
  min-height: 29px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  background: rgba(4, 7, 14, .67);
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: .74rem;
  font-weight: 900;
}

.home-title-card__rating {
  left: 11px;
  color: #ffe083;
}

.home-title-card__type {
  right: 11px;
  letter-spacing: .04em;
}

.home-title-card__quick {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 13px;
  background: rgba(139, 92, 246, .86);
  color: #fff;
  font-size: .79rem;
  font-weight: 900;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--kp-transition), transform var(--kp-transition);
}

.home-title-card__poster:hover {
  border-color: rgba(167, 139, 250, .58);
  box-shadow: 0 24px 54px rgba(0, 0, 0, .34), 0 0 0 1px rgba(139, 92, 246, .18);
  transform: translateY(-8px) scale(1.018);
}

.home-title-card__poster:hover img {
  transform: scale(1.07);
  filter: saturate(1.12);
}

.home-title-card__poster:hover .home-title-card__shade {
  opacity: .84;
}

.home-title-card__poster:hover .home-title-card__quick {
  opacity: 1;
  transform: translateY(0);
}

.home-title-card__body {
  padding: 13px 3px 0;
}

.home-title-card__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.home-title-card h3 {
  min-width: 0;
  margin: 0;
  font-size: .96rem !important;
  line-height: 1.35 !important;
}

.home-title-card h3 a {
  display: -webkit-box;
  overflow: hidden;
  color: var(--kp-heading) !important;
  text-decoration: none !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-title-card h3 a:hover {
  color: var(--kp-cyan) !important;
}

.home-title-card .home-save-button {
  width: 35px;
  height: 35px;
  min-width: 35px;
  border-color: var(--kp-border);
  border-radius: 11px;
  background: rgba(255, 255, 255, .045);
  color: var(--kp-text-muted) !important;
  backdrop-filter: none;
}

.home-title-card .home-save-button svg {
  width: 17px;
  height: 17px;
}

.home-title-card .home-save-button:hover,
.home-title-card .home-save-button.is-active {
  border-color: var(--kp-border-strong);
  background: var(--kp-primary-soft);
  color: var(--kp-primary) !important;
}

.home-title-card__meta {
  min-height: 38px;
  margin-top: 7px;
  display: grid;
  gap: 2px;
  color: var(--kp-text-soft);
  font-size: .73rem;
  line-height: 1.35;
}

.home-title-card__meta strong {
  color: var(--kp-amber);
}

.home-rail-arrow {
  position: absolute;
  top: 39%;
  z-index: 4;
  border-color: var(--kp-border);
  background: rgba(7, 10, 18, .82);
  box-shadow: var(--kp-shadow-sm);
  transform: translateY(-50%);
}

.home-rail-arrow:hover {
  transform: translateY(-50%) scale(1.06);
}

.home-rail-arrow--prev { left: -23px; }
.home-rail-arrow--next { right: -23px; }
.home-rail-arrow[disabled] { opacity: .22; pointer-events: none; }

/* NEWS */
.home-section--editorial {
  position: relative;
}

.home-section--editorial::before {
  content: "";
  position: absolute;
  inset: 8% 0 auto;
  height: 430px;
  z-index: -1;
  background: radial-gradient(circle at 50% 20%, rgba(59, 130, 246, .09), transparent 62%);
  pointer-events: none;
}

.home-news-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, .72fr));
  gap: 18px;
}

.home-news-card {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--kp-border);
  border-radius: 21px;
  background: linear-gradient(160deg, rgba(23, 32, 51, .82), rgba(12, 18, 32, .92));
  box-shadow: var(--kp-shadow-xs);
  transition: transform var(--kp-transition), border-color var(--kp-transition), box-shadow var(--kp-transition);
}

html[data-theme="light"] .home-news-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, .96), rgba(242, 245, 255, .96));
}

.home-news-card:hover {
  transform: translateY(-6px);
  border-color: var(--kp-border-strong);
  box-shadow: var(--kp-shadow-md);
}

.home-news-card--lead {
  grid-row: span 2;
}

.home-news-card__image {
  position: relative;
  aspect-ratio: 16 / 9;
  display: block;
  overflow: hidden;
  background: var(--kp-surface-2);
}

.home-news-card--lead .home-news-card__image {
  aspect-ratio: 16 / 10;
}

.home-news-card__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2, .8, .2, 1), filter .4s ease;
}

.home-news-card:hover .home-news-card__image img {
  transform: scale(1.045);
  filter: saturate(1.1);
}

.home-news-card__body {
  padding: 16px 17px 18px;
}

.home-news-card--lead .home-news-card__body {
  padding: clamp(20px, 3vw, 30px);
}

.home-news-card__meta {
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--kp-text-soft);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.home-news-card h3 {
  margin: 0;
  font-size: 1rem !important;
  line-height: 1.36 !important;
}

.home-news-card--lead h3 {
  font-size: clamp(1.35rem, 2.4vw, 2.2rem) !important;
  line-height: 1.2 !important;
}

.home-news-card h3 a {
  color: var(--kp-heading) !important;
  text-decoration: none !important;
}

.home-news-card h3 a:hover {
  color: var(--kp-cyan) !important;
}

.home-news-card p {
  margin: 13px 0 0;
  color: var(--kp-text-muted);
  font-size: .92rem;
  line-height: 1.65;
}

/* READING */
.home-reading-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.home-reading-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--kp-border);
  border-radius: 20px;
  background: var(--kp-surface);
  box-shadow: var(--kp-shadow-xs);
  transition: transform var(--kp-transition), border-color var(--kp-transition), box-shadow var(--kp-transition);
}

.home-reading-card:hover {
  transform: translateY(-6px);
  border-color: var(--kp-border-strong);
  box-shadow: var(--kp-shadow-md);
}

.home-reading-card__image {
  position: relative;
  aspect-ratio: 16 / 10;
  display: block;
  overflow: hidden;
  background: var(--kp-surface-2);
}

.home-reading-card__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2, .8, .2, 1);
}

.home-reading-card:hover img {
  transform: scale(1.055);
}

.home-reading-card__body {
  padding: 17px;
}

.home-reading-card__tag {
  display: inline-flex;
  color: var(--kp-cyan);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.home-reading-card--review .home-reading-card__tag {
  color: #c4b5fd;
}

.home-reading-card h3 {
  margin: 8px 0 0;
  font-size: 1rem !important;
}

.home-reading-card h3 a {
  display: -webkit-box;
  overflow: hidden;
  color: var(--kp-heading) !important;
  text-decoration: none !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home-reading-card p,
.home-reading-card__date {
  margin: 9px 0 0;
  color: var(--kp-text-muted);
  font-size: .78rem;
  line-height: 1.5;
}

.home-reading-card__date {
  display: block;
}

.home-section__footer-links {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.home-section__footer-links a {
  min-height: 42px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--kp-border);
  border-radius: 13px;
  color: var(--kp-text) !important;
  background: rgba(255, 255, 255, .035);
  font-size: .82rem;
  font-weight: 900;
  text-decoration: none !important;
}

.home-section__footer-links a:hover {
  border-color: var(--kp-border-strong);
  background: var(--kp-primary-soft);
}

/* COMMUNITY */
.home-section--community {
  position: relative;
}

.home-community-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 22px;
}

.home-community-card {
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--kp-border);
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0, rgba(139, 92, 246, .16), transparent 20rem),
    linear-gradient(145deg, rgba(23, 32, 51, .86), rgba(12, 18, 32, .95));
  box-shadow: var(--kp-shadow-sm);
}

html[data-theme="light"] .home-community-card {
  background:
    radial-gradient(circle at 100% 0, rgba(124, 58, 237, .10), transparent 20rem),
    linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(241, 244, 253, .96));
}

.home-community-card h2 {
  margin: 10px 0 22px;
  font-size: clamp(1.5rem, 3vw, 2.4rem) !important;
}

.home-poll__flash {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(34, 197, 94, .28);
  border-radius: 12px;
  background: rgba(34, 197, 94, .10);
  color: #86efac;
  font-size: .82rem;
  font-weight: 800;
}

.home-poll__flash--error {
  border-color: rgba(244, 63, 94, .28);
  background: rgba(244, 63, 94, .10);
  color: #fda4af;
}

.home-poll__form {
  display: grid;
  gap: 10px;
}

.home-poll__form label {
  position: relative;
  min-height: 50px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--kp-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
  transition: border-color var(--kp-transition), background-color var(--kp-transition), transform var(--kp-transition-fast);
}

.home-poll__form label:hover {
  border-color: var(--kp-border-strong);
  background: var(--kp-primary-soft);
  transform: translateX(3px);
}

.home-poll__form input {
  width: 19px;
  height: 19px;
  accent-color: var(--kp-primary);
}

.home-poll__form span {
  color: var(--kp-text);
  font-size: .88rem;
  font-weight: 700;
}

.home-poll__form .home-button {
  margin-top: 8px;
  justify-self: start;
}

.home-poll__results {
  display: grid;
  gap: 15px;
}

.home-poll__result > div:first-child {
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--kp-text);
  font-size: .85rem;
  font-weight: 700;
}

.home-poll__bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, .14);
}

.home-poll__bar span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--kp-primary), var(--kp-cyan));
  box-shadow: 0 0 18px rgba(34, 211, 238, .22);
}

.home-poll__total {
  margin: 15px 0 0;
  color: var(--kp-text-muted);
  font-size: .78rem;
}

.home-quiz-block__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.home-quiz-block__head h2 {
  margin-bottom: 18px;
}

.home-quiz-block__head > a {
  flex: 0 0 auto;
  color: var(--kp-cyan) !important;
  font-size: .78rem;
  font-weight: 900;
  text-decoration: none !important;
}

.home-quiz-list {
  display: grid;
  gap: 10px;
}

.home-quiz-item {
  min-width: 0;
  min-height: 76px;
  padding: 8px 12px 8px 8px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--kp-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, .035);
  color: inherit !important;
  text-decoration: none !important;
  transition: border-color var(--kp-transition), background-color var(--kp-transition), transform var(--kp-transition-fast);
}

.home-quiz-item:hover {
  border-color: var(--kp-border-strong);
  background: var(--kp-primary-soft);
  transform: translateX(4px);
}

.home-quiz-item img {
  width: 62px;
  height: 58px;
  display: block;
  border-radius: 11px;
  object-fit: cover;
  background: var(--kp-surface-2);
}

.home-quiz-item span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.home-quiz-item strong {
  overflow: hidden;
  color: var(--kp-heading);
  font-size: .86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-quiz-item small {
  color: var(--kp-text-soft);
  font-size: .7rem;
}

.home-quiz-item i {
  color: var(--kp-cyan);
  font-style: normal;
  font-size: 1.2rem;
}

/* PEOPLE */
.home-people-rail {
  grid-auto-columns: 126px;
  gap: 14px;
}

.home-person-card {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 10px;
  scroll-snap-align: start;
  color: var(--kp-text) !important;
  text-align: center;
  text-decoration: none !important;
}

.home-person-card__photo {
  position: relative;
  width: 112px;
  height: 112px;
  padding: 5px;
  display: block;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--kp-primary), var(--kp-cyan));
  box-shadow: 0 18px 36px rgba(0, 0, 0, .24);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
}

.home-person-card__photo::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid var(--kp-bg);
  border-radius: inherit;
  pointer-events: none;
}

.home-person-card__photo img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(.93);
  transform-origin: center;
  background: var(--kp-surface-2);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

.home-person-card:hover .home-person-card__photo {
  transform: translateY(-7px) scale(1.035);
  box-shadow: 0 24px 46px rgba(76, 29, 149, .28);
}

.home-person-card:hover .home-person-card__photo img {
  transform: scale(.96);
}

.home-person-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--kp-heading);
  font-size: .78rem;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-person-card small {
  color: var(--kp-text-soft);
  font-size: .72rem;
}

/* MODAL */
.home-trailer-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  padding: 20px;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

.home-trailer-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.home-trailer-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 10, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.home-trailer-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 1120px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 24px;
  background: #060911;
  box-shadow: 0 34px 100px rgba(0, 0, 0, .62);
  transform: translateY(20px) scale(.98);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}

.home-trailer-modal.is-open .home-trailer-modal__dialog {
  transform: translateY(0) scale(1);
}

.home-trailer-modal__head {
  min-height: 62px;
  padding: 0 16px 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.home-trailer-modal__head h2 {
  margin: 0;
  color: #fff !important;
  font-size: 1rem !important;
}

.home-trailer-modal__head button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.home-trailer-modal__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.home-trailer-modal__media iframe,
.home-trailer-modal__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

body.home-modal-open {
  overflow: hidden;
}

/* POPUP */
.kp-home-popup {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 4200;
  width: min(380px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid var(--kp-border);
  border-radius: 22px;
  background: var(--kp-surface-solid);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .38);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}

.kp-home-popup.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.kp-home-popup__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  background: rgba(4, 7, 14, .75);
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
}

.kp-home-popup__media img {
  width: 100%;
  max-height: 210px;
  display: block;
  object-fit: cover;
}

.kp-home-popup__body {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.kp-home-popup__text {
  margin: 0;
  color: var(--kp-text);
  font-size: .88rem;
  line-height: 1.6;
  white-space: pre-line;
}

/* reveal */
.js .home-section[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s ease, transform .65s cubic-bezier(.2, .8, .2, 1);
}

.js .home-section[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* LIGHT THEME */
html[data-theme="light"] .home-hero {
  background: #070a12;
}

html[data-theme="light"] .home-title-card__poster,
html[data-theme="light"] .home-person-card__photo {
  box-shadow: 0 14px 32px rgba(15, 23, 42, .13);
}

html[data-theme="light"] .home-title-card .home-save-button {
  background: rgba(91, 33, 182, .05);
}

/* TABLET */
@media (max-width: 1100px) {
  .home-page--stage3 {
    --home-card-width: 188px;
  }

  .home-hero {
    min-height: 680px;
  }

  .home-hero__content {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 44px;
  }

  .home-hero__title {
    font-size: clamp(3.2rem, 8vw, 5.7rem) !important;
  }

  .home-hero__poster {
    width: 220px;
  }

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

  .home-news-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  }

  .home-news-card--lead {
    grid-row: span 3;
  }

  .home-community-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .home-page--stage3 {
    --home-card-width: min(42vw, 184px);
  }

  .home-hero {
    min-height: 690px;
  }

  .home-hero__slide::before {
    background:
      linear-gradient(90deg, rgba(4, 7, 14, .94), rgba(4, 7, 14, .58) 82%, rgba(4, 7, 14, .66)),
      linear-gradient(180deg, rgba(4, 7, 14, .18), rgba(4, 7, 14, .12) 42%, var(--kp-bg) 100%);
  }

  .home-hero__content {
    grid-template-columns: 1fr;
    padding-top: 82px;
    padding-bottom: 128px;
  }

  .home-hero__copy {
    max-width: 660px;
  }

  .home-hero__poster {
    display: none;
  }

  .home-hero__controls {
    bottom: 28px;
  }

  .home-hero__arrows {
    display: none;
  }

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

  .home-news-card--lead {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .home-news-card--lead .home-news-card__image {
    aspect-ratio: 16 / 8.8;
  }

  .home-rail-arrow {
    display: none;
  }
}

/* PHONE */
@media (max-width: 640px) {
  .home-page--stage3 {
    --home-gutter: 14px;
    --home-section-gap: 58px;
    --home-card-width: min(44vw, 172px);
  }

  .home-content {
    padding-top: 12px;
  }

  .home-hero {
    min-height: min(760px, calc(100svh - 10px));
  }

  .home-hero__backdrop {
    background-position: 60% center;
  }

  .home-hero__slide::before {
    background:
      linear-gradient(180deg, rgba(4, 7, 14, .35) 0%, rgba(4, 7, 14, .62) 30%, rgba(4, 7, 14, .94) 70%, var(--kp-bg) 100%),
      linear-gradient(90deg, rgba(4, 7, 14, .66), rgba(4, 7, 14, .20));
  }

  .home-hero__content {
    min-height: inherit;
    padding-top: clamp(110px, 19vh, 158px);
    padding-bottom: 108px;
    align-items: end;
  }

  .home-hero__eyebrow {
    margin-bottom: 12px;
  }

  .home-hero__title {
    font-size: clamp(2.65rem, 14vw, 4.3rem) !important;
    line-height: .96 !important;
  }

  .home-hero__original {
    display: none;
  }

  .home-hero__meta {
    margin-top: 14px;
    gap: 7px 11px;
    font-size: .78rem;
  }

  .home-hero__meta > span:not(:last-child)::after {
    margin-left: 11px;
  }

  .home-hero__genres {
    margin-top: 11px;
  }

  .home-hero__genres span:nth-child(n+3) {
    display: none;
  }

  .home-hero__plot {
    margin-top: 14px;
    display: -webkit-box;
    overflow: hidden;
    font-size: .88rem;
    line-height: 1.58;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
  }

  .home-hero__actions {
    margin-top: 20px;
    gap: 8px;
  }

  .home-button {
    min-height: 46px;
    padding-inline: 15px;
    border-radius: 14px;
    font-size: .82rem;
  }

  .home-hero__actions .home-button--glass {
    padding-inline: 13px;
  }

  .home-save-button {
    width: 46px;
    height: 46px;
  }

  .home-hero__controls {
    bottom: 25px;
    align-items: center;
  }

  .home-hero__dot {
    width: 25px;
  }

  .home-hero__dot.is-active {
    width: 48px;
  }

  .home-section {
    padding: 30px 0;
  }

  .home-section__head {
    margin-bottom: 18px;
    align-items: flex-start;
  }

  .home-section__head h2 {
    font-size: clamp(1.72rem, 8vw, 2.4rem) !important;
  }

  .home-section__head p {
    font-size: .84rem;
    line-height: 1.55;
  }

  .home-section__more {
    min-height: 37px;
    padding: 0 10px;
    border-radius: 11px;
    font-size: 0;
  }

  .home-section__more span {
    font-size: 1.1rem;
  }

  .home-title-rail,
  .home-people-rail {
    margin-inline: calc(var(--home-gutter) * -1);
    padding-inline: var(--home-gutter);
    gap: 12px;
    scroll-padding-inline: var(--home-gutter);
  }

  .home-title-card__poster {
    border-radius: 17px;
  }

  .home-title-card__quick {
    display: none;
  }

  .home-title-card__poster:hover {
    transform: none;
  }

  .home-title-card h3 {
    font-size: .86rem !important;
  }

  .home-title-card__meta {
    min-height: 34px;
    font-size: .68rem;
  }

  .home-news-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .home-news-card,
  .home-news-card--lead {
    grid-template-columns: 118px minmax(0, 1fr);
    grid-template-rows: 1fr;
    border-radius: 17px;
  }

  .home-news-card--lead {
    grid-column: auto;
  }

  .home-news-card__image,
  .home-news-card--lead .home-news-card__image {
    height: 100%;
    min-height: 128px;
    aspect-ratio: auto;
  }

  .home-news-card__body,
  .home-news-card--lead .home-news-card__body {
    padding: 13px;
  }

  .home-news-card__meta {
    margin-bottom: 5px;
    font-size: .62rem;
  }

  /* Показуємо статистику новини також на телефоні (не приховуємо лічильники). */
  .home-news-card__meta .kp-news-views,
  .home-news-card__meta .kp-private-readers {
    display: inline-flex;
  }

  .home-news-card h3,
  .home-news-card--lead h3 {
    display: -webkit-box;
    overflow: hidden;
    font-size: .86rem !important;
    line-height: 1.35 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
  }

  .home-news-card p {
    display: none;
  }

  .home-reading-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .home-reading-card {
    display: grid;
    grid-template-columns: 122px minmax(0, 1fr);
    border-radius: 17px;
  }

  .home-reading-card__image {
    height: 100%;
    min-height: 132px;
    aspect-ratio: auto;
  }

  .home-reading-card__body {
    padding: 13px;
  }

  .home-reading-card h3 {
    font-size: .86rem !important;
  }

  .home-reading-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .home-community-card {
    padding: 20px 16px;
    border-radius: 21px;
  }

  .home-community-card h2 {
    font-size: 1.45rem !important;
  }

  .home-quiz-block__head > a {
    font-size: 0;
  }

  .home-quiz-block__head > a::after {
    content: "→";
    font-size: 1.1rem;
  }

  .home-quiz-item {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    min-height: 68px;
  }

  .home-quiz-item img {
    width: 54px;
    height: 50px;
  }

  .home-quiz-item strong {
    font-size: .78rem;
  }

  .home-quiz-item small {
    font-size: .64rem;
  }

  .home-people-rail {
    grid-auto-columns: 116px;
  }

  .home-person-card__photo {
    width: 102px;
    height: 102px;
    padding: 5px;
  }

  .home-trailer-modal {
    padding: 8px;
  }

  .home-trailer-modal__dialog {
    border-radius: 18px;
  }

  .home-trailer-modal__head {
    min-height: 54px;
    padding-inline: 15px 9px;
  }

  .kp-home-popup {
    right: 8px;
    left: 8px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: auto;
    border-radius: 18px;
  }
}

@media (hover: none) {
  .home-title-card__quick {
    display: none;
  }

  .home-title-card__poster:hover,
  .home-news-card:hover,
  .home-reading-card:hover,
  .home-person-card:hover .home-person-card__photo {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__backdrop,
  .home-hero__slide,
  .home-hero__copy,
  .home-hero__dot::after,
  .home-title-card__poster,
  .home-title-card__poster img,
  .home-news-card,
  .home-news-card__image img,
  .home-reading-card,
  .home-reading-card img,
  .home-person-card__photo,
  .home-section[data-reveal] {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}

.home-action-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 5200;
  max-width: min(92vw, 420px);
  padding: 12px 17px;
  border: 1px solid rgba(34, 197, 94, .32);
  border-radius: 14px;
  background: rgba(10, 20, 16, .94);
  color: #bbf7d0;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .35);
  font-size: .82rem;
  font-weight: 800;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.home-action-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.home-action-toast.is-error {
  border-color: rgba(244, 63, 94, .36);
  background: rgba(31, 10, 16, .96);
  color: #fecdd3;
}

@media (max-width: 640px) {
  .home-action-toast {
    bottom: calc(88px + env(safe-area-inset-bottom));
  }
}


/* 2026-08-02: hard contrast for the home cinematic carousel */
body.home-page .home-hero .home-hero__slide::before {
  background:
    linear-gradient(90deg, rgba(4, 7, 14, .995) 0%, rgba(4, 7, 14, .96) 31%, rgba(4, 7, 14, .64) 66%, rgba(4, 7, 14, .78) 100%),
    linear-gradient(180deg, rgba(4, 7, 14, .22) 0%, rgba(4, 7, 14, .16) 48%, var(--kp-bg) 100%) !important;
}

body.home-page .home-hero .home-hero__copy,
body.home-page .home-hero .home-hero__eyebrow,
body.home-page .home-hero .home-hero__meta,
body.home-page .home-hero .home-hero__genres,
body.home-page .home-hero .home-hero__plot {
  position: relative;
  z-index: 3;
  color: #f8fafc !important;
  opacity: 1 !important;
}

body.home-page .home-hero h2.home-hero__title,
body.home-page .home-hero .home-hero__title {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: 0 10px 36px rgba(0, 0, 0, .88) !important;
}

body.home-page .home-hero .home-hero__original {
  color: rgba(255, 255, 255, .82) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, .82) !important;
  opacity: 1 !important;
}

body.home-page .home-hero .home-hero__meta,
body.home-page .home-hero .home-hero__meta span,
body.home-page .home-hero .home-hero__genres span {
  color: rgba(255, 255, 255, .96) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, .96) !important;
  opacity: 1 !important;
}

body.home-page .home-hero .home-hero__meta .home-rating strong {
  color: #ffe083 !important;
  -webkit-text-fill-color: #ffe083 !important;
}

body.home-page .home-hero .home-hero__plot {
  color: rgba(255, 255, 255, .92) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, .92) !important;
  text-shadow: 0 3px 18px rgba(0, 0, 0, .82) !important;
}

body.home-page .home-hero .home-kicker {
  color: #67e8f9 !important;
  -webkit-text-fill-color: #67e8f9 !important;
}


/* Home horizontal rails: reliable desktop arrow controls. */
.home-rail-wrap {
  isolation: isolate;
}

.home-rail-wrap [data-home-rail] {
  position: relative;
  z-index: 1;
}

.home-rail-wrap .home-rail-arrow {
  z-index: 20;
  pointer-events: auto;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.home-rail-wrap .home-rail-arrow:not([disabled]) {
  cursor: pointer;
}

/* 2026-08-03: великі та зручні кнопки керування каруселями. */
body.home-page .home-hero__arrows {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

body.home-page .home-hero__arrows button {
  width: auto;
  min-width: 108px;
  height: 54px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, .30);
  border-radius: 17px;
  background: rgba(7, 10, 18, .82);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .32);
  font-size: .8rem;
  font-weight: 850;
  letter-spacing: .035em;
  text-transform: uppercase;
  touch-action: manipulation;
}

body.home-page .home-hero__arrows button svg,
body.home-page .home-rail-arrow svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

body.home-page .home-hero__arrows button:hover,
body.home-page .home-hero__arrows button:focus-visible {
  border-color: rgba(103, 232, 249, .72);
  background: linear-gradient(135deg, rgba(124, 58, 237, .96), rgba(37, 99, 235, .96));
  transform: translateY(-2px);
  outline: none;
}

body.home-page .home-rail-wrap {
  padding-inline: 8px;
}

body.home-page .home-rail-wrap .home-rail-arrow {
  display: grid !important;
  top: 50%;
  width: 58px;
  height: 88px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 19px;
  background: rgba(4, 7, 14, .91);
  color: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .42);
}

body.home-page .home-rail-wrap .home-rail-arrow--prev {
  left: 8px;
}

body.home-page .home-rail-wrap .home-rail-arrow--next {
  right: 8px;
}

body.home-page .home-rail-wrap .home-rail-arrow:not([disabled]):hover,
body.home-page .home-rail-wrap .home-rail-arrow:not([disabled]):focus-visible {
  border-color: rgba(103, 232, 249, .72);
  background: linear-gradient(135deg, rgba(124, 58, 237, .98), rgba(37, 99, 235, .98));
  transform: translateY(-50%) scale(1.06);
  outline: none;
}

body.home-page .home-rail-wrap .home-rail-arrow[disabled] {
  display: none !important;
}

@media (max-width: 1100px) {
  body.home-page .home-hero__arrows {
    display: flex !important;
  }

  body.home-page .home-rail-wrap .home-rail-arrow {
    display: grid !important;
    width: 52px;
    height: 78px;
  }

  body.home-page .home-rail-wrap .home-rail-arrow[disabled] {
    display: none !important;
  }
}

@media (max-width: 640px) {
  body.home-page .home-hero__controls {
    gap: 12px;
  }

  body.home-page .home-hero__arrows button {
    min-width: 50px;
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 15px;
  }

  body.home-page .home-hero__arrows button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  body.home-page .home-hero__arrows button svg,
  body.home-page .home-rail-arrow svg {
    width: 23px;
    height: 23px;
  }

  body.home-page .home-rail-wrap {
    margin-inline: -6px;
    padding-inline: 6px;
  }

  body.home-page .home-rail-wrap .home-rail-arrow {
    display: grid !important;
    width: 46px;
    height: 68px;
    border-radius: 16px;
  }

  body.home-page .home-rail-wrap .home-rail-arrow--prev {
    left: 6px;
  }

  body.home-page .home-rail-wrap .home-rail-arrow--next {
    right: 6px;
  }

  body.home-page .home-rail-wrap .home-rail-arrow[disabled] {
    display: none !important;
  }
}

/* 2026-10-12 · Mobile cinematic hero: show real poster ABOVE the copy.
   Old <=820px rule had display:none on the poster, so mobile users saw only text. */
@media (max-width: 820px) {
  body.home-page .home-hero { min-height:0 !important; height:auto; max-height:none; overflow:clip; }
  body.home-page .home-hero__slides { min-height:0; height:auto; }
  body.home-page .home-hero__slide { min-height:0; align-items:start; }
  body.home-page .home-hero__slide.is-active { position:relative; }
  body.home-page .home-hero__content {
    min-height:0; display:flex; flex-direction:column; align-items:stretch;
    gap:20px; padding-top:22px; padding-bottom:22px;
  }
  body.home-page .home-hero__poster {
    display:block !important; order:-1; align-self:center; justify-self:center;
    width:clamp(132px,38vw,190px); max-width:48%; margin:0 auto;
    border-radius:18px; transform:none; box-shadow:0 16px 44px rgba(0,0,0,.50);
  }
  body.home-page .home-hero__poster:hover { transform:none; }
  body.home-page .home-hero__copy { order:0; width:100%; max-width:100%; }
  body.home-page .home-hero__title { font-size:clamp(2.45rem,11.5vw,4rem) !important; overflow-wrap:anywhere; }
  body.home-page .home-hero__plot { -webkit-line-clamp:3; }
  body.home-page .home-hero .home-hero__slide::before {
    background:linear-gradient(180deg,rgba(4,7,14,.54),rgba(4,7,14,.93) 55%,#070a12 100%) !important;
  }
  body.home-page .home-hero__controls {
    position:relative; inset:auto; bottom:auto; left:auto; transform:none;
    min-width:0; width:min(calc(100% - 28px),600px); margin:0 auto;
    padding:8px 0 25px; align-items:center; gap:10px;
  }
  body.home-page .home-hero__dots { min-width:0; flex:1; overflow-x:auto; scrollbar-width:none; }
  body.home-page .home-hero__dots::-webkit-scrollbar { display:none; }
  body.home-page .home-hero__arrows { flex-shrink:0; }
  body.home-page .home-hero__arrows button { width:44px; min-width:44px; height:44px; }
}
@media (max-width: 365px) {
  body.home-page .home-hero__poster { width:126px; }
  body.home-page .home-hero__actions { gap:6px; }
  body.home-page .home-button { padding-inline:10px; }
}

/* 2026-10-13: mobile first screen must show the REAL poster, not just the background. */
@media (max-width: 820px) {
  /* Every slide must reserve the same poster slot, even when hidden.
     Visibility remains inherited from the slide to prevent ghost posters. */
  html body.home-page .home-hero__slide .home-hero__poster {
    display:block!important;position:relative!important;
    order:-1!important;grid-column:1!important;flex:none;
    width:min(47vw,196px)!important;max-width:196px!important;height:auto!important;
    margin:12px auto 8px!important;aspect-ratio:2 / 3!important;
    border:1px solid rgba(255,255,255,.26);border-radius:18px;
    overflow:hidden;z-index:3;
  }
  html body.home-page .home-hero__poster img {display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;}
  html body.home-page .home-hero__content {display:flex!important;flex-direction:column!important;gap:12px!important;align-items:stretch!important;padding-top:24px!important;}
  html body.home-page .home-hero__copy {order:0!important;}
}

/* 4.0.26: fit long titles without truncating or enlarging the whole hero
   excessively. Keep the original cinematic scale for short titles. */
body.home-page .home-hero__title--medium {
  font-size: clamp(2.6rem, 5vw, 4.5rem) !important;
  line-height: 1.04 !important;
}
body.home-page .home-hero__title--long {
  font-size: clamp(2.1rem, 3.5vw, 3.2rem) !important;
  line-height: 1.1 !important;
}
.home-hero__original { overflow-wrap: anywhere; }
@media (max-width: 820px) {
  body.home-page .home-hero__title--medium {
    font-size: clamp(1.9rem, 7vw, 3rem) !important;
  }
  body.home-page .home-hero__title--long {
    font-size: clamp(1.65rem, 5.4vw, 2.4rem) !important;
  }
}
