/* DMH Gallery — Pinterest-like popup + NO scrollbars (FULL CSS) */
.dmh-gal,
.dmh-gal * {
  font-family: "Noto Sans Armenian", "Noto Serif Armenian", system-ui,
    -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
}

.dmh-gal {
  padding: 26px 0;
  background: radial-gradient(
      900px 520px at 50% -10%,
      rgba(255, 255, 255, 0.1),
      transparent 60%
    ),
    radial-gradient(
      760px 520px at 18% 25%,
      rgba(224, 22, 22, 0.16),
      transparent 60%
    ),
    radial-gradient(
      900px 650px at 88% 55%,
      rgba(224, 22, 22, 0.1),
      transparent 62%
    ),
    linear-gradient(180deg, #0a0a0c 0%, #060607 55%, #050506 100%);
}

.dmh-gal__wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px;
}

.dmh-gal__head {
  text-align: center;
  margin-bottom: 18px;
}

.dmh-gal__title {
  margin: 0;
  color: #fff;
  font-weight: 900;
  font-size: clamp(26px, 3vw, 46px);
  text-shadow: 0 18px 70px rgba(0, 0, 0, 0.55);
}

.dmh-gal__sub {
  margin: 10px auto 0;
  max-width: 860px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

/* Masonry */
.dmh-gal__masonry {
  column-count: 4;
  column-gap: 16px;
}
@media (max-width: 1280px) {
  .dmh-gal__masonry {
    column-count: 3;
  }
}
@media (max-width: 980px) {
  .dmh-gal__masonry {
    column-count: 2;
    column-gap: 14px;
  }
}
@media (max-width: 640px) {
  .dmh-gal__masonry {
    column-count: 1;
    column-gap: 12px;
  }
}

/* Cards */
.dmh-gal__card {
  width: 100%;
  display: block;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin: 0 0 16px;
  padding: 0;

  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.33);
  cursor: pointer;
  position: relative;

  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.dmh-gal__card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 28px 92px rgba(0, 0, 0, 0.52);
}

.dmh-gal__media {
  display: block;
  position: relative;
  width: 100%;
}

.dmh-gal__img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.dmh-gal__video,
.dmh-gal__embed {
  display: block;
  width: 100%;
  aspect-ratio: 4/5;
  background: radial-gradient(
      circle at 30% 25%,
      rgba(224, 22, 22, 0.14),
      transparent 55%
    ),
    radial-gradient(
      circle at 70% 80%,
      rgba(255, 255, 255, 0.12),
      transparent 60%
    ),
    rgba(255, 255, 255, 0.06);
  position: relative;
}

.dmh-gal__video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.96;
}

.dmh-gal__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70px;
  height: 70px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.45);
}
.dmh-gal__play::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-38%, -50%);
  width: 0;
  height: 0;
  border-left: 18px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

.dmh-gal__hover {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 40%,
    rgba(0, 0, 0, 0.62) 100%
  );
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.dmh-gal__card:hover .dmh-gal__hover {
  opacity: 1;
}

.dmh-gal__meta {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.dmh-gal__user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.dmh-gal__avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  object-fit: cover;
}
.dmh-gal__avatar--ph {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
}

.dmh-gal__name {
  font-weight: 900;
  font-size: 13px;
}

.dmh-gal__cap {
  font-weight: 800;
  font-size: 13px;
  opacity: 0.92;
}

/* =========================
   POPUP (Pinterest-like) — NO SCROLLBARS
========================= */
.dmh-gal__lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999999;
}
.dmh-gal__lightbox.is-open {
  display: block;
}

.dmh-gal__lbBack {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72) !important;
  backdrop-filter: blur(8px);
}

/* ✅ important: prevent ANY inner scrollbars */
.dmh-gal__lbBox,
.dmh-gal__lbGrid,
.dmh-gal__lbMediaWrap,
.dmh-gal__lbMedia,
.dmh-gal__lbSide {
  overflow: hidden !important;
}

.dmh-gal__lbBox {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: min(1280px, calc(100vw - 18px)) !important;
  height: min(860px, calc(100vh - 18px)) !important;

  border-radius: 18px !important;
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 40px 140px rgba(0, 0, 0, 0.55) !important;
}

.dmh-gal__lbGrid {
  height: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr 360px !important;
}
@media (max-width: 980px) {
  .dmh-gal__lbBox {
    height: calc(100vh - 18px) !important;
  }
  .dmh-gal__lbGrid {
    grid-template-columns: 1fr !important;
    grid-template-rows: 1fr auto !important;
  }
}

.dmh-gal__lbMediaWrap {
  position: relative !important;
  background: #f2f2f2 !important;
}

.dmh-gal__lbMedia {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f2f2f2 !important;
}

/* ✅ media fits — no overflow */
.dmh-gal__lbMedia iframe,
.dmh-gal__lbMedia img,
.dmh-gal__lbMedia video {
  border: 0 !important;
  display: block !important;
}

.dmh-gal__lbMedia img,
.dmh-gal__lbMedia video {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  background: #f2f2f2 !important;
}

.dmh-gal__lbMedia iframe {
  width: 100% !important;
  height: 100% !important;
  background: #f2f2f2 !important;
}

/* Side panel — белая, без скролла */
.dmh-gal__lbSide {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  padding: 16px !important;
  background: #fff !important;
  border-left: 1px solid rgba(0, 0, 0, 0.1) !important;
}
@media (max-width: 980px) {
  .dmh-gal__lbSide {
    border-left: 0 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
    padding: 14px !important;
  }
}

.dmh-gal__lbText {
  min-width: 0 !important;
  overflow: hidden !important; /* ✅ no scroll */
}

.dmh-gal__lbName {
  color: #111 !important;
  font-weight: 900 !important;
  font-size: 15px !important;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; /* ✅ максимум 2 строки */
  overflow: hidden;
}

.dmh-gal__lbCap {
  margin-top: 6px !important;
  color: rgba(0, 0, 0, 0.68) !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 10; /* ✅ без скролла, просто обрезка */
  overflow: hidden;
}

.dmh-gal__lbShop {
  margin-top: auto !important;
  text-decoration: none !important;
  color: #fff !important;
  font-weight: 900 !important;
  padding: 12px 14px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #e01616, #b10f0f) !important;
  text-align: center !important;
  box-shadow: 0 18px 60px rgba(224, 22, 22, 0.22);
}

/* Close — top-left like Pinterest */
.dmh-gal__lbClose {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(0, 0, 0, 0.16) !important;
  background: #fff !important;
  cursor: pointer !important;
  z-index: 80 !important;
}
.dmh-gal__lbClose::before,
.dmh-gal__lbClose::after {
  content: "" !important;
  position: absolute !important;
  width: 18px !important;
  height: 2.6px !important;
  background: #111 !important;
  border-radius: 999px !important;
  left: 50% !important;
  top: 50% !important;
}
.dmh-gal__lbClose::before {
  transform: translate(-50%, -50%) rotate(45deg) !important;
}
.dmh-gal__lbClose::after {
  transform: translate(-50%, -50%) rotate(-45deg) !important;
}

/* Nav arrows — always visible */
.dmh-gal__lbNav {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 54px !important;
  height: 54px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(0, 0, 0, 0.14) !important;
  background: #fff !important;
  cursor: pointer !important;
  z-index: 75 !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.dmh-gal__lbPrev {
  left: 14px !important;
}
.dmh-gal__lbNext {
  right: 14px !important;
}

.dmh-gal__lbPrev::before,
.dmh-gal__lbNext::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  margin: auto !important;
  width: 16px !important;
  height: 16px !important;
  border-right: 3px solid #111 !important;
  border-bottom: 3px solid #111 !important;
  transform: rotate(135deg) !important;
}
.dmh-gal__lbNext::before {
  transform: rotate(-45deg) !important;
}

@media (max-width: 640px) {
  .dmh-gal__lbPrev {
    left: 8px !important;
  }
  .dmh-gal__lbNext {
    right: 8px !important;
  }
}

/* ✅ HARD hide any scrollbar visuals (if theme forces) */
.dmh-gal__lbBox *::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
}
.dmh-gal__lbBox * {
  scrollbar-width: none !important;
}

/* Scroll lock */
html.dmh-gal--lock,
html.dmh-gal--lock body {
  overflow: hidden !important;
}
