/* =========================================
   BLOG CONTENT
========================================= */


.blog-details {
    width: 100%;
    max-width: 100%;
    color: #334155;
    font-family: "Poppins", sans-serif;
}

/* =========================================
   BLOG TITLE
========================================= */

.blog-details > h1 {
    margin: 0 0 14px;
    padding: 0;
    color: #172554;
    font-size: 38px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* =========================================
   PUBLISHED INFO
========================================= */

.blog-details .blog-published {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.blog-details .blog-published .published {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 14px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.blog-details .blog-published strong {
    color: #1f3c88;
    font-weight: 600;
}

/* =========================================
   BLOG IMAGE
========================================= */

.blog-details .blog-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    margin: 0 0 30px;
    padding: 0 !important;
    object-fit: cover;
    border-radius: 16px;
    background: #f1f5f9;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.10);
}

/* =========================================
   IMAGE HOVER
========================================= */

.blog-details .blog-image {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.blog-details .blog-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

/* =========================================
   BLOG CONTENT TOP SPACING
========================================= */

.blog-details .blog-content {
    width: 100%;
    max-width: 100%;
}

/* =========================================
   BLOG CONTENT FIRST PARAGRAPH
========================================= */

.blog-details .blog-content > p:first-child {
    font-size: 17px;
    line-height: 1.9;
}

/* =========================================
   BLOG CONTENT HEADING
========================================= */

.blog-details .blog-content h2:first-child {
    margin-top: 25px;
}

/* =========================================
   RESPONSIVE - TABLET
========================================= */

@media (max-width: 991px) {

    .blog-details > h1 {
        font-size: 32px;
        line-height: 1.3;
    }

    .blog-details .blog-image {
        margin-bottom: 25px;
        border-radius: 14px;
    }
}

/* =========================================
   RESPONSIVE - MOBILE
========================================= */

@media (max-width: 767px) {

    .blog-details > h1 {
        margin-bottom: 12px;
        font-size: 27px;
        line-height: 1.3;
        letter-spacing: -0.2px;
    }

    .blog-details .blog-published {
        margin-bottom: 16px;
    }

    .blog-details .blog-published .published {
        padding: 7px 11px;
        font-size: 12px;
    }

    .blog-details .blog-image {
        margin-bottom: 22px;
        border-radius: 11px;
        box-shadow: 0 8px 25px rgba(15, 23, 42, 0.09);
    }

    .blog-details .blog-content > p:first-child {
        font-size: 15px;
        line-height: 1.8;
    }
}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    .blog-details > h1 {
        font-size: 23px;
        line-height: 1.35;
    }

    .blog-details .blog-published .published {
        width: 100%;
        font-size: 11.5px;
    }

    .blog-details .blog-image {
        border-radius: 9px;
    }
}

.blog-content {
    --blog-primary: #1f3c88;
    --blog-secondary: #2a6f97;
    --blog-accent: #3fbac2;
    --blog-heading: #172554;
    --blog-text: #334155;
    --blog-muted: #64748b;
    --blog-border: #e2e8f0;
    --blog-light: #f8fafc;

    color: var(--blog-text);
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    line-height: 1.8;
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
}

/* =========================================
   DYNAMIC BR TAG HANDLING
========================================= */

.blog-content br {
    display: none;
}

/* Keep line breaks inside special elements if needed */
.blog-content pre br {
    display: block;
}

/* =========================================
   PARAGRAPHS
========================================= */

.blog-content p {
    margin: 0 0 18px;
    padding: 0;
    color: var(--blog-text);
    font-size: 16px;
    line-height: 1.85;
}

.blog-content p:last-child {
    margin-bottom: 0;
}

/* Remove empty paragraphs */
.blog-content p:empty {
    display: none;
}

/* =========================================
   HEADINGS
========================================= */

.blog-content h2 {
    position: relative;
    margin: 42px 0 20px;
    padding: 0 0 12px 18px;
    color: var(--blog-heading);
    font-size: 30px;
    line-height: 1.35;
    font-weight: 700;
    border-bottom: 1px solid var(--blog-border);
}

.blog-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 5px;
    height: calc(100% - 15px);
    border-radius: 10px;
    background: linear-gradient(
        135deg,
        var(--blog-primary),
        var(--blog-secondary),
        var(--blog-accent)
    );
}

.blog-content h3 {
    position: relative;
    margin: 32px 0 15px;
    padding-left: 15px;
    color: var(--blog-heading);
    font-size: 24px;
    line-height: 1.4;
    font-weight: 700;
}

.blog-content h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 4px;
    height: 24px;
    border-radius: 5px;
    background: var(--blog-accent);
}

.blog-content h4 {
    margin: 26px 0 12px;
    color: var(--blog-secondary);
    font-size: 20px;
    line-height: 1.45;
    font-weight: 700;
}

.blog-content h5,
.blog-content h6 {
    margin: 22px 0 10px;
    color: var(--blog-heading);
    font-weight: 700;
}

/* =========================================
   LINKS
========================================= */

.blog-content a {
    color: var(--blog-primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed var(--blog-primary);
    transition: 0.25s ease;
}

.blog-content a:hover {
    color: var(--blog-secondary);
    border-bottom-style: solid;
}



/* =========================================
   LIST
========================================= */

.blog-content ul {
    margin: 22px 0 25px;
    padding: 0;
    list-style: none;
}

.blog-content ul li {
    position: relative;
    margin: 0 0 11px;
    padding: 13px 16px 13px 46px;
    color: var(--blog-text);
    line-height: 1.7;
    background: var(--blog-light);
    border: 1px solid #edf2f7;
    border-radius: 10px;
    transition: all 0.25s ease;
}

.blog-content ul li::before {
    content: "\f00c";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 23px;
    height: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    color: #fff;
    font-family: "Font Awesome 6 Free";
    font-size: 10px;
    font-weight: 900;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--blog-primary),
        var(--blog-accent)
    );
}

.blog-content ul li:hover {
    transform: translateX(3px);
    border-color: #dbeafe;
    box-shadow: 0 7px 20px rgba(31, 60, 136, 0.07);
}

/* =========================================
   LIST PARAGRAPH
========================================= */

.blog-content li p {
    margin: 0;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
}

/* =========================================
   ORDERED LIST
========================================= */

.blog-content ol {
    counter-reset: blog-counter;
    margin: 22px 0 25px;
    padding: 0;
    list-style: none;
}

.blog-content ol li {
    position: relative;
    counter-increment: blog-counter;
    margin-bottom: 12px;
    padding: 13px 16px 13px 55px;
    background: var(--blog-light);
    border: 1px solid var(--blog-border);
    border-radius: 10px;
}

.blog-content ol li::before {
    content: counter(blog-counter);
    position: absolute;
    left: 14px;
    top: 50%;
    width: 29px;
    height: 29px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--blog-primary),
        var(--blog-secondary)
    );
}

.blog-content ol li p {
    margin: 0;
}

/* =========================================
   TABLE WRAPPER
========================================= */

.blog-content > div[align="left"],
.blog-content > div[align="center"] {
    width: 100%;
    max-width: 100%;
    margin: 28px 0;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* =========================================
   TABLE
========================================= */

.blog-content table {
    width: 100% !important;
    min-width: 650px;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid var(--blog-border) !important;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
}

/* =========================================
   TABLE CELL
========================================= */

.blog-content table td,
.blog-content table th {
    padding: 14px 18px !important;
    vertical-align: middle;
    color: var(--blog-text);
    font-size: 14px;
    line-height: 1.6;
    border: 0 !important;
    border-bottom: 1px solid var(--blog-border) !important;
}

/* =========================================
   TABLE HEADER
========================================= */

.blog-content table tr:first-child td,
.blog-content table tr:first-child th {
    padding: 16px 18px !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(
        135deg,
        var(--blog-primary),
        var(--blog-secondary)
    ) !important;
    border-bottom: none !important;
}

/* Header paragraph */
.blog-content table tr:first-child td p,
.blog-content table tr:first-child th p {
    margin: 0 !important;
    padding: 0 !important;
    color: #fff !important;
    font-size: inherit;
    font-weight: 700;
}

/* =========================================
   TABLE BODY
========================================= */

.blog-content table tbody tr:not(:first-child):nth-child(even) {
    background: #f8fafc;
}

.blog-content table tbody tr:not(:first-child):hover {
    background: #eef7ff;
}

/* Body paragraphs */
.blog-content table td p,
.blog-content table th p {
    margin: 0 !important;
    padding: 0 !important;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Last row */
.blog-content table tr:last-child td,
.blog-content table tr:last-child th {
    border-bottom: none !important;
}

/* =========================================
   TABLE LINKS
========================================= */

.blog-content table a {
    color: var(--blog-primary);
    font-weight: 600;
    border-bottom: 1px dashed var(--blog-primary);
}

.blog-content table a:hover {
    color: var(--blog-secondary);
}

/* =========================================
   TABLE EMPTY ROW
========================================= */

.blog-content table tr td:empty {
    min-height: 10px;
}

/* =========================================
   BLOCKQUOTE
========================================= */

.blog-content blockquote {
    position: relative;
    margin: 28px 0;
    padding: 20px 24px 20px 55px;
    color: #475569;
    font-size: 17px;
    line-height: 1.8;
    font-style: italic;
    background: #f0f7ff;
    border-left: 5px solid var(--blog-primary);
    border-radius: 0 12px 12px 0;
}

.blog-content blockquote::before {
    content: "\f10d";
    position: absolute;
    left: 17px;
    top: 18px;
    color: var(--blog-accent);
    font-family: "Font Awesome 6 Free";
    font-size: 21px;
    font-weight: 900;
}

/* =========================================
   IMAGES
========================================= */

.blog-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 28px auto;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}

/* =========================================
   HR
========================================= */

.blog-content hr {
    margin: 32px 0;
    border: 0;
    border-top: 1px solid var(--blog-border);
}

/* =========================================
   CODE
========================================= */

.blog-content code {
    padding: 3px 7px;
    color: #be185d;
    font-size: 14px;
    background: #fdf2f8;
    border-radius: 5px;
}

.blog-content pre {
    margin: 25px 0;
    padding: 20px;
    overflow-x: auto;
    color: #e2e8f0;
    background: #0f172a;
    border-radius: 12px;
}

/* =========================================
   MOBILE TABLE
========================================= */

@media (max-width: 767px) {

    .blog-content {
        font-size: 15px;
        line-height: 1.75;
    }

    .blog-content p {
        font-size: 15px;
        line-height: 1.8;
        margin-bottom: 16px;
    }

    .blog-content h2 {
        margin: 32px 0 17px;
        padding: 0 0 10px 14px;
        font-size: 24px;
    }

    .blog-content h2::before {
        width: 4px;
    }

    .blog-content h3 {
        margin: 27px 0 14px;
        padding-left: 13px;
        font-size: 21px;
    }

    .blog-content h4 {
        margin: 22px 0 10px;
        font-size: 18px;
    }

    .blog-content ul li {
        padding: 11px 12px 11px 40px;
        font-size: 14px;
    }

    .blog-content ul li::before {
        left: 10px;
        width: 21px;
        height: 21px;
    }

    .blog-content ol li {
        padding: 11px 12px 11px 48px;
        font-size: 14px;
    }

    .blog-content table {
        min-width: 620px;
    }

    .blog-content table td,
    .blog-content table th {
        padding: 12px 14px !important;
        font-size: 13px;
    }

    .blog-content table tr:first-child td,
    .blog-content table tr:first-child th {
        padding: 14px !important;
        font-size: 13px;
    }

    .blog-content blockquote {
        padding: 17px 18px 17px 47px;
        font-size: 15px;
    }

    .blog-content img {
        margin: 22px auto;
        border-radius: 10px;
    }
}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    .blog-content h2 {
        font-size: 21px;
    }

    .blog-content h3 {
        font-size: 19px;
    }

    .blog-content h4 {
        font-size: 17px;
    }

    .blog-content ul li,
    .blog-content ol li {
        font-size: 13.5px;
    }

    .blog-content table {
        min-width: 570px;
    }

    .blog-content table td,
    .blog-content table th {
        padding: 11px 12px !important;
        font-size: 12.5px;
    }
}