.video-section {
  padding: 20px 0;
  text-align: center;
  color: #333;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
}
.video-section h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  font-weight: 800;
  color: #222;
}
.video-card p,
.video-text {
  font-size: 1rem;
  font-weight: 500;
}
.video-container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
}
.video-card {
  background-color: rgba(255, 255, 255, 0.98);
  border-radius: 10px 10px 0 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card img {
  height: 500px;
}
.video-card p {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  padding: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  text-align: center;
  margin: 0;
  z-index: 10;
}
.video-section .swiper {
  width: 100%;
  height: 80vh;
  padding-bottom: 40px;
  overflow: visible;
}
.video-section .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}
.video-text {
  color: #000;
  padding: 10px 21px;
  border-radius: 0 0 8px 8px;
}
.video-section .swiper-button-next,
.video-section .swiper-button-prev {
  color: #fff;
  background: rgba(67, 173, 219, 0.8);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  transition: background 0.3s, transform 0.2s;
  display: none;
}
.video-section .swiper-button-next:hover,
.video-section .swiper-button-prev:hover {
  background: #007aff;
  transform: scale(1.1);
}
.video-section .swiper-button-next:after,
.video-section .swiper-button-prev:after {
  font-size: 18px;
}
.video-section .swiper-pagination {
  position: absolute;
  bottom: 60px;
  padding: 0;
  z-index: 20;
}
.video-section .swiper-pagination-bullet {
  background: #999;
  opacity: 0.7;
  width: 6px;
  height: 6px;
  margin: 0 6px;
  border: 1px solid #007aff;
}
.video-section .swiper-pagination-bullet-active {
  background: #007aff;
  opacity: 1;
  width: 8px;
  height: 8px;
  border: 1px solid #fff;
}
@media (min-width: 769px) {
  .video-section .swiper {
    height: auto;
    padding-bottom: 20px;
  }
  .video-card {
    height: 500px;
    max-width: 300px;
    border-radius: 10px 10px 0 0;
  }
  .video-section .swiper-button-next,
  .video-section .swiper-button-prev {
    display: block;
  }
  .video-section .swiper-slide {
    transition: opacity 0.3s;
  }
  .video-section .swiper-pagination {
    bottom: 30px;
  }
}
@media (max-width: 768px) {
  .video-section {
    padding: 10px 0;
  }
  .video-card {
    height: 500px;
  }
  .video-section h2 {
    font-size: 1.8rem;
  }
  .video-card p {
    font-size: 0.9rem;
    padding: 8px;
  }
  .video-section .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
  }
  .video-section .swiper-pagination-bullet-active {
    width: 10px;
    height: 10px;
  }
  .video-section .swiper-pagination {
    bottom: 50px;
  }
}
@media (max-width: 480px) {
  .video-section {
    padding: 0 5px;
  }
  .video-section h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
  }
  .video-card {
    height: 85vh;
  }
  .video-text {
    font-size: 1.1rem;
    padding: 14px 58px;
  }
  .video-card p {
    font-size: 0.85rem;
  }
  .video-section .swiper-pagination {
    bottom: 40px;
  }
}
@media (max-width: 360px) {
  .video-section h2 {
    font-size: 1.3rem;
  }
  .video-card {
    height: 80vh;
  }
  .video-section .swiper-pagination {
    bottom: 30px;
  }
}

.video-skeleton {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(120deg, #f7f7f7 25%, #ececec 50%, #f7f7f7 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.video-skeleton::after {
  content: "\f04b"; /* FA play icon */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 2rem;
  color: rgba(0, 0, 0, 0.25);
}

.lazy-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block; /* video shows directly */
}

.media-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.media-wrapper video,
.media-wrapper .fallback-image,
.media-wrapper .video-skeleton {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  position: absolute;
  top: 0;
  left: 0;
}

.lazy-video {
  z-index: 3;
  display: block; /* video always tried first */
}

.fallback-image {
  z-index: 2;
  display: none; /* only if video fails */
}

.video-skeleton {
  z-index: 1;
  display: none;
  background: linear-gradient(120deg, #f7f7f7 25%, #ececec 50%, #f7f7f7 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}
