/* =========================================
   1. VARIABLES & IMPORTS
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,700;1,400;1,700&family=Vazirmatn:wght@100..900&display=swap');

img {
  max-width: 100%;
  height: auto;
}

:root {
  --font-stack: Ubuntu,'Poppins', 'Vazirmatn', ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Core Colors */
  --text-color: #2d2d2d;
  --text-muted: #666666;
  --accent-color: #e03e2d;
  --accent-hover: #b71c1c;
  --secondary-color: #2c3e50;
  --background-color: #ffffff;
  --surface-color: #f9f9f9;

  /* Card & Border */
  --border-color: #dde3ea;
  --border-radius: 8px;
  --card-shadow: 0px 3px 10px rgba(0, 0, 0, 0.07);

  /* Blockquote — cleaner left-border style (from article CSS) */
  --blockquote-bg: #fafafa;
  --blockquote-border: #dde3ea;
  --blockquote-text: #444444;

  /* Typography Scale */
  --font-size-base: 18px;
  --line-height-base: 1.75;
  --line-height-heading: 1.25;

  /* List rule color (from article CSS) */
  --list-rule: #c8b89a;
}


/* =========================================
   2. GLOBAL BODY STYLES
   ========================================= */
body {
    font-family: var(--font-stack) !important;
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   3. HEADINGS (H1 - H6)
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-stack) !important;
    font-weight: 700;
    line-height: var(--line-height-heading);
    color: var(--secondary-color);
    margin-top: 1.2em;
    margin-bottom: 0.4em;
}

h1 {
    font-size: 2.4rem;
    color: var(--accent-color);
}

/* Softer bottom border on h2, inspired by article CSS */
h2 {
    font-size: 1.9rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.2em;
}

h3 {
    font-size: 1.6rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.15em;
}

h4 { font-size: 1.35rem; }
h5 { font-size: 1.15rem; }
h6 {
    font-size: 1.0rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================
   4. PARAGRAPH & BODY TEXT
   ========================================= */
p {
    margin-top: 0;
    margin-bottom: 1.1em;
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
}

/* Lead paragraph — enhanced from article CSS */
p.lead {
    font-size: 1.15em;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.8;
    border-left: 4px solid var(--accent-color);
    padding: 16px 20px;
    background: #fdf7f6;
    margin-bottom: 32px;
}

/* =========================================
   5. LINKS
   ========================================= */
a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--accent-hover);
}

a:visited {
    color: #8e3028;
}

a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* =========================================
   6. BLOCKQUOTE
   ========================================= */
/* Cleaner left-border style from article CSS — removed decorative ::before quote mark */
blockquote {
    font-family: var(--font-stack) !important;
    font-size: 1.0em;
    line-height: 1.8;
    color: var(--blockquote-text);
    padding: 20px 24px;
    margin: 24px 0;
    background: var(--blockquote-bg);
    border: 1px solid var(--blockquote-border);
    border-left: 4px solid var(--accent-color);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

blockquote p {
    margin-bottom: 0.6em;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* =========================================
   7. LISTS
   ========================================= */
ul, ol {
    padding-left: 0;
    margin-bottom: 1.1em;
    line-height: var(--line-height-base);
    list-style: none;
}

ol {
    padding-left: 1.5em;
    list-style-type: decimal;
}

ol li::marker {
    color: var(--accent-color);
}

/* Diamond marker + dotted rule from article CSS */
ul li {
    padding: 8px 0 8px 32px;
    position: relative;
    border-bottom: 1px dotted var(--list-rule);
}

ul li:last-child {
    border-bottom: none;
}

ul li::before {
    content: '◆';
    position: absolute;
    left: 4px;
    color: var(--accent-color);
    font-size: 10px;
    top: 13px;
}

ol li {
    margin-bottom: 0.5em;
    padding: 4px 0;
}

/* =========================================
   8. HORIZONTAL RULE
   ========================================= */
hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 2em 0;
}

/* =========================================
   9. TABLES
   ========================================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    font-size: 0.95em;
}

th {
    background-color: var(--accent-color);
    color: #ffffff;
    font-weight: 700;
    text-align: left;
    padding: 10px 14px;
}

td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

tr:nth-child(even) td {
    background-color: var(--surface-color);
}

tr:hover td {
    background-color: #fff4f3;
}

/* =========================================
   10. INLINE CODE & CODE BLOCKS
   ========================================= */
code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.88em;
    background-color: #f3f3f3;
    color: #c0392b;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.88em;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    overflow-x: auto;
    line-height: 1.6;
    margin-bottom: 1.5em;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

/* =========================================
   11. IMAGES
   ========================================= */
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    display: block;
}

img.img-border {
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

/* =========================================
   12. STRONG & EMPHASIS
   ========================================= */
strong, b {
    font-weight: 700;
    color: var(--secondary-color);
}

em, i {
    font-style: italic;
    color: inherit;
}

/* =========================================
   13. SELECTION HIGHLIGHT
   ========================================= */
::selection {
    background-color: #fddcda;
    color: var(--accent-color);
}

/* =========================================
   14. SCROLLBAR (webkit browsers)
   ========================================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* =========================================
   15. RESPONSIVE ADJUSTMENTS
   ========================================= */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.4rem; }
    h4 { font-size: 1.2rem; }

    blockquote {
        padding: 16px 20px;
    }

    table {
        font-size: 0.88em;
    }
}
/* =========================================
   16. SIDEBAR MODULE LISTS FIX
   ========================================= */
.moduletable ul li,
.sidebar-right ul li,
.sidebar-left ul li {
    padding: 8px 0 8px 32px !important;
    position: relative;
    border-bottom: 1px dotted var(--list-rule);
}

.moduletable ul li:last-child,
.sidebar-right ul li:last-child,
.sidebar-left ul li:last-child {
    border-bottom: none;
}

.moduletable ul li::before,
.sidebar-right ul li::before,
.sidebar-left ul li::before {
    content: '◆';
    position: absolute;
    left: 4px;
    color: var(--accent-color);
    font-size: 10px;
    top: 13px;
}
/* =========================================
   17. MODULES LOADED INSIDE ARTICLES FIX
   ========================================= */
.item-page .loadmodule ul li,
.item-page > div ul li,
.com-content-article__body ul li {
    padding: 8px 0 8px 32px !important;
    position: relative;
    border-bottom: 1px dotted var(--list-rule);
}

.item-page .loadmodule ul li:last-child,
.item-page > div ul li:last-child,
.com-content-article__body ul li:last-child {
    border-bottom: none;
}

.item-page .loadmodule ul li::before,
.item-page > div ul li::before,
.com-content-article__body ul li::before {
    content: '◆';
    position: absolute;
    left: 4px;
    color: var(--accent-color);
    font-size: 10px;
    top: 13px;
}