/* Link contrast + underline */
:root{ --link-color:#0b57d0; --link-hover:#084bbb; --link-visited:#003f99; }
.entry-content a,
.page .entry-content a,
.archive .entry-content a,
.woocommerce ul.products li.product a:not(.button),
.widget a,
.footer a { color:var(--link-color); text-decoration:none;
  background-image:linear-gradient(currentColor,currentColor);
  background-size:100% 2px; background-position:0 100%; background-repeat:no-repeat;
  padding-bottom:2px; transition:background-size .15s ease, color .15s ease; }
.entry-content a:hover,
.page .entry-content a:hover,
.archive .entry-content a:hover,
.woocommerce ul.products li.product a:not(.button):hover,
.widget a:hover,
.footer a:hover { color:var(--link-hover); background-size:100% 3px; outline:none; }
.entry-content a:visited,
.page .entry-content a:visited,
.archive .entry-content a:visited,
.woocommerce ul.products li.product a:visited:not(.button),
.widget a:visited,
.footer a:visited { color:var(--link-visited); }
.entry-content a:focus-visible{ box-shadow:0 0 0 3px rgba(11,87,208,.25); border-radius:3px; }

/* Placeholders and aspect-ratio to avoid white frames */
.entry-content img { background:#f1f3f4; height:auto; }
.entry-content img[width][height] { aspect-ratio: attr(width number) / attr(height number); object-fit: cover; }
/* attr() for aspect-ratio not supported in all browsers, inline style will be injected when possible by PHP */

/* FOIT guard safety */
html.foit-guard body, html:not(.fonts-ready) body { font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Noto Sans","Liberation Sans",sans-serif !important; visibility: visible !important; opacity: 1 !important; }
html.wf-loading body, html.fonts-loading body, .wf-loading .site, .fonts-loading .site, html:not(.fonts-ready) .site { visibility: visible !important; opacity: 1 !important; }






/* === PATCH v2: Keep background-image on thumbnail anchors; only adjust underline + sizing === */
.post-components a.post-thumb,
.post-components a[class*="post-thumb"],
.post-components a[style*="background-image"],
.prev-next-post-nav a,
.td-module-thumb a,
.tie-col-xs-6 a {
  /* Do NOT touch background/background-image here. */
  text-decoration: none !important;
  background-color: transparent !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}
/* underline فقط برای لینک‌های متنی */
.post-components a:not(.post-thumb):not([style*="background-image"]):not(.td-module-thumb):not(.tie-media-icon):not(.thumb):not(.has-bg) {
  text-decoration: underline;
}
/* === END PATCH v2 === */

