/* =========================================================
   BLOG DETAIL — FRONT-END
   ========================================================= */

.blog-detail-page {
    direction: rtl;
    padding: 5.75rem 0 5rem;
    background: #f7f9fc;
}

.blog-detail-container {
    max-width: 1320px;
}

.blog-detail-breadcrumb {
    margin-bottom: 1.75rem;
    padding-top: .25rem;
}

.blog-detail-breadcrumb .breadcrumb {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .65rem .9rem;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 6px 20px rgba(15,23,42,.04);
}

.blog-detail-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-left: .35rem;
    padding-right: .35rem;
    color: #94a3b8;
    content: "←";
}

.blog-detail-breadcrumb a {
    color: #64748b;
    text-decoration: none;
}

.blog-detail-breadcrumb a:hover {
    color: var(--bs-primary);
}

.blog-detail-hero {
    position: relative;
    min-height: 500px;
    overflow: hidden;
    border-radius: 28px;
    background: #0f172a;
    box-shadow: 0 24px 60px rgba(15,23,42,.16);
    isolation: isolate;
}

.blog-detail-hero-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.01);
}

.blog-detail-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(15,23,42,.08) 0%, rgba(15,23,42,.18) 34%, rgba(15,23,42,.76) 100%),
        linear-gradient(270deg, rgba(15,23,42,.70) 0%, rgba(15,23,42,.34) 45%, rgba(15,23,42,.08) 100%);
}

.blog-detail-hero-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    min-height: auto;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 2rem clamp(1.5rem, 4vw, 4rem) 2.25rem;
    color: #fff;
}

.blog-detail-hero-content::before {
    position: absolute;
    right: clamp(1rem, 3vw, 3rem);
    bottom: 1.25rem;
    left: clamp(1rem, 3vw, 3rem);
    z-index: -1;
    min-height: 210px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 22px;
    background: rgba(7,15,29,.48);
    box-shadow: 0 18px 45px rgba(0,0,0,.16);
    backdrop-filter: blur(8px);
    content: "";
}

.blog-detail-category {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .9rem;
    padding: .5rem .9rem;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 999px;
    background: rgba(255,255,255,.13);
    color: #fff;
    backdrop-filter: blur(8px);
    font-size: .88rem;
    font-weight: 800;
}

.blog-detail-title {
    width: 100%;
    max-width: none;
    margin: 0;
    color: #fff;
    text-shadow: 0 3px 18px rgba(0,0,0,.42);
    font-size: clamp(1.85rem, 3vw, 2.65rem);
    line-height: 1.45;
    font-weight: 900;
    letter-spacing: -.025em;
}

.blog-detail-summary {
    width: 100%;
    max-width: none;
    margin: .9rem 0 0;
    color: rgba(255,255,255,.9);
    text-shadow: 0 2px 10px rgba(0,0,0,.35);
    font-size: 1.02rem;
    line-height: 2;
}

.blog-detail-layout {
    margin-top: 2.5rem;
    align-items: flex-start;
}

.blog-article-card {
    overflow: hidden;
    border: 1px solid #e8edf3;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(15,23,42,.07);
}

.blog-article-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 1rem;
    padding: 1.2rem 1.4rem;
    border-bottom: 1px solid #edf1f5;
    background: #fbfcfe;
}

.blog-meta-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.blog-meta-icon,
.blog-info-icon,
.blog-section-heading-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
    font-size: 1.1rem;
}

.blog-meta-item > span:last-child,
.blog-info-card-head > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.blog-meta-item small,
.blog-info-card-head small,
.blog-section-heading small {
    color: #94a3b8;
    font-size: .74rem;
}

.blog-meta-item strong {
    overflow: hidden;
    color: #334155;
    font-size: .86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blog-content {
    padding: 2.25rem clamp(1.25rem, 4vw, 3rem);
    color: #263244;
    font-size: 1.06rem;
    line-height: 2.25;
}

.blog-content > :first-child {
    margin-top: 0;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
    color: #172033;
    font-weight: 850;
    line-height: 1.7;
}

.blog-content h2 {
    position: relative;
    margin: 2.8rem 0 1.1rem;
    padding-right: 1rem;
    font-size: 1.7rem;
}

.blog-content h2::before {
    position: absolute;
    top: .35rem;
    right: 0;
    width: 4px;
    height: 2rem;
    border-radius: 4px;
    background: var(--bs-primary);
    content: "";
}

.blog-content h3 {
    margin: 2.25rem 0 1rem;
    font-size: 1.4rem;
}

.blog-content a {
    color: var(--bs-primary);
    font-weight: 600;
}

.blog-content img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(15,23,42,.09);
}

.blog-content blockquote {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border-right: 4px solid var(--bs-primary);
    border-radius: 12px;
    background: #f6f8fb;
    color: #475569;
}

.blog-content pre {
    direction: ltr;
    overflow-x: auto;
    margin: 2rem 0;
    padding: 1.25rem;
    border-radius: 14px;
    background: #111827;
    color: #f8fafc;
    text-align: left;
}

.blog-content table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
}

.blog-content th,
.blog-content td {
    padding: .8rem;
    border: 1px solid #e2e8f0;
}

.blog-content th {
    background: #f8fafc;
    color: #172033;
}

.blog-tags-section {
    margin: 0 2.25rem;
    padding: 1.5rem 0;
    border-top: 1px solid #edf1f5;
}

.blog-section-heading,
.blog-info-card-head {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.blog-section-heading strong,
.blog-info-card-head strong {
    display: block;
    color: #172033;
    font-size: .96rem;
}

.blog-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1rem;
}

.blog-tag {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    padding: .45rem .75rem;
    border: 1px solid #e4e9ef;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: .82rem;
}

.blog-article-footer {
    display: flex;
    justify-content: flex-start;
    padding: 1.25rem 2.25rem;
    border-top: 1px solid #edf1f5;
    background: #fbfcfe;
}

.blog-back-button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    padding-inline: 1rem;
    border: 1px solid #dce3eb;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    font-weight: 700;
}

.blog-back-button:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    background: #fff;
}

.blog-detail-sidebar {
    position: sticky;
    top: 1.5rem;
}

.blog-info-card {
    padding: 1.2rem;
    border: 1px solid #e8edf3;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15,23,42,.06);
}

.blog-info-card-head {
    padding-bottom: 1rem;
    margin-bottom: .35rem;
    border-bottom: 1px solid #edf1f5;
}

.blog-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 0;
    border-bottom: 1px dashed #e5eaf0;
    color: #94a3b8;
    font-size: .82rem;
}

.blog-info-row:last-child {
    border-bottom: 0;
}

.blog-info-row strong {
    max-width: 60%;
    color: #334155;
    font-size: .82rem;
    text-align: left;
}

.blog-sidebar-cta {
    margin-top: 1rem;
    padding: 1.35rem;
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    color: #1e293b;
    border: 1px solid #e8edf3;
    box-shadow: 0 14px 35px rgba(15,23,42,.08);
}

.blog-sidebar-cta-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .9rem;
    border-radius: 13px;
    background: #eef4ff;
    color: var(--bs-primary);
    font-size: 1.15rem;
}

.blog-sidebar-cta h3 {
    margin-bottom: .55rem;
    font-size: 1.05rem;
    font-weight: 800;
}

.blog-sidebar-cta p {
    margin-bottom: 1rem;
    color: #64748b;
    font-size: .84rem;
    line-height: 1.9;
}

.blog-sidebar-cta .btn {
    min-height: 43px;
    border: 0;
    border-radius: 11px;
    font-weight: 700;
}

.blog-related-section {
    direction: rtl;
    padding: 0 0 5rem;
    background: #f7f9fc;
}

.blog-related-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.blog-related-heading span {
    color: var(--bs-primary);
    font-size: .78rem;
    font-weight: 800;
}

.blog-related-heading h2 {
    margin: .25rem 0 0;
    color: #172033;
    font-size: 1.55rem;
    font-weight: 900;
}

.blog-related-all {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: #64748b;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
}

.blog-related-all:hover {
    color: var(--bs-primary);
}

.blog-related-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.blog-related-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid #e8edf3;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15,23,42,.06);
    transition: transform .25s ease, box-shadow .25s ease;
}

.blog-related-link:hover .blog-related-card {
    transform: translateY(-6px);
    box-shadow: 0 18px 42px rgba(15,23,42,.11);
}

.blog-related-image-wrap {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #eef2f6;
}

.blog-related-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.blog-related-link:hover .blog-related-image {
    transform: scale(1.04);
}

.blog-related-category {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    padding: .4rem .7rem;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;
    background: rgba(15,23,42,.72);
    color: #fff;
    font-size: .76rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.blog-related-body {
    display: flex;
    min-height: 205px;
    flex-direction: column;
    padding: 1.15rem;
}

.blog-related-body h3 {
    margin-bottom: .65rem;
    color: #172033;
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 800;
}

.blog-related-body p {
    display: -webkit-box;
    margin-bottom: 1rem;
    overflow: hidden;
    color: #64748b;
    font-size: .82rem;
    line-height: 1.9;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.blog-related-meta {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    margin-top: auto;
    padding-top: .85rem;
    border-top: 1px solid #edf1f5;
    color: #94a3b8;
    font-size: .73rem;
}

.blog-related-meta span {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

@media (max-width: 991.98px) {
    .blog-detail-hero {
        min-height: 460px;
    }

    .blog-detail-hero-content {
        padding: 1.75rem 2rem 2rem;
    }

    .blog-detail-hero-content::before {
        right: 1.25rem;
        bottom: 1rem;
        left: 1.25rem;
    }

    .blog-article-meta {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .blog-detail-sidebar {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .blog-detail-page {
        padding-top: 1.5rem;
    }

    .blog-detail-hero {
        min-height: 430px;
        border-radius: 20px;
    }

    .blog-detail-hero-content {
        padding: 1.25rem 1.25rem 1.5rem;
    }

    .blog-detail-hero-content::before {
        right: .75rem;
        bottom: .75rem;
        left: .75rem;
        min-height: 190px;
        border-radius: 17px;
    }

    .blog-detail-hero-overlay {
        background:
            linear-gradient(180deg, rgba(15,23,42,.08) 0%, rgba(15,23,42,.26) 30%, rgba(15,23,42,.88) 100%),
            linear-gradient(270deg, rgba(15,23,42,.64), rgba(15,23,42,.12));
    }

    .blog-detail-title {
        width: 100%;
        font-size: 1.8rem;
        line-height: 1.6;
    }

    .blog-detail-summary {
        width: 100%;
        font-size: .92rem;
        line-height: 1.95;
    }

    .blog-article-card,
    .blog-info-card,
    .blog-sidebar-cta,
    .blog-related-card {
        border-radius: 17px;
    }

    .blog-article-meta {
        grid-template-columns: 1fr 1fr;
        gap: .85rem;
        padding: 1rem;
    }

    .blog-meta-item {
        gap: .55rem;
    }

    .blog-meta-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        border-radius: 10px;
        font-size: .95rem;
    }

    .blog-meta-item strong {
        font-size: .75rem;
    }

    .blog-content {
        padding: 1.5rem 1.15rem;
        font-size: 1rem;
        line-height: 2.1;
    }

    .blog-tags-section {
        margin: 0 1.15rem;
    }

    .blog-article-footer {
        padding: 1rem 1.15rem;
    }

    .blog-related-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .blog-related-image-wrap {
        height: 200px;
    }
}

@media (max-width: 420px) {
    .blog-article-meta {
        grid-template-columns: 1fr;
    }

    .blog-detail-title {
        font-size: 1.6rem;
        line-height: 1.65;
    }

    .blog-detail-summary {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }
}
