/* Audience switch shared by the existing male home and the female channel home. */
.nr-channel-switch,
.m-channel-switch {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nr-channel-switch {
  margin-left: 18px;
  margin-right: auto;
}

.nr-channel-btn,
.m-channel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #e8d8da;
  border-radius: 999px;
  color: #65585a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 7px 11px;
  text-decoration: none;
  white-space: nowrap;
}

.nr-channel-btn::before,
.m-channel-btn::before {
  display: inline-block;
  font-size: 1.08em;
  font-weight: 800;
  line-height: 1;
}

.nr-channel-btn[href="/"]::before,
.m-channel-btn[href="/"]::before {
  content: "♂";
}

.nr-channel-btn[href="/femenino/"]::before,
.m-channel-btn[href="/femenino/"]::before {
  content: "♀";
}

.nr-channel-btn:hover,
.nr-channel-btn:focus-visible,
.m-channel-btn:hover,
.m-channel-btn:focus-visible {
  border-color: #ed4259;
  color: #bd3045;
}

.nr-channel-btn.is-active,
.nr-channel-btn[aria-current="page"],
.m-channel-btn.is-active,
.m-channel-btn[aria-current="page"] {
  background: #ed4259;
  border-color: #ed4259;
  color: #fff;
}

/* Search autocomplete: one lightweight title-only list shared by desktop/mobile. */
.nr-search-box.nr-search-enhanced,
.m-search.nr-search-enhanced {
  position: relative;
  overflow: visible;
}

.nr-search-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(390px, calc(100vw - 24px));
  max-height: 340px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: none;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(24, 35, 58, 0.18);
  padding: 6px;
  z-index: 320;
}

.nr-search-suggest.is-open {
  display: block;
}

.nr-search-option {
  display: block;
  width: 100%;
  padding: 10px 11px;
  border-radius: 8px;
  color: #303541;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nr-search-option:hover,
.nr-search-option.is-active,
.nr-search-option[aria-selected="true"] {
  background: #fff1f3;
  color: #b4233b;
}

.nr-search-option:focus-visible {
  outline: 2px solid #ed4259;
  outline-offset: -2px;
}

/* Immersive three-layer hero. JS derives the blurred background from the same
   already-localized cover used by the visible cover card, so no extra image
   service or duplicate source asset is required. */
.nr-featured-slide,
.m-hero-slide {
  isolation: isolate;
  background: #121621;
}

.nr-hero-blur-bg {
  position: absolute;
  inset: -18%;
  z-index: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.15);
  filter: blur(32px) brightness(0.78) saturate(1.25);
  pointer-events: none;
}

.nr-featured-slide {
  align-items: center;
  padding: 24px 28px;
}

.nr-featured-slide .carousel-overlay {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(8, 11, 18, 0.72) 0%, rgba(8, 11, 18, 0.52) 43%, rgba(8, 11, 18, 0.20) 72%, rgba(8, 11, 18, 0.32) 100%),
    linear-gradient(0deg, rgba(8, 11, 18, 0.24), rgba(8, 11, 18, 0.04));
}

.nr-featured-slide .carousel-content {
  z-index: 3;
  max-width: 62%;
  padding-right: 18px;
}

.nr-featured-slide .carousel-content h2 {
  margin-top: 0;
  line-height: 1.13;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.nr-featured-slide .carousel-content p {
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.55;
}

.nr-featured-slide .carousel-cover {
  right: 28px;
  top: 20px;
  bottom: 20px;
  width: auto;
  aspect-ratio: 3 / 4;
  z-index: 3;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  background: rgba(255, 255, 255, 0.08);
}

.nr-featured-slide .carousel-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile: keep a compact clear cover on the right and reserve the left for
   Spanish text. The blurred cover becomes the atmosphere layer behind both. */
@media (max-width: 768px) {
  .m-search-bar {
    position: relative;
    z-index: 110;
    overflow: visible;
  }

  .m-search .nr-search-suggest {
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    width: 100%;
    max-height: min(48vh, 320px);
    border-radius: 12px;
  }

  .m-hero-slide .nr-hero-blur-bg {
    inset: -22%;
    transform: scale(1.16);
    filter: blur(22px) brightness(0.74) saturate(1.22);
  }

  .m-hero-slide::after {
    z-index: 1;
    background:
      linear-gradient(90deg, rgba(8, 11, 18, 0.76) 0%, rgba(8, 11, 18, 0.58) 48%, rgba(8, 11, 18, 0.24) 72%, rgba(8, 11, 18, 0.34) 100%),
      linear-gradient(0deg, rgba(8, 11, 18, 0.26), rgba(8, 11, 18, 0.04));
  }

  .m-hero-slide > img {
    inset: 16px 14px 16px auto;
    width: auto;
    height: calc(100% - 32px);
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
    z-index: 3;
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
  }

  .m-hero-inner {
    box-sizing: border-box;
    width: 61%;
    padding: 14px 8px 18px 16px;
    justify-content: center;
    overflow: hidden;
    z-index: 4;
  }

  .m-hero-title {
    font-size: clamp(16px, 4.7vw, 21px) !important;
    line-height: 1.16;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
  }

  .m-hero-desc {
    font-size: clamp(10px, 2.8vw, 12px) !important;
    -webkit-line-clamp: 2 !important;
    line-height: 1.4;
    margin-bottom: 7px;
  }

  .m-hero-meta {
    font-size: clamp(9px, 2.5vw, 11px);
  }

  .m-hero-dots {
    z-index: 5;
  }

  /* Mobile: one physical header row.
     Existing markup keeps the audience switch inside .m-header-right; display:contents
     promotes its children into .m-header so the visual order is:
     NovelRefined -> audience switch -> Novelas -> Ultimas. */
  .m-header {
    justify-content: flex-start;
    gap: 5px;
    flex-wrap: nowrap;
  }

  .m-header-right,
  body.force-mobile .m-header-right {
    display: contents !important;
  }

  .m-logo {
    flex: 0 0 auto;
    min-width: 0;
  }

  .m-channel-switch {
    flex: 0 0 auto;
    margin-left: 2px;
    margin-right: auto;
    gap: 2px;
  }

  .m-channel-btn {
    min-height: 28px;
    font-size: 10px;
    padding: 4px 6px;
  }

  .m-tab-btn {
    flex: 0 0 auto;
  }

  /* Female/shared channel home must use the same existing mobile homepage system,
     not fall back to desktop cards or the desktop header. No second mobile UI is
     created here: these selectors only expose the already-shared m-* components. */
  body.nr-shared-home .nr-header,
  body.nr-shared-home .nr-hero,
  body.nr-shared-home .nr-updates-section,
  body.nr-shared-home .nr-footer {
    display: none !important;
  }

  body.nr-shared-home .m-header {
    display: flex !important;
  }

  body.nr-shared-home .m-search-bar,
  body.nr-shared-home .m-hero-banner,
  body.nr-shared-home .m-section {
    display: block !important;
  }

  body.nr-shared-home .m-9cat {
    display: grid !important;
  }

  body.nr-shared-home .m-rail {
    display: flex !important;
  }

  body.nr-shared-home .nr-main {
    padding: 0 0 32px;
  }
}

/* The existing desktop ?m=1 preview is part of the homepage QA workflow.
   Make the dynamic female home obey the same mobile component visibility even
   when the browser viewport itself is wider than 768px. */
body.force-mobile.nr-shared-home .nr-header,
body.force-mobile.nr-shared-home .nr-hero,
body.force-mobile.nr-shared-home .nr-updates-section,
body.force-mobile.nr-shared-home .nr-footer {
  display: none !important;
}

body.force-mobile.nr-shared-home .m-header {
  display: flex !important;
}

body.force-mobile.nr-shared-home .m-header-right {
  display: contents !important;
}

body.force-mobile.nr-shared-home .m-search-bar,
body.force-mobile.nr-shared-home .m-hero-banner,
body.force-mobile.nr-shared-home .m-section {
  display: block !important;
}

body.force-mobile.nr-shared-home .m-9cat {
  display: grid !important;
}

body.force-mobile.nr-shared-home .m-rail {
  display: flex !important;
}

body.force-mobile.nr-shared-home .nr-main {
  padding: 0 0 32px !important;
}

/* style.min.css contains force-mobile !important hero rules; override them here
   so desktop QA preview and real <=768px render the exact same immersive layout. */
body.force-mobile .m-hero-slide .nr-hero-blur-bg {
  inset: -22% !important;
  transform: scale(1.16) !important;
  filter: blur(22px) brightness(0.74) saturate(1.22) !important;
}

body.force-mobile .m-hero-slide::after {
  z-index: 1 !important;
  background:
    linear-gradient(90deg, rgba(8, 11, 18, 0.76) 0%, rgba(8, 11, 18, 0.58) 48%, rgba(8, 11, 18, 0.24) 72%, rgba(8, 11, 18, 0.34) 100%),
    linear-gradient(0deg, rgba(8, 11, 18, 0.26), rgba(8, 11, 18, 0.04)) !important;
}

body.force-mobile .m-hero-slide > img {
  inset: 16px 14px 16px auto !important;
  width: auto !important;
  height: calc(100% - 32px) !important;
  aspect-ratio: 3 / 4 !important;
  object-fit: cover !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38) !important;
  z-index: 3 !important;
  opacity: 1 !important;
}

body.force-mobile .m-hero-inner {
  width: 61% !important;
  padding: 14px 8px 18px 16px !important;
  justify-content: center !important;
  overflow: hidden !important;
  z-index: 4 !important;
}

@media (max-width: 390px) {
  .m-header {
    gap: 3px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .m-logo-text {
    font-size: 14px;
  }

  .m-channel-switch {
    margin-left: 0;
  }

  .m-channel-btn {
    gap: 2px;
    min-height: 26px;
    font-size: 9.5px;
    padding: 4px 5px;
  }

  .m-tab-btn {
    font-size: 10px;
    padding-left: 7px;
    padding-right: 7px;
  }

  .m-hero-slide > img,
  body.force-mobile .m-hero-slide > img {
    right: 10px !important;
    top: 14px !important;
    bottom: 14px !important;
    height: calc(100% - 28px) !important;
  }

  .m-hero-inner,
  body.force-mobile .m-hero-inner {
    width: 62% !important;
    padding-left: 12px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nr-hero-blur-bg {
    filter: blur(24px) brightness(0.55) saturate(1.08);
  }
}

/* V4 owner-approved mobile shell and SVG channel icons. */
.nr-channel-btn::before,
.m-channel-btn::before {
  content: "" !important;
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  background-color: currentColor;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.nr-channel-btn[href="/"]::before,
.m-channel-btn[href="/"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cg%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='10'%20cy='14'%20r='5'/%3E%3Cpath%20d='M14%2010l7-7M15%203h6v6'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cg%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='10'%20cy='14'%20r='5'/%3E%3Cpath%20d='M14%2010l7-7M15%203h6v6'/%3E%3C/g%3E%3C/svg%3E");
}

.nr-channel-btn[href="/femenino/"]::before,
.m-channel-btn[href="/femenino/"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cg%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='8'%20r='5'/%3E%3Cpath%20d='M12%2013v8M8.5%2018h7'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cg%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='8'%20r='5'/%3E%3Cpath%20d='M12%2013v8M8.5%2018h7'/%3E%3C/g%3E%3C/svg%3E");
}

.nr-featured-slide,
.m-hero-slide {
  position: relative;
  overflow: hidden;
}

.nr-hero-blur-bg {
  opacity: .96;
}

@media (max-width: 768px) {
  .m-header {
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    min-height: 44px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .m-header-right,
  body.force-mobile .m-header-right {
    display: contents !important;
  }

  .m-logo {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    margin-right: auto !important;
  }

  .m-channel-switch {
    flex: 0 0 auto !important;
    margin: 0 !important;
    gap: 4px !important;
  }

  .m-channel-btn {
    min-height: 30px !important;
    padding: 5px 8px !important;
    gap: 4px !important;
    font-size: 11px !important;
  }

  .m-channel-btn::before {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
  }

  .m-tab-btn {
    display: none !important;
  }

  body.nr-book-page .nr-header {
    display: none !important;
  }

  body.nr-book-page .m-header {
    display: flex !important;
  }

  body.nr-book-page .m-search-bar {
    display: block !important;
  }
}

body.force-mobile .m-header {
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}

body.force-mobile .m-logo {
  margin-right: auto !important;
}

body.force-mobile .m-channel-switch {
  margin: 0 !important;
  gap: 4px !important;
}

body.force-mobile .m-tab-btn {
  display: none !important;
}

@media (max-width: 390px) {
  .m-header {
    gap: 6px !important;
    padding-left: 8px;
    padding-right: 8px;
  }

  .m-logo-text {
    font-size: 15px !important;
  }

  .m-channel-btn {
    min-height: 28px !important;
    padding: 4px 6px !important;
    font-size: 10.5px !important;
  }

  .m-channel-btn::before {
    width: 12px;
    height: 12px;
    flex-basis: 12px;
  }
}


/* V5 owner real-Staging correction: make cover-derived ambience visibly present. */
/* The prior blur+overlay combination left only ~4% effective image luminance on the text side,
   visually collapsing to the legacy black banner. V5 preserves text contrast while allowing
   cover hue/light to remain unmistakably visible across the panel. */
