/* Emmaus Publishers — Blog listing + single */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bi-blog {
    padding: 0 0 100px;
    background: #fff;
}

.bi-blog > .bi-container {
    padding-top: 80px;
    padding-bottom: 0;
}

.blog-filter {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 18px 20px;
    border: 1px solid rgba(153, 88, 42, 0.35);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
}

ul.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

ul.category-tabs li {
    padding: 8px 18px;
    color: #453829;
    font-family: var(--font-secondary, sans-serif);
    font-size: 14px;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

ul.category-tabs li:hover {
    background: rgba(224, 135, 79, 0.12);
}

ul.category-tabs li.active {
    background: #99582a;
    color: #fff;
}

.blog-search-label {
    display: block;
    flex: 0 1 260px;
}

input#blog-search {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border: 1px solid rgba(69, 56, 41, 0.16);
    border-radius: 10px;
    background: #f7f4f0;
    color: #453829;
    font-family: var(--font-secondary, sans-serif);
    font-size: 15px;
}

input#blog-search:focus {
    outline: none;
    border-color: #e0874f;
    box-shadow: 0 0 0 3px rgba(224, 135, 79, 0.18);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.blog-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #716b5d;
}

.blog-card-modern {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(153, 88, 42, 0.22);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.blog-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 34px rgba(153, 88, 42, 0.16);
    background: #faf7f3;
}

.blog-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eee8e0;
}

.blog-thumb img,
.blog-thumb-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-thumb-placeholder {
    background: linear-gradient(135deg, #e9a064 0%, #99582a 100%);
}

.blog-content {
    padding: 22px 22px 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.blog-cats span {
    color: #99582a;
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.blog-title {
    margin: 0;
    font-family: var(--font-primary, serif);
    font-size: 24px;
    font-weight: 400;
    line-height: 1.25;
}

.blog-title a {
    color: #453829;
    text-decoration: none;
}

.blog-title a:hover {
    color: #99582a;
}

.blog-author {
    display: flex;
    margin-top: auto;
    padding-top: 18px;
    align-items: center;
    gap: 10px;
}

.blog-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-author span {
    font-size: 14px;
    color: #716b5d;
}

/* Single post */
.single-blog {
    background: #fff;
}

.single-header {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 160px !important;
    padding-bottom: 40px !important;
}

.single-header .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
    font-size: 15px;
    color: #716b5d;
}

.single-header .dot {
    opacity: 0.6;
}

.single-title {
    margin: 0 0 28px;
    color: #453829;
    font-family: var(--font-primary, serif);
    font-size: 48px;
    font-weight: 400;
    line-height: 1.15;
}

.author-box {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.author-box img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #453829;
}

.author-info strong {
    font-size: 16px;
}

.author-info span {
    font-size: 13px;
    color: #716b5d;
}

small.post-date {
    margin-left: auto;
    font-size: 15px;
    font-weight: 600;
    color: #e0874f;
}

.single-body {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 280px;
    gap: 40px;
    padding-top: 40px !important;
    padding-bottom: 100px !important;
    color: #453829;
}

.single-sidebar h4 {
    margin: 0 0 18px;
    font-family: var(--font-primary, serif);
    font-size: 20px;
    font-weight: 400;
    color: #99582a;
}

.single-sidebar.toc {
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(153, 88, 42, 0.2);
    align-self: start;
    position: sticky;
    top: 110px;
}

.toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc li {
    margin-bottom: 10px;
    font-size: 14px;
}

.toc a {
    color: #453829;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-transform: capitalize;
}

.toc li.active a {
    color: #e0874f;
    font-weight: 600;
}

.single-content {
    font-family: var(--font-secondary, sans-serif);
    font-size: 17px;
    line-height: 1.7;
}

.single-content :is(h2, h3, h4) {
    margin: 1.4em 0 0.6em;
    color: #453829;
    font-family: var(--font-primary, serif);
    font-weight: 400;
    text-transform: capitalize;
}

.single-content p {
    margin: 0 0 1.4em;
    color: #716b5d;
}

.single-featured {
    margin: 0 0 32px;
    border-radius: 14px;
    overflow: hidden;
}

.single-featured img {
    width: 100%;
    height: auto;
    display: block;
}

.recent {
    align-self: start;
    position: sticky;
    top: 110px;
}

.recent-card {
    display: block;
    padding: 18px;
    border-radius: 14px;
    background: #f7f4f0;
    margin-bottom: 14px;
    text-decoration: none;
    transition: background-color 0.25s ease;
}

.recent-card:hover {
    background: #efe7dc;
}

.recent-card h5 {
    margin: 0 0 6px;
    color: #453829;
    font-family: var(--font-primary, serif);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.3;
}

.recent-card span {
    font-size: 13px;
    color: #716b5d;
}

.comment-wrapper {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid rgba(69, 56, 41, 0.12);
}

.comment-wrapper :is(textarea, input[type="text"], input[type="email"], input[type="url"]) {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(69, 56, 41, 0.16);
    background: #f7f4f0;
    padding: 12px 14px;
}

.comment-wrapper input#submit {
    margin-top: 12px;
    padding: 14px 28px;
    border: 0;
    border-radius: 999px;
    background: #e0874f;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.comment-wrapper input#submit:hover {
    background: #c8733d;
}

@media (max-width: 1100px) {
    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .single-body {
        grid-template-columns: 1fr;
    }

    .single-sidebar.toc,
    .recent {
        position: static;
    }

    .single-sidebar.toc {
        order: -1;
    }
}

@media (max-width: 768px) {
    .blog-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .blog-search-label {
        flex: 1 1 auto;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .single-header {
        padding-top: 120px !important;
    }

    .single-title {
        font-size: 32px;
    }

    small.post-date {
        margin-left: 0;
        width: 100%;
    }
}
