/* ==========================================
   BLOG — GENERAL
========================================== */
.blog-post {
    padding: 110px 20px 80px;
}

.post {
    max-width: 760px;
    margin: 0 auto;
}

/* ==========================================
   BLOG POST — TYPOGRAPHY
========================================== */
.post, .post * {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #e5e7eb;
    opacity: 1;
}

.post-header h1 {
    margin: 0 0 1rem;
    font-size: 3rem;
    line-height: 1.2;
    font-weight: 800;
    color: #ffffff;
}

.bangla-post .post-header h2 {
    margin: 0 0 1rem;
    font-size: 2rem;
    line-height: 1.3;
    font-weight: 700;
    color: #ffffff;
}

.post-content {
    font-size: 18px;
    line-height: 1.9;
}

.post-content p {
    margin: 0 0 1.5rem;
    font-size: 18px;
    line-height: 1.9;
    color: #d1d5db;
}

.post-content h2 {
    margin: 3rem 0 1rem;
    font-size: 2rem;
    line-height: 1.3;
    font-weight: 700;
    color: #ffffff;
}

.post-content h3 {
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
    line-height: 1.4;
    font-weight: 700;
    color: #ffffff;
}

.post strong {
    color: #ffffff;
}

.post em {
    font-style: italic;
}

.post a {
    color: #60a5fa;
    text-decoration: none;
}

.post a:hover {
    text-decoration: underline;
}

/* ==========================================
   POST META
========================================== */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 3rem;
    color: #9ca3af;
    font-size: .95rem;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #9ca3af;
}

.post-meta i {
    color: #9ca3af;
}

/* ==========================================
   BREADCRUMB
========================================== */
.breadcrumb {
    margin-bottom: 2rem;
    font-size: .9rem;
}

.breadcrumb a {
    color: #9ca3af;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.breadcrumb span {
    margin: 0 .4rem;
    color: #6b7280;
}

/* ==========================================
   LISTS
========================================== */
.post-content ul, .post-content ol {
    margin: 1rem 0 2rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: .75rem;
    color: #d1d5db;
}

/* ==========================================
   ARTICLE IMAGES
========================================== */
.post-content img {
    display: block;
    width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 14px;
}

/* ==========================================
   BLOCKQUOTE
========================================== */
.post-content blockquote {
    margin: 2rem 0;
    padding-left: 1rem;
    border-left: 4px solid #3b82f6;
    color: #cbd5e1;
    font-style: italic;
}

/* ==========================================
   CODE
========================================== */
.post-content pre {
    overflow-x: auto;
    padding: 1rem;
    border-radius: 10px;
    background: #111827;
}

.post-content code {
    font-family: Consolas, "Courier New", monospace;
}

/* ==========================================
   SHARE
========================================== */
.post-share {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #374151;
}

.share-label {
    display: block;
    margin-bottom: 1rem;
    color: #9ca3af;
    font-size: .9rem;
    font-weight: 500;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}

.share-buttons a, .share-buttons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 40px;
    padding: 0 .9rem;
    border: 1px solid #374151;
    border-radius: 8px;
    background: transparent;
    color: #d1d5db;
    font: inherit;
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.share-buttons a:hover, .share-buttons button:hover {
    color: #ffffff;
    background: rgba(96, 165, 250, .08);
    border-color: #60a5fa;
    text-decoration: none;
}

.copy-message {
    display: block;
    min-height: 1.2rem;
    margin-top: .75rem;
    color: #9ca3af;
    font-size: .85rem;
}

/* ==========================================
   POST FOOTER
========================================== */
.post-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #374151;
}

.post-footer a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: #60a5fa;
    font-weight: 600;
    text-decoration: none;
}

.post-footer a:hover {
    color: #93c5fd;
    text-decoration: none;
}

/* ==========================================
   BLOG ARCHIVE
========================================== */
.blog-page {
    padding: 110px 20px 80px;
}

.blog-header {
    margin-bottom: 3rem;
}

.blog-header h1 {
    margin: 0;
    font-size: 3rem;
    line-height: 1.2;
    font-weight: 800;
    color: #ffffff;
}

.blog-header h1 span {
    color: #60a5fa;
}

/* ==========================================
   BLOG LANGUAGE FILTER
========================================== */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .65rem;
    margin-bottom: 2.5rem;
}

.blog-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 1rem;
    border: 1px solid #374151;
    border-radius: 8px;
    background: transparent;
    color: #9ca3af;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.blog-filter-btn:hover {
    color: #ffffff;
    border-color: #60a5fa;
    background: rgba(96, 165, 250, .08);
}

.blog-filter-btn.active {
    color: #ffffff;
    border-color: #60a5fa;
    background: #60a5fa;
}

/* ==========================================
   INITIAL FILTER BUTTON STATE
   Prevent active-button flash
========================================== */
html[data-blog-filter="bangla"] .blog-filter-btn[data-filter="bangla"] {
    color: #ffffff;
    border-color: #60a5fa;
    background: #60a5fa;
}

html[data-blog-filter="english"] .blog-filter-btn[data-filter="english"] {
    color: #ffffff;
    border-color: #60a5fa;
    background: #60a5fa;
}

html[data-blog-filter="all"] .blog-filter-btn[data-filter="all"] {
    color: #ffffff;
    border-color: #60a5fa;
    background: #60a5fa;
}

.blog-filter-btn.active:hover {
    color: #ffffff;
    background: #3b82f6;
    border-color: #3b82f6;
}

/* ==========================================
   HIDDEN BLOG CARD
========================================== */
.blog-card[hidden] {
    display: none;
}

/* ==========================================
   INITIAL LANGUAGE FILTER
   Prevent filter flash on page load
========================================== */
html[data-blog-filter="bangla"] .blog-card:not([data-language="bangla"]) {
    display: none;
}

html[data-blog-filter="english"] .blog-card:not([data-language="english"]) {
    display: none;
}

/* ==========================================
   FILTER BUTTON STATE
========================================== */
html[data-blog-filter="bangla"] .blog-filter-btn[data-filter="all"] {
    color: #9ca3af;
    background: transparent;
    border-color: #374151;
}

html[data-blog-filter="bangla"] .blog-filter-btn[data-filter="english"] {
    color: #9ca3af;
    background: transparent;
    border-color: #374151;
}

html[data-blog-filter="english"] .blog-filter-btn[data-filter="all"] {
    color: #9ca3af;
    background: transparent;
    border-color: #374151;
}

html[data-blog-filter="english"] .blog-filter-btn[data-filter="bangla"] {
    color: #9ca3af;
    background: transparent;
    border-color: #374151;
}

/* ==========================================
   BLOG FILTER — MOBILE
========================================== */
@media (max-width: 768px) {
    .blog-filters {
        gap: .5rem;
        margin-bottom: 2rem;
    }

    .blog-filter-btn {
        min-height: 38px;
        padding: 0 .85rem;
        font-size: .85rem;
    }
}

/* ==========================================
   BLOG GRID
========================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

/* ==========================================
   BLOG CARD
========================================== */
.blog-card {
    border: 1px solid #374151;
    border-radius: 16px;
    overflow: hidden;
    background: #111827;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: #4b5563;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .25);
}

/* ==========================================
   BLOG CARD CONTENT
========================================== */
.blog-card-content {
    padding: 1.75rem;
}

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #9ca3af;
    font-size: .85rem;
}

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

.blog-card-meta i {
    color: #9ca3af;
}

/* ==========================================
   BLOG CARD CONTENT
========================================== */
.blog-card-content h2 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    line-height: 1.35;
    font-weight: 700;
}

.blog-card-content h2 a {
    color: #ffffff;
    text-decoration: none;
    transition: color .2s ease;
}

.blog-card-content h2 a:hover {
    color: #60a5fa;
}

.blog-card-content p {
    margin: 0 0 1.25rem;
    color: #d1d5db;
    font-size: 1rem;
    line-height: 1.7;
}

/* ==========================================
   READ ARTICLE
========================================== */
.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: #60a5fa;
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s ease;
}

.blog-card-link:hover {
    color: #93c5fd;
    text-decoration: none;
}

.blog-card-link i {
    transition: transform .2s ease;
}

.blog-card-link:hover i {
    transform: translateX(4px);
}

/* ==========================================
   PREVIOUS / NEXT POST
========================================== */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #374151;
}

.post-nav-item {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    min-width: 0;
}

.post-nav-item.next-post {
    text-align: right;
}

.post-nav-label {
    color: #6b7280;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.post-nav-item a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    width: fit-content;
    color: #d1d5db;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    transition: color .2s ease;
}

.post-nav-item a:hover {
    color: #60a5fa;
    text-decoration: none;
}

.post-nav-item.next-post a {
    margin-left: auto;
}

.post-nav-empty {
    color: #6b7280;
    font-size: .9rem;
    line-height: 1.5;
}

/* ==========================================
   MOBILE
========================================== */
@media (max-width: 768px) {
    /* Blog post */
    .blog-post {
        padding-top: 90px;
    }

    .post-header h1 {
        font-size: 2.2rem;
    }

    .bangla-post .post-header h2 {
        font-size: 1.7rem;
    }

    .post-content {
        font-size: 17px;
    }

    .post-content p {
        font-size: 17px;
    }

    .post-content h2 {
        font-size: 1.7rem;
    }

    .post-content h3 {
        font-size: 1.35rem;
    }

    .post-meta {
        flex-direction: column;
        gap: .6rem;
    }

    /* Share */
    .share-buttons {
        width: 100%;
    }

    .share-buttons a, .share-buttons button {
        flex: 1 1 140px;
    }

    /* Blog archive */
    .blog-page {
        padding-top: 90px;
    }

    .blog-header {
        margin-bottom: 2rem;
    }

    .blog-header h1 {
        font-size: 2.3rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .blog-card-content {
        padding: 1.5rem;
    }

    .blog-card-content h2 {
        font-size: 1.35rem;
    }

    /* Previous / Next */
    .post-navigation {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .post-nav-item.next-post {
        text-align: left;
    }

    .post-nav-item.next-post a {
        margin-left: 0;
    }
}

/* Bangla blog posts and cards */
@font-face {
    font-family: "SiyamRupali";
    src: url("../fonts/SiyamRupali.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

/* Bangla post pages */
.bangla-post .post-header h2, .bangla-post .breadcrumb, .bangla-post .breadcrumb a, .bangla-post .breadcrumb span, .bangla-post .post-content, .bangla-post .post-content h2, .bangla-post .post-content h3, .bangla-post .post-content p, .bangla-post .post-content li, .bangla-post .post-content a {
    font-family: "SiyamRupali", sans-serif;
}

/* Bangla post cards */
.blog-card[data-language="bangla"] .blog-card-meta, .blog-card[data-language="bangla"] h2, .blog-card[data-language="bangla"] h2 a, .blog-card[data-language="bangla"] p, .blog-card[data-language="bangla"] .blog-card-link {
    font-family: "SiyamRupali", sans-serif;
}

/* Bangla post content size */
.bangla-post .post-content {
    font-size: 16px;
    line-height: 1.8;
}

.bangla-post .post-content p {
    font-size: 17px;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .bangla-post .post-content {
        font-size: 15px;
    }

    .bangla-post .post-content p {
        font-size: 15px;
    }
}
