/* Free Trainings (CR-105 U3): the app's FreeTrainingsScreen (lib/features/trainings/free_trainings_screen.dart), set up
   like My Reports: the cards four to a row on a computer, stacked on a phone. Sizes are the app's; font sizes use --u.
   Letter spacing is in px, as the app's is: its phone and text-size scaling enlarges the letters, not the gaps. */

/* PageBody(maxWidth: 1360 / 720, padding 26 40 48 / 18 16 26), its column held to 1100 at the left. */
.trainings { max-width: 1360px; margin: 0 auto; padding: 26px 40px 48px; }
.trainings__column { max-width: 1100px; }

/* FREE TRAININGS and TRANSIT CALLS, as My Reports' MY REPORTS. */
.trainings__heading {
  margin: 0; font-family: var(--font-ui); font-size: calc(12 * var(--u)); font-weight: 600; line-height: 1.5;
  letter-spacing: 2.4px; color: var(--gold-deep);
}
.trainings__row {
  margin-top: 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch;
}
.trainings__rule { margin: 36px 0 26px; border: 0; height: 1px; background: var(--hairline-strong); }

/* A card (the app's TrainingTile, My Reports' ReportTile): white, its picture, kicker and name, then its button. */
.training {
  display: flex; flex-direction: column; min-width: 0; padding: 14px 16px 12px;
  background: var(--white); border: 1px solid var(--hairline); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(138, 107, 16, 0.059);
  container-type: inline-size;
}
.training__inner { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; }
.training__picture { position: relative; }
.training__words { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.training__kicker {
  margin: 0; font-family: var(--font-ui); font-size: calc(9.5 * var(--u)); font-weight: 600; line-height: 1.5;
  letter-spacing: 1.9px; color: var(--gold-deep);
}
.training__title {
  margin: 5px 0 0; font-family: var(--font-display); font-size: calc(17 * var(--u)); font-weight: 700; line-height: 1.2;
  color: var(--ink);
}

/* A picture's place (the app's PictureSlot): its 1640 / 924 shape, the picture whole unless it is a photo cropped to
   it. The introduction's still sits on a warm-white panel with the gold hairline, which is all that shows without one. */
.slot { position: relative; aspect-ratio: 1640 / 924; }
.slot img { width: 100%; height: 100%; object-fit: contain; }
.slot--cover img, .slot--panel img { object-fit: cover; }
.slot--panel { background: var(--warm-white); border-radius: 4px; box-shadow: inset 0 0 0 1px var(--hairline-strong); }
.slot--panel img { position: absolute; inset: 0; }
/* Your Secret Advantage, dimmed for a visitor without a finished account. */
.slot--dimmed::after { content: ""; position: absolute; inset: 0; border-radius: 4px; background: rgba(17, 17, 17, 0.451); }

/* WATCH THIS FIRST!: on the introduction's picture on a computer, over its words on a phone. */
.watch-first {
  display: inline-block; padding: 4px 7px; border-radius: 2px; background: var(--gold); color: #1A1A1A;
  font-family: var(--font-ui); font-size: calc(8.5 * var(--u)); font-weight: 700; line-height: 1.5; letter-spacing: 1.19px;
}
.watch-first--picture { position: absolute; left: 8px; top: 8px; }
.watch-first--words { display: none; }

/* A card's button (the app's CardButton): dark to open, gold to ask for an account. A new-tab button's ↗ is the app's
   arrow, after its words at the left. */
.card-button {
  margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 11px 18px;
  border-radius: 3px; text-align: center; text-decoration: none;
  font-family: var(--font-ui); font-size: calc(10 * var(--u)); font-weight: 600; line-height: 1.5; letter-spacing: 1.4px;
}
.card-button--dark, .card-button--dark:hover { background: var(--ink); color: var(--cream); }
.card-button--gold, .card-button--gold:hover { background: var(--gold); color: #1A1A1A; }
.card-button--arrow { justify-content: flex-start; text-align: left; }
.card-button__arrow { flex: none; width: calc(11 * var(--u)); height: calc(11 * var(--u)); }

/* A phone: the cards stacked, each picture beside its words; at a larger text size the picture goes above the words,
   so no word is split (the app's CR-106 rule, which switches past 1.14 times the phone's text: here, once the words
   would have less room than that size gives them on a 390 px phone). */
@media (max-width: 899.98px) {
  .trainings { max-width: 720px; padding: 18px 16px 26px; }
  .trainings__heading { font-size: calc(11 * var(--u)); letter-spacing: 2.2px; }
  .trainings__row { margin-top: 16px; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .trainings__rule { margin: 26px 0 20px; }
  .training { padding: 14px; }
  .training__inner { flex-direction: row; align-items: center; gap: 12px; }
  .training__picture { flex: 0 0 104px; }
  .training__words { flex: 1 1 0; }
  .training__title { font-size: calc(16 * var(--u)); }
  .watch-first--picture { display: none; }
  .watch-first--words { display: inline-block; margin-bottom: 8px; padding: 3px 5px; font-size: calc(7.5 * var(--u)); letter-spacing: 1.05px; }
  @container (width < calc(116px + 11.66rem)) {
    .training__inner { flex-direction: column; align-items: flex-start; }
    .training__picture { flex: none; width: 160px; }
    .training__words { flex: none; align-self: stretch; }
  }
}
