/* ============================================
   VIDEO SECTION MAIN CONTAINER
   ============================================ */

#a-647db9fe4a0b3065878959 {
  max-width: 1600px;
  margin: 50px auto 30px;
  padding: 0 20px;
}

/* ============================================
   VIDEO CARD STYLING
   ============================================ */

.astroid-article-item.video .card {
  height: 280px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  cursor: pointer;
}

.astroid-article-item.video .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  border-color: #ccc;
}

/* ============================================
   VIDEO CONTAINER - SHOW YOUTUBE EMBED
   ============================================ */

.entry-video {
  height: 100%;
  position: relative;
  background: #000;
  overflow: hidden;
}

.entry-video iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block; /* Ensure iframe is visible */
}

/* YouTube thumbnail overlay for preview */
.video-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transition: opacity 0.3s ease;
}

/* Hide YouTube iframe initially, show only thumbnail */
.entry-video iframe {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

/* When video is playing, show iframe */
.entry-video.playing iframe {
  opacity: 1;
  z-index: 2;
}

.entry-video.playing .video-thumbnail {
  opacity: 0;
  z-index: 0;
}

/* ============================================
   VIDEO PLAY ICON OVERLAY
   ============================================ */

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  font-size: 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
}

.astroid-article-item.video .card:hover .video-play-icon {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-play-icon::before {
  content: "▶";
  margin-left: 3px;
  color: #333;
}

/* Hide play icon when video is playing */
.entry-video.playing .video-play-icon {
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   TITLE OVERLAY - BOTTOM OF VIDEO
   ============================================ */

.astroid-article-item.video .card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9),
    rgba(0, 0, 0, 0.7) 70%,
    transparent
  );
  color: white;
  padding: 20px 15px 15px;
  margin: 0;
  z-index: 4;
  transition: all 0.3s ease;
}

.astroid-article-heading {
  margin: 0;
  padding: 0;
}

.astroid-article-heading a {
  font-size: 15px;
  font-weight: 500;
  color: #f0f0f0;
  text-decoration: none;
  line-height: 1.4;
  display: block;

  transition: color 0.2s ease;
  letter-spacing: 0.3px;
}

/* Title hover effect */
.astroid-article-item.video .card:hover .card-body {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.95),
    rgba(0, 0, 0, 0.85) 70%,
    transparent
  );
}

.astroid-article-item.video .card:hover .astroid-article-heading a {
  color: #ffffff;
}

/* ============================================
   VIDEO LIGHTBOX MODAL
   ============================================ */

.video-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.video-lightbox.active {
  display: flex;
}

.video-lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  width: 900px;
}

.video-lightbox-iframe {
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  position: relative;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.video-lightbox-iframe iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  z-index: 100000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.video-lightbox-title {
  color: white;
  margin-top: 15px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  padding: 0 20px;
}

/* ============================================
   RESPONSIVE DESIGN FOR VIDEO SECTION
   ============================================ */

/* 24-inch screens (1600px) */
@media (max-width: 1600px) {
  #a-647db9fe4a0b3065878959 {
    max-width: 1400px;
    margin: 40px auto 25px;
  }

  .astroid-article-item.video .card {
    height: 260px;
  }

  .astroid-article-heading a {
    font-size: 14.5px !important;
  }

  .video-play-icon {
    width: 55px;
    height: 55px;
    font-size: 22px;
  }
}

/* Medium screens (1300px devices) */
@media (max-width: 1300px) {
  #a-647db9fe4a0b3065878959 {
    max-width: 1000px;
    margin: 35px auto 20px;
    padding: 0 15px;
  }

  .astroid-article-item.video .card {
    height: 220px !important;
  }

  .card-body {
    padding: 16px 12px 12px !important;
  }

  .astroid-article-heading a {
    font-size: 14px !important;
    line-height: 1.3 !important;
  }

  .video-play-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .video-lightbox-content {
    width: 800px;
  }
}

/* Tablets (992px) */
@media (max-width: 992px) {
  #a-647db9fe4a0b3065878959 {
    max-width: 100%;
    padding: 0 15px;
  }

  .astroid-articles .row {
    margin: 0 -10px !important;
  }

  .astroid-article-item.video {
    padding: 0 10px !important;
    margin-bottom: 20px !important;
  }

  .astroid-article-item.video .card {
    height: 200px !important;
  }

  .card-body {
    padding: 14px 10px 10px !important;
  }

  .astroid-article-heading a {
    font-size: 13px !important;
  }

  .video-play-icon {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }

  .video-lightbox-content {
    width: 700px;
  }
}

/* Mobile (768px) */
@media (max-width: 768px) {
  #a-647db9fe4a0b3065878959 {
    margin: 30px auto 15px;
    padding: 0 10px;
  }

  .astroid-article-item.video .card {
    height: 180px !important;
  }

  .card-body {
    padding: 12px 8px 8px !important;
  }

  .astroid-article-heading a {
    font-size: 12.5px !important;
    line-height: 1.3 !important;
  }

  .video-play-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .video-lightbox-content {
    width: 100%;
    max-width: 95%;
  }

  .video-lightbox-close {
    top: -35px;
    right: 0;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
}

/* Small phones (480px) */
@media (max-width: 480px) {
  .astroid-article-item.video .card {
    height: 230px !important;
  }

  .card-body {
    padding: 10px 8px 8px !important;
  }

  .astroid-article-heading a {
    font-size: 11.5px !important;
    line-height: 1.2 !important;
  }

  .video-play-icon {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .video-lightbox-title {
    font-size: 14px;
    margin-top: 10px;
  }
}
