.hoat-dong {
  padding-top: 100px;
  position: relative;
}

.hinh-trang-tri
{
  position: absolute;
}

.hinh-trang-tri#hinh1{
  top: 15%;
  left: 10%;
}

.hinh-trang-tri#hinh2{
  top: 11%;
  left: 15%;
}

.hinh-trang-tri#hinh3{
  top: 10%;
  left: 30%;
}

.hinh-trang-tri#hinh4{
  top: 12%;
  left: 48%;
}

.hinh-trang-tri#hinh5{
  top: 10%;
  left: 65%;
}


.hinh-trang-tri#hinh6{
  top: 11%;
  left: 80%;;
}

.hinh-trang-tri#hinh7{
  top: 16%;
  left: 82%;
}

.hoat-dong-content {
  justify-items: center;
}

.noi-dung-hoat-dong {
  font-size: 32px;
  font-weight: 700;
}

.giai-doan {
  margin-top: 100px;
  width: 85%;
}

.giai-doan-tieu-de {
  font-size: 32px;
  font-weight: 700;
  display: inline-flex;
  align-items: baseline;
  gap: 10px; /* Khoảng cách giữa chữ và gạch */
  position: relative;
}

.underline-decoration-nam {
  width: 40px;
  height: 8px;
  background-color: var(--underline-decoration-nam-color);
  border-radius: 2px;
}

.hoat-dong-tieu-de {
  font-size: 24px;
  font-weight: 700;
}

.title-thuvienvideo {
  margin-bottom: 5px;
  font-size: 29px;
}

.title-thuvienvideo a {
  color: #0038b0;
}

@media (max-width: 767.99px) {
  .text-thuvienvideo {
    font-size: 29px;
  }
}

@media (max-width: 575.99px)
{
  .giai-doan {
    width: 100% !important;
  }
}

.thuvienvideo .img-video-responsive,
.section-thu-vien-video .img-video-responsive {
  height: 165px;
}

.slider-controls {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.control-btn {
  background-color: #fff;
  border: none;
  color: #990000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Container slider - ẩn overflow */
.slider-container {
  position: relative;
  overflow: hidden; /* QUAN TRỌNG: Ẩn các items ngoài viewport */
  width: 100%;
  margin: 0 auto;
  padding: 20px 10px;
  /* background-color: #fafafa; */
  border-radius: 8px;
  contain: layout style paint;
}

/* Loading states */
.slider-card-image[src*="data:image/svg+xml"] {
	background-color: #f0f0f0;
	animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
	0% { opacity: 0.7; }
	100% { opacity: 1; }
}

.hoat-dong .control-btn {
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0px 8px 8px -4px #adb5bd6e;
}

/* Button states */
.control-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Responsive performance optimizations */
@media (max-width: 768px) {
	.slider-card-image {
		height: 150px;
	}

  .slider-card:hover {
  transform: unset !important;
}
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
	.slider-wrapper,
	.slider-card,
	.slider-card-image {
		transition: none !important;
	}
	
	.slider-card-image[src*="data:image/svg+xml"] {
		animation: none;
	}
}

/* Wrapper chứa tất cả cards */
.slider-wrapper {
  display: flex;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
  width: 100%; /* Không cần tính toán width phức tạp */
}

/* Mỗi card */
.slider-card {
  flex: 0 0 auto; /* Không co giãn */
  margin-right: 20px; /* Gap between cards */
  width: calc(33.333% - 13.33px);
  /* min-height: 280px; */
  background: #fafafa;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.slider-card.double-width {
	transition: width 0.3s ease;
}

.hoat-dong .control-btn {
  color: black !important;
}

.hoat-dong .slider-card {
  /* margin-right: unset !important; */
  text-align: center;
}

.slider-card:hover {
  transform: translateY(-5px);
}

.slider-card:last-child {
  margin-right: 0;
}

/* Card image */
.slider-card-image {
  border-radius: 8px;
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.lazy-image {
	opacity: 0.7;
}

.loading {
	position: relative;
}

.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid #f3f3f3;
	border-top: 2px solid #3498db;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.hoat-dong .slider-card-image {
  /* width: unset !important; */
  height: 298px !important;
  border-radius: unset !important;
}

/* Card content */
.slider-card-content {
  padding: 15px;
}

.title-video-detail-big {
  font-size: 18px;
  font-weight: 700;
  text-align: justify;
  color: #337ab7;
}

.description-video-detail-big {
  color: #555555;
  font-size: 14px;
  text-align: justify;
  font-weight: 500;
  padding-right: 12px;
}

.slider-card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-ban-tin .slider-card-title {
  color: #0b5090;
}

.slider-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #666;
}

.slider-card-date {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Responsive card widths và image heights */
@media (max-width: 1199px) {
  .slider-card {
    width: calc(33.333% - 13.33px); /* Laptop: 3 cards per view */
  }
}

@media (max-width: 991px) {
  .slider-card {
    width: calc(50% - 10px); /* Tablet: 2 cards per view */
  }

  .slider-card-image {
    height: 160px; /* Tablet: Giảm xuống */
  }
}

@media (max-width: 767px) {
  .slider-card {
    width: 100%; /* Mobile: 1 card per view */
    margin-right: 0;
  }

  .slider-card-image {
    height: 200px; /* Mobile: Thấp nhất để phù hợp màn hình nhỏ */
  }
}

/* Responsive cho màn hình rất nhỏ */
@media (max-width: 480px) {
  .slider-card-image {
    height: 190px; /* Mobile nhỏ: Tối ưu cho màn hình rất nhỏ */
  }

  .slider-card-title {
    font-size: 13px; /* Giảm font size cho mobile nhỏ */
  }

  .slider-card-content {
    padding: 12px; /* Giảm padding */
  }
}
