/* ---------- 1. page shell (هم‌راستا با صفحات blog / projects) ---------- */
body[data-page="workshops"] .page-wrap {
  max-width: none;
}

/* ---------- 2. سربرگ صفحه: عنوان + فیلتر سال ---------- */
.ws-head {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 42px 0 6px;
}
.ws-head .page-title {
  margin: 0;
  flex: 0 0 auto;
}
.ws-filterbar {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 560px;
  padding: 0 36px;
}
.ws-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 22px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y pinch-zoom;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.ws-chips::-webkit-scrollbar {
  display: none;
}
.ws-chips .filter-chip {
  cursor: inherit;
}
.ws-chips.is-dragging,
.ws-chips.is-dragging .filter-chip {
  cursor: grabbing;
}
.ws-filter-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.ws-filter-arrow-left {
  left: 0;
}
.ws-filter-arrow-right {
  right: 0;
}
.ws-filter-arrow svg {
  width: 22px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ws-filter-arrow:hover:not(:disabled) {
  color: var(--yellow);
}
.ws-filter-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}
.ws-filter-arrow:focus-visible,
.ws-chips .filter-chip:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: -2px;
}

/* دکمه موبایل: بازکننده شیت پایین صفحه */
.ws-filter-trigger {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink);
  padding: 10px 18px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.85);
  transition:
    border-color var(--tr-fast),
    color var(--tr-fast),
    background var(--tr-fast);
}
.ws-filter-trigger svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--tr-fast);
}
.ws-filter-trigger:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  background: #fff;
}
.ws-filter-trigger .ws-filter-value {
  font-weight: 600;
}
.ws-filter-trigger .ws-sep {
  color: var(--gray-light);
}

/* ---------- 3. توضیح کوتاه صفحه ---------- */
body[data-page="workshops"] .page-lead {
  margin: 4px 0 28px;
}

/* ---------- 4. اسلایدر کارگاه‌ها (هم‌خانواده carousel سایت) ---------- */
.ws-carousel {
  margin: 4px 0 26px;
}
body[data-page="workshops"] .ws-carousel {
  padding: 0; /* مثل صفحات home/blog: حذف پدینگ افقی پیش‌فرض carousel */
}
body[data-page="workshops"] .ws-carousel .carousel-track {
  gap: 24px;
}
body[data-page="workshops"] .ws-carousel .carousel-slide {
  flex: 0 0 calc((100% - 48px) / 3);
}

/* caption کارگاه — هم‌سبک صفحه اخبار */
body[data-page="workshops"] .card-meta {
  font-size: 12px;
  color: var(--gray-light);
  margin-top: 16px;
  text-align: center;
}
body[data-page="workshops"] .card-caption {
  margin-top: 4px;
}
body[data-page="workshops"] .card-caption h2 {
  font-size: 19px;
}
body[data-page="workshops"] .card-excerpt {
  font-size: 13px;
  color: var(--gray);
  font-weight: 300;
  text-align: center;
  margin-top: 6px;
  line-height: 1.9;
}

/* پیام خالی بودن فیلتر */
.ws-empty {
  display: none;
  text-align: center;
  color: var(--gray-light);
  font-weight: 300;
  padding: 56px 0;
}
.ws-empty.is-visible {
  display: block;
}

/* ---------- 5. بلوک متنی سئوی صفحه لیست ---------- */
.ws-seo {
  margin-top: 34px;
}

/* ---------- 6. صفحه جزئیات کارگاه ---------- */
.ws-cats-label {
  color: var(--gray-light);
  font-weight: 300;
}
.ws-cats-sep {
  color: var(--line-soft);
  margin: 0 4px;
}

.ws-gallery-section {
  margin: 6px 0 6px;
}

/* دکمه «نمایش تصاویر بیشتر» */
.ws-more-wrap {
  text-align: center;
  margin: 26px 0 40px;
}
.ws-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  padding: 12px 30px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  transition:
    border-color var(--tr-fast),
    color var(--tr-fast),
    background var(--tr-fast),
    transform var(--tr-fast);
}
.ws-more-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ws-more-btn:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  background: #fff;
}
.ws-more-btn:active {
  transform: scale(0.985);
}
.ws-more-done {
  font-size: 12.5px;
  color: var(--gray-light);
  font-weight: 300;
}

/* گالری جزئیات: ۳ ستون — موبایل ۲ ستون */
.ws-detail-gallery {
  margin-bottom: 6px;
}

/* ناوبری کارگاه قبلی / بعدی */
.ws-pn {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 18px;
  border-top: 1px solid var(--line-soft);
  margin-top: 38px;
  padding-top: 20px;
}
.ws-pn a {
  max-width: 48%;
  display: block;
}
.ws-pn .ws-pn-link.prev {
  text-align: start;
}
.ws-pn .ws-pn-link.next {
  text-align: end;
}
.ws-pn-dir {
  display: block;
  font-size: 11.5px;
  color: var(--gray-light);
  font-weight: 300;
  margin-bottom: 2px;
  transition: color var(--tr-fast);
}
.ws-pn-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.8;
  transition: color var(--tr-fast);
}
.ws-pn a:hover .ws-pn-title,
.ws-pn a:hover .ws-pn-dir {
  color: var(--yellow);
}

/* ---------- 7. بات‌شیت انتخاب سال (فقط موبایل) ---------- */
.ws-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 340;
  background: rgba(17, 17, 17, 0.42);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s var(--tr),
    visibility 0s linear 0.35s;
}
.ws-sheet-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s var(--tr);
}

.ws-sheet {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 350;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -14px 44px rgba(0, 0, 0, 0.2);
  transform: translateY(105%);
  visibility: hidden;
  transition:
    transform 0.45s var(--tr),
    visibility 0s linear 0.45s;
  max-height: 78vh;
  max-height: 78dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0);
  overscroll-behavior: contain;
}
.ws-sheet.is-open {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.45s var(--tr);
}

/* دستگیره کشیدن به پایین */
.ws-sheet-handle {
  flex: 0 0 auto;
  width: 100%;
  padding: 12px 0 4px;
  cursor: grab;
  touch-action: none;
  background: none;
  border: 0;
}
.ws-sheet-handle::before {
  content: "";
  display: block;
  width: 46px;
  height: 4px;
  border-radius: 2px;
  background: var(--line-soft);
  margin: 0 auto;
}

.ws-sheet-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 22px 12px;
  border-bottom: 1px solid var(--line-soft);
  touch-action: none;
}
.ws-sheet-head h2 {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
}
.ws-sheet-close {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
  color: var(--gray);
  transition: color var(--tr-fast);
}
.ws-sheet-close:hover {
  color: var(--yellow);
}

.ws-sheet-options {
  overflow-y: auto;
  padding: 10px 14px 18px;
  -webkit-overflow-scrolling: touch;
}
.ws-sheet-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 15px 14px;
  font-size: 15px;
  color: var(--ink);
  border-radius: 12px;
  transition: background 0.2s var(--tr);
  text-align: start;
}
.ws-sheet-option:hover {
  background: rgba(255, 196, 0, 0.09);
}
.ws-sheet-option:active {
  background: rgba(255, 196, 0, 0.16);
}
.ws-sheet-option .ws-opt-check {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--yellow);
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity 0.25s var(--tr),
    transform 0.25s var(--tr);
}
.ws-sheet-option.is-active {
  font-weight: 600;
}
.ws-sheet-option.is-active .ws-opt-check {
  opacity: 1;
  transform: none;
}

/* ---------- 8. منوی همبرگری با ۷ آیتم (تأخیر ورود آیتم هفتم) ---------- */
.menu-overlay.is-open .menu-nav li:nth-child(7) a {
  transition-delay: 1.08s;
}

/* ---------- 9. واکنش‌گرایی ---------- */
@media (max-width: 1200px) {
  body[data-page="workshops"] .ws-carousel .carousel-slide {
    flex: 0 0 calc((100% - 24px) / 2);
  }
}

@media (max-width: 992px) {
  .ws-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin: 28px 0 4px;
  }
}

@media (max-width: 768px) {
  body[data-page="workshops"] .site-main {
    padding: 0 20px 22px;
  }

  /* هدر جمع‌وجور در موبایل (فقط همین صفحه؛ برای بقیه صفحات همین قواعد را در style.css کپی کنید) */
  body[data-page="workshops"] .site-header {
    padding: 16px 20px 6px;
  }
  body[data-page="workshops"] .header-tagline {
    display: none;
  }
  body[data-page="workshops"] .header-inner {
    gap: 18px;
  }
  body[data-page="workshops"] .header-controls {
    gap: 20px;
  }
  body[data-page="workshops"] .site-logo svg {
    width: 92px;
  }

  /* همان ردیف فیلتر در موبایل: اسکرول طبیعی با لمس و انتخاب با ضربه */
  .ws-filterbar {
    max-width: none;
  }
  .ws-chips {
    gap: 18px;
  }
  .ws-chips .filter-chip {
    min-height: 44px;
  }

  body[data-page="workshops"] .ws-carousel .carousel-track {
    gap: 14px;
  }
  body[data-page="workshops"] .ws-carousel .carousel-slide {
    flex: 0 0 100%;
  }

  /* فلش‌ها روی میانه تصویر 16:9 در موبایل (مثل صفحه اخبار) */
  body[data-page="workshops"] .ws-carousel .carousel-arrow {
    position: absolute !important;
    top: calc((100vw - 40px) * 0.28125) !important;
    transform: translateY(-50%) !important;
  }
  body[data-page="workshops"] .ws-carousel .carousel-arrow.prev {
    left: -14px !important;
    right: auto !important;
  }
  body[data-page="workshops"] .ws-carousel .carousel-arrow.next {
    right: -14px !important;
    left: auto !important;
  }

  body[data-page="workshops"] .card-caption h2 {
    font-size: 17px;
  }

  .ws-detail-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .ws-pn {
    flex-direction: column;
    gap: 14px;
  }
  .ws-pn a {
    max-width: 100%;
  }
  .ws-pn .ws-pn-link.next {
    text-align: start;
    border-top: 1px dashed var(--line-soft);
    padding-top: 12px;
  }
}

@media (max-width: 560px) {
  .ws-filter-trigger {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ---------- 10. حرکت کاهش‌یافته ---------- */
@media (prefers-reduced-motion: reduce) {
  .ws-sheet,
  .ws-sheet-backdrop,
  .ws-sheet-option .ws-opt-check,
  .ws-filter-trigger svg {
    transition: none;
  }
}
