/* Filmy o szkoleniach — inc/filmy.php + js/film.js.
   Kolory z tokenów modern.css (--brand, --ink, --radius…). */

/* ── Znak „play" — czerwony kwadrat z trójkątem (jak kwadraty w logo), wspólne dla okładki i kafla ── */
.film-play {
  position: relative;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 2px;
  background: var(--brand);
  box-shadow: 0 0 0 6px rgba(239, 62, 54, .25), 0 10px 24px rgba(0, 0, 0, .25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.film-play::after {
  content: "";
  position: absolute;
  left: 52%;
  top: 50%;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}

/* ── Okładka na podstronie (zamiast .pod-foto) ── */
.film-okladka { margin: 8px 0 28px; }
.film-start, .film-wideo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: #0b1f3a;
  box-shadow: var(--shadow-md);
}
.film-start {
  position: relative;
  padding: 0;
  border: 0;
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  color: #fff;
  text-align: left;
}
.film-start img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
/* Ciemny dół kadru, żeby napis był czytelny na każdym zdjęciu. */
.film-start::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 18, 34, 0) 45%, rgba(10, 18, 34, .78) 100%);
}
.film-okladka--kadr .film-start::before { background: linear-gradient(180deg, rgba(10, 18, 34, 0) 60%, rgba(10, 18, 34, .55) 100%); }
.film-znak {
  position: absolute;
  z-index: 2;
  left: 24px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.film-znak-tekst b { display: block; font-size: 19px; font-weight: 700; line-height: 1.2; }
.film-znak-tekst small { display: block; margin-top: 3px; font-size: 14px; opacity: .85; }
.film-start:hover img { transform: scale(1.03); }
.film-start:hover .film-play, .film-kafel:hover .film-play { transform: scale(1.08); box-shadow: 0 0 0 9px rgba(239, 62, 54, .3), 0 12px 28px rgba(0, 0, 0, .3); }
.film-start:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.film-okladka figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .film-znak { left: 16px; bottom: 14px; gap: 12px; }
  .film-play { width: 46px; height: 46px; }
  .film-play::after { border-width: 8px 0 8px 13px; }
  .film-znak-tekst b { font-size: 16px; }
  .film-znak-tekst small { font-size: 13px; }
}

/* ── Przycisk na zdjęciu kafla (strona główna) ── */
.kafel-foto-ramka { position: relative; }
.film-kafel {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 16, 26, .18);
  backdrop-filter: blur(4px);
  transition: background .2s ease, transform .2s ease;
}
.film-kafel .film-play { width: 34px; height: 34px; box-shadow: none; }
.film-kafel .film-play::after { border-width: 6px 0 6px 10px; }
.film-kafel small { margin-left: 4px; font-weight: 500; color: var(--ink-soft); }
.film-kafel:hover { background: #fff; transform: translateY(-1px); }
.film-kafel:hover .film-play { box-shadow: 0 0 0 4px rgba(239, 62, 54, .25); }
.film-kafel:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ── Okno z filmem ── */
.film-okno {
  width: min(960px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: #0b1f3a;
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.film-okno::backdrop { background: rgba(8, 12, 22, .78); backdrop-filter: blur(3px); }
.film-okno-pasek {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 18px;
}
.film-okno-tytul { flex: 1; font-size: 15px; font-weight: 600; line-height: 1.3; }
.film-okno-zamknij {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.film-okno-zamknij:hover { background: var(--brand); }
.film-okno-ekran video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }

@media (prefers-reduced-motion: reduce) {
  .film-start img, .film-play, .film-kafel { transition: none; }
  .film-start:hover img { transform: none; }
}
.kafel-foto-ramka { margin: 0 0 18px; }
.kafel-foto-ramka .kafel-foto-link { margin: 0; }
