/*
 * "Trending now" on the trial home page: tabs (Events / Run Clubs / Experts / Articles)
 * and a swipeable rail of compact cards. Markup: template-parts/content/trending-hub.php
 * and inc/trending-hub.php. Behaviour: assets/js/home-trending.js.
 *
 * Replaces the four stacked carousels. The old .trending-*-trial classes are still used by
 * the Explore pages, so none of those rules are touched.
 */

.trending-trial-wrap.rd-trend-wrap {
  margin-top: 0;
  padding: 40px 0 48px;
  background-color: #e8eaed;
}

/* Explore links used to live inside the grey Trending wrap; now they follow the feature article */
.trending-trial-wrap.rd-explore-wrap {
  margin-top: 0;
  padding: 0;
  background: none;
}

/* The diagonal edge now meets the light page background (not the grey Trending block) */
.rd-explore-wrap .explore-links-diagonal-top {
  background-color: #f1f3f4;
}

.rd-trend {
  --rd-trend-gutter: 60px;
  --rd-trend-gap: 20px;
  --rd-trend-ink: #04132d;
  --rd-trend-green: #96ff94;
  color: var(--rd-trend-ink);
}

@media (max-width: 991.98px) {
  .rd-trend {
    --rd-trend-gutter: 40px;
  }
}

@media (max-width: 575.98px) {
  .rd-trend {
    --rd-trend-gutter: 16px;
  }
}

/* ---------- Header: title, tabs, "see all" ---------- */

.rd-trend__head {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

.rd-trend__title {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
  margin: 0;
  color: var(--rd-trend-ink);
  font-family: "roc-grotesk", sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.rd-trend__flame {
  box-sizing: content-box;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 8px;
  border-radius: 50%;
  background: var(--rd-trend-green);
  color: var(--rd-trend-ink);
}

.rd-trend__tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.rd-trend__tabs::-webkit-scrollbar {
  display: none;
}

.rd-trend__tab {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  height: 40px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: var(--rd-trend-ink);
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.rd-trend__tab-icon {
  display: inline-flex;
  color: #5b6577;
  transition: color 0.15s ease;
}

.rd-trend__tab-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.rd-trend__tab:hover {
  border-color: rgba(4, 19, 45, 0.25);
}

.rd-trend__tab:focus-visible {
  outline: 2px solid var(--rd-trend-ink);
  outline-offset: 2px;
}

.rd-trend__tab.is-active {
  background: var(--rd-trend-ink);
  color: #fff;
}

.rd-trend__tab.is-active .rd-trend__tab-icon {
  color: var(--rd-trend-green);
}

.rd-trend__all {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  margin-left: auto;
  color: var(--rd-trend-ink);
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.rd-trend__all svg {
  transition: transform 0.15s ease;
}

.rd-trend__all:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rd-trend__all:hover svg {
  transform: translateX(3px);
}

/* ---------- Rail ---------- */

/* All panels share one grid cell, so the block is as tall as the tallest tab and
   switching tabs never makes the page below jump. Inactive panels are just invisible. */
.rd-trend__panels {
  display: grid;
}

.rd-trend__panel {
  grid-area: 1 / 1;
  min-width: 0;
}

.rd-trend__panel[hidden] {
  display: block;
  visibility: hidden;
  pointer-events: none;
}

/* Some save-button rules force visibility, so hide every descendant explicitly */
.rd-trend__panel[hidden] * {
  visibility: hidden !important;
}

.rd-trend__panel:not([hidden]) {
  animation: rd-trend-in 0.25s ease;
}

@keyframes rd-trend-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.rd-trend__rail-wrap {
  position: relative;
}

.rd-trend__rail {
  display: flex;
  gap: var(--rd-trend-gap);
  margin: 0 -6px;
  padding: 6px 6px 16px;
  overflow-x: auto;
  list-style: none;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.rd-trend__rail::-webkit-scrollbar {
  display: none;
}

.rd-trend__rail:focus {
  outline: none;
}

.rd-trend__arrow {
  position: absolute;
  top: calc(50% - 30px);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 18px rgba(4, 19, 45, 0.25);
  color: var(--rd-trend-ink);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.rd-trend__arrow--prev {
  left: -22px;
}

.rd-trend__arrow--next {
  right: -22px;
}

.rd-trend__arrow:hover {
  background: var(--rd-trend-green);
  transform: scale(1.06);
}

.rd-trend__arrow:focus-visible {
  outline: 2px solid var(--rd-trend-ink);
  outline-offset: 2px;
}

.rd-trend__arrow[disabled] {
  opacity: 0;
  pointer-events: none;
}

/* No arrows when the rail fits, or on touch screens (they swipe) */
.rd-trend__rail-wrap:not(.is-scrollable) .rd-trend__arrow {
  display: none;
}

@media (hover: none) {
  .rd-trend__arrow {
    display: none !important;
  }
}

/* ---------- Card ---------- */

.rd-tcard {
  position: relative;
  display: flex;
  flex: 0 0 calc((100% - 3 * var(--rd-trend-gap)) / 4);
  flex-direction: column;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(4, 19, 45, 0.06), 0 10px 22px -12px rgba(4, 19, 45, 0.28);
  scroll-snap-align: start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 992px) {
  .rd-tcard:hover {
    transform: translateY(-3px);
    box-shadow: 0 1px 2px rgba(4, 19, 45, 0.06), 0 18px 30px -14px rgba(4, 19, 45, 0.4);
  }
}

.rd-tcard__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #cfd5de;
}

.rd-tcard__media picture {
  position: absolute;
  inset: 0;
  display: block;
}

.rd-tcard__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rd-tcard--expert .rd-tcard__media img {
  object-position: center top;
}

@media (min-width: 992px) {
  .rd-tcard:hover .rd-tcard__media img {
    transform: scale(1.04);
  }
}

.rd-tcard__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4, 19, 45, 0.82) 0%, rgba(4, 19, 45, 0.25) 38%, rgba(4, 19, 45, 0) 62%);
  pointer-events: none;
}

.rd-tcard__rank {
  position: absolute;
  bottom: 6px;
  left: 14px;
  color: #fff;
  font-family: "roc-grotesk", sans-serif;
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  text-shadow: 0 2px 12px rgba(4, 19, 45, 0.45);
  pointer-events: none;
}

.rd-tcard:nth-child(-n + 3) .rd-tcard__rank {
  color: #fff;
}

.rd-tcard__chip {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 70px);
  padding: 5px 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--rd-trend-green);
  color: var(--rd-trend-ink);
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

/* Save to account heart (same look as the heart on the listing cards) */
.rd-tcard__save {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
}

.rd-tcard__save .customfavorite-button,
.rd-tcard__save .simplefavorite-button {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 200px;
  background-color: #fff;
  box-shadow: 0 8px 8px -4px rgba(24, 39, 75, 0.08), 0 4px 6px -4px rgba(24, 39, 75, 0.12);
  font-size: 0;
  text-decoration: none;
}

.rd-tcard__save .customfavorite-button svg,
.rd-tcard__save .simplefavorite-button svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.rd-tcard__save .customfavorite-button.loading,
.rd-tcard__save .simplefavorite-button.loading {
  opacity: 0.7 !important;
}

.rd-tcard__save .customfavorite-button.active,
.rd-tcard__save .simplefavorite-button.active {
  background-color: #c2ff42;
}

.rd-tcard__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 14px 16px 16px;
}

.rd-tcard__title {
  display: -webkit-box;
  min-height: 2.4em;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--rd-trend-ink);
  font-family: "roc-grotesk", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.2px;
  text-align: left;
  text-transform: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rd-tcard__link {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-decoration: none;
}

/* The whole card is the tap target; the heart sits above it */
.rd-tcard__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.rd-tcard__link:focus-visible {
  outline: none;
}

.rd-tcard:has(.rd-tcard__link:focus-visible) {
  outline: 2px solid var(--rd-trend-ink);
  outline-offset: 2px;
}

.rd-tcard__meta {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rd-tcard__meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #4a5568;
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.rd-tcard__meta-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rd-tcard__icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: #7a8496;
}

.rd-tcard__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: auto 0 0;
  padding: 10px 0 0;
  list-style: none;
}

.rd-tcard__tags li {
  max-width: 100%;
  padding: 3px 10px;
  overflow: hidden;
  border: 1px solid #d3d8df;
  border-radius: 999px;
  color: var(--rd-trend-ink);
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rd-tcard__tags .rd-tcard__tags-more {
  border-color: transparent;
  background: #eef0f3;
  color: #5b6577;
}

/* ---------- Tablet: three cards ---------- */

@media (max-width: 1199.98px) {
  .rd-tcard {
    flex-basis: calc((100% - 2 * var(--rd-trend-gap)) / 3);
  }
}

/* ---------- Phone: swipe rail that bleeds to the screen edges ---------- */

@media (max-width: 767.98px) {
  .trending-trial-wrap.rd-trend-wrap {
    padding: 28px 0 32px;
  }

  .rd-trend {
    --rd-trend-gap: 12px;
  }

  .rd-trend__head {
    flex-wrap: wrap;
    gap: 14px 12px;
    margin-bottom: 14px;
  }

  .rd-trend__title {
    gap: 10px;
    font-size: 26px;
  }

  .rd-trend__flame {
    width: 18px;
    height: 18px;
    padding: 6px;
  }

  .rd-trend__all {
    font-size: 14px;
  }

  /* Tabs drop under the title and use the full width */
  .rd-trend__tabs {
    order: 3;
    width: calc(100% + 2 * var(--rd-trend-gutter));
    margin: 0 calc(-1 * var(--rd-trend-gutter));
    padding: 0 var(--rd-trend-gutter);
  }

  .rd-trend__tab {
    height: 38px;
    padding: 0 14px;
    font-size: 13px;
  }

  .rd-trend__rail {
    margin: 0 calc(-1 * var(--rd-trend-gutter));
    padding: 4px var(--rd-trend-gutter) 14px;
    scroll-padding-inline: var(--rd-trend-gutter);
  }

  .rd-tcard {
    flex-basis: min(74%, 290px);
    border-radius: 6px;
  }

  .rd-tcard__rank {
    bottom: 4px;
    left: 12px;
    font-size: 44px;
  }

  .rd-tcard__body {
    padding: 12px 14px 14px;
  }

  .rd-tcard__title {
    font-size: 17px;
  }

  /* Swipe on phones; arrows would only overflow the screen edge */
  .rd-trend__arrow {
    display: none !important;
  }

  .rd-tcard__tags {
    gap: 5px;
    padding-top: 8px;
  }

  .rd-tcard__tags li {
    padding: 2px 8px;
    font-size: 11.5px;
  }
}

@media (max-width: 420px) {
  .rd-trend__tab-icon {
    display: none;
  }

  .rd-trend__tab {
    padding: 0 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rd-trend__panel:not([hidden]),
  .rd-tcard,
  .rd-tcard__media img {
    animation: none;
    transition: none;
  }
}

/* =====================================================================
 * Feature Article (left) + Trending Articles (right)
 * Markup: template-parts/content/feature-trending-split.php
 * ===================================================================== */

.rd-featstack {
  padding-bottom: 72px;
}

.rd-featsplit {
  position: relative;
  z-index: 2;
  padding: 56px 0 0;
}

.rd-featsplit__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: stretch;
}

/* Events: list on the left, big featured block on the right */
@media (min-width: 992px) {
  .rd-featsplit--feature-right .rd-featsplit__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  }

  .rd-featsplit--feature-right .rd-featsplit__trending {
    order: -1;
  }

  /* Experts: a narrower featured card, so its photo leaves room for the services below it */
  .rd-featsplit--experts .rd-featsplit__grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }

  .rd-featsplit--clubs .rd-featsplit__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  }
}

.rd-featsplit--solo .rd-featsplit__grid,
.rd-featsplit--feature-only .rd-featsplit__grid {
  grid-template-columns: minmax(0, 1fr);
}

/* The feature block keeps its markup; here it just fills its column */
.rd-featsplit__feature {
  display: flex;
  min-width: 0;
}

.rd-featsplit__feature .text-back-card {
  display: flex;
  flex: 1 1 auto;
  margin: 0;
}

.rd-featsplit__feature .text-back-card .container {
  display: flex;
  width: 100%;
  max-width: none;
  padding: 0;
}

.rd-featsplit__feature .text-back-card .content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
  border-radius: 6px;
  padding: 48px;
}

.rd-featsplit__feature .text-back-card .btns-box {
  margin-top: auto;
  padding-top: 40px;
}

.rd-featsplit__feature .text-back-card h2 {
  font-size: 88px;
  max-width: 420px;
}

/* Featured event: label, logo and a long title all have to fit */
.rd-featsplit--events .text-back-card .logo-box {
  width: 84px;
  margin-bottom: 28px;
}

.rd-featsplit--events .text-back-card h2 {
  font-size: 76px;
  max-width: 470px;
}

.rd-featsplit--events .text-back-card p {
  font-size: 20px;
  letter-spacing: -0.4px;
}

.rd-featsplit--events .rd-tcard__save {
  top: 16px;
  right: 16px;
  z-index: 5;
}

.rd-featsplit--events .rd-enter-now.button {
  background-color: #96ff94;
}

.rd-featsplit--experts .rd-trow,
.rd-featsplit--clubs .rd-trow {
  grid-template-columns: 176px minmax(0, 1fr);
}

.rd-featsplit--clubs .rd-featsplit__title {
  white-space: normal;
}

/* ---------- Trending articles list ---------- */

.rd-featsplit__trending {
  --rd-trend-ink: #04132d;
  --rd-trend-green: #96ff94;
  min-width: 0;
  color: var(--rd-trend-ink);
}

.rd-featsplit__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.rd-featsplit__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--rd-trend-ink);
  font-family: "roc-grotesk", sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.4px;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
}

.rd-featsplit__title .rd-trend__flame {
  width: 16px;
  height: 16px;
  padding: 6px;
}

/* Five rows are visible; the up / down buttons slide to rows 6-10 (home-trending.js) */
.rd-vlist {
  --rd-row-h: 116px;
  --rd-row-gap: 12px;
  height: calc(5 * var(--rd-row-h) + 4 * var(--rd-row-gap));
  margin: 0 -6px;
  padding: 0 6px;
  overflow-y: hidden;
  overflow-x: clip;
  overscroll-behavior: contain;
}

.rd-featsplit__list {
  display: grid;
  gap: var(--rd-row-gap, 12px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.rd-featsplit__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-left: auto;
}

/* Narrow columns (small laptops / tablets): drop the "1-5 of 10" text, keep the buttons */
@media (max-width: 1279.98px) {
  .rd-vlist__count {
    display: none;
  }

  .rd-featsplit__title {
    font-size: 22px;
  }
}

.rd-featsplit__tools .rd-trend__all {
  margin-left: 8px;
}

.rd-vlist__count {
  margin-right: 2px;
  color: #5b6577;
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.rd-vlist__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 1px solid #d3d8df;
  border-radius: 50%;
  background: #fff;
  color: var(--rd-trend-ink);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.rd-vlist__btn:hover:not([disabled]) {
  border-color: var(--rd-trend-green);
  background: var(--rd-trend-green);
}

.rd-vlist__btn:focus-visible {
  outline: 2px solid var(--rd-trend-ink);
  outline-offset: 2px;
}

.rd-vlist__btn[disabled] {
  opacity: 0.35;
  cursor: default;
}

.rd-trow {
  position: relative;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: stretch;
  height: var(--rd-row-h, auto);
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(4, 19, 45, 0.06), 0 10px 22px -12px rgba(4, 19, 45, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 992px) {
  .rd-trow:hover {
    box-shadow: 0 1px 2px rgba(4, 19, 45, 0.06), 0 16px 28px -14px rgba(4, 19, 45, 0.4);
  }

  .rd-trow:hover .rd-trow__media img {
    transform: scale(1.05);
  }
}

.rd-trow__media {
  position: relative;
  min-height: 92px;
  overflow: hidden;
  background: #cfd5de;
}

.rd-trow__media picture {
  position: absolute;
  inset: 0;
  display: block;
}

.rd-trow__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rd-trow__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4, 19, 45, 0.78) 0%, rgba(4, 19, 45, 0) 60%);
  pointer-events: none;
}

.rd-trow__rank {
  position: absolute;
  bottom: 4px;
  left: 10px;
  color: #fff;
  font-family: "roc-grotesk", sans-serif;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1.5px;
  text-shadow: 0 2px 10px rgba(4, 19, 45, 0.45);
  pointer-events: none;
}

.rd-trow:nth-child(-n + 3) .rd-trow__rank {
  color: #fff;
}

.rd-trow .rd-tcard__save {
  top: 6px;
  right: 6px;
}

.rd-trow .rd-tcard__save .customfavorite-button,
.rd-trow .rd-tcard__save .simplefavorite-button {
  width: 32px;
  height: 32px;
}

.rd-trow .rd-tcard__save .customfavorite-button svg,
.rd-trow .rd-tcard__save .simplefavorite-button svg {
  width: 17px;
  height: 17px;
}

.rd-trow__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
}

.rd-trow__chip {
  align-self: flex-start;
  max-width: 100%;
  padding: 3px 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--rd-trend-green);
  color: var(--rd-trend-ink);
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.rd-trow__title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--rd-trend-ink);
  font-family: "roc-grotesk", sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.2px;
  text-align: left;
  text-transform: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rd-trow__link {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-decoration: none;
}

/* The whole row is the tap target */
.rd-trow__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.rd-trow__link:focus-visible {
  outline: none;
}

.rd-trow:has(.rd-trow__link:focus-visible) {
  outline: 2px solid var(--rd-trend-ink);
  outline-offset: 2px;
}

/* One line of meta so every row is the same height; long places / authors shorten with "..." */
.rd-trow__meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px 14px;
}

.rd-trow__meta .rd-tcard__meta-item {
  flex: 0 1 auto;
}

.rd-trow__meta .rd-tcard__meta-item--date,
.rd-trow__meta .rd-tcard__meta-item--read {
  flex: 0 0 auto;
}

.rd-trow--focus-top .rd-trow__media img {
  object-position: center top;
}

/* Feature + list stack on tablets and phones */
@media (max-width: 991.98px) {
  .rd-featstack {
    padding-bottom: 48px;
  }

  .rd-featsplit {
    padding: 40px 0 0;
  }

  .rd-featsplit__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  /* The 5-row window is a scroll container. On a phone a finger drag is
     caught by it and the page does not move. Show every row in normal flow. */
  .rd-vlist {
    height: auto;
    overflow: visible;
    overscroll-behavior: auto;
    touch-action: pan-y;
  }

  .rd-vlist__btn {
    display: none;
  }

  .rd-featsplit__feature .text-back-card .content {
    padding: 40px;
  }

  .rd-featsplit__feature .text-back-card h2 {
    font-size: 72px;
  }
}

@media (max-width: 767.98px) {
  .rd-featstack {
    padding-bottom: 40px;
  }

  .rd-featsplit {
    padding: 28px 0 0;
  }

  .rd-vlist {
    --rd-row-h: 108px;
  }

  .rd-vlist__count {
    display: none;
  }

  .rd-featsplit__tools .rd-trend__all {
    margin-left: 4px;
  }

  .rd-featsplit__feature .text-back-card .content {
    border-radius: 6px;
    padding: 24px;
  }

  .rd-featsplit__feature .text-back-card h2 {
    font-size: 56px;
    max-width: 260px;
  }

  .rd-featsplit__title {
    font-size: 22px;
  }

  .rd-trow {
    grid-template-columns: 96px minmax(0, 1fr);
    border-radius: 6px;
  }

  .rd-featsplit--experts .rd-trow,
  .rd-featsplit--clubs .rd-trow {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .rd-trow__rank {
    left: 8px;
    font-size: 30px;
  }

  .rd-trow__body {
    gap: 4px;
    padding: 10px 12px;
  }

  .rd-trow__title {
    font-size: 15.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rd-trow,
  .rd-trow__media img {
    transition: none;
  }
}

/* ===== Hero stats strip (home-trial.css is compiled to .min.css, so this lives here) ===== */

/* Hero stats strip: a slim bar along the bottom edge of the hero */
.home-trial-stats {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 55;
  container-type: inline-size;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(4, 19, 45, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.home-trial-stats__list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: 0 auto;
  padding: 14px 16px;
  list-style: none;
}

.home-trial-stats__item {
  position: relative;
  padding: 0 28px;
  color: rgba(255, 255, 255, 0.82);
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.home-trial-stats__item + .home-trial-stats__item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%);
}

.home-trial-stats__item strong {
  color: #96ff94;
  font-weight: 800;
}

/* Keep the search clear of the strip */
.banner-home-trial.banner-4 .container {
  padding-bottom: 56px;
}

@media (max-width: 767.98px) {
  .home-trial-stats__list {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0;
    width: 100%;
    padding: 11px 4px;
    /* Scale with the bar width so the three stats stay on one line. */
    font-size: 2.6vw;
    font-size: clamp(8px, calc((100cqi - 8px) / 38), 13px);
  }

  .home-trial-stats__item {
    flex: 0 0 auto;
    padding: 0 0.42em;
    font-size: inherit;
    letter-spacing: -0.02em;
    text-align: center;
  }

  .home-trial-stats__item + .home-trial-stats__item::before {
    height: 0.95em;
  }

  .banner-home-trial.banner-4 .container {
    padding-bottom: 52px;
  }
}

/* ---------- Featured expert card ---------- */

.rd-fexpert {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(4, 19, 45, 0.06), 0 10px 22px -12px rgba(4, 19, 45, 0.28);
  color: #04132d;
}

/* Experts column: the card is exactly as tall as the list beside it */
.rd-featsplit--experts .rd-featsplit__feature {
  position: relative;
}

.rd-featsplit--experts .rd-fexpert {
  align-self: stretch;
}

/* The cover photo keeps its own proportions (aspect-ratio is set inline) */
.rd-fexpert__media {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  max-height: 58%;
  overflow: hidden;
  background: #cfd5de;
}

.rd-fexpert__media picture {
  position: absolute;
  inset: 0;
  display: block;
}

.rd-fexpert__img,
.rd-fexpert__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.rd-fexpert__label {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  margin: 0;
  padding: 0;
  color: #fff;
  font-family: "roc-grotesk", sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.4;
  text-shadow: 0 1px 8px rgba(4, 19, 45, 0.45);
  pointer-events: none;
}

.rd-fexpert__media .rd-tcard__save {
  top: 12px;
  right: 12px;
}

/* Everything under the photo; the services use whatever room is left */
.rd-fexpert__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 18px 22px 20px;
}

.rd-fexpert__role {
  margin: 0 0 4px;
  overflow: hidden;
  color: #5b6577;
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rd-fexpert__title {
  margin: 0 0 10px;
  color: #04132d;
  font-family: "roc-grotesk", sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.4px;
  text-align: left;
  text-transform: none;
}

.rd-fexpert__link {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: none;
}

/* The whole card is the tap target; the heart and the button sit above it */
.rd-fexpert__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.rd-fexpert__link:focus-visible {
  outline: none;
}

.rd-fexpert:has(.rd-fexpert__link:focus-visible) {
  outline: 2px solid #04132d;
  outline-offset: 2px;
}

.rd-fexpert__facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rd-fexpert__loc {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
  color: #4a5568;
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 500;
}

.rd-fexpert__loc .rd-tcard__icon {
  flex: 0 0 auto;
}

.rd-fexpert__tag {
  padding: 3px 10px;
  border: 1px solid #d3d8df;
  border-radius: 999px;
  color: #04132d;
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.rd-fexpert__offer {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  margin-top: 14px;
  padding-top: 14px;
  overflow: hidden;
  border-top: 1px solid #e8eaed;
}

/* Soft fade where the list is cut off */
.rd-fexpert__offer::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 28px;
  background: linear-gradient(to top, #fff, rgba(255, 255, 255, 0));
  pointer-events: none;
}

.rd-fexpert__offer-title {
  margin: 0 0 8px;
  color: #5b6577;
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: left;
  text-transform: uppercase;
}

.rd-fexpert__services {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rd-fexpert__services li {
  display: grid;
  gap: 2px;
  padding-left: 14px;
  border-left: 3px solid #96ff94;
}

.rd-fexpert__services strong {
  color: #04132d;
  font-family: "roc-grotesk", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.rd-fexpert__services span {
  display: -webkit-box;
  overflow: hidden;
  color: #4a5568;
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rd-fexpert__about {
  margin: 0;
  color: #4a5568;
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.rd-fexpert__cta {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  flex: 0 0 auto;
  margin-top: 14px;
  padding: 11px 18px;
  border-radius: 4px;
  background: #96ff94;
  color: #04132d;
  font-family: "roc-grotesk", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.rd-fexpert__cta:hover {
  opacity: 0.75;
}

@media (max-width: 991.98px) {
  /* Stacked: the card is as tall as its content, photo shown in full */
  .rd-fexpert__media {
    max-height: none;
  }

  .rd-fexpert__offer {
    flex: 0 0 auto;
    overflow: visible;
  }

  .rd-fexpert__offer::after {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .rd-fexpert__body {
    padding: 16px 16px 18px;
  }

  .rd-fexpert__title {
    font-size: 22px;
  }
}

/* =====================================================================
 * Create account promo (guests): copy + looping account walkthrough
 * Markup: template-parts/content/home-account-promo.php
 * ===================================================================== */

.rd-acctpromo {
  --rd-acct-dur: 5200ms;
  position: relative;
  z-index: 2;
  padding: 56px 0 0;
}

.rd-acctpromo__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
  gap: 48px;
  align-items: center;
  overflow: hidden;
  border-radius: 6px;
  padding: 56px;
  background: #04132d;
  color: #fff;
}

.rd-acctpromo__panel::before {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -40%;
  width: 70%;
  height: 120%;
  background: radial-gradient(closest-side, rgba(150, 255, 148, 0.22), rgba(150, 255, 148, 0));
  pointer-events: none;
}

.rd-acctpromo__copy {
  position: relative;
  min-width: 0;
  text-align: left;
}

.rd-acctpromo__eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: #96ff94;
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rd-acctpromo__title {
  margin: 0 0 28px;
  color: #fff;
  text-align: left;
  font-family: "roc-grotesk", sans-serif;
  font-size: 40px;
  font-weight: 700;
  font-stretch: normal;
  letter-spacing: normal;
  line-height: 1.15;
}

.rd-acctpromo__features {
  display: grid;
  gap: 4px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.rd-acctpromo__feature {
  margin: 0;
}

.rd-acctpromo__feature-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 12px 0 14px 20px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.rd-acctpromo__feature-btn::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 14px;
  left: 0;
  width: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
}

.rd-acctpromo__progress {
  position: absolute;
  top: 12px;
  bottom: 14px;
  left: 0;
  width: 3px;
  overflow: hidden;
  border-radius: 3px;
}

.rd-acctpromo__progress span {
  display: block;
  width: 100%;
  height: 0;
  background: #96ff94;
}

.rd-acctpromo__feature.is-active .rd-acctpromo__progress span {
  animation: rdAcctProgress var(--rd-acct-dur) linear forwards;
}

.rd-acctpromo.is-paused .rd-acctpromo__progress span {
  animation-play-state: paused;
}

.rd-acctpromo.is-static .rd-acctpromo__feature.is-active .rd-acctpromo__progress span {
  height: 100%;
  animation: none;
}

@keyframes rdAcctProgress {
  from { height: 0; }
  to { height: 100%; }
}

.rd-acctpromo__feature-title {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-family: "roc-grotesk", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  transition: color 0.25s ease;
}

.rd-acctpromo__feature-text {
  display: block;
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  color: rgba(255, 255, 255, 0.78);
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  opacity: 0;
  transition: max-height 0.35s ease, margin-top 0.35s ease, opacity 0.35s ease;
}

.rd-acctpromo__feature.is-active .rd-acctpromo__feature-title,
.rd-acctpromo__feature-btn:hover .rd-acctpromo__feature-title {
  color: #fff;
}

.rd-acctpromo__feature.is-active .rd-acctpromo__feature-text {
  max-height: 80px;
  margin-top: 6px;
  opacity: 1;
}

.rd-acctpromo__feature-btn:focus-visible {
  outline: 2px solid #96ff94;
  outline-offset: 2px;
  border-radius: 6px;
}

.rd-acctpromo__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.rd-acctpromo__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 6px;
  background: #96ff94;
  color: #04132d;
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.rd-acctpromo__cta:hover,
.rd-acctpromo__cta:focus-visible {
  background: #c2ff42;
  color: #04132d;
  text-decoration: none;
  transform: translateY(-1px);
}

.rd-acctpromo__login {
  color: rgba(255, 255, 255, 0.8);
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rd-acctpromo__login:hover {
  color: #fff;
}

/* Stage: a browser window that cycles through the account screens */
.rd-acctpromo__stage {
  position: relative;
  min-width: 0;
  perspective: 1800px;
}

.rd-acctpromo__window {
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: rotateY(-7deg) rotateX(3deg);
  transform-origin: left center;
  transition: transform 0.6s ease;
}

.rd-acctpromo__stage:hover .rd-acctpromo__window {
  transform: rotateY(0deg) rotateX(0deg);
}

.rd-acctpromo__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid #e8eaed;
  background: #f1f3f4;
}

.rd-acctpromo__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d3d8df;
}

.rd-acctpromo__bar em {
  flex: 0 1 auto;
  overflow: hidden;
  margin: 0 auto;
  padding: 3px 14px;
  border-radius: 6px;
  background: #fff;
  color: #5b6577;
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rd-acctpromo__screens {
  position: relative;
  aspect-ratio: 1200 / 816;
  overflow: hidden;
  background: #fff;
}

.rd-acctpromo__screen {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.rd-acctpromo__screen.is-active {
  opacity: 1;
  transform: none;
}

.rd-acctpromo__screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform-origin: 50% 0;
}

.rd-acctpromo__screen.is-active img {
  animation: rdAcctPan var(--rd-acct-dur) ease-in-out forwards;
}

.rd-acctpromo.is-paused .rd-acctpromo__screen img {
  animation-play-state: paused;
}

@keyframes rdAcctPan {
  from { transform: scale(1.0); }
  to { transform: scale(1.07) translateY(-1.5%); }
}

.rd-acctpromo__toast {
  position: absolute;
  bottom: 18px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 12px;
  border-radius: 6px;
  background: #04132d;
  color: #fff;
  box-shadow: 0 12px 30px rgba(4, 19, 45, 0.35);
  font-family: "Inter", "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  pointer-events: none;
}

.rd-acctpromo__toast svg {
  flex: 0 0 auto;
  padding: 3px;
  border-radius: 50%;
  background: #96ff94;
  color: #04132d;
}

.rd-acctpromo__toast.is-shown {
  animation: rdAcctToast var(--rd-acct-dur) ease forwards;
}

.rd-acctpromo.is-paused .rd-acctpromo__toast {
  animation-play-state: paused;
}

@keyframes rdAcctToast {
  0%, 22% { opacity: 0; transform: translateY(12px) scale(0.96); }
  30%, 84% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .rd-acctpromo__window,
  .rd-acctpromo__stage:hover .rd-acctpromo__window {
    transform: none;
  }

  .rd-acctpromo__screen,
  .rd-acctpromo__screen.is-active img {
    transition: none;
    animation: none;
  }

  .rd-acctpromo__toast.is-shown {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1199.98px) {
  .rd-acctpromo__panel {
    gap: 32px;
    padding: 40px;
  }

  .rd-acctpromo__title {
    font-size: 34px;
  }
}

@media (max-width: 991.98px) {
  .rd-acctpromo__panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .rd-acctpromo__stage {
    order: -1;
  }

  .rd-acctpromo__window {
    transform: none;
  }
}

@media (max-width: 767.98px) {
  .rd-acctpromo {
    padding-top: 40px;
  }

  .rd-acctpromo__panel {
    gap: 24px;
    padding: 20px 18px 24px;
  }

  .rd-acctpromo__title {
    margin-bottom: 18px;
    font-size: 28px;
  }

  .rd-acctpromo__feature-title {
    font-size: 17px;
  }

  .rd-acctpromo__feature-text {
    font-size: 14px;
  }

  .rd-acctpromo__features {
    margin-bottom: 24px;
  }

  .rd-acctpromo__cta {
    width: 100%;
  }

  .rd-acctpromo__actions {
    justify-content: center;
  }

  .rd-acctpromo__bar {
    height: 26px;
  }

  .rd-acctpromo__bar em {
    font-size: 10px;
  }

  .rd-acctpromo__toast {
    bottom: 10px;
    left: 10px;
    padding: 7px 12px 7px 9px;
    font-size: 12px;
  }
}

/* Banner under the Trending articles split */
.rd-home-ad {
  padding-top: 28px;
}

.rd-home-ad .ad-link,
.rd-home-ad .ad-slick,
.rd-home-ad .ad-item {
  display: block;
}

.rd-home-ad img,
.rd-home-ad video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* The directory stats sit straight under Explore on the trial home */
.rd-explore-wrap + .number-and-text {
  margin-top: 56px;
}

@media (max-width: 767.98px) {
  .rd-explore-wrap + .number-and-text {
    margin-top: 40px;
  }
}
