/* Blog Banner Styles */
.blog-banner {
    min-height: 340px;
    position: relative;
    overflow: hidden;
}
.blog-banner-bg {
    object-fit: cover;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 1;
}
.blog-banner-overlay {
    background: rgba(24, 49, 63, 0.65);
    z-index: 2;
}
.blog-banner .container {
    z-index: 3;
    position: relative;
}
.blog-label {
    font-size: 1.1rem;
    font-weight: 600;
    background: #fff;
    color: #222;
    border-radius: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    display: inline-block;
}

/* Blog Cards */
.blog-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
    min-height: 340px;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    box-shadow: 0 8px 32px rgba(255, 112, 67, 0.12);
    transform: translateY(-4px) scale(1.01);
}
.blog-img-wrap {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
}
.blog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px 18px 0 0;
    transition: transform 0.3s;
}
.blog-card:hover .blog-img {
    transform: scale(1.05);
}
.btn-blog-read {
    background: #ff7043;
    color: #fff;
    border-radius: 8px;
    font-weight: 500;
    padding: 6px 10px;
    font-size: 1rem;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: none;
}
.btn-blog-read:hover {
    background: #125875;
    color: #fff;
}

/* Pagination */
.blog-pagination .page-link {
    color: #ff7043;
    border-radius: 8px;
    border: none;
    margin: 0 4px;
    font-weight: 600;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: background 0.2s, color 0.2s;
}
.blog-pagination .page-item.active .page-link,
.blog-pagination .page-link:hover {
    background: #ff7043;
    color: #fff;
}
.blog-pagination .page-item {
    margin: 0 2px;
}

/* Blog Sidebar Styles */
.blog-sidebar .card {
    border: none;
    border-radius: 12px;
}

.blog-sidebar .card-header {
    border-radius: 12px 12px 0 0 !important;
    border: none;
    padding: 1rem 1.25rem;
}

.blog-sidebar .list-group-item {
    border: none;
    border-bottom: 1px solid #f8f9fa;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
}

.blog-sidebar .list-group-item:last-child {
    border-bottom: none;
}

.blog-sidebar .list-group-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.blog-sidebar .list-group-item.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.blog-sidebar .list-group-item.active:hover {
    background-color: #0b5ed7;
    transform: translateX(5px);
}

.blog-sidebar .badge {
    font-size: 0.75rem;
}

/* Filter Display Styles */
.filter-display .badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

.filter-display .badge a {
    text-decoration: none;
    color: inherit;
    margin-left: 0.5rem;
}

.filter-display .badge a:hover {
    opacity: 0.8;
}

/* Blog card adjustments for sidebar layout */
.blog-cards-section .col-xl-4 {
    flex: 0 0 auto;
    width: 33.33333333%;
}

@media (max-width: 1200px) {
    .blog-cards-section .col-xl-4 {
        width: 50%;
    }
}

/* Blog Single Page Styles */
.blog-single-banner {
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.blog-single-banner-bg {
    background-image: url('/images/breadcrumb-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.blog-single-banner-overlay {
    background: rgba(24, 49, 63, 0.65);
    z-index: 2;
}

.blog-single-banner .container {
    z-index: 3;
    position: relative;
}

.blog-content-section {
    background-color: #f8f9fa;
}

.blog-image {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.blog-image img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-content {
    line-height: 1.8;
}

.blog-body {
    color: #333;
    font-size: 1.1rem;
}

.blog-body h1,
.blog-body h2,
.blog-body h3,
.blog-body h4,
.blog-body h5,
.blog-body h6 {
    color: #125875;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

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

.blog-body ul,
.blog-body ol {
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.blog-body li {
    margin-bottom: 0.5rem;
}

.blog-body a {
    color: #ff7043;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-body a:hover {
    color: #125875;
    text-decoration: underline;
}

.blog-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.blog-body blockquote {
    border-right: 4px solid #ff7043;
    padding-right: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #666;
}

.blog-excerpt {
    border-right: 4px solid #ff7043;
}

.blog-tags .badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    transition: transform 0.2s;
}

.blog-tags .badge:hover {
    transform: translateY(-2px);
}

.blog-meta {
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Related Blogs Slider Section */
.related-blogs-section {
    background-color: #fff;
    border-top: 1px solid #e9ecef;
}

.related-blogs-title {
    color: #125875;
    font-weight: 700;
    font-size: 1.6rem;
    position: relative;
}

.related-blogs-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    background: #ff7043;
    border-radius: 2px;
    margin-top: 8px;
}

.related-blogs-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #125875;
    background: transparent;
    color: #125875;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.related-blogs-nav-btn:hover {
    background: #125875;
    color: #fff;
}

.related-blogs-nav-btn.swiper-button-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.related-blogs-swiper {
    padding-bottom: 3rem !important;
    overflow: visible;
}

.related-blogs-swiper .swiper-wrapper {
    align-items: stretch;
}

.related-blog-card {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    height: 100%;
}

.related-blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(18, 88, 117, 0.13) !important;
}

.related-blog-card-img-wrap {
    width: 100%;
    height: 210px;
    overflow: hidden;
}

.related-blog-card-img-wrap .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}

.related-blog-card:hover .related-blog-card-img-wrap .card-img-top {
    transform: scale(1.06);
}

.related-blog-card .card-title {
    color: #125875;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.related-blogs-pagination {
    bottom: 0 !important;
}

.related-blogs-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #cbd5e0;
    opacity: 1;
    transition: background 0.2s, width 0.2s;
    border-radius: 4px;
}

.related-blogs-pagination .swiper-pagination-bullet-active {
    background: #ff7043;
    width: 24px;
}

/* Utility classes for blog single page */
.w-60 {
    width: 60px;
}

.h-60 {
    height: 60px;
}

.img-h-60 {
    height: 60px;
    width: 60px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .blog-banner {
        min-height: 220px;
    }
    .blog-single-banner {
        min-height: 300px;
    }
    .blog-label {
        font-size: 1rem;
        padding: 0.5rem 1.2rem;
    }
    .blog-img-wrap {
        height: 120px;
    }
    .blog-card {
        min-height: 260px;
    }
    .blog-sidebar {
        margin-bottom: 2rem;
    }
    .blog-cards-section .col-xl-4 {
        width: 100%;
    }
    .blog-body {
        font-size: 1rem;
    }
    .related-blog-card-img-wrap {
        height: 170px;
    }
    .related-blogs-title {
        font-size: 1.25rem;
    }
}

/* ══ Blog list: sidebar hover, cards, pagination. Must stay at the end of the file. ══ */

/* Sidebar categories: no sideways shift (it pushed items out of the card in RTL) */
.blog-sidebar .card { overflow: hidden; }
.blog-sidebar .list-group-item,
.blog-sidebar .list-group-item:hover,
.blog-sidebar .list-group-item.active:hover {
    transform: none;
}
.blog-sidebar .list-group-item {
    box-shadow: inset 0 0 0 transparent;
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.blog-sidebar .list-group-item:hover:not(.active) {
    background-color: #f1f5f9;
    color: #156481;
    box-shadow: inset -3px 0 0 #ff7043;
}
[dir="ltr"] .blog-sidebar .list-group-item:hover:not(.active) { box-shadow: inset 3px 0 0 #ff7043; }

/* Card */
.blog-cards-section .blog-card {
    min-height: 0;
    border: 1px solid #e8edf3;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.blog-cards-section .blog-card:hover {
    transform: translateY(-3px);
    border-color: #dbe3ec;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
}
.blog-card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f1f5f9;
}
.blog-card-media .blog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform .4s ease;
}
.blog-card:hover .blog-card-media .blog-img { transform: scale(1.04); }
.blog-card-media .blog-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #94a3b8;
    font-size: 2.5rem;
}
.blog-card-featured,
.blog-card-category {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    max-width: calc(100% - 1.5rem);
    padding: .3rem .65rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.blog-card-featured {
    top: .75rem;
    inset-inline-start: .75rem;
    background: #ff7043;
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 112, 67, .35);
}
.blog-card-category {
    bottom: .75rem;
    inset-inline-start: .75rem;
    background: rgba(255, 255, 255, .95);
    color: #156481;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
}
.blog-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: .6rem;
    padding: 1.1rem 1.2rem 1.2rem;
}
.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1rem;
    font-size: .8rem;
    color: #64748b;
}
.blog-card-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.blog-card-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card-title a { color: #1e293b; text-decoration: none; transition: color .2s ease; }
.blog-card-title a:hover { color: #156481; }
.blog-card-excerpt {
    margin: 0;
    flex: 1 1 auto;
    font-size: .9rem;
    line-height: 1.75;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: .35rem;
    padding-top: .85rem;
    border-top: 1px solid #eef2f7;
}
.blog-card-author {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-width: 0;
    font-size: .82rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.blog-card-more {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    flex: 0 0 auto;
    margin-inline-start: auto;
    font-size: .88rem;
    font-weight: 700;
    color: #ff7043;
    text-decoration: none;
}
.blog-card-more:hover { color: #156481; }
.blog-card-arrow { font-size: .8rem; transition: transform .2s ease; }
.blog-card-more:hover .blog-card-arrow { transform: translateX(3px); }
[dir="rtl"] .blog-card-arrow { transform: scaleX(-1); }
[dir="rtl"] .blog-card-more:hover .blog-card-arrow { transform: scaleX(-1) translateX(3px); }

/* Pagination: one row, compact */
.blog-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 2.5rem;
}
.blog-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .6rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
a.blog-pager-btn:hover { border-color: #156481; color: #156481; background: #f1f7fa; }
.blog-pager-btn.is-current {
    background: #156481;
    border-color: #156481;
    color: #fff;
    box-shadow: 0 6px 14px rgba(21, 100, 129, .25);
}
.blog-pager-btn.is-disabled { opacity: .4; }
.blog-pager-gap { padding: 0 .2rem; color: #94a3b8; font-weight: 700; }
[dir="rtl"] .blog-pager-prev,
[dir="rtl"] .blog-pager-next { transform: scaleX(-1); }
@media (max-width: 575.98px) {
    .blog-pager-btn { min-width: 36px; height: 36px; border-radius: 8px; font-size: .9rem; }
}

/* ── Related articles slider: stays inside the container, equal-height cards. Must stay at the end. ── */
.related-blogs-swiper {
    overflow: hidden !important;
    padding: 10px 6px 3rem !important;   /* room for card shadow / hover lift */
    margin: -10px -6px 0;
}
.related-blogs-swiper .swiper-slide {
    height: auto;
    display: flex;
}
.related-blogs-swiper .related-blog-card {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    height: auto;
    border: 1px solid #e8edf3;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .05) !important;
}
.related-blogs-swiper .related-blog-card:hover { transform: translateY(-4px); }
.related-blogs-swiper .related-blog-card-img-wrap { height: auto; aspect-ratio: 16 / 9; flex: 0 0 auto; }
.related-blogs-swiper .related-blog-card .card-body { flex: 1 1 auto; padding: 1rem 1.1rem 1.1rem; }
.related-blogs-swiper .related-blog-card .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(2 * 1.5em);
    line-height: 1.5;
}
.related-blogs-swiper .related-blog-card .card-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(2 * 1.7em);
    line-height: 1.7;
    margin-bottom: .75rem;
}
.related-blogs-swiper .related-blog-card .card-body > .d-flex:last-child {
    margin-top: auto !important;
    padding-top: .75rem;
    border-top: 1px solid #eef2f7;
}

/* ── Article page sidebar: categories + recent posts. Must stay at the end. ── */
.article-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 1.25rem; }
.side-card {
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
    padding: 1.1rem 1.1rem 1rem;
}
.side-card-title {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 .9rem;
    padding-bottom: .75rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #156481;
    border-bottom: 1px solid #eef2f7;
    position: relative;
}
.side-card-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    inset-inline-start: 0;
    width: 42px;
    height: 3px;
    border-radius: 3px;
    background: #ff7043;
}
.side-card-title i {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #e8f2f6;
    color: #156481;
    font-size: .9rem;
}

.side-cats { display: flex; flex-direction: column; gap: 4px; }
.side-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .6rem .7rem;
    border-radius: 10px;
    color: #334155;
    font-weight: 600;
    font-size: .93rem;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
.side-cat:hover { background: #f1f5f9; color: #156481; }
.side-cat.is-current { background: #e8f2f6; color: #156481; }
.side-cat-count {
    flex: 0 0 auto;
    min-width: 28px;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: #eef2f7;
    color: #475569;
    font-size: .75rem;
    font-weight: 700;
    text-align: center;
}
.side-cat:hover .side-cat-count,
.side-cat.is-current .side-cat-count { background: #156481; color: #fff; }

.side-posts { display: flex; flex-direction: column; }
.side-post {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .65rem .3rem;
    border-bottom: 1px dashed #e8edf3;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color .2s ease;
}
.side-post:last-child { border-bottom: 0; }
.side-post:hover { background: #f8fafc; }
.side-post-thumb {
    flex: 0 0 80px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    background: #eef2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}
.side-post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.side-post:hover .side-post-thumb img { transform: scale(1.06); }
.side-post-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.side-post-title {
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.5;
    color: #1e293b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s ease;
}
.side-post:hover .side-post-title { color: #156481; }
.side-post-date { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; color: #94a3b8; }

@media (max-width: 991.98px) { .article-side { position: static; } }
