/*
Theme Name: Daftarche – Hello Elementor Child
Theme URI: https://notes.thebestbooks.ir/
Description: Lightweight child theme for Hello Elementor. Adds clean Persian typography to Gutenberg and post content, reuses the IranSansX custom font registered in Elementor when available, and converts pagination digits to Persian, and adds a restricted Daftarche demo-writer role.
Author: Daftarche
Template: hello-elementor
Version: 1.2.0
Text Domain: daftarche-hello-child
*/

:root {
  --daftarche-font: "IranSansX", "IRANSansX", Tahoma, Arial, sans-serif;
  --daftarche-text: #111;
  --daftarche-muted: #6b7280;
  --daftarche-border: #d7d7d7;
  --daftarche-link: #4b22b5;
}

/* Gutenberg-generated content on the front end.
   Kept intentionally scoped so Elementor layout/widgets are not restyled. */
body:not(.elementor-page) .entry-content,
.elementor-widget-theme-post-content .elementor-widget-container,
.elementor-widget-text-editor .wp-block-post-content {
  font-family: var(--daftarche-font);
  color: var(--daftarche-text);
  font-size: 17px;
  line-height: 2;
}

body:not(.elementor-page) .entry-content h1,
body:not(.elementor-page) .entry-content h2,
body:not(.elementor-page) .entry-content h3,
body:not(.elementor-page) .entry-content h4,
body:not(.elementor-page) .entry-content h5,
body:not(.elementor-page) .entry-content h6,
.elementor-widget-theme-post-content h1,
.elementor-widget-theme-post-content h2,
.elementor-widget-theme-post-content h3,
.elementor-widget-theme-post-content h4,
.elementor-widget-theme-post-content h5,
.elementor-widget-theme-post-content h6 {
  font-family: var(--daftarche-font);
  color: #050505;
  margin-top: 1.65em;
  margin-bottom: .65em;
  line-height: 1.65;
  font-weight: 800;
}

body:not(.elementor-page) .entry-content h1,
.elementor-widget-theme-post-content h1 { font-size: clamp(34px, 3.6vw, 44px); font-weight: 900; }
body:not(.elementor-page) .entry-content h2,
.elementor-widget-theme-post-content h2 { font-size: clamp(28px, 2.9vw, 34px); font-weight: 850; }
body:not(.elementor-page) .entry-content h3,
.elementor-widget-theme-post-content h3 { font-size: clamp(21px, 2vw, 26px); font-weight: 800; }
body:not(.elementor-page) .entry-content h4,
.elementor-widget-theme-post-content h4 { font-size: 20px; }

body:not(.elementor-page) .entry-content p,
body:not(.elementor-page) .entry-content li,
.elementor-widget-theme-post-content p,
.elementor-widget-theme-post-content li {
  font-family: var(--daftarche-font);
}

body:not(.elementor-page) .entry-content ul,
body:not(.elementor-page) .entry-content ol,
.elementor-widget-theme-post-content ul,
.elementor-widget-theme-post-content ol {
  padding-inline-start: 1.4em;
  margin-block: .8em 1.25em;
}

body:not(.elementor-page) .entry-content li,
.elementor-widget-theme-post-content li { margin-block: .2em; }

body:not(.elementor-page) .entry-content a,
.elementor-widget-theme-post-content a {
  color: var(--daftarche-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

body:not(.elementor-page) .entry-content hr,
.elementor-widget-theme-post-content hr {
  border: 0;
  border-top: 1px solid #777;
  margin: 2.1em 0;
}

body:not(.elementor-page) .entry-content blockquote,
.elementor-widget-theme-post-content blockquote {
  border: 0;
  border-right: 4px solid var(--daftarche-border);
  margin: 1.5em 0;
  padding: .5em 1.1em .5em 0;
  color: #333;
}

body:not(.elementor-page) .entry-content img,
.elementor-widget-theme-post-content img {
  max-width: 100%;
  height: auto;
}

body:not(.elementor-page) .entry-content figcaption,
.elementor-widget-theme-post-content figcaption {
  font-family: var(--daftarche-font);
  color: var(--daftarche-muted);
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
}

body:not(.elementor-page) .entry-content table,
.elementor-widget-theme-post-content table {
  font-family: var(--daftarche-font);
  border-collapse: collapse;
  width: 100%;
}

body:not(.elementor-page) .entry-content th,
body:not(.elementor-page) .entry-content td,
.elementor-widget-theme-post-content th,
.elementor-widget-theme-post-content td {
  border: 1px solid var(--daftarche-border);
  padding: .7em .85em;
}
