/* styles/videos.css - Videos frontend styling */

/* Hero section - Navy background with gold accents */
.videos-hero {
  background: linear-gradient(135deg, #001f3f 0%, #003d7a 100%);
  color: #fff;
  padding: 3rem 1rem;
  text-align: center;
}

.videos-hero__inner {
  max-width: 800px;
  margin: 0 auto;
}

.videos-hero__title {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #ffd700;
}

.videos-hero__subtitle {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.videos-hero__search {
  display: flex;
  gap: 0.5rem;
  max-width: 600px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.videos-hero__search input[type="text"] {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
}

.videos-hero__btn {
  padding: 0.75rem 2rem;
  background: #ffd700;
  color: #001f3f;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.videos-hero__btn:hover {
  background: #ffed4e;
}

/* Videos grid */
.videos-list-section {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.video-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.video-card__link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.video-card__thumb {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  background: #000;
}

.video-card__thumb iframe,
.video-card__thumb img,
.video-card__thumb > div {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card__thumb iframe {
  pointer-events: none; /* Prevent iframe interaction on list page */
}

.video-card__play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 215, 0, 0.9);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  pointer-events: none;
  transition: transform 0.3s ease, color 0.3s ease;
}

.video-card:hover .video-card__play-overlay {
  transform: translate(-50%, -50%) scale(1.1);
  color: rgba(255, 237, 78, 1);
}

.video-card__badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #ffd700;
  color: #001f3f;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 2;
}

.video-card__play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: rgba(255, 215, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #001f3f;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.video-card:hover .video-card__play-icon {
  opacity: 1;
}

.video-card__play-icon svg {
  width: 32px;
  height: 32px;
}

.video-card__content {
  padding: 1rem;
}

.video-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: #001f3f;
  line-height: 1.4;
}

.video-card__desc {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

.no-videos-msg {
  text-align: center;
  font-size: 1.125rem;
  color: #666;
  padding: 3rem 1rem;
}

/* Video detail page */
.video-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.video-detail__header {
  margin-bottom: 2rem;
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(0, 31, 63, 0.03) 0%, rgba(0, 61, 122, 0.05) 100%);
  border-radius: 16px;
  border-left: 4px solid #ffd700;
}

.video-detail__title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #001f3f;
  margin: 0;
  line-height: 1.2;
  background: linear-gradient(135deg, #001f3f 0%, #003d7a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.video-detail__player {
  margin-bottom: 3rem;
  box-shadow: 0 8px 32px rgba(0, 31, 63, 0.15);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  background: linear-gradient(135deg, #001f3f 0%, #003d7a 100%);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-detail__description,
.video-detail__tags {
  margin-bottom: 2.5rem;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border-left: 4px solid #ffd700;
}

.video-detail__description h2,
.video-detail__tags h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #001f3f;
  margin: 0 0 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.video-detail__description h2::before {
  content: '📝';
  font-size: 1.5rem;
}

.video-detail__tags h3::before {
  content: '🏷️';
  font-size: 1.5rem;
}

.video-detail__description div {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #333;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #001f3f;
  border-radius: 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 2px solid #dee2e6;
  transition: all 0.3s ease;
  cursor: default;
}

.tag-badge:hover {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border-color: #ffd700;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.video-detail__no-link {
  text-align: center;
  font-size: 1.125rem;
  color: #999;
  padding: 2rem 1rem;
}

/* Related videos */
.related-videos {
  margin-top: 3rem;
  padding: 2rem 1rem;
  background: #f9f9f9;
  border-radius: 12px;
}

.related-videos h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #001f3f;
  margin-bottom: 1.5rem;
}

.related-videos__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.related-video-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.related-video-card:hover {
  transform: translateY(-2px);
}

.related-video-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.related-video-card__thumb {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
}

.related-video-card__thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-video-card__play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 215, 0, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #001f3f;
  font-size: 1.25rem;
}

.related-video-card__title {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem;
  margin: 0;
  color: #001f3f;
  line-height: 1.3;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem;
}

.pagination a {
  padding: 0.5rem 1rem;
  background: #001f3f;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.pagination a:hover {
  background: #003d7a;
}

.pagination__current {
  font-weight: 600;
  color: #001f3f;
}

/* Responsive */
@media (max-width: 768px) {
  .videos-hero__title {
    font-size: 2rem;
  }

  .videos-hero__search {
    flex-direction: column;
  }

  .videos-hero__search input[type="text"] {
    min-width: 100%;
  }

  .videos-grid {
    grid-template-columns: 1fr;
  }

  .video-detail__title {
    font-size: 1.5rem;
  }

  .related-videos__grid {
    grid-template-columns: 1fr 1fr;
  }
}
