/**
 * Bengali Media CMS - Phase 5 Complete Responsive & Optimization Stylesheet
 * 
 * Supports Target Devices:
 * - 320px, 360px, 375px, 390px, 414px, 430px (Small to Large Mobile)
 * - 480px, 600px (Phablet & Foldable)
 * - 768px, 820px (Tablet Portrait & Landscape)
 * - 1024px, 1280px (Laptop & Desktop)
 * - 1366px, 1440px (High-Res Desktop)
 * - 1920px (Ultra-Wide Full HD Screens)
 */

:root {
    /* Color Palette - Light Mode */
    --bg-canvas: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-subtle: #f1f5f9;
    --bg-surface-elevated: #ffffff;
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    --border-color: #e2e8f0;
    --border-subtle: #cbd5e1;

    --brand-primary: #b91c1c;      /* Editorial Crimson */
    --brand-hover: #991b1b;
    --brand-surface: #fef2f2;
    --brand-ring: rgba(185, 28, 28, 0.2);

    --header-height: 64px;
    --sidebar-width: clamp(240px, 20vw, 280px);
    --border-radius-sm: 6px;
    --border-radius-md: 10px;
    --border-radius-lg: 14px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

    --font-bengali: "Hind Siliguri", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-latin: "Plus Jakarta Sans", sans-serif;

    /* Responsive Fluid Typography */
    --font-size-xs: clamp(0.72rem, 0.2vw + 0.7rem, 0.8rem);
    --font-size-sm: clamp(0.82rem, 0.3vw + 0.78rem, 0.92rem);
    --font-size-base: clamp(0.95rem, 0.4vw + 0.85rem, 1.05rem);
    --font-size-lg: clamp(1.1rem, 0.6vw + 0.95rem, 1.25rem);
    --font-size-xl: clamp(1.25rem, 1vw + 1rem, 1.6rem);
    --font-size-2xl: clamp(1.5rem, 1.5vw + 1.15rem, 2.1rem);
    --font-size-3xl: clamp(1.8rem, 2.2vw + 1.3rem, 2.75rem);

    /* Touch Targets */
    --touch-target-min: 44px;
}

[data-theme="dark"] {
    --bg-canvas: #090d16;
    --bg-surface: #111827;
    --bg-surface-subtle: #1f2937;
    --bg-surface-elevated: #1e293b;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;

    --border-color: #1e293b;
    --border-subtle: #334155;

    --brand-primary: #ef4444;
    --brand-hover: #f87171;
    --brand-surface: rgba(239, 68, 68, 0.12);
    --brand-ring: rgba(239, 68, 68, 0.3);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   RESET & FOUNDATIONS
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    width: 100%;
}

body.site-body {
    font-family: var(--font-bengali);
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    transition: background-color 0.25s ease, color 0.25s ease;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

a:hover {
    color: var(--brand-primary);
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Sensible Max-Width Container for Ultra-Wide Screens */
.container {
    width: 100%;
    max-width: min(1520px, 94vw);
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(12px, 2.5vw, 24px);
    padding-right: clamp(12px, 2.5vw, 24px);
}

.container-fluid {
    width: 100%;
    padding-left: clamp(12px, 3vw, 28px);
    padding-right: clamp(12px, 3vw, 28px);
}

/* ==========================================================================
   1. SITE HEADER & COMPACT RESPONSIVE TOPBAR
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: background-color 0.25s ease, border-color 0.25s ease;
    width: 100%;
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(8px, 2vw, 16px);
}

.header-zone {
    display: flex;
    align-items: center;
}

.brand-zone {
    gap: clamp(8px, 1.5vw, 14px);
    flex-shrink: 0;
}

.site-brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    min-height: var(--touch-target-min);
}

.header-logo-img {
    max-height: 38px;
    width: auto;
    object-fit: contain;
    display: block;
}

.fallback-logo-text {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    color: var(--text-primary);
    letter-spacing: -0.02em;
    min-height: var(--touch-target-min);
}

.brand-symbol {
    width: clamp(28px, 5vw, 34px);
    height: clamp(28px, 5vw, 34px);
    background-color: var(--brand-primary);
    color: #ffffff;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    box-shadow: 0 2px 4px rgba(185, 28, 28, 0.3);
    flex-shrink: 0;
}

.brand-text {
    color: var(--text-primary);
    white-space: nowrap;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:focus-visible {
    background-color: var(--bg-surface-subtle);
    outline: none;
}

/* Search Zone */
.search-zone {
    flex: 1;
    max-width: min(440px, 40vw);
    margin: 0 clamp(6px, 1.5vw, 16px);
}

.header-search-form {
    width: 100%;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.header-search-input {
    width: 100%;
    height: 40px;
    padding: 0 42px 0 14px;
    background-color: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.header-search-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    background-color: var(--bg-surface);
    box-shadow: 0 0 0 3px var(--brand-ring);
}

.header-search-submit {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.header-search-submit:hover {
    color: var(--brand-primary);
}

/* Utilities Zone */
.utilities-zone {
    gap: clamp(6px, 1vw, 10px);
    flex-shrink: 0;
}

.theme-toggle-btn, .user-action-btn {
    height: var(--touch-target-min);
    min-width: var(--touch-target-min);
    padding: 0 clamp(8px, 1.5vw, 12px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    background-color: transparent;
    border: 1px solid var(--border-color);
    font-size: var(--font-size-xs);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.theme-toggle-btn {
    padding: 0;
    width: var(--touch-target-min);
}

.theme-toggle-btn:hover, .user-action-btn:hover {
    background-color: var(--bg-surface-subtle);
    color: var(--brand-primary);
    border-color: var(--border-subtle);
}

[data-theme="dark"] .sun-icon { display: none !important; }
[data-theme="dark"] .moon-icon { display: block !important; }
[data-theme="light"] .sun-icon { display: block !important; }
[data-theme="light"] .moon-icon { display: none !important; }

/* ==========================================================================
   2. DESKTOP LEFT SIDEBAR & MOBILE DRAWER
   ========================================================================== */
.site-layout-wrapper {
    display: flex;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    flex: 1;
    position: relative;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(9, 13, 22, 0.65);
    backdrop-filter: blur(3px);
    z-index: 1040;
}

/* Sidebar: Hidden by default on Desktop (>= 1024px) */
.left-sidebar {
    display: none;
    width: var(--sidebar-width);
    flex-shrink: 0;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    position: sticky;
    top: var(--header-height);
    height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: clamp(14px, 2vw, 20px) clamp(10px, 1.5vw, 16px);
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, border-color 0.25s ease;
}

@media (min-width: 1024px) {
    #leftSidebar,
    .left-sidebar,
    .sidebar {
        display: none !important;
    }
}

/* Mobile & Tablet Off-Canvas Drawer (1023px and below) */
@media (max-width: 1023px) {
    .mobile-menu-btn {
        display: flex !important;
    }

    .left-sidebar {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100dvh;
        z-index: 1050;
        transform: translateX(-100%);
        box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
        max-width: 320px;
        width: 82vw;
        padding: 0; /* Removing outer padding to fix the top gap issue */
        background-color: var(--bg-surface);
    }

    .left-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-header {
        display: flex !important;
        padding: 16px;
    }

    .sidebar-nav {
        padding: 0 16px 16px 16px; /* Applying padding inside the nav instead */
    }

    .sidebar-backdrop.active {
        display: block !important;
    }
}

.sidebar-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-title {
    font-weight: 700;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

.sidebar-close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sidebar-group-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 8px;
}

.sidebar-menu-list, .sidebar-category-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link, .sidebar-category-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    min-height: var(--touch-target-min);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.sidebar-link:hover, .sidebar-category-link:hover {
    background-color: var(--bg-surface-subtle);
    color: var(--brand-primary);
}

.sidebar-link.active, .sidebar-category-link.active {
    background-color: var(--brand-surface);
    color: var(--brand-primary);
    font-weight: 600;
}

.sidebar-icon {
    flex-shrink: 0;
    color: var(--text-muted);
}

.sidebar-link:hover .sidebar-icon, .sidebar-link.active .sidebar-icon {
    color: var(--brand-primary);
}

.sidebar-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-left: 6px;
}

.sidebar-tag-item {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 4px;
    background-color: var(--bg-surface-subtle);
    transition: all 0.15s ease;
}

.sidebar-tag-item:hover {
    color: var(--brand-primary);
    background-color: var(--brand-surface);
}

.sidebar-bottom {
    margin-top: 24px;
    padding: 14px;
    border-top: 1px solid var(--border-color);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.sidebar-edition {
    display: flex;
    align-items: center;
    gap: 6px;
}

.edition-dot {
    color: var(--border-subtle);
}

/* ==========================================================================
   3. PRIMARY CONTENT AREA & HERO SLIDER
   ========================================================================== */
.main-content-area {
    flex: 1;
    min-width: 0;
    padding: clamp(16px, 2.5vw, 32px) clamp(12px, 2.5vw, 32px);
    overflow-x: hidden;
}

.ad-outer-container {
    margin-bottom: clamp(20px, 3vw, 32px);
    width: 100%;
    overflow: hidden;
}

.ad-placement-slot {
    background-color: var(--bg-surface-subtle);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    padding: clamp(12px, 2vw, 16px);
    text-align: center;
    width: 100%;
    overflow: hidden;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.ad-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.ad-banner-link {
    display: block;
    width: 100%;
}

.ad-banner-img {
    margin: 0 auto;
    max-height: 100px;
    object-fit: contain;
}

/* HERO SLIDER (Clean, Thin & Auto-Fit for All Devices) */
.hero-slider-section {
    margin-bottom: clamp(24px, 3.5vw, 40px);
    width: 100%;
}

.hero-slider-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    width: 100%;
    height: clamp(200px, 40vw, 400px);
    background-color: #0f172a;
}

.slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    width: 100%;
    height: 100%;
}

.slider-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide-media-wrapper {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.slide-fallback-bg {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

/* Slider Arrows (Duplicates removed) */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: clamp(38px, 5vw, 46px);
    height: clamp(38px, 5vw, 46px);
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
    background-color: rgba(9, 13, 22, 0.55);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.slider-arrow:hover {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.slider-prev { left: 16px; }
.slider-next { right: 16px; }

/* Slider Indicators (Duplicates removed) */
.slider-indicators {
    position: absolute;
    bottom: 16px;
    right: 24px;
    z-index: 5;
    display: flex;
    gap: 6px;
}

.indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.45);
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.indicator-dot.active {
    width: 26px;
    background-color: var(--brand-primary);
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    min-height: var(--touch-target-min);
    background-color: #ffffff;
    color: #0f172a;
    font-size: var(--font-size-xs);
    font-weight: 700;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
}

.btn-read-more:hover {
    background-color: #f1f5f9;
    color: var(--brand-primary);
    transform: translateY(-1px);
}

/* ==========================================================================
   4. POSTS GRIDS & RESPONSIVE CARDS
   ========================================================================== */
.homepage-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.5fr) minmax(280px, 1fr);
    gap: clamp(20px, 3vw, 36px);
}

.homepage-feed-col {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 3.5vw, 40px);
    min-width: 0;
}

.section-heading-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    gap: 12px;
    transition: border-color 0.25s ease;
}

.heading-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.heading-accent {
    width: 5px;
    height: 22px;
    background-color: var(--brand-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

.section-title {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    transition: color 0.25s ease;
}

.section-subtitle {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.section-view-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--brand-primary);
    min-height: 36px;
}

/* FLUID POST CARDS GRID */
.post-cards-grid,
.apps-grid,
.prompts-grid,
.archive-grid,
.search-grid,
.related-posts-grid,
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(14px, 2vw, 24px);
    width: 100%;
}

.post-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    align-self: start;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-subtle);
}

.post-thumbnail-link {
    display: block;
    width: 100%;
    overflow: hidden;
    flex-shrink: 0;
}

.post-thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--bg-surface-subtle);
    overflow: hidden;
    transition: background-color 0.25s ease;
}

.post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail {
    transform: scale(1.04);
}

.thumbnail-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-surface-subtle), var(--border-color));
}

.fallback-cat {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--text-muted);
}

.post-card-body {
    padding: clamp(12px, 2vw, 16px);
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

/* ZERO-PILL METADATA STRIP */
.post-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-bottom: 8px;
}

.post-meta-category {
    font-weight: 700;
    color: var(--brand-primary);
}

.post-meta-category:hover {
    text-decoration: underline;
}

.meta-dot {
    color: var(--border-subtle);
}

.post-card-title {
    font-size: var(--font-size-base);
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 8px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* FIX: Ensure post title changes color properly in light/dark mode */
.post-card-title a,
.post-title-link {
    color: var(--text-primary);
    transition: color 0.25s ease;
}

.post-card-title a:hover,
.post-title-link:hover {
    color: var(--brand-primary);
}

.post-card-excerpt {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: auto;
    transition: color 0.25s ease;
}

/* SIDEBAR WIDGETS */
.homepage-aside-col {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 3vw, 32px);
    min-width: 0;
}

.sidebar-widget {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    width: 100%;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.25s ease;
}

.widget-title {
    font-size: var(--font-size-sm);
    font-weight: 800;
    color: var(--text-primary);
    transition: color 0.25s ease;
}

.widget-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--brand-primary);
    background-color: var(--brand-surface);
    padding: 2px 6px;
    border-radius: 4px;
}

.popular-posts-list {
    list-style: none;
    padding: 8px 0;
}

.popular-post-item {
    display: flex;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.15s ease, border-color 0.25s ease;
}

.popular-post-item:last-child {
    border-bottom: none;
}

.popular-post-item:hover {
    background-color: var(--bg-surface-subtle);
}

.popular-rank {
    font-size: var(--font-size-lg);
    font-weight: 800;
    color: var(--text-muted);
    width: 24px;
    flex-shrink: 0;
    text-align: center;
    line-height: 1.2;
}

.popular-post-info {
    flex: 1;
    min-width: 0;
}

.popular-cat {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--brand-primary);
    display: block;
    margin-bottom: 2px;
}

.popular-title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
    word-break: break-word;
    transition: color 0.25s ease;
}

.popular-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.widget-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px 16px;
}

.widget-tag-link {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-secondary);
    padding: 6px 10px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-surface-subtle);
    border-radius: var(--border-radius-sm);
    transition: all 0.15s ease;
}

.widget-tag-link:hover {
    background-color: var(--brand-surface);
    color: var(--brand-primary);
}

.tag-count {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ==========================================================================
   5. SINGLE POST READING EXPERIENCE (/post/{slug})
   ========================================================================== */
.single-post-article {
    max-width: min(1180px, 100%);
    margin: 0 auto;
}

.breadcrumb-nav {
    margin-bottom: 16px;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.breadcrumb-item a:hover {
    color: var(--brand-primary);
}

.breadcrumb-separator {
    color: var(--border-subtle);
}

.post-kicker-bar {
    margin-bottom: 8px;
}

.post-kicker-link {
    font-size: var(--font-size-sm);
    font-weight: 800;
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.single-post-title {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 16px;
    word-break: break-word;
    overflow-wrap: anywhere;
    transition: color 0.25s ease;
}

.post-byline-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: clamp(16px, 2.5vw, 24px);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    transition: border-color 0.25s ease;
}

.author-details {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-surface-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: background-color 0.25s ease;
}

.author-name {
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.25s ease;
}

.meta-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-hero-figure {
    margin-bottom: clamp(20px, 3vw, 32px);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    background-color: #0f172a;
    width: 100%;
}

.post-hero-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 540px;
    object-fit: cover;
}

.post-image-caption {
    padding: 10px 16px;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    font-style: italic;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.post-content-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.6fr) minmax(280px, 1fr);
    gap: clamp(20px, 3vw, 40px);
}

.post-body-container {
    min-width: 0;
}

.article-rich-text {
    font-size: var(--font-size-base);
    line-height: 1.85;
    color: var(--text-primary);
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 75ch;
    transition: color 0.25s ease;
}

.article-rich-text p {
    margin-bottom: 1.35em;
}

.article-rich-text h2, .article-rich-text h3 {
    margin-top: 1.5em;
    margin-bottom: 0.6em;
    font-weight: 800;
    line-height: 1.35;
    color: var(--text-primary);
}

.article-rich-text blockquote {
    padding: 16px 20px;
    margin: 24px 0;
    border-left: 4px solid var(--brand-primary);
    background-color: var(--bg-surface-subtle);
    font-style: italic;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    transition: background-color 0.25s ease;
}

.post-tags-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    transition: border-color 0.25s ease;
}

.tags-label {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--text-muted);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.post-tag-item {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    background-color: var(--bg-surface-subtle);
    padding: 6px 12px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    border-radius: var(--border-radius-sm);
    transition: all 0.15s ease;
}

.post-tag-item:hover {
    background-color: var(--brand-surface);
    color: var(--brand-primary);
}

/* SOCIAL SHARE BAR */
.post-share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding: 16px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.share-label {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.25s ease;
}

.share-buttons-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    min-height: var(--touch-target-min);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.share-facebook { background-color: #1877f2; color: #ffffff; }
.share-facebook:hover { background-color: #0c63d4; }
.share-twitter { background-color: #0f1419; color: #ffffff; }
.share-twitter:hover { background-color: #272c30; }
.share-whatsapp { background-color: #25d366; color: #ffffff; }
.share-whatsapp:hover { background-color: #1ea952; }
.share-copy { background-color: var(--bg-surface-subtle); color: var(--text-primary); border: 1px solid var(--border-color); }
.share-copy:hover { background-color: var(--border-color); }

/* PREV / NEXT NAV */
.prev-next-posts-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    transition: border-color 0.25s ease;
}

.nav-post-col {
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: var(--bg-surface);
    transition: border-color 0.15s ease, background-color 0.25s ease;
}

.nav-post-col:hover {
    border-color: var(--brand-primary);
}

.next-post-col {
    text-align: right;
}

.nav-direction-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.nav-post-title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    line-height: 1.4;
    word-break: break-word;
    color: var(--text-primary);
    transition: color 0.25s ease;
}

/* COMMENTS */
.comments-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid var(--border-color);
    transition: border-color 0.25s ease;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 20px 0;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-surface-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: background-color 0.25s ease;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: var(--font-size-xs);
}

.comment-author {
    font-weight: 700;
    color: var(--brand-primary);
}

.comment-date {
    color: var(--text-muted);
}

.comment-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    transition: color 0.25s ease;
}

/* COMMENT FORM */
.comment-form-container {
    margin-top: 32px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: clamp(16px, 3vw, 28px);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.form-title {
    font-size: var(--font-size-base);
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
    transition: color 0.25s ease;
}

.comment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.25s ease;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    min-height: var(--touch-target-min);
    background-color: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    transition: all 0.15s ease;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    background-color: var(--bg-surface);
    box-shadow: 0 0 0 3px var(--brand-ring);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    min-height: var(--touch-target-min);
    background-color: var(--brand-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-primary:hover {
    background-color: var(--brand-hover);
}

/* ==========================================================================
   6. ARCHIVES (CATEGORY, TAG, SEARCH) & STATIC PAGE
   ========================================================================== */
.archive-page-container, .static-page-article, .search-page-container {
    max-width: min(1200px, 100%);
    margin: 0 auto;
}

.archive-header, .search-hero-box {
    margin-bottom: clamp(20px, 3vw, 32px);
    padding: clamp(16px, 3vw, 28px);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.archive-title, .search-page-title, .static-page-title {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
    transition: color 0.25s ease;
}

.archive-desc {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-top: 8px;
    max-width: 60ch;
    transition: color 0.25s ease;
}

.archive-count, .search-result-stats {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 500;
}

.search-page-form {
    margin-top: 16px;
    max-width: 600px;
}

.search-page-input-wrap {
    display: flex;
    gap: 8px;
}

.search-page-input {
    flex: 1;
    padding: 10px 14px;
    min-height: var(--touch-target-min);
    background-color: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    transition: all 0.25s ease;
}

.search-page-btn {
    padding: 0 20px;
    min-height: var(--touch-target-min);
    background-color: var(--brand-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    font-size: var(--font-size-sm);
    cursor: pointer;
}

/* PAGINATION */
.pagination-nav {
    margin-top: clamp(24px, 4vw, 40px);
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-surface);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: all 0.25s ease;
}

.pagination-link.active {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #ffffff;
}

/* ==========================================================================
   7. SITE FOOTER
   ========================================================================== */
.site-footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    width: 100%;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.footer-main {
    padding-top: clamp(28px, 4vw, 48px);
    padding-bottom: clamp(24px, 3.5vw, 40px);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 36px);
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    transition: color 0.25s ease;
}

.footer-logo-symbol {
    width: 30px;
    height: 30px;
    background-color: var(--brand-primary);
    color: #ffffff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.footer-desc {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    max-width: 45ch;
}

.footer-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.social-icon-btn {
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-surface-subtle);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.social-icon-btn:hover {
    background-color: var(--brand-primary);
    color: #ffffff;
}

.footer-heading {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--brand-primary);
    display: inline-block;
    transition: color 0.25s ease;
}

.footer-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-nav-list a {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    min-height: 24px;
    display: inline-block;
}

.footer-nav-list a:hover {
    color: var(--brand-primary);
}

.footer-contact-info .contact-item {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.footer-bottom {
    background-color: var(--bg-canvas);
    border-top: 1px solid var(--border-color);
    padding: 16px 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* ==========================================================================
   8. COMPREHENSIVE RESPONSIVE REDESIGN FOR ALL SCREEN SIZES
   ========================================================================== */

/* --- VERY LARGE & LARGE DESKTOP SCREENS (1440px+) --- */
@media (min-width: 1440px) {
    .site-layout-wrapper {
        max-width: 1680px;
    }
    .post-cards-grid,
    .apps-grid,
    .prompts-grid,
    .archive-grid,
    .search-grid,
    .related-posts-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: clamp(16px, 2vw, 24px);
    }
    .hero-slider-container {
        aspect-ratio: 21 / 9;
        max-height: 560px;
    }
}

/* --- LAPTOP / STANDARD DESKTOP (1024px - 1439px) --- */
@media (min-width: 1024px) and (max-width: 1439px) {
    :root {
        --sidebar-width: 240px;
    }
    .site-layout-wrapper {
        max-width: 1440px;
    }
    .post-cards-grid,
    .apps-grid,
    .prompts-grid,
    .archive-grid,
    .search-grid,
    .related-posts-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: clamp(12px, 1.8vw, 18px);
    }
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- TABLETS & MEDIUM SCREENS (769px - 1023px) --- */
@media (min-width: 769px) and (max-width: 1023px) {
    .homepage-layout-grid {
        grid-template-columns: 1fr;
    }
    .post-content-layout {
        grid-template-columns: 1fr;
    }
    .post-cards-grid,
    .apps-grid,
    .prompts-grid,
    .archive-grid,
    .search-grid,
    .related-posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .search-zone {
        max-width: 260px;
    }
}

/* --- MOBILE DEVICES (Up to 768px down to 320px) --- */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Convert Desktop Sidebar into Full Mobile Off-Canvas Drawer */
    .left-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100dvh;
        z-index: 1050;
        transform: translateX(-100%);
        box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
        max-width: 300px;
        width: 82vw;
        padding: 0; /* FIX: Removing outer padding to fix the top gap issue */
        background-color: var(--bg-surface);
    }

    .left-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-header {
        display: flex;
        padding: 16px;
    }
    
    .sidebar-nav {
        padding: 0 16px 16px 16px;
    }

    .sidebar-backdrop.active {
        display: block;
    }

    /* Compact Header */
    .header-inner {
        padding-left: 8px;
        padding-right: 8px;
    }

    .brand-link {
        font-size: 1.15rem;
    }

    /* Compact or Hidden Desktop Search Input */
    .search-zone {
        display: none;
    }

    .user-label {
        display: none;
    }

    .main-content-area {
        padding: 14px clamp(6px, 2vw, 12px);
    }

    /* Hero Slider Adaptation */
    .hero-slider-container {
        aspect-ratio: 16 / 10;
        min-height: 220px;
        max-height: 360px;
    }

    .slide-content {
        padding: 12px 14px;
        max-width: 100%;
    }

    .slide-excerpt {
        display: none;
    }

    .slide-title {
        font-size: clamp(1rem, 4vw, 1.35rem);
    }

    .slider-arrow {
        width: 34px;
        height: 34px;
    }

    .slider-prev { left: 8px; }
    .slider-next { right: 8px; }

    /* Layout Grids become single column */
    .homepage-layout-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .post-content-layout {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .prev-next-posts-nav {
        grid-template-columns: 1fr;
    }

    .comment-form .form-row {
        grid-template-columns: 1fr;
    }

    .post-byline-strip {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .share-buttons-group {
        width: 100%;
    }

    .share-btn {
        flex: 1;
        justify-content: center;
        min-height: 40px;
    }

    /* STRICT 2-COLUMN GRID ON MOBILE (Up to 768px down to 320px) */
    .post-cards-grid,
    .apps-grid,
    .prompts-grid,
    .archive-grid,
    .search-grid,
    .related-posts-grid,
    .categories-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: clamp(8px, 2vw, 12px) !important;
        width: 100% !important;
    }

    /* 2-Column Mobile Card & Component Proportions */
    .post-card {
        min-width: 0 !important;
        width: 100% !important;
        border-radius: var(--border-radius-sm, 8px) !important;
        overflow: hidden !important;
    }

    .post-card-body {
        padding: clamp(6px, 1.5vw, 10px) !important;
        min-width: 0 !important;
    }

    .post-thumbnail-wrapper {
        border-radius: 6px !important;
    }

    .post-type-badge {
        top: 6px !important;
        left: 6px !important;
        padding: 2px 5px !important;
        font-size: 0.58rem !important;
        line-height: 1 !important;
        letter-spacing: 0.02em !important;
    }

    .post-model-badge,
    .post-size-badge {
        top: 6px !important;
        right: 6px !important;
        padding: 2px 5px !important;
        font-size: 0.55rem !important;
        line-height: 1 !important;
        max-width: 48% !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .post-card-meta {
        font-size: 0.65rem !important;
        margin-bottom: 4px !important;
        gap: 4px !important;
        flex-wrap: wrap !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .post-meta-category {
        font-size: 0.65rem !important;
        max-width: 100% !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .post-meta-platform,
    .post-meta-date {
        font-size: 0.6rem !important;
        padding: 1px 4px !important;
    }

    .post-card-title {
        font-size: 0.82rem !important;
        line-height: 1.25 !important;
        margin: 0 0 4px 0 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        word-break: break-word !important;
    }
     
    .post-card-excerpt {
        font-size: 0.72rem !important;
        line-height: 1.3 !important;
        margin: 0 0 6px 0 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .post-card-footer,
    .post-card-body > div:last-child {
        padding-top: 6px !important;
        margin-top: auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        font-size: 0.65rem !important;
    }

    .post-card-footer > div,
    .post-card-body > div:last-child > span {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        font-size: 0.62rem !important;
    }

    .post-view-btn,
    .post-card-body > div:last-child > a {
        width: 100% !important;
        justify-content: center !important;
        padding: 3px 6px !important;
        font-size: 0.65rem !important;
        border-radius: 4px !important;
        min-height: 26px !important;
    }
}

/* --- ULTRA-COMPACT MOBILE (320px - 480px) --- */
@media (max-width: 480px) {
    .main-content-area {
        padding: 10px clamp(4px, 1.5vw, 8px) !important;
    }

    .post-cards-grid,
    .apps-grid,
    .prompts-grid,
    .archive-grid,
    .search-grid,
    .related-posts-grid,
    .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }

    .post-card-body {
        padding: 6px 4px !important;
    }

    .post-card-title {
        font-size: 0.76rem !important;
        line-height: 1.2 !important;
    }

    .post-card-excerpt {
        display: none !important; /* Hide excerpt on compact 320px-480px screens */
    }

    .post-card-footer,
    .post-card-body > div:last-child {
        padding-top: 4px !important;
        gap: 3px !important;
    }

    .post-view-btn,
    .post-card-body > div:last-child > a {
        padding: 2px 4px !important;
        font-size: 0.6rem !important;
        min-height: 24px !important;
    }

    .single-post-title {
        font-size: 1.35rem;
    }

    .article-rich-text {
        font-size: 0.95rem;
    }

    .btn-read-more {
        padding: 5px 10px;
        font-size: 0.72rem;
    }
}

.section-title {
    color: var(--text-primary) !important; /* এটি লাইট মোডে কালো এবং ডার্ক মোডে সাদা বা থিম অনুযায়ী কালার নিয়ে নেবে */
}








