/* ==========================================================================
   blog-article.css — blog single + archive overrides (2026-11-16)
   Loaded after style.css / uikit / dg-editor-content.css on blog pages only.
   ========================================================================== */

/* ---------- Banner: "وبلاگ" is decorative text, not a heading ---------- */
.blogs .headers .blogs-page-kicker {
    font-weight: 900;
    font-size: 35px;
    line-height: 1.4;
    margin: 0 0 5px;
    color: var(--elpr-dark);
}
.blogs .headers .blogs-breadcrumb,
.blogs .headers .blogs-breadcrumb span,
.blogs .headers .blogs-breadcrumb a {
    font-size: 15px;
}
.blogs .headers .blogs-breadcrumb a {
    color: inherit;
}
.blogs .headers .blogs-breadcrumb a:hover {
    color: var(--base-green-color);
}

/* ---------- Category badge (the only green box on the page) ---------- */
.singleBlog .blog-category-badge {
    display: inline-block;
    font-size: 15px;
    line-height: 1.6;
    padding: 6px 35px;
    background: #73a72740;
    border: 1px solid var(--base-green-color);
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 12px;
    color: inherit;
    text-decoration: none;
}
.singleBlog a.blog-category-badge:hover {
    color: var(--base-green-color);
}

/* ---------- Super-admin edit shortcut (same idea as product page) ---------- */
.blog-admin-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #212529;
    background: #f3f4f6;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.blog-admin-edit i {
    font-size: 18px;
    line-height: 1;
}
.blog-admin-edit:hover {
    color: #fff;
    background: #212529;
    transform: translateY(-1px);
}

/* ---------- Sidebar category links ---------- */
.blogs .categories a.itemCategory {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.blogs .categories a.itemCategory:hover,
.blogs .categories a.itemCategory.is-active {
    color: var(--base-green-color);
}
.blogs .blogsCardList .image a.cp {
    text-decoration: none;
    color: inherit;
}
.blogs .blogsCardList .image a.cp:hover {
    color: var(--base-green-color);
}

/* ---------- Post title: the single H1 ---------- */
.singleBlog h1.blog-title {
    margin: 14px 0 12px;
    font-size: 1.75rem;          /* 28px */
    font-weight: 900;
    line-height: 1.6;
    color: var(--elpr-dark);
}

/* ---------- Neutralise the old global ".singleBlog h3" green badge ---------- */
.singleBlog h3 {
    font-size: inherit;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    font-weight: inherit;
    margin-bottom: 0;
}

/* ---------- Article body typography (h2 > h3 > h4, all below the H1) ---------- */
.singleBlog .content h2 {
    margin: 1.8em 0 0.6em;
    font-size: 1.4rem;           /* was 2rem (32px, from uikit) -> 22.4px */
    font-weight: 800;
    line-height: 1.7;
    color: var(--elpr-dark);
    background: none;
    border: 0;
    padding: 0;
}
.singleBlog .content h3 {
    margin: 1.5em 0 0.5em;
    font-size: 1.2rem;           /* 19.2px */
    font-weight: 700;
    line-height: 1.7;
    color: var(--elpr-dark);
    background: none;
    border: 0;
    border-radius: 0;
    padding: 0;
}
.singleBlog .content h4 {
    margin: 1.3em 0 0.4em;
    font-size: 1.05rem;          /* 16.8px */
    font-weight: 700;
    line-height: 1.7;
    color: var(--elpr-dark);
    background: none;
    border: 0;
    padding: 0;
}
.singleBlog .content h5,
.singleBlog .content h6 {
    margin: 1.2em 0 0.4em;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.7;
}
.singleBlog .content h2:empty,
.singleBlog .content h3:empty,
.singleBlog .content h4:empty {
    display: none;
}

@media (max-width: 767.98px) {
    .blogs .headers .blogs-page-kicker { font-size: 28px; }
    .singleBlog h1.blog-title { font-size: 1.4rem; }
    .singleBlog .content h2 { font-size: 1.2rem; }
    .singleBlog .content h3 { font-size: 1.08rem; }
    .singleBlog .content h4 { font-size: 1rem; }
}

/* ---------- Paragraphs: justified, last line stays right (RTL) ---------- */
.singleBlog .content p {
    text-align: justify !important;
    text-align-last: right !important;
    text-justify: inter-word;
}

/* ---------- Images: always centred, never wider than the column ---------- */
.singleBlog .content img {
    max-width: 100%;
    height: auto;
}

/* CKEditor block image: <figure class="image"> (+ optional figcaption) */
.singleBlog .content figure.image {
    display: table;
    float: none;
    clear: both;
    margin: 1.2em auto;
    max-width: 100%;
    border: 0;
    background: none;
    text-align: center;
}
.singleBlog .content figure.image img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 6px;
}
/* resized block image: width lives on the <figure style="width:..."> */
.singleBlog .content figure.image.image_resized {
    display: block;
    max-width: 100%;
    box-sizing: border-box;
}
.singleBlog .content figure.image.image_resized img {
    width: 100%;
}
/* explicit alignment classes from the editor */
.singleBlog .content figure.image.image-style-align-center,
.singleBlog .content figure.image.image-style-block-align-center,
.singleBlog .content figure.image[data-dg-align="center"] {
    margin-left: auto;
    margin-right: auto;
    float: none;
}
.singleBlog .content figure.image.image-style-side {
    float: none;
    margin-left: auto;
    margin-right: auto;
}

/* Caption: small, close to the image, centred */
.singleBlog .content figure.image > figcaption {
    display: table-caption;
    caption-side: bottom;
    margin: 4px 0 0;
    padding: 0 4px;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    color: #6c757d;
    background: none;
    outline: 0;
}
.singleBlog .content figure.image.image_resized > figcaption {
    display: block;
}

/* Inline images (side-by-side rows): <p style="text-align:center"><img class="image_resized" style="width:300px"> ... */
.singleBlog .content p:has(> img) {
    text-align: center !important;
    text-align-last: center !important;
    margin-bottom: 4px;
}
.singleBlog .content p > img,
.singleBlog .content p > a > img,
.singleBlog .content img.image-inline {
    display: inline-block;
    vertical-align: top;
    max-width: 100%;
    height: auto;
    margin: 4px;
    border-radius: 6px;
}
.singleBlog .content p[style*="text-align:center"],
.singleBlog .content p[style*="text-align: center"] {
    text-align: center !important;
    text-align-last: center !important;
}
/* Keep the article column from growing past the Bootstrap grid when images are large */
.singleBlog,
.singleBlog .content {
    min-width: 0;
    max-width: 100%;
}

/* Side-by-side rows fill only the article column (same width as a single image), not the viewport.
   min-width: 0 stops large intrinsic image sizes from blowing out the column. */
.singleBlog .content p:has(> img + img) {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
}
.singleBlog .content p:has(> img + img) > img,
.singleBlog .content p:has(> img + img) > a {
    flex: 1 1 0;
    min-width: 0;
    width: calc((100% - 8px) / 2) !important;
    max-width: calc((100% - 8px) / 2);
    height: auto !important;
    margin: 0;
    box-sizing: border-box;
}
.singleBlog .content p:has(> img + img + img) > img,
.singleBlog .content p:has(> img + img + img) > a {
    width: calc((100% - 16px) / 3) !important;
    max-width: calc((100% - 16px) / 3);
}
.singleBlog .content p:has(> img + img) > a > img {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    margin: 0;
}

/* Small caption paragraph under an image row (CKEditor "Tiny" font) */
.singleBlog .content .text-tiny {
    font-size: 13px;
    line-height: 1.6;
    color: #6c757d;
}
.singleBlog .content p:has(> .text-tiny:only-child) {
    text-align: center !important;
    text-align-last: center !important;
    margin-top: 0;
    margin-bottom: 1.2em;
}
.singleBlog .content .text-small { font-size: .85em; }
.singleBlog .content .text-big   { font-size: 1.4em; }
.singleBlog .content .text-huge  { font-size: 1.8em; }

/* Editor column grids are already styled globally in dg-editor-content.css;
   make the images inside them fill their column. */
.singleBlog .content .dg-columns img {
    max-width: 100%;
    height: auto;
}

/* Tables / long words must not break the layout on mobile */
.singleBlog .content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}
.singleBlog .content {
    overflow-wrap: anywhere;
}

/* Featured image */
.singleBlog .imageHeader img {
    height: auto;
}

/* ---------- Blog archive (/blog) ---------- */
/* banner title became <h1 class="fa"> (was h3): keep the exact same look */
.blogs .home-title h1.fa {
    font-size: 16px;
    font-weight: 900;
    line-height: 1.4;
}
.blogs .blogsCardList .blog-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.7;
    margin: 0 0 8px;
}
.blogs .blogsCardList .blog-card-title a {
    color: var(--elpr-dark);
}
.blogs .blogsCardList .blog-card-title a:hover {
    color: var(--base-green-color);
}
.blogs .blogsCardList .image img {
    height: auto;
}
