/* ============================================================
   CCG VIDEO LIBRARY
============================================================ */

.video-library {
  width: min(1380px, calc(100% - 28px));
  margin: 0 auto;
  padding: clamp(20px, 4vw, 42px) 0 64px;
}

.video-library__breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin: 0 0 14px;
  color: rgba(230, 240, 250, 0.62);
  font-size: 0.78rem;
}

.video-library__breadcrumbs a {
  color: rgba(238, 247, 255, 0.78);
  text-decoration: none;
}

.video-library__breadcrumbs a:hover,
.video-library__breadcrumbs a:focus-visible {
  color: rgb(var(--accent-rgb));
  text-decoration: underline;
  text-underline-offset: 3px;
}

.video-library__hero,
.video-library__search-panel,
.video-library__featured,
.video-library__results,
.video-library__crawl-links {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.055), transparent 42%),
    rgba(5, 10, 22, 0.9);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.video-library__hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: clamp(24px, 5vw, 52px);
  background:
    radial-gradient(circle at 15% 10%, rgba(var(--accent-rgb), 0.22), transparent 38%),
    radial-gradient(circle at 90% 5%, rgba(255, 255, 255, 0.07), transparent 28%),
    linear-gradient(145deg, rgba(4, 9, 20, 0.98), rgba(8, 15, 30, 0.95));
}

.video-library__hero::after {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 13px;
}

.video-library__eyebrow,
.video-library__kicker {
  margin: 0 0 9px;
  color: rgb(var(--accent-rgb));
  font: 700 0.68rem/1.2 "Orbitron", sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.video-library__hero h1 {
  max-width: 18ch;
  margin: 0;
  color: rgba(249, 252, 255, 0.98);
  font: 700 clamp(2rem, 5vw, 4rem)/1.04 "Orbitron", sans-serif;
  letter-spacing: -0.03em;
}

.video-library__hero > p:not(.video-library__eyebrow) {
  max-width: 76ch;
  margin: 18px 0 0;
  color: rgba(230, 241, 250, 0.78);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  line-height: 1.72;
}

.video-library__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.video-library__stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(2, 7, 17, 0.62);
  color: rgba(225, 237, 247, 0.7);
  font-size: 0.82rem;
}

.video-library__stats strong {
  color: rgba(249, 252, 255, 0.96);
  font: 700 0.9rem/1 "Orbitron", sans-serif;
}

.video-library__search-panel,
.video-library__featured,
.video-library__results,
.video-library__crawl-links {
  margin-bottom: 18px;
  padding: clamp(18px, 3vw, 28px);
}

.video-library__section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 10px 18px;
  margin-bottom: 16px;
}

.video-library__section-heading h2 {
  margin: 0;
  color: rgba(248, 252, 255, 0.96);
  font: 700 clamp(1.1rem, 2.2vw, 1.45rem)/1.3 "Orbitron", sans-serif;
  letter-spacing: 0.02em;
}

.video-library__section-heading > p,
.video-library__section-heading > a {
  margin: 0;
  color: rgba(225, 237, 247, 0.62);
  font-size: 0.84rem;
}

.video-library__section-heading > a {
  color: rgb(var(--accent-rgb));
  text-decoration: none;
}

.video-library__section-heading > a:hover,
.video-library__section-heading > a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.video-library__search-field {
  display: grid;
  gap: 7px;
}

.video-library__search-field span {
  color: rgba(237, 245, 252, 0.82);
  font: 700 0.76rem/1.2 "Orbitron", sans-serif;
  letter-spacing: 0.04em;
}

.video-library__search-field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 11px;
  background: rgba(2, 7, 17, 0.78);
  color: rgba(249, 252, 255, 0.96);
  font: 500 1rem/1.3 "Roboto", sans-serif;
  outline: none;
}

.video-library__search-field input:focus {
  border-color: rgba(var(--accent-rgb), 0.58);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.video-library__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.video-library__filters button {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(5, 11, 24, 0.78);
  color: rgba(232, 241, 249, 0.74);
  cursor: pointer;
  font: 700 0.7rem/1 "Orbitron", sans-serif;
  letter-spacing: 0.04em;
}

.video-library__filters button[aria-pressed="true"] {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.13);
  color: rgb(var(--accent-rgb));
}

.video-library__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.video-library__grid--featured {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.video-library-card {
  min-width: 0;
}

.video-library-card__link {
  display: flex;
  overflow: hidden;
  height: 100%;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(3, 8, 18, 0.82);
  color: inherit;
  text-decoration: none;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.video-library-card__link:hover,
.video-library-card__link:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb), 0.46);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35), 0 0 18px rgba(var(--accent-rgb), 0.09);
  outline: none;
}

.video-library-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #02050b;
}

.video-library-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-library-card__badge {
  position: absolute;
  left: 9px;
  bottom: 9px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(2, 7, 17, 0.86);
  color: rgba(246, 251, 255, 0.9);
  font: 700 0.58rem/1 "Orbitron", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.video-library-card__copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  padding: 13px;
}

.video-library-card__title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: rgba(248, 252, 255, 0.95);
  font: 700 0.86rem/1.42 "Orbitron", sans-serif;
}

.video-library-card__description {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: rgba(225, 236, 247, 0.66);
  font-size: 0.84rem;
  line-height: 1.5;
}

.video-library-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  color: rgba(210, 224, 236, 0.54);
  font-size: 0.72rem;
}

.video-library-card__meta span + span::before {
  content: "•";
  margin-right: 6px;
  color: rgba(var(--accent-rgb), 0.58);
}

.video-library__more {
  display: flex;
  margin: 18px auto 0;
}

.video-library__empty {
  margin: 18px 0 0;
  color: rgba(225, 237, 247, 0.68);
  text-align: center;
}

.video-library__quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.video-library__quick-links a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  background: rgba(4, 9, 20, 0.72);
  color: rgba(239, 247, 252, 0.82);
  text-decoration: none;
}

.video-library__quick-links a:hover,
.video-library__quick-links a:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.44);
  color: rgb(var(--accent-rgb));
  outline: none;
}

@media (max-width: 1120px) {
  .video-library__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .video-library {
    width: min(100% - 18px, 1380px);
    padding-top: 16px;
  }

  .video-library__grid,
  .video-library__grid--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-library__quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .video-library__grid,
  .video-library__grid--featured,
  .video-library__quick-links {
    grid-template-columns: 1fr;
  }

  .video-library__hero {
    padding: 22px 18px;
  }

  .video-library__hero h1 {
    max-width: none;
  }

  .video-library__filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-library__filters button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-library-card__link {
    transition: none;
  }

  .video-library-card__link:hover,
  .video-library-card__link:focus-visible {
    transform: none;
  }
}
