/*
 * Shared layout for the customized Kerge site (hero with <img>, footer logo swap,
 * header flex stack). Direction-agnostic — works with both RTL and LTR.
 * Load after main.css; rtl.css / i18n.css may override direction-specific bits.
 */

/* ========== Sidebar photo — same hero image, small ========== */
.my-photo {
  position: relative;
  margin: 12px auto 4px;
  max-width: 96px;
  width: 96px;
  height: 100px;
  text-align: center;
  z-index: 0;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
}

.my-photo img {
  width: 96px !important;
  height: 100px !important;
  max-width: 96px !important;
  max-height: 100px !important;
  object-fit: cover;
  object-position: center top;
  display: block;
  margin: 0 auto;
  border-radius: 0;
  background: transparent;
  transform: none;
}

.menu-calendar {
  display: none;
}

.mobile-header-image img {
  width: 34px !important;
  height: 34px !important;
  max-width: 34px !important;
  max-height: 34px !important;
  object-fit: cover;
  object-position: center top;
  border-radius: 0;
}

.site-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

/* ========== Portfolio: grid + filters + image behavior (same as Persian) ========== */
.portfolio-filters {
  display: block;
  width: 100%;
  float: none;
  clear: both;
  overflow: visible;
  margin: 0 0 1.5em;
  padding: 0;
  list-style: none;
  white-space: normal;
}

.portfolio-filters li {
  float: none;
  display: inline-block;
  vertical-align: middle;
  margin: 0 8px 8px 0;
}

.portfolio-filters li a,
.portfolio-filters li a:hover,
.portfolio-filters li a:focus,
.portfolio-filters li a:active,
.portfolio-filters .btn,
.portfolio-filters .btn-sm,
.portfolio-filters .btn-link {
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.7 !important;
  letter-spacing: 0 !important;
  color: #666 !important;
  background-color: transparent !important;
  border-style: solid !important;
  border-width: 0 0 2px !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  padding: 2px 0 4px !important;
  margin: 0 !important;
  text-decoration: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  white-space: nowrap;
  overflow: visible;
  vertical-align: middle;
  cursor: pointer;
}

.portfolio-filters li a:hover,
.portfolio-filters .btn:hover,
.portfolio-filters .btn-link:hover {
  border-bottom-color: #ddd !important;
  color: #333 !important;
  text-decoration: none !important;
}

.portfolio-filters li.active a,
.portfolio-filters li.active a:hover,
.portfolio-filters li.active .btn,
.portfolio-filters li.active .btn-link {
  border-bottom-color: var(--theme-accent, #b3454f) !important;
  color: #222 !important;
  background-color: transparent !important;
  text-decoration: none !important;
}

.portfolio-filters::after {
  content: "";
  display: table;
  clear: both;
}

#portfolio .portfolio-grid,
#portfolio .portfolio-grid.portfolio-grid-ltr,
#portfolio .portfolio-grid.shuffle {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  clear: both;
  position: relative !important;
  height: auto !important;
  overflow: visible !important;
}

#portfolio .portfolio-grid figure,
#portfolio .portfolio-grid.portfolio-grid-ltr figure,
#portfolio .portfolio-grid .shuffle-item {
  width: 100% !important;
  float: none !important;
  position: relative !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  padding: 0;
  margin: 0;
}

#portfolio .portfolio-grid figure.portfolio-item-hidden {
  display: none !important;
}

#portfolio .portfolio-grid figure > i {
  display: none !important;
}

#portfolio .portfolio-grid figure > .name,
#portfolio .portfolio-grid figure > .category,
#portfolio .portfolio-grid figure > .desc {
  display: none !important;
}

#portfolio .portfolio-grid figure .project-tip {
  position: absolute;
  z-index: 6;
  left: 10px;
  right: 10px;
  bottom: 10px;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px 12px;
  border-radius: 6px;
  background: #fff;
  color: #222;
  text-align: inherit;
  direction: inherit;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  border-right: 3px solid var(--theme-accent, #b3454f);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}

#portfolio .portfolio-grid figure:hover .project-tip,
#portfolio .portfolio-grid figure:focus-within .project-tip,
#portfolio .portfolio-grid .portfolio-item-img:hover .project-tip {
  opacity: 1;
  transform: translateY(0);
}

#portfolio .portfolio-grid figure .project-tip .category,
#portfolio .portfolio-grid figure .project-tip .name,
#portfolio .portfolio-grid figure .project-tip .desc {
  position: static !important;
  display: block;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent !important;
  opacity: 1 !important;
  visibility: visible !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  box-shadow: none;
  pointer-events: none;
}

#portfolio .portfolio-grid figure .project-tip .category {
  margin-bottom: 2px;
  color: var(--theme-accent, #b3454f);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 500;
}

#portfolio .portfolio-grid figure .project-tip .name {
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

#portfolio .portfolio-grid figure .project-tip .desc {
  display: block;
  margin-top: 4px;
  color: #555;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.7;
  overflow: visible;
}

#portfolio .portfolio-grid figure .portfolio-item-img a.lightbox {
  pointer-events: none;
  cursor: default;
}

#portfolio .portfolio-grid .portfolio-item-img img {
  filter: grayscale(1);
  transition: filter 0.35s ease, transform 0.35s ease;
  width: 100%;
  display: block;
}

#portfolio .portfolio-grid figure:hover .portfolio-item-img img,
#portfolio .portfolio-grid .portfolio-item-img:hover img {
  filter: grayscale(0);
}

#portfolio .portfolio-grid figure .portfolio-item-img:after {
  z-index: 1;
  background: rgba(20, 24, 28, 0.42);
  opacity: 1;
  pointer-events: none;
}

#portfolio .portfolio-grid figure:hover .portfolio-item-img:after {
  background: rgba(20, 24, 28, 0.1);
  opacity: 1;
}

@media only screen and (max-width: 991px) {
  #portfolio .portfolio-grid,
  #portfolio .portfolio-grid.portfolio-grid-ltr,
  #portfolio .portfolio-grid.shuffle {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media only screen and (max-width: 575px) {
  #portfolio .portfolio-grid,
  #portfolio .portfolio-grid.portfolio-grid-ltr,
  #portfolio .portfolio-grid.shuffle {
    grid-template-columns: 1fr;
    gap: 0;
  }

  #portfolio .portfolio-grid figure:not(.portfolio-item-hidden) {
    padding: 16px 0;
    border-bottom: 1px solid #b7b2ac;
  }

  #portfolio .portfolio-grid figure:not(.portfolio-item-hidden):first-child {
    padding-top: 0;
  }

  #portfolio .portfolio-grid figure:not(.portfolio-item-hidden):last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
}

html[dir="rtl"] .portfolio-filters {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .portfolio-filters li {
  margin: 0 0 8px 8px;
}

html[dir="rtl"] #portfolio .portfolio-grid,
html[dir="rtl"] #portfolio .portfolio-grid.portfolio-grid-ltr,
html[dir="rtl"] #portfolio .portfolio-grid.shuffle {
  direction: rtl;
}

html[dir="rtl"] #portfolio .portfolio-grid .name,
html[dir="rtl"] #portfolio .portfolio-grid .category,
html[dir="rtl"] #portfolio .portfolio-grid .desc {
  text-align: right;
  direction: rtl;
}

html[dir="ltr"] .portfolio-filters {
  text-align: left;
  direction: ltr;
}

html[dir="ltr"] #portfolio .portfolio-grid,
html[dir="ltr"] #portfolio .portfolio-grid.portfolio-grid-ltr,
html[dir="ltr"] #portfolio .portfolio-grid.shuffle {
  direction: ltr;
}

html[dir="ltr"] #portfolio .portfolio-grid .name,
html[dir="ltr"] #portfolio .portfolio-grid .category,
html[dir="ltr"] #portfolio .portfolio-grid .desc {
  text-align: left;
  direction: ltr;
}

html[dir="ltr"] #portfolio .portfolio-grid figure .project-tip {
  border-right: 0;
  border-left: 3px solid var(--theme-accent, #b3454f);
}

/* ========== Contact: info column same height as form fields ========== */
#contact .contact-info-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 169px;
  max-height: 169px;
  box-sizing: border-box;
}

#contact .contact-info-list .info-block-w-icon {
  display: block;
  padding: 0;
  margin: 0;
}

#contact .contact-info-list .ci-text {
  display: block;
}

#contact .contact-info-list .ci-text h4 {
  margin: 0 0 1px;
  font-size: 14px;
  font-weight: 700;
  color: #222;
  line-height: 1.3;
}

#contact .contact-info-list .ci-text p {
  margin: 0;
  color: #666;
  font-size: 0.88em;
  line-height: 1.45;
  word-break: break-word;
}

#contact .contact-info-list .ci-text a,
#contact .contact-info-list .ci-text a:visited {
  color: #555;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

#contact .contact-info-list .ci-text a:hover,
#contact .contact-info-list .ci-text a:focus {
  color: #222;
  border-bottom-color: #bbb;
}

#contact .contact-form-fields {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 0 1.25em;
  align-items: stretch;
}

#contact .contact-form-meta,
#contact .contact-form-message {
  width: 100%;
  float: none;
  margin: 0;
}

#contact .contact-form-meta .form-group:last-child {
  margin-bottom: 0;
}

#contact .contact-form-message .form-group {
  margin-bottom: 0;
}

#contact .contact-form-message textarea.form-control {
  height: 169px;
  min-height: 169px;
  resize: none;
  box-sizing: border-box;
}

#contact .btn-send {
  clear: both;
  margin-top: 8px;
}

#contact .form-group .help-block,
#contact .form-group .help-block:after {
  display: none;
}

#contact .has-error .form-control,
#contact .has-error .form-control:focus {
  border-color: var(--theme-accent, #b3454f);
}

#contact .messages:empty {
  display: none;
}

#contact .messages .alert {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 0;
  border-radius: 0;
  background: #f4f6f5;
  color: #243028;
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: inherit;
}

#contact .messages .alert-danger {
  background: color-mix(in srgb, var(--theme-accent, #b3454f) 10%, #fff);
  color: var(--theme-accent, #b3454f);
}

html[dir="rtl"] #contact .contact-layout,
html[dir="rtl"] #contact .contact-form,
html[dir="rtl"] #contact .contact-form-fields {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] #contact .btn-send {
  float: right;
}

html[dir="ltr"] #contact .contact-layout,
html[dir="ltr"] #contact .contact-form,
html[dir="ltr"] #contact .contact-form-fields {
  direction: ltr;
  text-align: left;
}

html[dir="ltr"] #contact .btn-send {
  float: left;
}

@media only screen and (max-width: 991px) {
  #contact .contact-info-list {
    height: auto;
    max-height: none;
    gap: 0.85em;
  }
}

@media only screen and (max-width: 767px) {
  #contact .contact-form-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }

  #contact .contact-info-list {
    margin-bottom: 1.5em;
  }
}

/* ========== Languages list (name | level) — compact ========== */
.lang-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.82em;
  line-height: 1.35;
}

.lang-list li {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  padding: 0;
}

.lang-list .lang-name {
  font-weight: 600;
  font-size: inherit;
}

.lang-list .lang-level {
  color: #888;
  flex-shrink: 0;
  font-size: 0.95em;
  font-weight: 400;
}

/* ========== Hero: two full-height columns (photo | text) ========== */
.section-inner.start-page-full-width .hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  min-height: 100vh;
  margin: 0;
}

.section-inner.start-page-full-width .hero-photo,
.section-inner.start-page-full-width .hero-text {
  display: flex;
  flex-direction: column;
}

.section-inner.start-page-full-width .hero-photo .inner-content,
.section-inner.start-page-full-width .hero-text .inner-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  height: auto;
}

.section-inner.start-page-full-width .inner-content .fill-block {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 100vh;
  height: 100%;
  overflow: hidden;
  background-color: #f5f5f5;
  background-image: none !important;
}

.section-inner.start-page-full-width .fill-block img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.section-inner.start-page-full-width .hp-text-block {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #fcfcfc;
  min-height: 100vh;
  width: 100%;
}

@media only screen and (max-width: 991px) {
  .section-inner.start-page-full-width .hero-row {
    min-height: 0;
  }

  .section-inner.start-page-full-width .hero-photo .inner-content,
  .section-inner.start-page-full-width .hero-text .inner-content,
  .section-inner.start-page-full-width .inner-content .fill-block,
  .section-inner.start-page-full-width .hp-text-block {
    min-height: 0;
  }

  .section-inner.start-page-full-width .inner-content .fill-block {
    min-height: 520px;
  }
}

.section-inner.start-page-full-width .hp-text-block .sp-subtitle {
  color: var(--theme-accent, #b3454f);
  font-weight: 500;
}

.hp-main-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
}

@media only screen and (max-width: 991px) {
  .hp-main-title {
    font-size: 20px;
  }
}

/* لودینگ — لوگوی سایت به‌جای دایرهٔ اسپینر */
.preloader-animation {
  margin: 0;
}

.preloader-logo {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto;
  object-fit: contain;
  animation: sjs-preloader-logo 1.15s ease-in-out infinite;
}

@keyframes sjs-preloader-logo {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.92);
  }
}

/* ========== Header flex: photo → title → nav → lang → social → logo ========== */
@media only screen and (min-width: 992px) {
  .header {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    background-color: #fff;
  }

  .header .header-content {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    align-self: stretch;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    height: 100%;
    padding-bottom: 0;
    box-sizing: border-box;
  }

  .header .my-photo {
    margin: 16px auto 8px;
    flex-shrink: 0;
    width: 96px;
    max-width: 96px;
    height: 100px;
    border-radius: 0;
    overflow: hidden;
    background: transparent;
    z-index: auto;
    transition: none !important;
  }

  .header .my-photo img {
    width: 96px !important;
    height: 100px !important;
    max-width: 96px !important;
    max-height: 100px !important;
    object-fit: cover;
    object-position: center top;
    transform: none;
    display: block;
    margin: 0 auto;
    border-radius: 0;
    background: transparent;
    transition: none !important;
  }

  .header .site-title-block {
    margin: 4px 12px 8px;
    flex-shrink: 0;
    width: auto;
    align-self: stretch;
  }

  .header .site-title {
    margin-top: 0;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 400;
  }

  .header .site-nav {
    flex: 1 1 auto;
    align-self: stretch;
    min-width: 0;
    width: 100%;
    min-height: 0;
    padding: 10px 0 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    box-sizing: border-box;
  }

  .header .site-main-menu {
    flex: 0 1 auto;
    align-self: stretch;
    width: 100%;
  }

  .header .site-main-menu li {
    width: 100%;
  }

  .header .site-main-menu li a,
  .header .site-main-menu li a:hover {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 16px;
    line-height: 1.6;
  }

  .header .lang-switcher {
    flex-shrink: 0;
    margin: 4px 0 10px;
  }

  .header .social-links {
    flex-shrink: 0;
    align-self: stretch;
    width: 100%;
    margin-bottom: 8px;
    box-sizing: border-box;
  }

  .header .copyrights {
    position: static !important;
    flex-shrink: 0;
    align-self: stretch;
    width: 100%;
    padding: 8px 10px 16px;
    overflow: visible;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .header.header-at-intro .my-photo,
  .header.header-at-intro .my-photo img {
    visibility: hidden !important;
    opacity: 0 !important;
    transition: none !important;
  }

  .header .copyrights,
  .header.header-at-intro .copyrights {
    min-height: 102px;
    box-sizing: border-box;
  }

  .header .menu-calendar {
    display: none;
  }

  /* جای عکس بالا، تا قبل از تعویض، تاریخ امروز است؛ لوگو پایین می‌ماند */
  .header.header-at-intro .menu-calendar {
    position: absolute;
    top: 16px;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 96px;
    height: 100px;
    margin: 0 auto;
    padding: 8px 4px;
    gap: 2px;
    border: 1px solid #e4e4e4;
    border-radius: 0;
    background: #fafafa;
    text-align: center;
    transition: none !important;
  }

  .header.header-at-intro .menu-calendar span {
    display: block;
    width: 100%;
    white-space: normal;
    overflow: hidden;
  }

  .header.header-at-intro .menu-calendar-label {
    font-size: 11px;
    font-weight: 400;
    line-height: 1.35;
    color: #666;
  }

  .header.header-at-intro .menu-calendar-day {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    color: #222;
  }

  .header.header-at-intro .menu-calendar-note {
    display: none !important;
  }

}

@media only screen and (max-width: 991px) {
  .pt-page[id] {
    scroll-margin-top: calc(50px + env(safe-area-inset-top));
  }

  .lmpixels-scroll-to-top {
    position: fixed;
    z-index: 1003;
    bottom: calc(16px + env(safe-area-inset-bottom));
    right: 16px;
    left: auto;
  }

  .header {
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    width: min(240px, 72vw);
    max-width: 240px;
    padding: 0;
  }

  .header.mobile-menu-hide {
    width: 0;
    max-width: 0;
  }

  .header .header-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    align-self: stretch;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    margin: 0;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    padding-bottom: 0;
    box-sizing: border-box;
  }

  .header .my-photo,
  .mobile-header-image {
    display: none !important;
  }

  .header .site-title-block {
    margin: 2px 12px 6px;
    flex-shrink: 0;
  }

  .header .site-nav {
    flex: 1 1 auto;
    align-self: stretch;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 6px 0 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
  }

  .header .site-main-menu,
  .header .site-main-menu li,
  .header .site-main-menu li a {
    align-self: stretch;
    width: 100%;
    box-sizing: border-box;
  }

  .header .social-links {
    flex-shrink: 0;
    margin-bottom: 6px;
  }

  .header .copyrights {
    position: static !important;
    flex-shrink: 0;
    padding: 6px 10px 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
}

.header .social-links a {
  color: #666;
}

.header .social-links a i {
  display: inline-block;
  font-size: 14px;
  line-height: 28px;
}

/* ========== Footer logo: stacked layers (not three images in flow) ========== */
.header .copyrights .footer-logo,
.header .copyrights .footer-logo *,
.header .copyrights .footer-logo-swap,
.header .copyrights .footer-logo-swap img {
  transition: none !important;
}

.header .copyrights .footer-logo.is-leaving .footer-logo-swap {
  transition: transform 0.45s ease !important;
}

.header .copyrights .footer-logo {
  display: block;
  line-height: 0;
  overflow: visible;
  width: 56px;
  height: 56px;
  margin: 0 auto;
}

.header .copyrights .footer-logo-swap {
  position: relative;
  display: block;
  width: 56px;
  height: 56px;
  margin: 0;
  overflow: visible;
  transform-origin: 50% 50%;
  transform: rotate(0deg) scale(1);
}

.header .copyrights .footer-logo img {
  width: 56px !important;
  height: 56px !important;
  max-width: 56px !important;
  max-height: 56px !important;
  display: block;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border-radius: 0;
}

@keyframes sjs-logo-spin {
  from {
    transform: rotate(0deg) scale(1);
  }
  to {
    transform: rotate(60deg) scale(1);
  }
}

.header .copyrights .footer-logo-swap img {
  position: absolute;
  inset: 0;
  width: 56px !important;
  height: 56px !important;
}

.header .copyrights .footer-logo-swap .logo-hover-a,
.header .copyrights .footer-logo-swap .logo-hover-b {
  visibility: hidden;
}

.header .copyrights .footer-logo.is-hovering .footer-logo-swap {
  animation: sjs-logo-spin 2s ease 1 forwards;
}

.header .copyrights .footer-logo.is-hovering .logo-default {
  visibility: hidden;
}

.header .copyrights .footer-logo.is-hovering.is-left .logo-hover-b {
  visibility: visible;
}

.header .copyrights .footer-logo.is-hovering.is-right .logo-hover-a {
  visibility: visible;
}

.header .copyrights .footer-logo.is-leaving .footer-logo-swap {
  animation: none !important;
}

.header .copyrights .footer-logo.is-leaving .logo-default {
  visibility: visible;
}

.header .copyrights .footer-logo.is-leaving .logo-hover-a,
.header .copyrights .footer-logo.is-leaving .logo-hover-b {
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .header .copyrights .footer-logo.is-hovering .footer-logo-swap {
    animation: none;
  }
}

/* ========== Testimonials (shared RTL+LTR; rtl.css is disabled for LTR locales) ========== */
.testimonials-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.testimonials-header .block-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.testimonials-header .block-title h3 {
  margin-bottom: 0;
}

.testimonials.owl-carousel {
  position: relative;
  padding-bottom: 0;
}

.testimonials.owl-carousel .owl-stage-outer {
  overflow: hidden;
}

.testimonials.owl-carousel .owl-nav {
  display: none !important;
}

.testimonial-item {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
  box-sizing: border-box;
}

.testimonial-content {
  flex: 1 1 auto;
  padding-left: 0;
  padding-right: 0;
  width: 100%;
}

.testimonial-content .testimonial-text {
  position: relative;
  z-index: 1;
  padding: 1.2em 1.35em;
  margin: 0 0 12px;
  overflow: visible;
  background-color: #fdfdfd;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
}

.testimonial-content .testimonial-text p {
  font-style: normal;
  line-height: 1.9;
  text-align: justify;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  margin: 0;
  color: #555;
}

.testimonial-credits {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: auto;
  margin-bottom: 0;
  min-height: 56px;
  padding: 0;
  overflow: visible;
}

/* LTR: نویسنده و عکس سمت چپ؛ متن LTR */
html.locale-ltr .testimonials,
html.locale-ltr .testimonials .owl-stage,
html.locale-ltr .testimonial-item,
html.locale-ltr .testimonial-content,
html.locale-ltr .testimonial-content .testimonial-text,
html.locale-ltr .testimonial-credits {
  direction: ltr;
}

html.locale-ltr .testimonial-content .testimonial-text p {
  text-align: left;
}

html.locale-ltr .testimonials-count {
  direction: ltr;
  font-family: inherit;
}

.testimonial-picture {
  position: relative !important;
  top: auto !important;
  float: none !important;
  flex: 0 0 56px;
  width: 56px !important;
  height: 56px !important;
  margin: 0 !important;
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
}

.testimonial-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #e5e5e5;
}

.testimonial-author-info {
  flex: 0 1 auto;
  display: block;
  position: relative;
  padding: 0 !important;
  overflow: visible;
  min-width: 0;
}

.testimonial-author {
  display: block;
  text-align: start;
  margin: 0 0 2px;
}

.testimonial-firm {
  text-align: start;
  line-height: 1.45;
  color: #888;
  font-size: 12px;
}

.testimonials-header .testimonial-nav-slot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  direction: ltr;
  width: fit-content;
  max-width: 100%;
  min-width: 118px;
  height: 32px;
  margin: 0;
  transform: translateY(4px);
}

.testimonials-controls {
  position: relative !important;
  z-index: 2;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  visibility: visible;
  direction: ltr;
  display: inline-flex !important;
  align-items: center;
  width: auto !important;
  height: 32px;
  padding: 0 2px;
  margin: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  box-sizing: border-box;
  pointer-events: auto;
}

.testimonials-controls .t-prev,
.testimonials-controls .t-next {
  position: relative !important;
  display: inline-block !important;
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  color: #666 !important;
  cursor: pointer;
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 900 !important;
  font-size: 12px !important;
  line-height: 28px !important;
  text-align: center !important;
  text-shadow: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: color 0.15s ease;
}

.testimonials-controls .t-prev:before {
  content: "\f053";
}

.testimonials-controls .t-next:before {
  content: "\f054";
}

.testimonials-controls .t-prev:hover,
.testimonials-controls .t-next:hover,
.testimonials-controls .t-prev:focus,
.testimonials-controls .t-next:focus {
  color: var(--theme-accent) !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
}

.testimonials-controls .t-prev:disabled,
.testimonials-controls .t-next:disabled {
  opacity: .35;
  cursor: default;
}

.testimonials-count {
  display: inline-block;
  margin: 0;
  padding: 0 10px;
  font-family: 'IRANSans', Tahoma, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #999;
  line-height: 28px;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  direction: rtl;
  unicode-bidi: isolate;
  border: 0;
}

.testimonials-count .current {
  color: var(--theme-accent);
  font-weight: 600;
  padding: 0 2px;
}

.testimonials-count .sep {
  color: #bbb;
  font-weight: 400;
  padding: 0 3px;
}

.testimonials-count .total {
  color: #999;
  padding: 0 2px;
}

@media (max-width: 480px) {
  .testimonials-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .testimonials-header .testimonial-nav-slot {
    transform: none;
  }
}

.blog-search {
  margin: 0 0 14px;
}

.blog-search input {
  width: min(100%, 420px);
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  direction: rtl;
}

.blog-search-empty {
  margin: 8px 0 0;
  color: #777;
}

/* Blog body blocks — same 12-column order as the editor, right to left. */
.entry-content .sjs-block-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  direction: rtl;
  margin: 0 0 12px;
}

.entry-content .sjs-col {
  min-width: 0;
  grid-column: 1 / -1;
}

@media (min-width: 576px) {
  .entry-content .sjs-block-row {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .entry-content .sjs-col {
    grid-column: span var(--span, 12);
  }
}

.sjs-block-figure {
  margin: 0 0 12px;
}

.sjs-block-figure img,
.sjs-gallery img {
  max-width: 100%;
  height: auto;
  display: block;
}

.sjs-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.sjs-gallery img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.sjs-block-caption {
  margin-top: 6px;
  font-size: 0.9em;
  color: #777;
  text-align: center;
}

.sjs-block-quote {
  margin: 0 0 1em;
  padding: 0.7em 1em;
  border-inline-start: 3px solid var(--theme-accent, #b3454f);
  background: rgba(179, 69, 79, 0.06);
}

.sjs-block-quote p {
  margin: 0 0 0.5em;
}

.sjs-block-quote footer {
  color: #777;
  font-size: 0.9em;
}

.sjs-code-label {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
  direction: ltr;
  text-align: left;
}

.sjs-block-code {
  margin: 0 0 1em;
  padding: 12px 14px;
  background: #1c2430;
  color: #e7eef8;
  border-radius: 8px;
  overflow: auto;
  direction: ltr;
  text-align: left;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
}

.sjs-video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin: 0 0 1em;
  background: #111;
}

.sjs-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.sjs-block-divider {
  border: 0;
  border-top: 1px solid #ddd;
  margin: 12px 0 16px;
}

.sjs-group {
  min-width: 0;
}

.sjs-frame {
  border-width: var(--sjs-bw, 1px);
  border-color: var(--sjs-bc, #333);
  border-style: solid;
  padding: calc(8px + var(--sjs-bw, 1px));
  border-radius: 8px;
}

.sjs-frame.sjs-frame-double {
  border-style: double;
}

.sjs-frame.sjs-frame-dotted {
  border-style: dotted;
}

.sjs-frame.sjs-frame-dashed {
  border-style: dashed;
}

.sjs-frame.sjs-frame-dashdot {
  border-color: transparent;
  background-image:
    repeating-linear-gradient(90deg, var(--sjs-bc, #333) 0 10px, transparent 10px 14px, var(--sjs-bc, #333) 14px 18px, transparent 18px 26px),
    repeating-linear-gradient(90deg, var(--sjs-bc, #333) 0 10px, transparent 10px 14px, var(--sjs-bc, #333) 14px 18px, transparent 18px 26px),
    repeating-linear-gradient(180deg, var(--sjs-bc, #333) 0 10px, transparent 10px 14px, var(--sjs-bc, #333) 14px 18px, transparent 18px 26px),
    repeating-linear-gradient(180deg, var(--sjs-bc, #333) 0 10px, transparent 10px 14px, var(--sjs-bc, #333) 14px 18px, transparent 18px 26px);
  background-size: 100% var(--sjs-bw, 2px), 100% var(--sjs-bw, 2px), var(--sjs-bw, 2px) 100%, var(--sjs-bw, 2px) 100%;
  background-position: top, bottom, left, right;
  background-repeat: no-repeat;
}

/* فاصلهٔ انتهای هر بخش: حدود ۸ میلی‌متر */
.one-page-style .pt-page {
  padding-bottom: 0;
}

.one-page-style .pt-page .section-inner,
.one-page-style .pt-page:last-child .section-inner,
.one-page-style .pt-page:last-child .section-inner:not(.start-page-full-width) {
  padding-bottom: 8mm;
}

.one-page-style .pt-page .page-content,
.one-page-style .pt-page .section-content {
  padding-bottom: 0;
}

/* پس‌زمینهٔ بخش‌های صفحهٔ اصلی یکسان است؛ یک‌درمیان نیست */
.one-page-style .pt-page .section-inner:not(.start-page-full-width),
.one-page-style .pt-page:nth-child(even) .section-inner:not(.start-page-full-width) {
  background-color: #fff;
}

/* بدون تصویر شاخص، حاشیهٔ منفی قالب عنوان را از قاب بیرون می‌برد */
.single-post article:not(.has-post-thumbnail) .post-content {
  margin-top: 18px;
}

/* مسیر نوشته: به‌جای عنوان درشت، بخش مبدأ و نام مطلب جاری */
.single-page-content .page-content.single-post {
  height: auto;
}

.entry-header:has(.post-series-top) {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0 -30px 16px;
  padding: 10px 30px 8px;
  background: #fff;
  box-shadow: 0 1px 0 #eee;
}

.entry-header .post-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35em 0.5em;
  margin: 0 0 16px;
  font-family: "IRANSans", Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0;
}

.entry-header:has(.post-series-top) .post-crumb {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.entry-header .post-series-top {
  margin-inline-start: auto;
  max-width: 100%;
}

.entry-header .post-crumb-section {
  color: var(--theme-accent, #b3454f);
  font-weight: 600;
  text-decoration: none;
}

.entry-header .post-crumb-section:hover,
.entry-header .post-crumb-section:focus-visible {
  text-decoration: underline;
}

.entry-header .post-crumb-sep {
  color: #b0b0b0;
  font-weight: 400;
  user-select: none;
}

.single-page-content .post-navigation.post-series-foot {
  margin-top: 6px;
}

.post-series-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  max-width: 100%;
  overflow: visible;
  font-family: "IRANSans", Tahoma, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 2;
  color: #9a9a9a;
}

.post-series-head,
.post-series-steps {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-width: 0;
  margin: 0;
}

.post-series-head {
  flex: none;
}

.post-series-steps {
  margin-inline-start: 0.9em;
  padding-inline-start: 0.9em;
  border-inline-start: 1px solid #e4e4e4;
}

.post-series-row a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  text-align: start;
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  line-height: 2;
  color: #777;
}

.post-series-row a[rel="next"] {
  float: none;
  max-width: none;
  text-align: start;
}

.post-series-row a + a {
  margin-inline-start: 0.9em;
  padding-inline-start: 0.9em;
  border-inline-start: 1px solid #e4e4e4;
}

.post-series-kicker {
  flex: none;
  color: var(--theme-accent, #b3454f);
  font-size: 12px;
  font-weight: 500;
}

.post-series-title,
.post-series-name {
  overflow: visible;
  white-space: nowrap;
  font-weight: 400;
}

.post-series-title {
  color: #555;
}

.post-series-num,
.post-series-dir {
  flex: none;
  color: #b0b0b0;
  font-size: 11.5px;
  font-weight: 400;
}

.post-series-row a:hover,
.post-series-row a:hover .post-series-name {
  color: var(--theme-accent, #b3454f);
}

.entry-header .post-crumb-current {
  margin: 0;
  min-width: 0;
  flex: 1 1 12em;
  font-family: "IRANSans", Tahoma, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
  color: #333;
  overflow-wrap: break-word;
}

.blog-card .post-stats {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  color: #888;
  font-size: 12px;
}

.blog-card .post-stats i {
  margin-inline-end: 4px;
}

.post-talk .post-like {
  margin: 0 0 22px;
}

.post-talk .post-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "IRANSans", Tahoma, sans-serif;
}

.post-talk .post-like-btn.is-on {
  background: var(--theme-accent);
  color: #fff;
  border-color: var(--theme-accent);
}

.post-talk .post-like-btn:disabled {
  opacity: 0.7;
}

.post-talk .comment-form,
.post-talk .form-control,
.post-talk input.submit,
.post-talk button.submit {
  font-family: "IRANSans", Tahoma, sans-serif;
}

.post-talk-form {
  display: grid;
  gap: 8px;
  max-width: 440px;
  margin-top: 4px;
}

.post-talk-hint {
  margin: 0;
  color: #888;
  font-size: 12px;
  line-height: 1.6;
}

.post-talk-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.post-talk-form input,
.post-talk-form textarea {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  background: #fff;
  padding: 7px 10px;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

.post-talk-form textarea {
  resize: vertical;
  min-height: 54px;
}

.post-talk-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}

.post-talk-form button.submit {
  height: 36px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--theme-accent, #b3454f);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.post-talk-form button.submit:disabled {
  opacity: 0.65;
  cursor: default;
}

@media (max-width: 520px) {
  .post-talk-fields,
  .post-talk-compose {
    grid-template-columns: 1fr;
  }
}

.post-talk-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}

.post-talk-item {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.post-talk-meta {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
}

.post-talk-meta time {
  color: #999;
  font-size: 12px;
}

.post-talk-item p {
  margin: 0;
  white-space: pre-wrap;
}

.post-talk-note {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: var(--theme-accent);
}

/* فهرست نوشته‌ها: قاب یکسان برای تصویر افقی و عمودی */
#blog .blog-card .media-block,
#blog .blog-card .media-block.frame-wide,
#blog .blog-card .media-block.frame-tall {
  aspect-ratio: var(--blog-cover-wide, 800 / 375);
  background: #f3f1ee;
}

#blog .blog-card .media-block img {
  object-fit: contain;
  object-position: center center;
}

#blog .blog-card .post-info {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 6px 16px;
}

#blog .blog-card .post-info > a {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  order: -1;
  color: #222;
}

#blog .blog-card .post-info > a .blog-item-title {
  margin: 0;
  color: #222;
}

#blog .blog-card .post-info > a:hover,
#blog .blog-card .post-info > a:hover .blog-item-title {
  color: var(--theme-accent, #b3454f);
}

#blog .blog-card .post-meta-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex: none;
  margin-inline-start: auto;
  color: #888;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}

#blog .blog-card .post-reads i {
  margin-inline-end: 4px;
}

#blog .blog-card .post-stats {
  flex: 1 0 100%;
  margin-top: 2px;
}

@media only screen and (max-width: 767px) {
  #blog .blog-masonry,
  #blog .blog-masonry.two-columns {
    gap: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  #blog .blog-masonry .item:not(.blog-item-hidden) {
    padding: 16px 0 !important;
    border-bottom: 1px solid #b7b2ac;
  }

  #blog .blog-masonry .item:not(.blog-item-hidden):first-child {
    padding-top: 0 !important;
  }

  #blog .blog-masonry .item:not(.blog-item-hidden):last-child {
    border-bottom: 0;
    padding-bottom: 0 !important;
  }

  #blog .blog-masonry .item,
  #blog .blog-card,
  #blog .blog-card .post-info {
    min-width: 0;
    max-width: 100%;
  }

  #blog .blog-card .post-info {
    order: -1;
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 8px;
    padding: 0 2px !important;
    border: 0;
    background: transparent;
  }

  #blog .blog-card .post-info > a {
    order: -1;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  #blog .blog-card .blog-item-title {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
  }

  #blog .blog-card .post-date {
    order: 1;
    flex: none;
    margin: 0;
    white-space: nowrap;
  }

  #blog .blog-card .post-stats {
    order: 2;
    flex: none;
    margin: 0;
  }
}

.hp-text-block > h1.seo-title {
  margin: 0 0 1em;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: normal;
  color: inherit;
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -48px;
  z-index: 100000;
  padding: 8px 12px;
  background: #fff;
  color: #222;
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

