/* =====================================================================
   COMPANY VIDEOS PAGE
   Every block is driven from Dashboard → Videos Page (texts, buttons,
   banner image, visibility) and Dashboard → Company Videos (the videos).
   ===================================================================== */

.company-videos-page {
  --cv-navy: #061b48;
  --cv-navy-dark: #031536;
  --cv-green: #45b82a;
  --cv-green-dark: #32951e;
  --cv-text: #17243e;
  --cv-muted: #5f6b82;
  --cv-border: #e5eaf2;
  --cv-hero-bg: url("assets/images/hero.jpg");
  background: #fff;
  overflow: hidden;
}
.company-videos-page [hidden] { display: none !important; }

/* ---------- shared bits ---------- */
.cv-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--cv-green);
  font-size: 12px; font-weight: 700; letter-spacing: 2.4px; text-transform: uppercase;
  margin-bottom: 14px;
}
.cv-eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--cv-green); }

.cv-btn {
  display: inline-flex; align-items: center; gap: 10px;
  width: fit-content;
  padding: 14px 24px;
  border-radius: 6px;
  background: var(--cv-green);
  color: #fff;
  font-size: 12.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(69, 184, 42, .28);
  transition: background .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.cv-btn i { transition: transform .25s ease; }
.cv-btn:hover { background: #fff; color: var(--cv-navy); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 0, 0, .18); }
.cv-btn:hover i { transform: translateX(4px); }

/* ---------- 1. hero ---------- */
.cv-hero {
  position: relative;
  min-height: 520px;
  display: flex; align-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(100deg, rgba(3, 21, 54, .97) 0%, rgba(6, 27, 72, .86) 50%, rgba(6, 27, 72, .45) 100%),
    var(--cv-hero-bg) center / cover no-repeat;
}
/* film strip + glow decorations */
.cv-hero::before {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 46px; z-index: -1;
  background:
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(255, 255, 255, .07) 22px 40px) center / auto 14px no-repeat,
    linear-gradient(0deg, rgba(3, 21, 54, .85), transparent);
}
.cv-hero::after {
  content: "";
  position: absolute; width: 560px; height: 560px; right: -200px; top: -220px; z-index: -1;
  border-radius: 50%;
  border: 90px solid rgba(69, 184, 42, .07);
  pointer-events: none;
}
.cv-hero-content { position: relative; max-width: 780px; padding: 100px 0 110px; }
.cv-hero h1 {
  margin: 0 0 22px;
  color: #fff;
  font-family: "Oswald", sans-serif;
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: .98;
  text-transform: uppercase;
}
.cv-hero h1 span { color: var(--cv-green); }
.cv-hero p { max-width: 640px; margin: 0; color: #d9e2f1; font-size: 16px; line-height: 1.8; }
.cv-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 34px; }
.cv-stat {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50px;
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(6px);
  color: #c9d5e8; font-size: 13px; font-weight: 600; letter-spacing: .5px;
}
.cv-stat i {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--cv-green); color: #fff; font-size: 13px;
}
.cv-stat strong { color: #fff; font-family: "Oswald", sans-serif; font-size: 20px; }
.cv-scroll {
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
}
.cv-scroll i {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid rgba(255, 255, 255, .35);
  animation: cv-bob 2s ease-in-out infinite;
}
.cv-scroll:hover i { border-color: var(--cv-green); color: var(--cv-green); }
@keyframes cv-bob { 50% { transform: translateY(5px); } }

/* ---------- player (shared by the featured block and the cards) ---------- */
.cv-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020b1d;
  overflow: hidden;
}
.cv-media video { display: block; width: 100%; height: 100%; object-fit: cover; background: #020b1d; }
.cv-media.is-playing video { object-fit: contain; }
.cv-play {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  border: 0; padding: 0; cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 11, 29, .05), rgba(2, 11, 29, .45));
  transition: background .3s ease;
}
.cv-play span {
  position: relative;
  width: 74px; height: 74px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--cv-green); color: #fff; font-size: 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  transition: transform .3s ease, background .3s ease;
}
.cv-play span i { margin-left: 4px; }
.cv-play span::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid rgba(69, 184, 42, .6);
  animation: cv-pulse 2s ease-out infinite;
}
@keyframes cv-pulse { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.cv-play:hover { background: linear-gradient(180deg, rgba(2, 11, 29, 0), rgba(2, 11, 29, .3)); }
.cv-play:hover span { transform: scale(1.08); background: #fff; color: var(--cv-navy); }
.cv-media.is-playing .cv-play { display: none; }

/* ---------- 2. featured ---------- */
.cv-featured {
  position: relative;
  padding: 90px 0;
  background: #f5f8fc;
}
.cv-featured-box {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(125deg, #031536 0%, #0a2a63 100%);
  box-shadow: 0 30px 70px rgba(6, 27, 72, .22);
}
.cv-featured-player { position: relative; display: flex; flex-direction: column; background: #020b1d; }
.cv-featured-player .cv-media { flex: 1; aspect-ratio: auto; min-height: 380px; }
.cv-now {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, .04);
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
  font-family: "Oswald", sans-serif; font-size: 17px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
}
.cv-now i { color: var(--cv-green); font-size: 13px; }
.cv-featured-content {
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding: 56px 48px;
}
.cv-featured-content::after {
  content: "\f008"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; right: 26px; bottom: 18px;
  font-size: 110px; line-height: 1; color: rgba(255, 255, 255, .04);
  pointer-events: none;
}
.cv-featured-content h2 {
  margin: 0 0 18px;
  color: #fff;
  font-family: "Oswald", sans-serif; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.06;
  text-transform: uppercase;
}
.cv-featured-content h2 strong { color: var(--cv-green); }
.cv-featured-content p { margin: 0 0 28px; color: #c6d2e4; font-size: 14.5px; line-height: 1.85; }

/* ---------- 3/4. library ---------- */
.cv-library { padding: 90px 0 100px; background: #fff; }
.cv-section-head { max-width: 760px; margin: 0 auto 46px; text-align: center; }
.cv-section-head .cv-eyebrow { justify-content: center; }
.cv-section-head .cv-eyebrow::after { content: ""; width: 34px; height: 2px; background: var(--cv-green); }
.cv-section-head h2 {
  margin: 0 0 14px;
  color: var(--cv-navy);
  font-family: "Oswald", sans-serif; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.15;
  text-transform: uppercase;
}
.cv-section-head h2 strong { color: var(--cv-green); }
.cv-section-head p { margin: 0; color: var(--cv-muted); font-size: 15px; line-height: 1.8; }

.cv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.cv-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.cv-card {
  display: flex; flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--cv-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(6, 27, 72, .07);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease, border-color .35s ease;
}
.cv-card:hover { transform: translateY(-8px); box-shadow: 0 26px 50px rgba(6, 27, 72, .14); border-color: rgba(69, 184, 42, .45); }
.cv-card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px 16px;
  border-bottom: 3px solid var(--cv-green);
}
.cv-number {
  flex-shrink: 0;
  color: var(--cv-green);
  font-family: "Oswald", sans-serif; font-size: 22px; font-weight: 700; line-height: 1;
}
.cv-card-title {
  margin: 0;
  color: var(--cv-navy);
  font-family: "Oswald", Inter, sans-serif; font-size: 20px; font-weight: 700; line-height: 1.3;
  letter-spacing: .3px; text-transform: uppercase;
  overflow-wrap: anywhere;
}
.cv-card .cv-media { border-radius: 0; }
.cv-card .cv-play span { width: 62px; height: 62px; font-size: 18px; }
.cv-card-info { padding: 16px 20px 22px; }
.cv-card-info p { margin: 0; color: var(--cv-muted); font-size: 13.5px; line-height: 1.75; }

/* ---------- 5. call to action ---------- */
.cv-cta { padding: 0 0 90px; background: #fff; }
.cv-cta-inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  padding: 46px 50px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(110deg, #031536, #0a2a63);
  box-shadow: 0 24px 55px rgba(6, 27, 72, .18);
}
.cv-cta-inner::before {
  content: ""; position: absolute; left: -60px; top: -90px;
  width: 240px; height: 240px; border-radius: 50%;
  border: 50px solid rgba(69, 184, 42, .08);
}
.cv-cta-inner > div { position: relative; }
.cv-cta-inner .cv-eyebrow { margin-bottom: 8px; font-size: 11px; }
.cv-cta-inner h2 {
  margin: 0 0 6px;
  color: #fff;
  font-family: "Oswald", sans-serif; font-size: clamp(26px, 3vw, 36px); line-height: 1.1;
  text-transform: uppercase;
}
.cv-cta-inner h2 strong { color: var(--cv-green); }
.cv-cta-inner p { margin: 0; color: #bdc9dc; font-size: 14px; line-height: 1.7; }
.cv-cta-inner .cv-btn { position: relative; flex-shrink: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .cv-featured-box { grid-template-columns: 1fr; }
  .cv-featured-player .cv-media { aspect-ratio: 16 / 9; min-height: 0; }
  .cv-featured-content { padding: 44px 40px; }
}
@media (max-width: 700px) {
  .cv-hero { min-height: 420px; }
  .cv-hero-content { padding: 70px 0 80px; }
  .cv-hero p { font-size: 14px; }
  .cv-hero-meta { margin-top: 26px; }
  .cv-featured, .cv-library { padding: 60px 0; }
  .cv-section-head { margin-bottom: 32px; }
  .cv-section-head p { font-size: 14px; }
  .cv-grid, .cv-grid.cols-2 { grid-template-columns: 1fr; gap: 22px; }
  .cv-featured-content { padding: 32px 22px 36px; }
  .cv-featured-content::after { font-size: 80px; }
  .cv-now { padding: 12px 16px; font-size: 15px; }
  .cv-card-head { padding: 14px 16px 12px; }
  .cv-card-title { font-size: 17px; }
  .cv-card-info { padding: 14px 16px 18px; }
  .cv-play span { width: 60px; height: 60px; font-size: 18px; }
  .cv-cta { padding-bottom: 60px; }
  .cv-cta-inner { flex-direction: column; align-items: flex-start; padding: 32px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .cv-play span::before, .cv-scroll i { animation: none; }
}

/* Fewer videos than columns: centre them instead of leaving an empty gap */
.cv-grid[data-count="1"] { grid-template-columns: minmax(0, 1fr); max-width: 780px; margin-inline: auto; }
.cv-grid:not(.cols-2)[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 940px; margin-inline: auto; }
/* Cards in one row share the same title height, so the videos line up */
@supports (grid-template-rows: subgrid) {
  .cv-grid { row-gap: 0; }
  .cv-card { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; margin-bottom: 28px; }
  .cv-card-head { align-self: stretch; }
}
@media (max-width: 700px) {
  .cv-grid:not(.cols-2)[data-count="2"] { grid-template-columns: 1fr; }
  @supports (grid-template-rows: subgrid) { .cv-card { margin-bottom: 22px; } }
}
