/*
 * .resources__card overrides of the frozen bundle (index.css), loaded on
 * every page, the homepage included.
 */

/* .resources__media::after — the bundle's bottom shade shows on hover only (Vlad, 2026-10-19):
   the inner page designs (1574:12493, 1574:12406) show the photo as is, the homepage
   design shows the shaded hover state */
.resources__media::after {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* .resources__card:hover .resources__media::after — `&` cannot stand for a pseudo-element, so no nesting */
.resources__card:hover .resources__media::after {
  opacity: 1;
}

/* .resources__slider .resources__title-card h3 — at most 3 lines, the rest ends with an ellipsis
   (Vlad, 2026-10-17); slider only, listing grids keep full titles */
.resources__slider .resources__title-card h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* .resources__best-for — guides: "Best for: <audience>" in place of the date, 14 → 16 px,
   audience in blue (Figma 397:37210 / M 397:37341) */
.resources__best-for {
  color: #132132;
  font-weight: 500;
  font-size: clamp(0.875rem, 0.831rem + 0.1878vw, 1rem);
  line-height: 1;
  letter-spacing: -0.02em;

  /* .resources__best-for span */
  & span {
    color: #1a79bf;
  }
}

/*
 * .resources__card:hover — dark card as in Figma (Featured articles,
 * /resources/articles-insights 1574:12406): navy body, white date and title,
 * green link and arrow. Overrides the white hover of the frozen bundle
 * (index.css) on every page, the homepage included (Pavlo, 2026-10-14).
 * The presenter and "Best for" turn white too (Vlad, 2026-10-17); the PDF link has no dark
 * design and turns white to stay readable. Colours are literal: _tokens.css is not
 * loaded on the homepage.
 */

/* .resources__card .resources__date, .resources__time, .resources__presenter, .resources__best-for, .resources__title-card — colour fades with the body */
.resources__card :is(.resources__date, .resources__time, .resources__presenter, .resources__best-for, .resources__best-for span, .resources__title-card, .resources__download) {
  transition: color 0.3s ease;
}

/* .resources__card:hover */
.resources__card:hover {
  /* .resources__card:hover .resources__body */
  & .resources__body {
    background-color: #132132;
  }

  /* .resources__card:hover .resources__date, .resources__time, .resources__presenter, .resources__best-for, .resources__title-card, .resources__download */
  & :is(.resources__date, .resources__time, .resources__presenter, .resources__best-for, .resources__best-for span, .resources__title-card, .resources__download) {
    color: #fff;
  }

  /* .resources__card:hover .resources__link-icon path */
  & .resources__link .resources__link-icon path {
    stroke: #a8d95f;
  }
}

/*
 * Phase-2 pages only (the same section is approved on the sprint-2 pages): the Figma render shows the cards
 * without the 1 px border. (The tabs are as on the sprint-2 pages: the render has the navy → blue gradient and no
 * stroke, whatever the node data says.)
 */

/* :is(.postid-78 … .page-slug-erp-readiness-assessment) .resources__card — no border */
:is(.postid-78, .postid-79, .postid-80, .postid-81, .page-id-124, .page-id-125, .page-id-126, .page-id-127, .page-slug-erp-readiness-assessment, .page-id-122, .page-slug-frequently-asked-questions) .resources__card {
  border: 0;
}
