/*
 * ROW Academy guide cards and the "Related Articles" band
 * (components/frontend/AcademyGuideCards.tsx; also the /trading-guides listing).
 *
 * Ported from live's guide template and /trading-guides stylesheets
 * (.academy-card_*, .guides-list_*, .guides-related_*, .share-block_button.is-card);
 * measured at 1440/1024/768/390 (tmp/academy/d/live/*.json).
 * Academy-only; scoped under .raven-academy.
 */

.raven-academy .guides-related_text-wrap { margin-bottom: 3rem; }

.raven-academy .guides-list_content {
  display: flex;
  flex-flow: column;
  gap: 2rem;
}

.raven-academy .guides-list_list {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto;
  grid-auto-columns: 1fr;
  column-gap: 1.5rem;
  row-gap: 4rem;
}

.raven-academy .guides-list_item { min-width: 0; }

.raven-academy .academy-card_component {
  position: relative;
  display: flex;
  flex-flow: column;
  height: 100%;
  /* The copy button is placed from the card's width (cqw): under the 4:3 image (R818-20). */
  container-type: inline-size;
}

.raven-academy .academy-card_link {
  position: relative;
  display: block;
  color: var(--academy-ink);
  text-decoration: none;
}

.raven-academy .academy-card_image-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 1.5rem;
  aspect-ratio: 4 / 3;
  border-radius: 1rem;
  background-color: #181c250a;
  overflow: hidden;
}

.raven-academy .academy-card_image {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 50%;
}

/*
 * Card hover (live's interaction on every guide and course card: lesson and guide Related Articles,
 * /trading-guides, /trading-courses): the picture grows to 1.07 over 0.5 s (outQuart) and back,
 * inside the wrapper's rounded box. Measured on live at 1440 and 1024 (owner QA, 2026-11-13).
 * Pure :hover, no class added by script; reduced motion: guide-base.css.
 */
.raven-academy .academy-card_image { transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); }
@media (hover: hover) {
  .raven-academy .academy-card_link:hover .academy-card_image { transform: scale(1.07); }
}

.raven-academy .academy-card_content {
  display: flex;
  flex-flow: column;
  gap: 0.75rem;
  border-radius: 1rem;
}

.raven-academy .academy-card_time-text {
  display: inline;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  white-space: pre;
}

.raven-academy .share-block_button.is-card {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  margin-left: auto;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.3s;
  /* Live's hover and press circle, written once (R818-102). */
  --academy-share-hover: #00000014;
  --academy-share-press: #0000003d;
}
[dir="rtl"] .raven-academy .share-block_button.is-card { margin-left: 0; margin-right: auto; }
.raven-academy .share-block_button.is-card:hover { background-color: var(--academy-share-hover); transform: scale(1.07); }
.raven-academy .share-block_button.is-card:active { background-color: var(--academy-share-press); transform: scale(1); }
.raven-academy .share-block_button.is-card img { display: block; width: 2rem; height: 2rem; }
/*
 * The copy button sits next to the card link, not inside it (R818-20). A stand-in of the
 * same size holds its place in the info row (live's look); the button is placed over it:
 * the image is 4:3 (75% of the card's width) plus its bottom margin, and the info row is
 * exactly the button's 2rem.
 */
.raven-academy .share-block_button.is-card.is-placeholder { visibility: hidden; pointer-events: none; }
.raven-academy .share-block_button.is-card.is-overlay {
  position: absolute;
  top: calc(75cqw + 1.5rem);
  inset-inline-end: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: transparent;
}
/* Live's hover and press circle on the copy button: the overlay's own background must not hide it (R818-58). */
.raven-academy .share-block_button.is-card.is-overlay:hover { background-color: var(--academy-share-hover); }
.raven-academy .share-block_button.is-card.is-overlay:active { background-color: var(--academy-share-press); }

@media screen and (max-width: 991px) {
  .raven-academy .guides-list_list { grid-template-columns: 1fr 1fr; }
}

@media screen and (max-width: 767px) {
  .raven-academy .academy-card_image-wrapper { margin-bottom: 1.25rem; border-radius: 0.75rem; }
  .raven-academy .share-block_button.is-card.is-overlay { top: calc(75cqw + 1.25rem); }
  .raven-academy .guides-list_list { grid-template-columns: 1fr; column-gap: 1.5rem; row-gap: 3rem; }
}

@media screen and (max-width: 479px) {
  .raven-academy .academy-card_image-wrapper { border-radius: 1rem; }
  .raven-academy .academy-card_content { gap: 0.5rem; }
}
