/**
 * قالب مشاغل دو — چیدمان Bento منحصربه‌فرد (جدا از رپینو).
 *
 * الگو: ui-ux-pro-max Bento Grids + directory detail (gallery-first).
 * پس‌زمینه خنثی Apple-style؛ بدون هیرو تمام‌عرض تیره و بدون .shell کلاسیک.
 */

/* خنثی‌سازی استایل‌های theme.css روی صفحه این قالب */
body.jdm-place-tpl-jobs-two {
  background: #f5f5f7;
  color: #1d1d1f;
  overflow-x: clip;
}

body.jdm-place-tpl-jobs-two .site-nav {
  background: rgba(245, 245, 247, 0.86);
}

.place-tpl--jobs-two.j2-page {
  --j2-bg: #f5f5f7;
  --j2-card: #ffffff;
  --j2-ink: #1d1d1f;
  --j2-muted: #6e6e73;
  --j2-line: rgba(0, 0, 0, 0.08);
  --j2-radius: 22px;
  --j2-radius-sm: 14px;
  --j2-gap: 6px;
  --j2-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --j2-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --j2-accent: var(--color-primary, #059669);
  --j2-accent-2: var(--color-secondary, #10b981);
  --j2-cta: var(--color-accent, #b45309);
  display: block;
  padding: 0 0 5rem;
  color: var(--j2-ink);
  max-width: 100%;
  overflow-x: clip;
  box-sizing: border-box;
}

.j2-wrap {
  width: 100%;
  max-width: var(--jdm-site-width, 1120px);
  margin-inline: auto;
  padding-inline: 1rem;
  padding-top: 1.1rem;
  box-sizing: border-box;
  min-width: 0;
}

/* —— مسیر —— */
.j2-crumbs {
  margin-bottom: 1.25rem;
}

.j2-crumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--j2-muted);
}

.j2-crumbs__list li:not(:last-child)::after {
  content: "/";
  margin-inline-start: 0.5rem;
  opacity: 0.45;
}

.j2-crumbs__list a {
  color: inherit;
  text-decoration: none;
}

.j2-crumbs__list a:hover {
  color: var(--j2-accent);
}

.j2-crumbs__list [aria-current="page"] {
  color: var(--j2-ink);
  font-weight: 600;
}

/* —— هویت (معادل هیرو آگهی) — گرادیان از توکن‌های تنظیمات قالب —— */
.j2-identity {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: end;
  margin-bottom: 0.75rem;
  padding: 1.35rem 1.4rem;
  overflow: hidden;
  color: #fff;
  border-radius: var(--j2-radius);
  border: 1px solid color-mix(in oklab, #fff 18%, transparent);
  box-shadow: var(--j2-shadow);
  background: var(--color-foreground, #064e3b);
}

/**
 * تصویر گالری (دوم، یا اول اگر یکی باشد) — نیمه چپ مورب، مات، زیر گرادیان.
 */
.j2-identity__media {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 0;
  width: 54%;
  pointer-events: none;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 72% 100%, 0 100%);
}

.j2-identity__media-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.78;
  filter: saturate(0.9) brightness(0.92) contrast(1.08);
  transform: scale(1.06);
}

/* لایه گرادیان روی تصویر (و کل باکس) */
.j2-identity__wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      color-mix(in oklab, var(--color-foreground, #064e3b) 22%, transparent) 0%,
      color-mix(in oklab, var(--color-foreground, #064e3b) 52%, transparent) 48%,
      color-mix(in oklab, var(--color-foreground, #064e3b) 88%, transparent) 100%
    ),
    linear-gradient(
      120deg,
      color-mix(in oklab, var(--color-primary, #047857) 42%, transparent),
      transparent 55%
    ),
    radial-gradient(
      circle at 72% 28%,
      color-mix(in oklab, var(--jdm-grad-hero-a, var(--color-secondary, #34d399)) 80%, transparent) 0%,
      transparent 42%
    ),
    radial-gradient(
      circle at 12% 78%,
      color-mix(in oklab, var(--jdm-grad-hero-b, var(--color-accent, #d97706)) 32%, transparent) 0%,
      transparent 40%
    ),
    linear-gradient(
      135deg,
      color-mix(in oklab, var(--color-primary, #0f766e) 78%, transparent),
      color-mix(in oklab, var(--color-foreground, #064e3b) 82%, transparent) 58%,
      color-mix(in oklab, var(--color-foreground, #022c22) 90%, #000)
    );
}

/* با تصویر: گرادیان روی نیمه چپ کمی شفاف‌تر تا عکس واضح‌تر دیده شود */
.j2-identity--has-media .j2-identity__wash {
  background:
    linear-gradient(
      90deg,
      color-mix(in oklab, var(--color-foreground, #064e3b) 28%, transparent) 0%,
      color-mix(in oklab, var(--color-foreground, #064e3b) 55%, transparent) 42%,
      color-mix(in oklab, var(--color-foreground, #064e3b) 88%, transparent) 100%
    ),
    linear-gradient(
      120deg,
      color-mix(in oklab, var(--color-primary, #047857) 28%, transparent),
      transparent 55%
    ),
    radial-gradient(
      circle at 72% 28%,
      color-mix(in oklab, var(--jdm-grad-hero-a, var(--color-secondary, #34d399)) 55%, transparent) 0%,
      transparent 42%
    ),
    radial-gradient(
      circle at 12% 78%,
      color-mix(in oklab, var(--jdm-grad-hero-b, var(--color-accent, #d97706)) 22%, transparent) 0%,
      transparent 40%
    ),
    linear-gradient(
      135deg,
      color-mix(in oklab, var(--color-primary, #0f766e) 55%, transparent),
      color-mix(in oklab, var(--color-foreground, #064e3b) 62%, transparent) 58%,
      color-mix(in oklab, var(--color-foreground, #022c22) 78%, transparent)
    );
}

.j2-identity__main,
.j2-identity__actions {
  position: relative;
  z-index: 2;
}

.j2-identity__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.j2-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}

.j2-chip--ok {
  background: color-mix(in oklab, var(--jdm-grad-hero-a, var(--color-secondary, #10b981)) 28%, transparent);
  border-color: color-mix(in oklab, #fff 35%, transparent);
  color: #fff;
}

.j2-chip--link:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.j2-identity__title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
  color: #fff;
}

.j2-identity__lead {
  margin: 0 0 0.85rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
}

.j2-identity__lead a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.j2-identity__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.j2-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.j2-rating__score {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

/* رنگ ستاره از تنظیمات قالب (color_gold → --gold) */
.j2-rating__stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--gold, var(--color-jdm-gold, #f59e0b));
}

.j2-rating__count,
.j2-identity__loc {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.88);
}

.j2-identity__loc {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-style: normal;
}

.j2-identity__loc svg {
  color: rgba(255, 255, 255, 0.9);
}

.j2-identity__actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 11.5rem;
}

.j2-identity__actions .j2-btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.j2-identity__actions .j2-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.j2-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--j2-ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
  color: inherit;
  background: #f5f5f7;
}

.j2-btn:hover {
  transform: translateY(-1px);
}

.j2-btn:active {
  transform: scale(0.98);
}

.j2-btn--block {
  width: 100%;
}

.j2-btn--accent {
  background: var(--j2-cta);
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in oklab, var(--j2-cta) 28%, transparent);
}

.j2-btn--primary {
  background: var(--j2-accent);
  color: #fff;
}

.j2-btn--ghost {
  background: #fff;
  border-color: var(--j2-line);
}

.j2-btn--ghost:hover {
  border-color: color-mix(in oklab, var(--j2-accent) 40%, var(--j2-line));
}

/* —— لایه‌بندی دوستونه: ستون اصلی + تماس (بدون هم‌ردیفی ارتفاع) —— */
.j2-bento {
  display: grid;
  gap: var(--j2-gap);
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* RTL: ستون اول سمت راست — تماس راست = ستون اول */
.j2-bento--contact-end {
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
}

.j2-bento--contact-end .j2-side {
  grid-column: 1;
  grid-row: 1;
}

.j2-bento--contact-end .j2-main {
  grid-column: 2;
  grid-row: 1;
}

/* RTL: تماس چپ = ستون دوم */
.j2-bento--contact-start {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
}

.j2-bento--contact-start .j2-main {
  grid-column: 1;
  grid-row: 1;
}

.j2-bento--contact-start .j2-side {
  grid-column: 2;
  grid-row: 1;
}

/**
 * ستون کناری: تماس + شعار + رضایت/سابقه.
 * sticky روی کل ستون؛ بدون اسکرول داخلی.
 */
.j2-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  position: sticky;
  top: var(
    --j2-sticky-top,
    calc(var(--wp-admin--admin-bar--height, 0px) + var(--nav-h, 68px) + 24px)
  );
  z-index: 2;
  align-self: start;
}

/**
 * ستون محتوا: معرفی و گالری تمام‌عرض؛ بقیه جفتی کنار هم.
 * فاصله واقعی بین باکس‌ها = --j2-gap (نه ارتفاع ردیف سایدبار).
 */
.j2-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--j2-gap);
  min-width: 0;
  max-width: 100%;
}

.j2-main > .j2-tile--about,
.j2-main > .j2-tile--gallery,
.j2-main > .j2-tile--services,
.j2-main > .j2-tile--related,
.j2-main > .j2-tile--reviews {
  grid-column: 1 / -1;
}

.j2-tile {
  background: var(--j2-card);
  border-radius: var(--j2-radius);
  border: 1px solid var(--j2-line);
  box-shadow: var(--j2-shadow);
  padding: 0.75rem 0.9rem 0.85rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: transform 0.22s var(--j2-ease), box-shadow 0.22s var(--j2-ease);
}

.j2-tile:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05), 0 16px 36px rgba(0, 0, 0, 0.08);
}

.j2-tile__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.j2-tile__title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.j2-tile__bar .j2-tile__title {
  margin: 0;
}

.j2-tile__action {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: #f5f5f7;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--j2-accent);
  cursor: pointer;
  text-decoration: none;
}

.j2-tile__action:hover {
  background: color-mix(in oklab, var(--j2-accent) 12%, #fff);
}

.j2-tile__meta {
  font-size: 0.82rem;
  color: var(--j2-muted);
  font-weight: 600;
}

.j2-tile--contact {
  position: static;
  max-height: none;
  overflow: visible;
  padding: 0;
  align-self: stretch;
}

/* گالری: اسلایدر تک‌ردیفه — کاشی‌های هم‌اندازه */
.j2-tile--gallery {
  padding: 0.75rem 0.9rem 0.85rem;
  overflow: hidden;
}

.j2-gallery-slider {
  position: relative;
  min-width: 0;
}

.j2-gallery-track.gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.5rem;
  padding: 0 0 0.15rem;
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.j2-gallery-track .gallery__item {
  /* همیشه هم‌اندازهٔ ۵ اسلات — حتی با ۱–۴ عکس، کاشی غول‌پیکر نشود */
  flex: 0 0 calc((100% - 2rem) / 5);
  width: calc((100% - 2rem) / 5);
  aspect-ratio: 1 / 1;
  height: auto;
  max-height: 11.5rem;
  border-radius: var(--j2-radius-sm);
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #ececef;
  position: relative;
  scroll-snap-align: start;
  transition: transform 0.22s var(--j2-ease), box-shadow 0.22s var(--j2-ease);
}

.j2-gallery-track .gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.j2-gallery-track .gallery__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.j2-gallery-track .gallery__more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 15, 20, 0.55);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
}

.j2-gallery-slider__nav {
  appearance: none;
  position: absolute;
  top: 50%;
  z-index: 2;
  translate: 0 -50%;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  color: var(--j2-ink, #1d1d1f);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.j2-gallery-slider__nav--prev {
  inset-inline-start: 0.35rem;
}

.j2-gallery-slider__nav--next {
  inset-inline-end: 0.35rem;
}

.j2-gallery-slider__nav:hover {
  background: #fff;
  color: var(--j2-accent);
}

/* مشاغل پیشنهادی: ۵ کارت در یک سطر تمام‌عرض */
.j2-tile--related {
  min-width: 0;
}

.j2-tile--related .related-jobs {
  margin: 0;
}

.j2-tile--related .related-jobs__title {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.j2-tile--related .related-jobs__list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.j2-tile--related .related-jobs__item {
  min-width: 0;
}

.j2-tile--related .related-jobs__row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  height: 100%;
  padding: 0;
  border-radius: var(--j2-radius-sm);
  border: 1px solid var(--j2-line);
  background: #fafafa;
  overflow: hidden;
  transition: border-color 0.18s var(--j2-ease), box-shadow 0.18s var(--j2-ease), transform 0.18s var(--j2-ease);
}

.j2-tile--related .related-jobs__row:has(.related-jobs__name:hover),
.j2-tile--related .related-jobs__row:has(.related-jobs__name:focus-visible) {
  border-color: color-mix(in oklab, var(--j2-accent) 35%, var(--j2-line));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
  background: #fff;
}

.j2-tile--related .related-jobs__thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 0;
}

.j2-tile--related .related-jobs__body {
  padding: 0.55rem 0.6rem 0.7rem;
  gap: 0.2rem;
}

.j2-tile--related .related-jobs__name {
  font-size: 0.84rem;
  -webkit-line-clamp: 2;
}

.j2-tile--related .related-jobs__meta {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* کارت تماس — بدون اسکرول داخلی */
.j2-tile--contact {
  padding: 0;
  overflow: visible;
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--j2-accent) 10%, #fff) 0 72px, #fff 72px);
}

.j2-contact {
  padding: 1.15rem 1.1rem 1.25rem;
}

.j2-contact__kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--j2-accent);
}

.j2-contact__title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.j2-contact__hint {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: #f5f5f7;
  font-size: 0.82rem;
  color: var(--j2-muted);
}

.j2-contact .j2-btn {
  margin-bottom: 0.5rem;
}

/* متای تماس: همان ساختار contact-meta قالب یک (آیکون + برچسب + مقدار) */
.j2-contact__meta.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--j2-line);
  font-style: normal;
}

.j2-tile--contact .contact-meta__row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 0;
  font-size: 0.9rem;
}

.j2-tile--contact .contact-meta__row a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.j2-tile--contact .contact-meta__row a:hover {
  color: var(--j2-accent);
}

.j2-side .owner-card,
.j2-side .trust-mini {
  margin: 0;
}

/* درباره / حقایق — تمام‌عرض باکس، جاستیفای */
.j2-prose {
  font-size: 0.98rem;
  line-height: 1.85;
  color: #3a3a3c;
  max-width: none;
  width: 100%;
}

.j2-prose p,
.j2-prose.about-text p,
.j2-tile--about .about-text {
  margin: 0;
  text-align: justify;
  text-justify: inter-word;
}

.j2-prose.about-text--intro a {
  color: var(--j2-accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.j2-prose.about-text--intro a:hover {
  color: var(--j2-ink);
}

/* حقایق معرفی — همان کلاس‌های رپینو داخل کاشی */
.j2-tile--about .facts.j2-facts-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.j2-tile--about .fact {
  padding: 0.85rem 0.9rem;
  border-radius: var(--j2-radius-sm);
  background: #f5f5f7;
  border: 1px solid var(--j2-line);
}

.j2-tile--services .about-groups {
  margin-top: 0.25rem;
}

.j2-tile--reviews .rating-summary {
  margin-bottom: 1rem;
}

@media (max-width: 720px) {
  .j2-tile--about .facts.j2-facts-row {
    grid-template-columns: 1fr;
  }
}

/* ساعات */
.j2-hours {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.j2-hours th,
.j2-hours td {
  padding: 0.55rem 0.15rem;
  border-bottom: 1px solid var(--j2-line);
  text-align: start;
}

.j2-hours tr.is-today {
  background: color-mix(in oklab, var(--j2-accent) 8%, transparent);
}

.j2-hours tr.is-today th,
.j2-hours tr.is-today td {
  border-radius: 8px;
}

.j2-hours__today {
  display: inline-block;
  margin-inline-start: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--j2-accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

/* نقشه */
.j2-map {
  border-radius: var(--j2-radius-sm);
  overflow: hidden;
  min-height: 220px;
  background: #ececef;
}

.j2-map .map__leaflet {
  min-height: 220px;
  height: 220px;
}

.j2-map--empty {
  display: grid;
  place-items: center;
  gap: 0.5rem;
  min-height: 200px;
  color: var(--j2-muted);
}

.j2-map--empty a {
  color: var(--j2-accent);
  font-weight: 700;
}

/* خدمات */
.j2-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.65rem;
}

.j2-service {
  padding: 0.8rem;
  border-radius: var(--j2-radius-sm);
  background: #f5f5f7;
}

.j2-service header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.j2-service h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
}

.j2-service ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--j2-muted);
}

.j2-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.j2-review {
  padding: 0.9rem;
  border-radius: var(--j2-radius-sm);
  background: #f5f5f7;
  margin-bottom: 0.55rem;
  border: 0;
}

.j2-empty {
  margin: 0;
  color: var(--j2-muted);
  font-size: 0.92rem;
}

/* موبایل: تک‌ستونه تمام‌عرض — بدون تکیه بر display:contents داخل flex (باگ نیم‌عرض ساعات/نقشه) */
@media (max-width: 960px) {
  .j2-identity {
    grid-template-columns: 1fr;
  }

  .j2-identity__actions {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
  }

  .j2-identity__actions .j2-btn {
    flex: 1 1 9rem;
  }

  .j2-identity__media {
    width: 62%;
  }

  .j2-bento,
  .j2-bento--contact-start,
  .j2-bento--contact-end {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    gap: var(--j2-gap);
    width: 100%;
    max-width: 100%;
  }

  /* فرزندان .j2-main مستقیماً در گرید تک‌ستونهٔ بنتو قرار می‌گیرند */
  .j2-main {
    display: contents;
  }

  .j2-bento--contact-end .j2-side,
  .j2-bento--contact-start .j2-side,
  .j2-bento--contact-end .j2-main,
  .j2-bento--contact-start .j2-main {
    grid-column: auto;
    grid-row: auto;
  }

  .j2-main > .j2-tile,
  .j2-side {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    justify-self: stretch;
  }

  .j2-tile--about {
    order: 1;
  }

  .j2-tile--gallery {
    order: 2;
  }

  .j2-side {
    position: static;
    order: 3;
    width: 100%;
    max-width: 100%;
  }

  .j2-tile--contact {
    position: static;
    max-height: none;
    width: 100%;
    overflow: visible;
  }

  .j2-side .owner-card,
  .j2-side .trust-mini {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .j2-tile--hours {
    order: 4;
  }

  .j2-tile--map {
    order: 5;
  }

  .j2-tile--services {
    order: 6;
  }

  .j2-tile--tags {
    order: 7;
  }

  .j2-tile--related {
    order: 8;
  }

  .j2-tile--reviews {
    order: 9;
  }

  /* گالری: تقریباً تمام‌عرض با کمی peek اسلاید بعدی */
  .j2-gallery-slider {
    width: 100%;
  }

  .j2-gallery-track.gallery {
    width: 100%;
  }

  .j2-gallery-track .gallery__item {
    flex: 0 0 calc(100% - 1.25rem);
    flex-basis: calc(100% - 1.25rem);
    width: calc(100% - 1.25rem);
    max-width: calc(100% - 1.25rem);
    max-height: 14rem;
  }

  .j2-tile--related .related-jobs__list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.55rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
  }

  .j2-tile--related .related-jobs__item {
    flex: 0 0 min(42vw, 11.5rem);
    scroll-snap-align: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .j2-btn,
  .j2-tile,
  .j2-gallery-track .gallery__item,
  .j2-tile--related .related-jobs__row {
    transition: none;
  }

  .j2-btn:hover,
  .j2-gallery-track .gallery__item:hover,
  .j2-tile--related .related-jobs__row:has(.related-jobs__name:hover) {
    transform: none;
  }
}
