.blog-wrap {
    --bl-heading: #1b1b2f;
    --bl-title: #1f2937;
    --bl-text: #374151;
    --bl-muted: #6b7280;
    --bl-line: #e5e7eb;
    --bl-accent: #ff5800;
    --bl-green: #3db62b;
    --bl-orange: #ff8a00;
    --bl-blue: #0b63d6;
    --bl-purple: #8a00ff;

    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.blog-wrap *,
.blog-wrap *::before,
.blog-wrap *::after {
    box-sizing: border-box;
}

/* ---------- 70 / 30 layout ---------- */
.blog-layout {
    display: flex;
    align-items: flex-start;
}

.blog-main {
    width: 70%;
    min-width: 0;
    padding-right: 40px;
}

.blog-sidebar {
    width: 30%;
    min-width: 0;
}

.blog-section-title {
    margin: 0 0 24px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--bl-heading);
}

.blog-empty {
    padding: 40px 0;
    font-size: 17px;
    color: var(--bl-muted);
}

/* ---------- Featured cards (top of blogs.php) ---------- */
.blog-featured {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    margin: 40px 0 30px;
}

.blog-card {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 2.5;
    border-radius: 12px;
    overflow: hidden;
}

.blog-card__link {
    display: block;
    width: 100%;
    height: 100%;
    color: #fff;
    text-decoration: none;
}

.blog-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.blog-card:hover .blog-card__img {
    transform: scale(1.04);
}

.blog-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 100%);
}

.blog-card__content {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    padding: 20px;
    color: #fff;
}

.blog-card__tag {
    display: inline-block;
    margin-bottom: 6px;
    padding: 5px 7px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #fff;
    background: var(--bl-accent);
    border-radius: 7px;
}

.blog-card__title {
    margin: 0 0 6px;
    font-size: 1.25rem;
    line-height: 1.3;
    color: #fff;
}

.blog-card__excerpt {
    margin: 0;
    font-size: .9rem;
    line-height: 1.4;
    color: #fff;
    opacity: .95;
}

/* ---------- Recent blogs grid ---------- */
.recent-blogs-area .rb-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
    row-gap: 44px;
}

.recent-blogs-area .rb-card {
    min-width: 0;
}

.recent-blogs-area .rb-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 5 / 3;
    background: #e5e7eb;
    border-radius: 10px;
}

.recent-blogs-area .rb-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.recent-blogs-area .rb-card:hover .rb-image img {
    transform: scale(1.04);
}

.recent-blogs-area .rb-meta,
.blogs-details .bd-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-top: 16px;
}

.rb-tag {
    display: inline-block;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.rb-tag--green  { background: var(--bl-green);  color: #14290f; }
.rb-tag--orange { background: var(--bl-orange); color: #2a1700; }
.rb-tag--blue   { background: var(--bl-blue); }
.rb-tag--purple { background: var(--bl-purple); }

.rb-date {
    font-size: 14px;
    color: var(--bl-muted);
}

.recent-blogs-area .rb-title {
    margin: 14px 0 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
}

.recent-blogs-area .rb-title a {
    color: var(--bl-title);
    text-decoration: none;
    transition: color .2s ease;
}

.recent-blogs-area .rb-title a:hover {
    color: var(--bl-accent);
}

/* ---------- Pagination ---------- */
.blog-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 48px;
}

.blog-pagination a,
.blog-pagination span {
    min-width: 40px;
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    color: var(--bl-title);
    text-decoration: none;
    border: 1px solid var(--bl-line);
    border-radius: 6px;
}

.blog-pagination a:hover {
    border-color: var(--bl-accent);
    color: var(--bl-accent);
}

.blog-pagination .is-current {
    color: #fff;
    background: #20232e;
    border-color: #20232e;
}

.blog-pagination .is-gap {
    border-color: transparent;
}

/* ---------- Sidebar ---------- */
.blog-sidebar .bs-block {
    margin-bottom: 44px;
}

.blog-sidebar .bs-title {
    margin: 0 0 24px;
    padding-bottom: 14px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--bl-heading);
    border-bottom: 1px solid var(--bl-line);
}

.blog-sidebar .bs-search {
    display: flex;
    gap: 8px;
}

.blog-sidebar .bs-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--bl-title);
    background: #fff;
    border: 2px solid #e0e1ec;
    border-radius: 6px;
}

.blog-sidebar .bs-search input:focus {
    outline: none;
    border-color: var(--bl-accent);
}

.blog-sidebar .bs-search button {
    height: 46px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: #20232e;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.blog-sidebar .bs-search button:hover {
    background: var(--bl-accent);
}

.blog-sidebar .bs-list,
.blog-sidebar .bs-cat-list,
.blog-sidebar .bs-tags {
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-sidebar .bs-item + .bs-item {
    margin-top: 20px;
}

.blog-sidebar .bs-link {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.blog-sidebar .bs-thumb {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    overflow: hidden;
    background: #e5e7eb;
    border-radius: 8px;
}

.blog-sidebar .bs-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-sidebar .bs-name {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--bl-title);
    transition: color .2s ease;
}

.blog-sidebar .bs-link:hover .bs-name {
    color: var(--bl-accent);
}

.blog-sidebar .bs-cat-item {
    border-bottom: 1px solid var(--bl-line);
}

.blog-sidebar .bs-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    font-size: 16px;
    color: var(--bl-title);
    text-decoration: none;
    transition: color .2s ease;
}

.blog-sidebar .bs-cat-link:hover {
    color: var(--bl-accent);
}

.blog-sidebar .bs-count {
    flex: 0 0 auto;
    min-width: 40px;
    padding: 3px 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    color: #fff;
    border-radius: 4px;
}

.blog-sidebar .bs-count--green  { background: var(--bl-green);  color: #14290f; }
.blog-sidebar .bs-count--orange { background: var(--bl-orange); color: #2a1700; }
.blog-sidebar .bs-count--blue   { background: var(--bl-blue); }
.blog-sidebar .bs-count--purple { background: var(--bl-purple); }

.blog-sidebar .bs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}

.blog-sidebar .bs-tag,
.blogs-details .bd-tag {
    display: inline-block;
    padding: 6px 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    text-decoration: none;
    background: #1f2230;
    border-radius: 4px;
    transition: background .2s ease;
}

.blog-sidebar .bs-tag:hover,
.blogs-details .bd-tag:hover {
    color: #fff;
    background: var(--bl-accent);
}

/* ---------- Blog details page ---------- */
.blogs-details {
    width: 100%;
    padding-bottom: 60px;
}

.blogs-details .bd-banner {
    width: 100%;
    height: 750px;
    overflow: hidden;
    background: #e5e7eb;
}

.blogs-details .bd-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blogs-details .blog-layout {
    padding-top: 50px;
}

.blogs-details .bd-title {
    margin: 0 0 8px;
    font-size: 38px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--bl-heading);
}

.blogs-details .bd-meta {
    margin: 0 0 28px;
}

.blogs-details .bd-draft-note {
    margin-bottom: 20px;
    padding: 10px 14px;
    font-size: 14px;
    color: #7a4b00;
    background: #fff4dc;
    border-radius: 6px;
}

.blogs-details .bd-content p,
.blogs-details .bd-content li {
    font-size: 17px;
    line-height: 1.85;
    color: var(--bl-text);
}

.blogs-details .bd-content p {
    margin: 0 0 22px;
}

.blogs-details .bd-content h2 {
    margin: 36px 0 14px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--bl-heading);
}

.blogs-details .bd-content h3 {
    margin: 28px 0 12px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--bl-heading);
}

.blogs-details .bd-content ul {
    margin: 0 0 22px;
    padding-left: 22px;
}

.blogs-details .bd-content a {
    color: var(--bl-accent);
    text-decoration: underline;
}

.blogs-details .bd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 36px 0 0;
    padding: 24px 0 0;
    list-style: none;
    border-top: 1px solid var(--bl-line);
}

.blogs-details .bd-back {
    display: inline-block;
    margin-top: 28px;
    font-weight: 700;
    color: var(--bl-title);
    text-decoration: none;
}

.blogs-details .bd-back:hover {
    color: var(--bl-accent);
}

/* ---------- Tablet ---------- */
@media (max-width: 991.98px) {
    .blog-layout {
        flex-direction: column;
    }

    .blog-main,
    .blog-sidebar {
        width: 100%;
    }

    .blog-main {
        padding-right: 0;
    }

    .blog-sidebar {
        margin-top: 50px;
    }

    .blog-featured {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .blogs-details .bd-banner {
        height: 300px;
    }

    .blogs-details .bd-title {
        font-size: 30px;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 575.98px) {
    .recent-blogs-area .rb-grid {
        grid-template-columns: 1fr;
        row-gap: 36px;
    }

    .recent-blogs-area .rb-title {
        font-size: 18px;
    }

    .blogs-details .bd-banner {
        height: 220px;
    }

    .blogs-details .bd-title {
        font-size: 25px;
    }

    .blogs-details .bd-content p,
    .blogs-details .bd-content li {
        font-size: 16px;
        line-height: 1.75;
    }

    .blogs-details .bd-content h2 {
        font-size: 23px;
    }
}