/* Figora marketing video components: hero media, pop-up player, slide-in prompt. */

/* Hero with media on the right */
.fg-page-hero--media .fg-page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
.fg-page-hero--media .fg-page-hero__title { max-width: 14ch; }
@media (max-width: 900px) {
  .fg-page-hero--media .fg-page-hero__grid { grid-template-columns: 1fr; }
}

.fg-hero-media {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(10, 37, 64, 0.18);
  background: #0a2540;
}
.fg-hero-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fg-hero-media--image { aspect-ratio: 4 / 3; }

/* Video card */
.fg-video-card {
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.fg-video-card img { transition: transform 0.5s ease, filter 0.3s ease; }
.fg-video-card:hover img { transform: scale(1.04); filter: brightness(0.85); }
.fg-video-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #5fad3a;
  box-shadow: 0 0 0 10px rgba(95, 173, 58, 0.28), 0 14px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fg-pulse 2.4s ease-out infinite;
}
.fg-video-card__play svg { margin-left: 4px; }
.fg-video-card:hover .fg-video-card__play,
.fg-video-card:focus-visible .fg-video-card__play { transform: scale(1.08); }
.fg-video-card__meta {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(10, 37, 64, 0.82);
  color: #fff;
  font-size: 0.9rem;
  backdrop-filter: blur(4px);
}
.fg-video-card__meta span { opacity: 0.75; }
.fg-video-card:focus-visible { outline: 3px solid #5fad3a; outline-offset: 4px; }
@keyframes fg-pulse {
  0% { box-shadow: 0 0 0 0 rgba(95, 173, 58, 0.5), 0 14px 30px rgba(0, 0, 0, 0.35); }
  70% { box-shadow: 0 0 0 18px rgba(95, 173, 58, 0), 0 14px 30px rgba(0, 0, 0, 0.35); }
  100% { box-shadow: 0 0 0 0 rgba(95, 173, 58, 0), 0 14px 30px rgba(0, 0, 0, 0.35); }
}

/* Pop-up player */
.fg-video-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  max-height: 94vh;
  width: min(1100px, 94vw);
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #0a2540;
  color: #fff;
  overflow: visible;
}
.fg-video-modal::backdrop { background: rgba(5, 15, 30, 0.82); backdrop-filter: blur(3px); }
.fg-video-modal__inner { position: relative; }
.fg-video-modal video { display: block; width: 100%; height: auto; border-radius: 18px 18px 0 0; background: #000; }
.fg-video-modal__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
}
.fg-video-modal__close,
.fg-video-modal__close:hover {
  position: absolute;
  padding: 0;
  display: grid;
  place-items: center;
  top: -18px;
  right: -18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #fff !important;
  color: #0a2540 !important;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  z-index: 2;
}
@media (max-width: 700px) {
  .fg-video-modal__close { top: 8px; right: 8px; }
}

/* Slide-in prompt */
.fg-video-slidein {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9990;
  width: min(360px, calc(100vw - 40px));
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(10, 37, 64, 0.25);
  border: 1px solid #e3e9f0;
  transform: translateY(140%);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fg-video-slidein.is-open { transform: none; }
.fg-video-slidein__body,
.fg-video-slidein__body:hover {
  white-space: normal;
  box-sizing: border-box;
  display: flex;
  gap: 0.85rem;
  align-items: center;
  width: 100%;
  padding: 0.75rem;
  border: 0;
  background: none !important;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: #0a2540 !important;
  box-shadow: none;
}
.fg-video-slidein__thumb { position: relative; flex: none; width: 112px; border-radius: 10px; overflow: hidden; }
.fg-video-slidein__thumb img { display: block; width: 100%; height: auto; }
.fg-video-slidein__thumb span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.4rem;
  background: rgba(10, 37, 64, 0.35);
}
.fg-video-slidein__text { min-width: 0; flex: 1; }
.fg-video-slidein__text small { display: block; color: #5b6b7f; font-size: 0.8rem; }
.fg-video-slidein__text strong { display: block; line-height: 1.3; }
.fg-video-slidein__close,
.fg-video-slidein__close:hover {
  position: absolute;
  padding: 0;
  display: grid;
  place-items: center;
  top: -10px;
  right: -10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #e3e9f0;
  background: #fff !important;
  color: #0a2540 !important;
  cursor: pointer;
  line-height: 1;
  font-size: 1.1rem;
}

/* Media library (/media/) */
.fg-media-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.fg-media-filter button,
.fg-media-filter button:hover {
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  border: 1px solid #d5dfea;
  background: #fff !important;
  color: #0a2540 !important;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.fg-media-filter button.is-active { background: #0a2540 !important; border-color: #0a2540; color: #fff !important; }
.fg-media-grid { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .fg-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fg-media-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(11, 44, 95, 0.08);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(10, 37, 64, 0.08);
  scroll-margin-top: 110px;
}
.fg-media-item[hidden] { display: none; }
.fg-media-item .fg-hero-media { border-radius: 0; box-shadow: none; }
.fg-media-item .fg-video-card__play { left: 50%; }
.fg-media-item__body { padding: 1.35rem 1.4rem 1.5rem; }
.fg-media-item__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1rem; }
.fg-media-copy,
.fg-media-copy:hover {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid #d5dfea;
  background: #fff !important;
  color: #0a2540 !important;
  font: inherit;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .fg-video-card__play { animation: none; }
  .fg-video-slidein { transition: none; }
  .fg-video-card img { transition: none; }
}

/* Vertical trailer on phones */
.fg-video-modal.is-portrait { width: min(94vw, calc(78vh * 9 / 16)); }
.fg-video-modal.is-portrait video { max-height: 78vh; object-fit: contain; }
.fg-video-modal.is-portrait .fg-video-modal__bar { padding: 0.75rem 1rem; }
.fg-video-modal.is-portrait .fg-video-modal__bar strong { font-size: 0.95rem; }

/* Trailer thumbnail on course cards */
.fg-card-trailer,
.fg-card-trailer:hover {
  position: relative;
  display: block;
  width: calc(100% + 2.7rem);
  margin: -1.4rem -1.35rem 1.1rem;
  padding: 0;
  border: 0;
  border-radius: var(--fg-radius, 16px) var(--fg-radius, 16px) 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0a2540 !important;
  cursor: pointer;
  box-shadow: none;
}
.fg-card-trailer img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease, filter 0.3s ease; }
.fg-card-trailer:hover img { transform: scale(1.04); filter: brightness(0.85); }
.fg-card-trailer__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #5fad3a;
  box-shadow: 0 0 0 8px rgba(95, 173, 58, 0.28);
  animation: fg-pulse 2.4s ease-out infinite;
}
.fg-card-trailer__play svg { margin-left: 3px; }
.fg-card-trailer__label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(10, 37, 64, 0.85);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Video strips (homepage, Nigeria page, end of articles) */
.fg-video-strip { background: linear-gradient(160deg, #0a2540 0%, #12355f 100%); color: #fff; }
.fg-video-strip .fg-eyebrow { color: #8fd16a; }
.fg-video-strip .fg-h2, .fg-video-strip .fg-lead { color: #fff; }
.fg-video-strip .fg-lead { opacity: 0.85; }
.fg-video-strip__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.fg-video-strip .fg-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.fg-video-strip__grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .fg-video-strip__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) {
  .fg-video-strip__grid--3 { grid-template-columns: repeat(3, 1fr); }
  .fg-video-strip__grid--4 { grid-template-columns: repeat(4, 1fr); }
}
.fg-video-tile,
.fg-video-tile:hover {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #fff !important;
  color: #0a2540 !important;
  text-align: left;
  font: inherit;
  white-space: normal;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease;
}
.fg-video-tile:hover { transform: translateY(-4px); }
.fg-video-tile__media { position: relative; display: block; aspect-ratio: 16 / 9; background: #0a2540; }
.fg-video-tile__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fg-video-tile__play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #5fad3a;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.fg-video-tile__play svg { margin-left: 3px; }
.fg-video-tile__dur {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(10, 37, 64, 0.85);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}
.fg-video-tile__body { display: block; padding: 0.95rem 1.1rem 1.15rem; }
.fg-video-tile__body small { display: block; color: #4f8a2f; font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.fg-video-tile__body strong { display: block; margin-top: 0.3rem; line-height: 1.3; }
.fg-video-strip--inline { margin: 2.5rem 0 0; border-radius: 20px; padding: 2rem 1.5rem; }
.fg-video-strip--inline .fg-video-strip__grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
@media (prefers-reduced-motion: reduce) {
  .fg-card-trailer__play, .fg-video-card__play { animation: none; }
  .fg-video-tile, .fg-card-trailer img { transition: none; }
}
