/* ==========================================================================
   SECTION 10: ALBUM HÌNH ẢNH MÁY MRD-BWT002 (SINGLE-ROW KINETIC MARQUEE)
   Matsuya R&D Vietnam - Model: MRD-BWT002
   Namespace: .mrd-album-*
   Thiết kế: 1 Dòng ảnh trôi êm vô tận, hover dừng & nhấc nổi, Lightbox HD
   ========================================================================== */

.mrd-album-wrapper {
  padding: 52px 0 58px 0;
  background-color: #f8fafc;
  position: relative;
  border-top: 1px solid #e2e8f0;
  overflow: hidden;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   NHÃN TAG ĐIỂM NHẤN (CHỈ DUY NHẤT 1 TAG - KHÔNG TIÊU ĐỀ/MÔ TẢ THỪA)
   -------------------------------------------------------------------------- */
.mrd-album-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  padding: 0 24px;
}

.mrd-album-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid rgba(0, 159, 227, 0.35);
  padding: 8px 22px;
  border-radius: 30px;
  color: #004b87;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  box-shadow: 0 6px 20px rgba(0, 159, 227, 0.12), 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all 0.3s ease;
}

.mrd-album-tag:hover {
  border-color: #009fe3;
  box-shadow: 0 8px 24px rgba(0, 159, 227, 0.22);
  transform: translateY(-2px);
}

.mrd-album-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #009fe3;
  box-shadow: 0 0 8px #009fe3;
  animation: mrdAlbumPulse 2s infinite ease-in-out;
}

@keyframes mrdAlbumPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 6px rgba(0, 159, 227, 0.8);
  }
  50% {
    transform: scale(1.3);
    box-shadow: 0 0 14px rgba(0, 159, 227, 1);
  }
}

.mrd-album-tag-divider {
  width: 1px;
  height: 14px;
  background: #cbd5e1;
}

.mrd-album-tag-hint {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: none;
  letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   SINGLE-ROW KINETIC MARQUEE (1 DÒNG ẢNH TRÔI ÊM VÔ TẬN)
   -------------------------------------------------------------------------- */
.mrd-album-marquee-wrap {
  display: flex;
  width: 100%;
  position: relative;
  /* Gradient mờ nhẹ 2 mép biên giúp dòng ảnh trôi ra/vào mềm mại */
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.mrd-album-row {
  display: flex;
  overflow: hidden;
  user-select: none;
  width: 100%;
  padding: 16px 0 20px 0;
}

.mrd-album-track {
  display: flex;
  align-items: center;
  gap: 22px;
  width: max-content;
  will-change: transform;
  animation: mrdAlbumMarqueeLeft 58s linear infinite;
}

/* Dừng cuộn khi rê chuột vào hàng ảnh */
.mrd-album-row:hover .mrd-album-track {
  animation-play-state: paused;
}

@keyframes mrdAlbumMarqueeLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* --------------------------------------------------------------------------
   THẺ ẢNH (KINETIC IMAGE CARD)
   -------------------------------------------------------------------------- */
.mrd-album-card {
  flex: 0 0 325px;
  width: 325px;
  height: 215px;
  border-radius: 16px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s ease;
  box-sizing: border-box;
}

.mrd-album-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
}

/* Lớp phủ thông tin khi hover */
.mrd-album-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 25, 41, 0.88) 0%, rgba(10, 25, 41, 0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-sizing: border-box;
}

.mrd-album-caption {
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.mrd-album-zoom-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.mrd-album-zoom-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Hiệu ứng Hover vào thẻ ảnh: Nhấc bổng, viền xanh phát sáng, ảnh zoom */
.mrd-album-card:hover {
  transform: scale(1.06) translateY(-4px);
  border-color: #009fe3;
  box-shadow: 0 18px 40px rgba(0, 159, 227, 0.22), 0 4px 12px rgba(15, 23, 42, 0.08);
  z-index: 10;
}

.mrd-album-card:hover .mrd-album-img {
  transform: scale(1.08);
}

.mrd-album-card:hover .mrd-album-overlay {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   LIGHTBOX MODAL (PHÓNG TO FULL HD CAO CẤP)
   -------------------------------------------------------------------------- */
.mrd-lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 41, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  padding: 20px;
}

.mrd-lightbox-backdrop.is-open {
  display: flex;
  opacity: 1;
}

.mrd-lightbox-dialog {
  position: relative;
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: mrdLightboxZoom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mrdLightboxZoom {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.mrd-lightbox-img-wrap {
  position: relative;
  max-width: 100%;
  max-height: 72vh;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 159, 227, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: #061527;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mrd-lightbox-img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  user-select: none;
}

/* Thanh thông tin dưới ảnh */
.mrd-lightbox-meta {
  width: 100%;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  padding: 0 6px;
}

.mrd-lightbox-caption {
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
}

.mrd-lightbox-counter {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
}

/* Nút đóng (Close button) */
.mrd-lightbox-close {
  position: absolute;
  top: -46px;
  right: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.mrd-lightbox-close svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.mrd-lightbox-close:hover {
  background: #ef4444;
  border-color: #ef4444;
  transform: rotate(90deg) scale(1.1);
}

/* Nút Điều Hướng Prev & Next */
.mrd-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(10, 25, 41, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 10;
}

.mrd-lightbox-nav svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.mrd-lightbox-prev {
  left: -65px;
}

.mrd-lightbox-next {
  right: -65px;
}

.mrd-lightbox-nav:hover {
  background: #009fe3;
  border-color: #009fe3;
  box-shadow: 0 0 20px rgba(0, 159, 227, 0.6);
  transform: translateY(-50%) scale(1.1);
}

/* --------------------------------------------------------------------------
   RESPONSIVE (MOBILE & TABLET)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .mrd-gallery-wrapper {
    padding: 50px 0 58px 0;
  }

  .mrd-gallery-card {
    flex: 0 0 270px;
    width: 270px;
    height: 180px;
  }

  .mrd-lightbox-prev {
    left: 10px;
  }

  .mrd-lightbox-next {
    right: 10px;
  }
}

@media (max-width: 640px) {
  .mrd-gallery-wrapper {
    padding: 40px 0 48px 0;
  }

  .mrd-gallery-header {
    margin-bottom: 24px;
  }

  .mrd-gallery-tag {
    font-size: 12px;
    padding: 6px 16px;
    gap: 8px;
  }

  .mrd-gallery-tag-hint {
    display: none;
  }

  .mrd-gallery-tag-divider {
    display: none;
  }

  .mrd-gallery-marquee-wrap {
    gap: 16px;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .mrd-gallery-track {
    gap: 14px;
  }

  .mrd-gallery-card {
    flex: 0 0 230px;
    width: 230px;
    height: 155px;
  }

  .mrd-lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .mrd-lightbox-nav svg {
    width: 20px;
    height: 20px;
  }
}
