/* Editor's Choice slider block */
.wp-block-gender-home-editors-choice {
  max-width: 1440px;
  margin: 32px auto;
  position: relative;
}

.wp-block-gender-home-editors-choice::before {
  content: "";
  position: absolute;
  inset: 0 50% 0 50%;
  width: 100vw;
  margin-left: -50vw;
  background: linear-gradient(
    to bottom,
    var(--wp--preset--color--primary, #f05023) 0%,
    var(--wp--preset--color--primary, #f05023) 70%,
    transparent 70%,
    transparent 100%
  );
  z-index: -1;
}

/* Orange banner — spans the full block width. The orange fill lives on the
   banner itself, so it's exactly banner-height (never behind the cards below). */
.home-editors-choice__banner {
  padding: 14px 28px;
  margin: 0;
  position: relative;
  z-index: 2;
}

.home-editors-choice__title {
  margin: 0;
  color: #fff;
  font-weight: 700;
  font-size: clamp(22px, 3vw, 44px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.05;
}

/* Heading link: slight zoom on hover/focus. transform avoids reflow. */
.home-editors-choice__title-link {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  transform-origin: left center;
  transition: transform 0.2s ease;
  will-change: transform;
}

.home-editors-choice__title-link:hover,
.home-editors-choice__title-link:focus-visible {
  transform: scale(1.05);
  /* Keep white on hover — background is also orange. */
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .home-editors-choice__title-link {
    transition: none;
  }
}

/* Slider sits directly below the banner. Side padding lives here so the
   cards don't bleed off the viewport. */
.home-editors-choice__swiper {
  position: relative;
  z-index: 1;
  padding: 0 16px;
  margin: 0;
  /* Horizontal scroll */
  /* overflow: visible !important; */
  clip-path: inset(0 -100vw 0 0);
  box-sizing: border-box;
}

.home-editors-choice__swiper .swiper-wrapper {
  align-items: stretch;
}

.home-editors-choice__slide {
  display: flex !important;
  flex-direction: column;
  height: auto;
  box-sizing: border-box;
  background-color: white;
}

.home-editors-choice__media {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background-color: var(--wp--preset--color--highlight, #ffff42);
}

.home-editors-choice__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: 2px solid var(--wp--preset--color--base, #ffffff);
}

.home-editors-choice__image--placeholder {
  background-color: var(--wp--preset--color--highlight, #ffff42);
}

.home-editors-choice__body {
  padding: 12px 4px 8px;
}

/* Скоупимо під обгортку блоку, щоб перебити глобальний :root :where(h3),
   який нав'язує Core-Rhino заголовкам. */
.wp-block-gender-home-editors-choice .home-editors-choice__post-title {
  font-family: var(--wp--preset--font-family--montserrat, "Montserrat", sans-serif);
  font-size: 24px;
  font-weight: 900; /* Black */
  line-height: 1; /* 100% */
  letter-spacing: 0; /* 0% */
  margin: 0 0 12px;
}

.home-editors-choice__post-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.home-editors-choice__post-title a:hover {
  color: var(--wp--preset--color--primary, #f05023);
}

.home-editors-choice__author {
  font-family: var(--wp--preset--font-family--montserrat, "Montserrat", sans-serif);
  font-style: normal;
  font-size: 16px;
  font-weight: 500; /* Medium */
  line-height: 1.1; /* 110% */
  letter-spacing: 0.3em; /* 30% від 16px ≈ 4.8px */
  vertical-align: middle;
  text-transform: uppercase;
  color: var(--wp--preset--color--contrast, #111);
}

.home-editors-choice__author-link {
  color: inherit;
  text-decoration: none;
}

.home-editors-choice__author-link:hover {
  text-decoration: underline;
}

/* Controls */
.home-editors-choice__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px 0 8px;
}

.home-editors-choice__controls .swiper-button {
  background: none;
  border: none;
  padding: 4px 8px;
  color: var(--wp--preset--color--contrast, #111);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  top: auto;
  right: auto;
  left: auto;
  bottom: auto;
}

.home-editors-choice__controls .swiper-button::after {
  content: none;
}

.home-editors-choice__controls .swiper-button:hover {
  transform: scale(1.1);
}

.home-editors-choice__controls .swiper-pagination {
  position: static;
  width: max-content;
  display: flex;
  align-items: center;
  gap: 16px;
  bottom: auto;
  top: auto;
  left: auto;
}

.home-editors-choice__controls .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background-color: var(--wp--preset--color--contrast, #111);
  opacity: 1;
  margin: 0;
  border-radius: 50%;
}

.home-editors-choice__controls .swiper-pagination-bullet-active {
  background-color: var(--wp--preset--color--primary, #f05023);
}

@media (min-width: 768px) {
  .home-editors-choice__banner {
    padding: 18px 40px;
  }

  .home-editors-choice__swiper {
    padding: 0 24px;
  }

  .home-editors-choice__body {
    padding: 20px 4px 8px;
  }
}

@media (min-width: 1280px) {
  .wp-block-gender-home-editors-choice {
    margin: 64px auto;
  }

  .home-editors-choice__banner {
    padding: 22px 40px;
    max-width: 1440px;
    margin: auto;
  }

  .home-editors-choice__swiper {
    padding: 0 40px;
  }

  .home-editors-choice__controls .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
  }
}

/* Editor preview */
.home-editors-choice-editor-preview {
  border: 2px dashed #ccc;
  padding: 24px;
  background: #fafafa;
  text-align: center;
}
