.jdm-gallery-section {
position: relative;
  background: #fbfcfe;
}
.jdm-gallery-preview-section {
position: relative;
  background: #f8fafc;
}
.jdm-gallery-filter-wrap {
display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}
.jdm-gallery-filter-btn {
display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.jdm-gallery-filter-btn i {
font-size: 14px;
  color: #64748b;
  transition: color 0.25s ease;
}
.jdm-gallery-filter-btn .filter-count {
display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
  transition: all 0.25s ease;
}
.jdm-gallery-filter-btn:hover,
.jdm-gallery-filter-btn:active {
color: #ffffff;
  border-color: #e55a30;
  background: #FF6D41;
  transform: translateY(-2px);
}
.jdm-gallery-filter-btn:hover i,
.jdm-gallery-filter-btn:active i {
color: #ffffff;
}
.jdm-gallery-filter-btn.active {
color: #ffffff;
  background: #FF6D41;
  border-color: #e55a30;
  box-shadow: 0 6px 18px rgba(229, 90, 48, 0.28);
}
.jdm-gallery-filter-btn.active i {
color: #ffffff;
}
.jdm-gallery-filter-btn.active .filter-count {
background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.jdm-gallery-grid {
display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
@media (max-width: 575px) {
  .jdm-gallery-grid {
grid-template-columns: 1fr;
    gap: 20px;
  }
}
.jdm-gallery-card {
position: relative;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #eef2f6;
  box-shadow: 0 8px 24px rgba(0, 78, 114, 0.06);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease;
}
.jdm-gallery-card:hover {
transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(229, 90, 48, 0.18);
  border-color: #e55a30;
}
.jdm-gallery-media {
position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0d222e;
  overflow: hidden;
  cursor: pointer;
}
.jdm-gallery-media img {
width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.jdm-gallery-card:hover .jdm-gallery-media img {
transform: scale(1.06);
}
.jdm-gallery-type-badge {
position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 2;
}
[dir="ltr"] .jdm-gallery-type-badge {
right: auto;
  left: 14px;
}
.jdm-gallery-type-badge.badge-video {
background: rgba(255, 109, 65, 0.9);
}
.jdm-gallery-type-badge.badge-photo {
background: rgba(0, 78, 114, 0.9);
}
.jdm-gallery-duration-badge {
position: absolute;
  bottom: 12px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(10, 25, 35, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2;
  font-family: inherit;
  direction: ltr;
}
[dir="ltr"] .jdm-gallery-duration-badge {
left: auto;
  right: 14px;
}
.jdm-gallery-overlay {
position: absolute;
  inset: 0;
  background: rgba(255, 109, 65, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1;
}
.jdm-gallery-card:hover .jdm-gallery-overlay {
opacity: 1;
  visibility: visible;
}
.jdm-gallery-play-btn,
.jdm-gallery-zoom-icon {
width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #FF6D41;
  border: 1.5px solid #e55a30;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transform: scale(0.85);
  transition: all 0.25s ease;
}
.jdm-gallery-play-btn {
color: #ffffff;
  padding-left: 3px;
}
[dir="ltr"] .jdm-gallery-play-btn {
padding-left: 3px;
}
.jdm-gallery-card:hover .jdm-gallery-play-btn,
.jdm-gallery-card:hover .jdm-gallery-zoom-icon {
transform: scale(1);
}
.jdm-gallery-media:hover .jdm-gallery-play-btn {
background: #ff6d41;
  color: #ffffff;
  transform: scale(1.1);
}
.jdm-gallery-media:hover .jdm-gallery-zoom-icon {
background: #004e72;
  color: #ffffff;
  transform: scale(1.1);
}
.jdm-gallery-body {
padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: right;
}
[dir="ltr"] .jdm-gallery-body {
text-align: left;
}
.jdm-gallery-category {
display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ff6d41;
  margin-bottom: 8px;
}
.jdm-gallery-title {
font-size: 16.5px;
  font-weight: 700;
  color: #004e72;
  line-height: 1.55;
  margin: 0 0 10px;
  transition: color 0.2s ease;
}
.jdm-gallery-card:hover .jdm-gallery-title {
color: #006b99;
}
.jdm-gallery-desc {
font-size: 13.5px;
  line-height: 1.7;
  color: #64748b;
  margin: 0 0 16px;
  flex: 1;
}
.jdm-gallery-action {
margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
.jdm-gallery-btn {
width: 100%;
  height: 42px;
  line-height: 40px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f0f7fa;
  color: #004e72;
  border: 1px solid rgba(0, 78, 114, 0.15);
  cursor: pointer;
  transition: all 0.25s ease;
}
.jdm-gallery-btn:hover,
.jdm-gallery-btn:active,
.jdm-gallery-card[data-type="video"] .jdm-gallery-btn:hover {
background: #FF6D41;
  color: #ffffff;
  border-color: #e55a30;
  box-shadow: 0 6px 16px rgba(229, 90, 48, 0.28);
  transform: translateY(-2px);
}
.jdm-gallery-more-wrap {
text-align: center;
  margin-top: 48px;
}
.jdm-gallery-more-btn {
display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 34px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #004e72 0%, #006b99 100%);
  box-shadow: 0 10px 28px rgba(0, 78, 114, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}
.jdm-gallery-more-btn:hover,
.jdm-gallery-more-btn:active {
color: #ffffff;
  transform: translateY(-3px);
  border: 1.5px solid #e55a30;
  box-shadow: 0 14px 32px rgba(229, 90, 48, 0.35);
  background: #FF6D41;
}
.jdm-gallery-more-btn i {
font-size: 15px;
  transition: transform 0.25s ease;
}
.jdm-gallery-more-btn:hover i {
transform: translateX(-4px);
}
[dir="ltr"] .jdm-gallery-more-btn:hover i {
transform: translateX(4px);
}
.jdm-gallery-modal {
position: fixed;
  inset: 0;
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}
.jdm-gallery-modal.is-open {
opacity: 1;
  visibility: visible;
}
.jdm-gallery-modal[hidden] {
display: none !important;
}
.jdm-gallery-modal-backdrop {
position: absolute;
  inset: 0;
  background: rgba(7, 20, 29, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}
.jdm-gallery-modal-dialog {
position: relative;
  z-index: 2;
  width: min(960px, 100%);
  max-height: 90vh;
  background: #0f1c24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.94);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.jdm-gallery-modal.is-open .jdm-gallery-modal-dialog {
transform: scale(1);
}
.jdm-gallery-modal-header {
display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: rgba(10, 25, 35, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.jdm-gallery-modal-title {
margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 15px;
}
[dir="ltr"] .jdm-gallery-modal-title {
padding-right: 0;
  padding-left: 15px;
}
.jdm-gallery-modal-close {
width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.jdm-gallery-modal-close:hover,
.jdm-gallery-modal-close:active {
background: #FF6D41;
  border: 1.5px solid #e55a30;
  color: #ffffff;
  transform: rotate(90deg);
}
.jdm-gallery-modal-body {
position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  overflow: hidden;
}
.jdm-gallery-modal-body img {
max-width: 100%;
  max-height: calc(85vh - 120px);
  object-fit: contain;
  display: block;
}
.jdm-gallery-modal-body video {
width: 100%;
  max-height: calc(85vh - 120px);
  background: #000000;
  outline: none;
  display: block;
}
body.jdm-gallery-modal-open {
overflow: hidden !important;
}
