.page-gallery-after-before-v2 {
  background-color: #070e1b;
  color: #e2e8fb;
  font-family: "Vazirmatn", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.page-gallery-after-before-v2 .glass-panel {
  background: rgba(34, 44, 65, 0.6);
  backdrop-filter: blur(12px);
}

.page-gallery-after-before-v2 .hero-gradient {
  background:
    radial-gradient(1200px 520px at 50% -10%, rgba(109, 221, 255, 0.22) 0%, rgba(109, 221, 255, 0.08) 35%, rgba(7, 14, 27, 0) 70%),
    radial-gradient(700px 320px at 8% 18%, rgba(47, 248, 1, 0.12) 0%, rgba(47, 248, 1, 0.02) 50%, rgba(7, 14, 27, 0) 75%),
    radial-gradient(700px 320px at 92% 20%, rgba(0, 210, 253, 0.14) 0%, rgba(0, 210, 253, 0.03) 55%, rgba(7, 14, 27, 0) 80%),
    linear-gradient(180deg, rgba(17, 25, 42, 0.88) 0%, rgba(7, 14, 27, 0.98) 72%, rgba(7, 14, 27, 1) 100%);
}

/* هم‌راستا با صفحات کراتو / لیزر / درباره ما */
.page-gallery-after-before-v2 .bg-grid-pattern {
  background-image: linear-gradient(to right, #1e293b 1px, transparent 1px),
    linear-gradient(to bottom, #1e293b 1px, transparent 1px);
  background-size: 40px 40px;
}

.page-gallery-after-before-v2 .royal-gab-v2-hero-card-glow {
  box-shadow:
    0 0 0 1px rgba(109, 221, 255, 0.12),
    0 24px 48px -12px rgba(0, 0, 0, 0.45);
}

.page-gallery-after-before-v2 .glow-line {
  box-shadow: 0 0 15px rgba(109, 221, 255, 0.5);
}

.page-gallery-after-before-v2 .material-symbols-outlined {
  font-family: "Material Symbols Outlined" !important;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.page-gallery-after-before-v2 ::selection {
  background-color: rgba(109, 221, 255, 0.3);
  color: #6dddff;
}

/* هر نمونه گالری: فاصلهٔ بصری از همسایه با پس‌زمینه، بوردر و عمق */
.page-gallery-after-before-v2 .royal-gab-v2-case-card {
  position: relative;
  padding: 1.25rem 1.25rem 1.5rem;
  border-radius: 1.25rem;
  background:
    radial-gradient(900px 240px at 50% 0%, rgba(109, 221, 255, 0.1) 0%, transparent 58%),
    linear-gradient(165deg, rgba(22, 34, 56, 0.72) 0%, rgba(8, 14, 26, 0.92) 100%);
  border: 1px solid rgba(109, 221, 255, 0.16);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 22px 48px -18px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.25) inset;
  transition: border-color 0.28s ease, box-shadow 0.28s ease;
}

.page-gallery-after-before-v2 .royal-gab-v2-case-card > * {
  position: relative;
  z-index: 1;
}

.page-gallery-after-before-v2 .royal-gab-v2-case-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(109, 221, 255, 0.08) 0%,
    transparent 42%,
    rgba(47, 248, 1, 0.05) 100%
  );
  pointer-events: none;
}

.page-gallery-after-before-v2 .royal-gab-v2-case-card:hover {
  border-color: rgba(109, 221, 255, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 26px 56px -16px rgba(0, 210, 253, 0.14),
    0 22px 48px -18px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.2) inset;
}

@media (min-width: 1024px) {
  .page-gallery-after-before-v2 .royal-gab-v2-case-card {
    padding: 1.375rem 1.5rem 1.625rem;
  }
}

.page-gallery-after-before-v2 .royal-gab-v2-grid--loading {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* فیلترها: بلوک‌های هم‌تراز RTL (عنوان و چیپ‌ها از یک لبه) */
.page-gallery-after-before-v2 .royal-gab-v2-filter-section {
  width: 100%;
  padding: 0.35rem 0 1.35rem;
}

.page-gallery-after-before-v2 .royal-gab-v2-filter-section--color {
  margin-top: 0.25rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(51, 65, 85, 0.65);
}

/* دسکتاپ: یک ردیف — روش | جداکننده | رنگ */
.page-gallery-after-before-v2 .royal-gab-v2-filters-desktop-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0.75rem 1rem;
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 0.2rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.page-gallery-after-before-v2 .royal-gab-v2-filter-section--inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  flex: 1 1 0;
  min-width: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.page-gallery-after-before-v2 .royal-gab-v2-filter-section--inline .royal-gab-v2-filter-section__head {
  margin-bottom: 0;
  flex: 0 0 auto;
  width: auto;
}

.page-gallery-after-before-v2 .royal-gab-v2-filter-section--inline .royal-gab-v2-chips {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-start;
}

.page-gallery-after-before-v2 .royal-gab-v2-filter-section--inline.royal-gab-v2-filter-section--color {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.page-gallery-after-before-v2 .royal-gab-v2-filters-desktop-sep {
  flex: 0 0 auto;
  width: 1px;
  align-self: stretch;
  min-height: 3rem;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(51, 65, 85, 0.85) 20%,
    rgba(51, 65, 85, 0.85) 80%,
    transparent 100%
  );
}

/* کشوی موبایل: ورود از لبهٔ راست صفحه (ثابت روی right) */
.page-gallery-after-before-v2 .royal-gab-v2-filter-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}

.page-gallery-after-before-v2 .royal-gab-v2-filter-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.page-gallery-after-before-v2 .royal-gab-v2-filter-drawer__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 15, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.page-gallery-after-before-v2 .royal-gab-v2-filter-drawer.is-open .royal-gab-v2-filter-drawer__backdrop {
  opacity: 1;
}

.page-gallery-after-before-v2 .royal-gab-v2-filter-drawer__panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 22rem);
  max-width: 100vw;
  padding: 1.25rem 1.25rem 1.5rem;
  background:
    linear-gradient(165deg, rgba(17, 25, 42, 0.98) 0%, rgba(7, 14, 26, 0.99) 100%);
  border-inline-start: 1px solid rgba(109, 221, 255, 0.2);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
  transform: translate3d(100%, 0, 0);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}

.page-gallery-after-before-v2 .royal-gab-v2-filter-drawer.is-open .royal-gab-v2-filter-drawer__panel {
  transform: translate3d(0, 0, 0);
}

.page-gallery-after-before-v2 .royal-gab-v2-filter-drawer-groups .royal-gab-v2-filter-section--color {
  margin-top: 0.25rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(51, 65, 85, 0.65);
}

@media (min-width: 1024px) {
  .page-gallery-after-before-v2 .royal-gab-v2-filter-drawer {
    display: none !important;
  }
}

.page-gallery-after-before-v2 .royal-gab-v2-filter-section__head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  width: 100%;
}

.page-gallery-after-before-v2 .royal-gab-v2-filter-section__title {
  line-height: 1.4;
}

.page-gallery-after-before-v2 .royal-gab-v2-filter-section__icon {
  flex-shrink: 0;
  font-size: 1.375rem;
  line-height: 1;
  color: rgba(109, 221, 255, 0.92);
}

/* چیپ‌ها: در RTL با flex-start از لبهٔ راست چیده می‌شوند (نه چپ صفحه) */
.page-gallery-after-before-v2 .royal-gab-v2-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
}

.page-gallery-after-before-v2 .royal-gab-v2-chips--colors {
  gap: 0.45rem;
}

@media (max-width: 520px) {
  .page-gallery-after-before-v2 .royal-gab-v2-chips--colors {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.35rem;
    margin-inline: -0.25rem;
    padding-inline: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
}

.page-gallery-after-before-v2 .royal-gab-v2-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  min-height: 2.5rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid rgba(100, 116, 139, 0.5);
  background: rgba(15, 23, 42, 0.55);
  color: #cbd5e1;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.page-gallery-after-before-v2 .royal-gab-v2-chip:hover {
  border-color: rgba(109, 221, 255, 0.45);
  background: rgba(30, 41, 59, 0.85);
  color: #f1f5f9;
}

.page-gallery-after-before-v2 .royal-gab-v2-chip:focus-visible {
  outline: none;
  border-color: rgba(109, 221, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(109, 221, 255, 0.22);
}

.page-gallery-after-before-v2 .royal-gab-v2-chip:active {
  transform: scale(0.98);
}

.page-gallery-after-before-v2 .royal-gab-v2-chip.is-active {
  border-color: rgba(109, 221, 255, 0.8);
  background: linear-gradient(
    145deg,
    rgba(23, 84, 207, 0.42) 0%,
    rgba(109, 221, 255, 0.15) 100%
  );
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(109, 221, 255, 0.2),
    0 10px 28px -10px rgba(109, 221, 255, 0.35);
}

/* دو ستون بدون هم‌پوشانی کلیک (جایگزین flex-row-reverse) */
.page-gallery-after-before-v2 .royal-gab-v2-case-media-row {
  isolation: isolate;
}

.page-gallery-after-before-v2 .royal-gab-v2-split {
  position: relative;
  min-width: 0;
}

.page-gallery-after-before-v2 .royal-gab-v2-split--after {
  border-inline-start: 1px solid rgba(109, 221, 255, 0.45);
}

/* لینک لایت‌باکس روی هر نیمهٔ تصویر */
.page-gallery-after-before-v2 .royal-gab-v2-lightbox-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  outline: none;
}

.page-gallery-after-before-v2 .royal-gab-v2-lightbox-hit img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-gallery-after-before-v2 .royal-gab-v2-lightbox-hit__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0);
  transition: background 0.22s ease;
  pointer-events: none;
}

.page-gallery-after-before-v2 .royal-gab-v2-lightbox-hit:hover .royal-gab-v2-lightbox-hit__shade,
.page-gallery-after-before-v2 .royal-gab-v2-lightbox-hit:focus-visible .royal-gab-v2-lightbox-hit__shade {
  background: rgba(0, 0, 0, 0.4);
}

.page-gallery-after-before-v2 .royal-gab-v2-lightbox-hit__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%) scale(0.92);
  font-size: 2rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.65));
  pointer-events: none;
}

.page-gallery-after-before-v2 .royal-gab-v2-lightbox-hit:hover .royal-gab-v2-lightbox-hit__icon,
.page-gallery-after-before-v2 .royal-gab-v2-lightbox-hit:focus-visible .royal-gab-v2-lightbox-hit__icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
