/*
 Theme Name: Hello Elementor Child (Custom Fonts)
 Theme URI: https://ahanbox.com/
 Description: Child theme for Hello Elementor with global custom fonts.
 Author: hermeslearn-behzad.sadeghian 
 Author URI: https://hermeslearn.com/
 Template: hello-elementor
 Version: 1.1.2
*/
@media (min-width: 1300px) {

    .page-header .entry-title,
    .site-footer .footer-inner,
    .site-footer:not(.dynamic-footer),
    .site-header .header-inner,
    .site-header:not(.dynamic-header),
    body:not([class*=elementor-page-]) .site-main {
        max-width: 1300px;
    }
}
/* استایل‌های سفارشی قبلی */
.tablepress-last-edit {
    color: #777;
    font-size: 13px;
    font-style: italic;
}

/* =========================
   Global Font: YekanBakhFaNum
   مسیر فونت‌ها: assets/fonts/
   ========================= */

/* Variable font (بهترین حالت) */
@font-face {
    font-family: 'YekanBakhFaNum';
    src:
        url('assets/fonts/woff2/YekanBakhFaNum-VF.woff2') format('woff2-variations'),
        url('assets/fonts/woff/YekanBakhFaNum-VF.woff') format('woff-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Static fallbacks */
@font-face {
    font-family: 'YekanBakhFaNum';
    src:
        url('assets/fonts/woff2/YekanBakhFaNum-Thin.woff2') format('woff2'),
        url('assets/fonts/woff/YekanBakhFaNum-Thin.woff') format('woff');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakhFaNum';
    src:
        url('assets/fonts/woff2/YekanBakhFaNum-Light.woff2') format('woff2'),
        url('assets/fonts/woff/YekanBakhFaNum-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakhFaNum';
    src:
        url('assets/fonts/woff2/YekanBakhFaNum-Regular.woff2') format('woff2'),
        url('assets/fonts/woff/YekanBakhFaNum-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakhFaNum';
    src:
        url('assets/fonts/woff2/YekanBakhFaNum-SemiBold.woff2') format('woff2'),
        url('assets/fonts/woff/YekanBakhFaNum-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakhFaNum';
    src:
        url('assets/fonts/woff2/YekanBakhFaNum-Bold.woff2') format('woff2'),
        url('assets/fonts/woff/YekanBakhFaNum-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakhFaNum';
    src:
        url('assets/fonts/woff2/YekanBakhFaNum-Black.woff2') format('woff2'),
        url('assets/fonts/woff/YekanBakhFaNum-Black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* 1) اعمال سراسری */
html,
body,
button,
input,
select,
textarea {
    font-family: 'YekanBakhFaNum', sans-serif !important;
}

/* 2) Override فونت‌های خود Elementor (حتی اگر در ویجت‌ها فونت مشخص شده باشد) */
.elementor :where(h1, h2, h3, h4, h5, h6,
    p, span, div, a, li, ul, ol,
    td, th, label, small, strong, em, blockquote, figcaption,
    button, input, textarea, select) {
    font-family: 'YekanBakhFaNum', sans-serif !important;
}

/* 3) ست کردن متغیرهای Global Typography المنتور (کمک می‌کند خیلی از قالب‌ها خودکار درست شوند) */
:root {
    --e-global-typography-primary-font-family: 'YekanBakhFaNum';
    --e-global-typography-secondary-font-family: 'YekanBakhFaNum';
    --e-global-typography-text-font-family: 'YekanBakhFaNum';
    --e-global-typography-accent-font-family: 'YekanBakhFaNum';
}

table td,
table th {
    border: none !important;
    line-height: 1.5;
    padding: 15px;
    vertical-align: top;
}

/* =========================================
   Responsive Typography System (Mobile-first)
   - Google-friendly readability
   - Applies globally to p, headings, lists, etc.
   ========================================= */
:root {
    /* Base sizes (tweak if needed) */
    --fs-body: clamp(15px, 1.0vw + 12px, 17px);
    /* 15..17 */
    --lh-body: 1.85;

    /* Headings scale */
    --fs-h1: clamp(22px, 2.2vw + 14px, 32px);
    --fs-h2: clamp(20px, 1.9vw + 13px, 28px);
    --fs-h3: clamp(18px, 1.6vw + 12px, 24px);
    --fs-h4: clamp(16px, 1.2vw + 12px, 20px);
    --fs-h5: clamp(15px, 1.0vw + 12px, 18px);
    --fs-h6: clamp(14px, 0.8vw + 12px, 16px);

    /* Secondary text */
    --fs-small: clamp(13px, 0.6vw + 12px, 14px);

    /* Spacing rhythm */
    --sp-1: clamp(6px, 0.6vw + 4px, 10px);
    --sp-2: clamp(10px, 1.0vw + 6px, 16px);
    --sp-3: clamp(14px, 1.4vw + 8px, 22px);
}

/* Global base */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    text-rendering: optimizeLegibility;
}

/* Paragraphs */
p {
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    margin: 0 0 var(--sp-2);
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.35;
    margin: 0 0 var(--sp-2);
    font-weight: 800;
}

h1 {
    font-size: var(--fs-h1);
}

h2 {
    font-size: var(--fs-h2);
}

h3 {
    font-size: var(--fs-h3);
}

h4 {
    font-size: var(--fs-h4);
}

h5 {
    font-size: var(--fs-h5);
}

h6 {
    font-size: var(--fs-h6);
}

/* Lists */
ul,
ol {
    margin: 0 0 var(--sp-2);
    padding-inline-start: 1.25em;
    /* RTL safe */
}

li {
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    margin: 0 0 var(--sp-1);
}

/* Common content elements */
blockquote {
    margin: 0 0 var(--sp-2);
    padding: var(--sp-2);
    border-inline-start: 3px solid rgba(0, 0, 0, .12);
    background: rgba(0, 0, 0, .03);
    border-radius: 12px;
}

small,
.text-small {
    font-size: var(--fs-small);
    line-height: 1.7;
}

/* Links in content: readable and tap-friendly */
a {
    text-underline-offset: 3px;
}

/* Media inside content */
img,
video {
    max-width: 100%;
    height: auto;
}

.page-header .yoast-breadcrumb {
    max-width: var(--container-max-width, 1140px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.page-header #breadcrumbs {
    margin: 0 0 10px;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* 1) اگر تصویر بعد از عنوان داخل page-header می‌آید: هم‌عرض کانتینر کن */
.single-post .page-header .post-featured-image {
    max-width: var(--container-max-width, 1140px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* 2) خود تصویر همیشه داخل wrapper بماند */
.single-post .post-featured-image img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

/* -----------------------------------------
   Mobile tuning (only on small screens)
----------------------------------------- */
@media (max-width: 980px) {
    body {
        font-size: var(--fs-body);
        line-height: var(--lh-body);
    }

    .entry-content,
    .woocommerce-Tabs-panel,
    .product .summary,
    .site-main {
        font-size: var(--fs-body);
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        margin-bottom: var(--sp-1);
    }

    p {
        margin-bottom: var(--sp-2);
    }
}

@media (max-width: 980px) {
    table {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        font-family: 'YekanBakhFaNum';
    }
}

/* =========================================================
   FINAL: Ahanbox Breadcrumb (Posts) - match screenshot
   - base color: #959595
   - hover: #b80000
   - size: 12px (fixed, all items)
   ========================================================= */
.ahanbox-breadcrumb {
    margin: 10px 0 14px;
}

.ahanbox-bc {
    list-style: none;
    padding: 0;
    margin: 0;
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    /* start from right in RTL */
    direction: rtl;

    font-size: 12px;
    /* fixed for all items */
    line-height: 1.6;
    color: #959595;
}

.ahanbox-bc__item {
    display: inline-flex;
    align-items: center;
}

.ahanbox-bc__item:not(:last-child)::after {
    content: "‹";
    display: inline-block;
    margin: 0 10px;
    color: #959595;
    font-size: 16px;
    line-height: 1;
    transform: translateY(-1px);
    opacity: .95;
    direction: ltr;
}

.ahanbox-bc__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: #959595;
    text-decoration: none;
    transition: color .15s ease, opacity .15s ease;
}

.ahanbox-bc__link:hover {
    color: #b80000;
    opacity: 1;
}

.ahanbox-bc__icon {
    display: inline-flex;
    align-items: center;
}

.ahanbox-bc__icon svg {
    display: block;
}

.ahanbox-bc__current {
font-weight: 400;
    font-size: 15px;
    color: #929498;
}
ol.ahanbox-bc a {
    font-size: 15px;
    font-weight: 400;
    color: #BBBDBF;
}
/* mobile: keep font-size = 12px, only reduce separator spacing */
@media (max-width: 480px) {
    .ahanbox-bc__item:not(:last-child)::after {
        margin: 0 8px;
    }
}
/* Keep breadcrumbs away from screen edges + align to site container */
.ahanbox-bc-wrap {
    max-width: var(--container-max-width, 1300px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
}
/* =========================================================
   Single Post Layout (Ahanbox)
   Sidebar Right + Main Center
   ========================================================= */
.ahanbox-single-container{
  max-width: var(--container-max-width, 1140px);
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.ahanbox-single-grid{
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 26px;
  align-items: start;
}

/* Sidebar */
.ahanbox-single-sidebar{
  position: sticky;
  top: 18px;
}

.ahanbox-sb-card{
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
  padding: 14px 14px;
  margin-bottom: 14px;
}

.ahanbox-sb-row{
  display: grid;
  grid-template-columns: 18px auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.ahanbox-sb-row:last-child{ border-bottom: 0; }

.ahanbox-sb-ico svg{
  width: 18px;
  height: 18px;
  display: block;
  opacity: .85;
}
.ahanbox-sb-label{
  color: #8a8a8a;
  font-size: 12px;
  white-space: nowrap;
}
.ahanbox-sb-val{
  color: #1f2937;
  font-size: 12px;
  font-weight: 600;
}

/* Tools */
.ahanbox-tools-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.ahanbox-tool-btn{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  border-radius: 12px;
  padding: 12px 10px;
  cursor: pointer;
  transition: .15s ease;
  font-family: inherit;
}

.ahanbox-tool-btn:hover{
  border-color: rgba(184,0,0,.35);
  color: #b80000;
}

.ahanbox-tool-ico svg{
  width: 18px;
  height: 18px;
}

.ahanbox-tool-txt{
  font-size: 12px;
  color: #334155;
}

.ahanbox-textsize{
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}
.ahanbox-textsize .ahanbox-tool-btn{
  padding: 10px 0;
  font-size: 16px;
  font-weight: 700;
}

/* Related */
.ahanbox-related-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ahanbox-related-title{
  font-size: 13px;
  font-weight: 800;
  color: #b80000;
}
.ahanbox-rel-btn{
  width: 34px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  cursor: pointer;
  line-height: 1;
}
.ahanbox-rel-btn:hover{
  border-color: rgba(184,0,0,.35);
  color: #b80000;
}

.ahanbox-related-list{
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.ahanbox-rel-item{
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}

.ahanbox-rel-link{
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  background: #fff;
}
.ahanbox-rel-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ahanbox-rel-noimg{
  display:block;
  width:100%;
  height:100%;
  background: rgba(0,0,0,.06);
}
.ahanbox-rel-info{
  padding: 10px 10px;
}
.ahanbox-rel-title2{
  font-size: 12px;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 6px;
  line-height: 1.6;
}
.ahanbox-rel-excerpt{
  font-size: 12px;
  color: #6b7280;
  line-height: 1.7;
}

/* Main */
.ahanbox-article-title{
  margin: 6px 0 14px;
  font-weight: 900;
}
.ahanbox-article-featured{
  border-radius: 18px;
  overflow: hidden;
  margin: 0 0 16px;
  background: rgba(0,0,0,.04);
}
.ahanbox-article-featured img{
  width: 100%;
  height: auto;
  display: block;
}

/* Responsive */
@media (max-width: 980px){
  .ahanbox-single-grid{
    grid-template-columns: 1fr;
  }
  .ahanbox-single-sidebar{
    position: static;
    order: 2;
  }
}
/* ===== Tools row like screenshot ===== */
.ahanbox-sb-tools{ padding: 14px 12px; }

.ahanbox-tools-row{
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
  align-items: center;
  gap: 0;
}

.ahanbox-tool-sep{
  width: 1px;
  height: 64px;
  background: rgba(0,0,0,.08);
  justify-self: center;
}

.ahanbox-tool-col{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;

  border: 0;
  background: transparent;
  padding: 8px 6px;
  cursor: pointer;

  font-family: inherit;
  color: #334155;
}

.ahanbox-tool-col svg{
  width: 34px;
  height: 34px;
  display: block;
}

.ahanbox-tool-title{
  font-size: 12px;
  color: #6b7280;
  line-height: 1.2;
}

.ahanbox-tool-col:hover .ahanbox-tool-title{
  color: #b80000;
}

/* Text size center column */
.ahanbox-tool-col--text{ cursor: default; }
.ahanbox-text-buttons{
  display: flex;
  gap: 10px;
}
.ahanbox-text-btn{
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.ahanbox-text-btn svg{
  width: 34px;
  height: 34px;
}
.ahanbox-text-btn:hover svg path,
.ahanbox-tool-col:hover svg path{
  stroke: #b80000;
}

/* ===== Related box vertical scroll ===== */
.ahanbox-related-list{
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
}

/* keep items vertical (already) */
.ahanbox-rel-link{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 10px;
}

/* thumb big like screenshot */
.ahanbox-rel-thumb{
  height: 150px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,.04);
}
.ahanbox-rel-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ahanbox-rel-info{ padding: 0; }
.ahanbox-rel-title2{
  font-size: 13px;
  font-weight: 900;
  margin: 6px 0 8px;
}
.ahanbox-rel-excerpt{ font-size: 12px; }
/* =========================================================
   Ahanbox Single Post UI - FINAL (Sidebar + Tools + Slider)
   ========================================================= */

/* --- container/grid --- */
.ahanbox-single-container {
    max-width: var(--container-max-width, 1140px);
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.ahanbox-single-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 26px;
    align-items: start;
}

/* --- sidebar cards --- */
.ahanbox-single-sidebar {
    position: sticky;
    top: 18px;
}

.ahanbox-sb-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .04);
    padding: 14px 14px;
    margin-bottom: 14px;
}

.ahanbox-sb-row {
    display: grid;
    grid-template-columns: 24px auto 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.ahanbox-sb-row:last-child {
    border-bottom: 0;
}

.ahanbox-sb-ico svg {
    width: 22px;
    height: 22px;
    display: block;
}

.ahanbox-sb-label {
    color: #8a8a8a;
    font-size: 12px;
    white-space: nowrap;
}

.ahanbox-sb-val {
    color: #1f2937;
    font-size: 12px;
    font-weight: 700;
}

/* --- main --- */
.ahanbox-article-title {
    margin: 6px 0 14px;
    font-weight: 900;
}

.ahanbox-article-featured {
    border-radius: 18px;
    overflow: hidden;
    margin: 0 0 16px;
    background: rgba(0, 0, 0, .04);
}

.ahanbox-article-featured img {
    width: 100%;
    height: auto;
    display: block;
}

/* =========================================================
   Tools row like screenshot (3 columns)
   ========================================================= */
.ahanbox-sb-tools {
    padding: 14px 12px;
}

.ahanbox-tools-row {
    display: grid;
    grid-template-columns: 1fr 1px 1fr 1px 1fr;
    align-items: center;
    gap: 0;
}

.ahanbox-tool-sep {
    width: 1px;
    height: 68px;
    background: rgba(0, 0, 0, .08);
    justify-self: center;
}

.ahanbox-tool-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: 0;
    background: transparent;
    padding: 8px 6px;
    cursor: pointer;

    font-family: inherit;
    color: #334155;
}

.ahanbox-tool-col svg {
    width: 36px;
    height: 36px;
    display: block;
}

.ahanbox-tool-title {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.2;
}

.ahanbox-tool-col:hover .ahanbox-tool-title {
    color: #b80000;
}

.ahanbox-tool-col:hover svg path {
    stroke: #b80000;
}

/* center column text-size buttons */
.ahanbox-tool-col--text {
    cursor: default;
}

.ahanbox-text-buttons {
    display: flex;
    gap: 10px;
}

.ahanbox-text-btn {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.ahanbox-text-btn svg {
    width: 36px;
    height: 36px;
}

.ahanbox-text-btn:hover svg path {
    stroke: #b80000;
}

/* =========================================================
   Related slider (HORIZONTAL) + nav buttons
   ========================================================= */
.ahanbox-related-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ahanbox-related-title {
    font-size: 13px;
    font-weight: 900;
    color: #b80000;
}

.ahanbox-related-nav {
    display: flex;
    gap: 8px;
}

/* grey left, red right like screenshot */
.ahanbox-rel-btn {
    width: 36px;
    height: 34px;
    border-radius: 8px;
    border: 0;
    cursor: pointer;
    line-height: 1;
    font-size: 18px;
}

.ahanbox-related-nav .ahanbox-rel-btn[data-ahanbox-rel="prev"] {
    background: #e5e7eb;
    color: #475569;
}

.ahanbox-related-nav .ahanbox-rel-btn[data-ahanbox-rel="next"] {
    background: #b80000;
    color: #fff;
}

/* horizontal list */
.ahanbox-related-list {
    display: flex;
    gap: 14px;

    overflow-x: auto;
    overflow-y: hidden;

    padding: 4px 2px 8px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.ahanbox-related-list::-webkit-scrollbar {
    height: 8px;
}

.ahanbox-related-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, .12);
    border-radius: 999px;
}

.ahanbox-rel-item {
    flex: 0 0 260px;
    scroll-snap-align: start;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 14px;
    overflow: hidden;
    margin: 0;
    background: #fff;
}

.ahanbox-rel-link {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    text-decoration: none;
    color: inherit;
}

.ahanbox-rel-thumb {
    height: 150px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(0, 0, 0, .04);
}

.ahanbox-rel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ahanbox-rel-title2 {
    font-size: 13px;
    font-weight: 900;
    margin: 6px 0 8px;
    line-height: 1.7;
    color: #1f2937;
}

.ahanbox-rel-excerpt {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.7;
}

/* --- responsive --- */
@media (max-width: 980px) {
    .ahanbox-single-grid {
        grid-template-columns: 1fr;
    }

    .ahanbox-single-sidebar {
        position: static;
        order: 2;
    }
}
#ahanboxArticleContent {
    font-size: 16px;
    /* default */
    line-height: 1.95;
}

/* force descendants to follow parent size (Elementor/Theme overrides fix) */
#ahanboxArticleContent p,
#ahanboxArticleContent li,
#ahanboxArticleContent blockquote,
#ahanboxArticleContent table,
#ahanboxArticleContent td,
#ahanboxArticleContent th {
    font-size: inherit !important;
    line-height: inherit;
}
/* make related card relative so arrows can sit on slider sides */
.ahanbox-sb-related {
    position: relative;
}

/* put nav buttons over the slider (left/right of the slider area) */
.ahanbox-related-nav {
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    transform: translateY(-50%);
    display: block;
    pointer-events: none;
    z-index: 5;
}

.ahanbox-related-nav .ahanbox-rel-btn {
    pointer-events: auto;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

/* RTL: prev on right, next on left (مثل عکس شما) */
.ahanbox-related-nav .ahanbox-rel-btn[data-ahanbox-rel="prev"] {
    right: 0;
}

.ahanbox-related-nav .ahanbox-rel-btn[data-ahanbox-rel="next"] {
    left: 0;
}
/* =========================================================
   Responsive Fix Pack (Blog/Archive + Content overflow)
   جلوگیری از بیرون‌زدن متن/عکس/کارت از صفحه
   ========================================================= */

/* 1) global box sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* 2) prevent horizontal scroll caused by long elements */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* 3) long text/urls should wrap */
a,
p,
li,
span,
div {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* 4) all media should stay inside container */
img,
video,
iframe,
embed,
object,
svg {
    max-width: 100% !important;
    height: auto;
}

/* 5) grids/flex children must be allowed to shrink (VERY important) */
.ahanbox-single-grid>*,
.elementor-section .elementor-container>*,
.elementor-row>*,
.site-main>*,
.page-content>*,
.entry-content>* {
    min-width: 0;
}

/* 6) make Elementor sections safe on small screens */
@media (max-width: 980px) {

    .elementor-section,
    .elementor-container,
    .elementor-column,
    .elementor-widget-container {
        max-width: 100%;
    }

    /* give page some padding (so content doesn't touch edges) */
    .site-main,
    .page-content,
    .entry-content {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* 7) tables are the #1 reason for overflow */
table {
    max-width: 100%;
}

@media (max-width: 980px) {
    table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

/* 8) archive/blog cards (Hello Elementor default) */
.archive .site-main,
.blog .site-main {
    max-width: var(--container-max-width, 1140px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}
/* Single post H1 responsive: desktop=28px, mobile smaller */
h1.ahanbox-article-title {
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1.35;
}
button.sew-nav.sew-prev,
button.sew-nav.sew-next {
    background-color: #ca3232;
    border: 1px solid #c36;
    border-radius: 3px;
    color: #ffffff;
    display: inline-block;
    font-size: 1rem;
        direction: ltr;
    font-weight: 800;
}