/* =========================================
   VIDEO ARCHIVE
   ========================================= */

.video-archive {
  width: 100%;
}

.video-archive.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 40px 100px;
}

/* Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 28px;
}

/* Card */
.video-item {
  min-width: 0;
}

/* Title */
.video-title {
  margin: 0 0 18px;

  font-size: 24px;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #111;

  height: calc(24px * 1.15 * 2);

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Video wrapper */
.video-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #f1f1f1;
}

/* Make WordPress oEmbed responsive */
.video-thumbnail iframe,
.video-thumbnail video,
.video-thumbnail embed,
.video-thumbnail object {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
}

/* YouTube iframe */
.video-thumbnail iframe {
  border-radius: 16px;
}

/* Hover */
.video-item {
  transition: transform 0.35s ease;
}

.video-item:hover {
  transform: translateY(-4px);
}

.video-item:hover .video-thumbnail {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.video-thumbnail {
  transition: box-shadow 0.35s ease;
}

/* Pagination */
.video-archive .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 80px;
}

.video-archive .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f3f3f3;
  color: #111;
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.video-archive .page-numbers:hover {
  background: #111;
  color: #fff;
  transform: translateY(-2px);
}

.video-archive .page-numbers.current {
  background: #111;
  color: #fff;
}

.video-title {
    cursor: pointer;
}

.video-title-tooltip {
    position: fixed;
    display: none;
    max-width: 350px;
    padding: 10px 14px;
    background: #222;
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 5px;
    overflow-wrap: break-word;
    white-space: normal;
    z-index: 99999;
    pointer-events: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* =========================================
   TABLET
   ========================================= */

@media (max-width: 1100px) {
  .video-archive.container {
    padding: 64px 32px 80px;
  }

  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px 24px;
  }

  .video-title {
    font-size: 22px;
  }
}

/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 700px) {
  .video-archive.container {
    padding: 48px 20px 64px;
  }

  .video-grid {
    display: flex;
    flex-direction: column;
    gap: 42px;
  }

  .video-title {
    margin-bottom: 14px;
    font-size: 21px;
    line-height: 1.2;
  }

  .video-thumbnail {
    border-radius: 12px;
  }

  .video-thumbnail iframe {
    border-radius: 12px;
  }

  .video-item:hover {
    transform: none;
  }

  .video-item:hover .video-thumbnail {
    box-shadow: none;
  }

  .video-archive .nav-links {
    margin-top: 56px;
    gap: 6px;
  }

  .video-archive .page-numbers {
    min-width: 40px;
    height: 40px;
    padding: 0 11px;
  }

  .video-title {
  height: fit-content;
  -webkit-box-orient: unset;
  -webkit-line-clamp: unset;
  overflow: unset;
}

}

/* =========================================
   SMALL MOBILE
   ========================================= */

@media (max-width: 420px) {
  .video-archive.container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .video-grid {
    gap: 36px;
  }

  .video-title {
    font-size: 20px;
  }

  .video-thumbnail {
    border-radius: 10px;
  }
}
