/* ==========================================================================
   TypoCore — Mobile-First Professional Single Post Article Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   BASE MOBILE STYLES (Targeting 360px - 480px Smartphones FIRST)
   -------------------------------------------------------------------------- */
.tc-article-page {
    --art-heading: #0B1F3A;
    --art-text: #2B2B2B;
    --art-link: #1D5FD6;
    --art-caption: #5A6B85;
    --art-button: #E31E24;
    --art-bg: #FFFFFF;

    font-family: 'Noto Sans Bengali', sans-serif;
    color: var(--art-text);
    background-color: var(--art-bg);
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 14px 14px 36px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.tc-article-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* 1. Breadcrumb & Category Pill */
.tc-article-header {
    margin-bottom: 20px;
}

.tc-breadcrumb {
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 0.85rem;
    color: var(--art-caption);
    margin-bottom: 10px;
    line-height: 1.4;
    overflow-wrap: break-word;
}

.tc-breadcrumb a {
    color: var(--art-caption);
    text-decoration: none;
}

.tc-breadcrumb a:hover {
    color: var(--art-link);
}

.tc-category-pill {
    display: inline-flex;
    align-items: center;
    background-color: var(--art-link);
    color: #FFFFFF !important;
    font-family: 'Noto Sans Bengali', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none !important;
    margin-bottom: 12px;
    min-height: 44px;
    box-sizing: border-box;
}

/* 2. Article Headline (H1) */
.tc-article-title {
    font-family: 'Anek Bengali', sans-serif;
    font-weight: 700;
    color: var(--art-heading);
    font-size: clamp(1.75rem, 7vw, 2.125rem); /* 28px - 34px on mobile */
    line-height: 1.25;
    margin: 0 0 14px;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* 3. Short Excerpt / Summary */
.tc-article-excerpt {
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 1.0625rem; /* 17px */
    line-height: 1.7;
    color: var(--art-text);
    background-color: #F8FAFC;
    border-left: 4px solid var(--art-link);
    padding: 12px 14px;
    border-radius: 0 4px 4px 0;
    margin-bottom: 18px;
    font-weight: 500;
}

.tc-article-excerpt p {
    margin: 0;
}

/* 4. Metadata Row (Author, Date, Updated) */
.tc-meta-row {
    display: flex;
    flex-direction: column; /* Stacked for mobile */
    align-items: flex-start;
    gap: 8px;
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 0.875rem;
    color: var(--art-caption);
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(90, 107, 133, 0.15);
}

.tc-meta-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--art-heading);
}

.tc-meta-author img {
    border-radius: 50%;
}

.tc-meta-date, .tc-meta-updated {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 5. Social Share Bar */
.tc-share-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #F8FAFC;
    border: 1px solid rgba(90, 107, 133, 0.15);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 22px;
}

.tc-share-label {
    font-family: 'Anek Bengali', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--art-heading);
}

.tc-share-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.tc-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 4px;
    font-family: 'Baloo Da 2', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: #FFFFFF !important;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    min-height: 44px; /* Touch target minimum */
    min-width: 44px;
    box-sizing: border-box;
    flex: 1 1 auto;
}

.tc-btn-fb { background-color: #1877F2; }
.tc-btn-wa { background-color: #25D366; }
.tc-btn-tw { background-color: #000000; }
.tc-btn-copy { background-color: var(--art-heading); position: relative; }

/* 6. Featured Image & Caption */
.tc-featured-media {
    margin-bottom: 22px;
    width: 100%;
}

.tc-featured-media img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    object-fit: cover;
}

.tc-image-caption {
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 0.85rem;
    color: var(--art-caption);
    margin-top: 6px;
    display: block;
    line-height: 1.4;
}

/* 7. Article Body Content */
.tc-article-body {
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 1.0625rem; /* 17px - 18px range */
    line-height: 1.85;
    color: var(--art-text);
    margin-bottom: 28px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.tc-article-body p {
    margin-bottom: 1.3em;
}

.tc-article-body h2, .tc-article-body h3, .tc-article-body h4 {
    font-family: 'Anek Bengali', sans-serif;
    font-weight: 700;
    color: var(--art-heading);
    margin-top: 28px;
    margin-bottom: 12px;
    line-height: 1.3;
    overflow-wrap: break-word;
}

.tc-article-body h2 { font-size: 1.4rem; }
.tc-article-body h3 { font-size: 1.25rem; }
.tc-article-body h4 { font-size: 1.1rem; }

.tc-article-body a {
    color: var(--art-link);
    font-weight: 500;
    text-decoration: underline;
}

.tc-article-body blockquote {
    border-left: 4px solid var(--art-link);
    background-color: #F8FAFC;
    padding: 14px 16px;
    margin: 20px 0;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--art-heading);
    border-radius: 0 4px 4px 0;
}

.tc-article-body ul, .tc-article-body ol {
    margin-bottom: 1.3em;
    padding-left: 20px;
}

.tc-article-body li {
    margin-bottom: 6px;
}

/* Responsive Table Container (Zero Horizontal Page Scroll) */
.tc-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
}

.tc-article-body table {
    width: 100%;
    min-width: 400px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tc-article-body table th, .tc-article-body table td {
    padding: 8px 12px;
    border: 1px solid rgba(90, 107, 133, 0.2);
}

.tc-article-body table th {
    background-color: #F4F6F9;
    color: var(--art-heading);
    font-family: 'Anek Bengali', sans-serif;
}

/* Responsive Videos & Embeds */
.tc-article-body iframe, .tc-article-body video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
}

/* 8. Dynamic Tags Area */
.tc-tags-area {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
    margin-bottom: 28px;
    border-top: 1px solid rgba(90, 107, 133, 0.15);
}

.tc-tags-label {
    font-family: 'Anek Bengali', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--art-heading);
}

.tc-tags-area a {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #F0F4F8;
    color: var(--art-heading);
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 0.85rem;
    border-radius: 20px;
    text-decoration: none !important;
    min-height: 44px;
    box-sizing: border-box;
}

/* 9. Author Bio Box (Stacked for Mobile) */
.tc-author-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    background-color: #F8FAFC;
    border: 1px solid rgba(90, 107, 133, 0.18);
    border-radius: 8px;
    padding: 20px 16px;
    margin-bottom: 30px;
}

.tc-author-avatar img {
    border-radius: 50%;
}

.tc-author-name {
    font-family: 'Anek Bengali', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.tc-author-name a {
    color: var(--art-heading);
    text-decoration: none;
}

.tc-author-role {
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 0.825rem;
    color: var(--art-caption);
    margin: 0 0 8px;
}

.tc-author-bio {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--art-text);
    margin-bottom: 10px;
}

.tc-author-more {
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--art-link);
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* 10. Related News Section (Vertical Stack for Mobile) */
.tc-related-section {
    margin-top: 32px;
    margin-bottom: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--art-heading);
}

.tc-section-title {
    font-family: 'Anek Bengali', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--art-heading);
    margin: 0 0 16px;
}

.tc-related-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tc-related-card {
    display: flex;
    gap: 12px;
    background: #FFFFFF;
    border: 1px solid rgba(90, 107, 133, 0.15);
    border-radius: 6px;
    overflow: hidden;
    padding: 10px;
}

.tc-related-thumb {
    width: 100px;
    height: 75px;
    flex-shrink: 0;
}

.tc-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.tc-related-body {
    display: flex;
    align-items: center;
}

.tc-related-card-title {
    font-family: 'Anek Bengali', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.35;
    margin: 0;
}

.tc-related-card-title a {
    color: var(--art-heading);
    text-decoration: none;
}

/* 11. Post Navigation (Vertical Stack for Mobile) */
.tc-post-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.tc-nav-card {
    display: block;
    background-color: #F8FAFC;
    border: 1px solid rgba(90, 107, 133, 0.15);
    border-radius: 6px;
    padding: 12px 14px;
    text-decoration: none !important;
    min-height: 44px;
    box-sizing: border-box;
}

.tc-nav-label {
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 0.8rem;
    color: var(--art-caption);
    display: block;
    margin-bottom: 4px;
}

.tc-nav-title {
    font-family: 'Anek Bengali', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--art-heading);
    line-height: 1.35;
}

/* --------------------------------------------------------------------------
   PROGRESSIVE ENHANCEMENTS (Tablet: ≥768px)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    .tc-article-page {
        padding: 20px 24px 44px;
    }

    .tc-meta-row {
        flex-direction: row;
        align-items: center;
        gap: 18px;
    }

    .tc-share-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .tc-share-btn {
        flex: 0 0 auto;
    }

    .tc-author-box {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
        padding: 24px;
    }

    .tc-related-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .tc-related-card {
        flex-direction: column;
        padding: 0;
    }

    .tc-related-thumb {
        width: 100%;
        height: 140px;
    }

    .tc-related-thumb img {
        border-radius: 0;
    }

    .tc-related-body {
        padding: 12px;
    }

    .tc-post-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .tc-nav-next {
        text-align: right;
    }
}

/* --------------------------------------------------------------------------
   PROGRESSIVE ENHANCEMENTS (Desktop: ≥1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
    .tc-article-page {
        max-width: 1200px;
        padding: 24px 20px 60px;
    }

    .tc-article-wrapper {
        max-width: 780px;
        margin: 0 auto;
    }

    .tc-article-title {
        font-size: clamp(2.5rem, 4vw, 3.5rem); /* 42px - 58px on desktop */
    }

    .tc-article-body {
        font-size: 1.18rem; /* 19px - 20px on desktop */
    }

    .tc-related-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }
}
