/* assets/css/style.css - Modern, High-Aesthetic Theme for Goppo.online */

@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,600;1,400&family=Noto+Serif+Bengali:wght@400;600;700&display=swap');

:root {
    /* Color Palette */
    --bg-primary: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-elevated: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-story: #e2e8f0;
    --accent: #e11d48; /* Vibrant Story Crimson */
    --accent-hover: #f43f5e;
    --accent-glow: rgba(225, 29, 72, 0.25);
    --gold: #f59e0b;
    --border-color: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    
    /* Fonts */
    --font-heading: 'Hind Siliguri', 'Inter', sans-serif;
    --font-reading: 'Noto Serif Bengali', 'Lora', serif;
    --font-body: 'Hind Siliguri', 'Inter', sans-serif;
    
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-story: #334155;
    --border-color: rgba(0, 0, 0, 0.08);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Prevent scroll when mobile nav is open */
body.nav-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Reading Progress Bar */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    width: 0%;
    z-index: 1000;
    transition: width 0.1s ease-out;
}

/* Navigation Bar */
.navbar {
    background-color: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 900;
}
[data-theme="light"] .navbar {
    background-color: rgba(255, 255, 255, 0.85);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: var(--font-heading);
}

.brand-logo span {
    color: var(--accent);
}

.brand-logo .logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent), var(--gold));
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
    color: var(--accent);
    background-color: var(--bg-surface-elevated);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle & Search Button */
.btn-icon {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Main Container */
.main-wrapper {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    flex: 1;
    width: 100%;
}

/* Hero Header */
.hero-banner {
    text-align: center;
    padding: 3rem 1.5rem;
    background: linear-gradient(180deg, var(--bg-surface) 0%, transparent 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.hero-banner h1 {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-banner p {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto 1.5rem;
}

/* ─── Section Header (shared across sections) ─────── */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.section-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* ─── Stats Bar ───────────────────────────────────── */
.stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.2rem 2rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--card-shadow);
}

.stats-bar-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex: 1;
    justify-content: center;
}

.stats-bar-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.stats-bar-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.1;
}

.stats-bar-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stats-bar-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
    flex-shrink: 0;
    margin: 0 1rem;
}

/* ─── Trending Strip ──────────────────────────────── */
.trending-section {
    margin-bottom: 2.5rem;
}

.trending-strip {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scroll-snap-type: x mandatory;
}

.trending-strip::-webkit-scrollbar {
    height: 4px;
}
.trending-strip::-webkit-scrollbar-track { background: var(--bg-surface-elevated); border-radius: 4px; }
.trending-strip::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

.trending-card {
    flex-shrink: 0;
    width: 200px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    color: var(--text-main);
    text-decoration: none;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

.trending-card:hover {
    transform: translateY(-5px);
    border-color: rgba(225, 29, 72, 0.4);
    box-shadow: 0 12px 28px -8px rgba(0,0,0,0.35);
}

.trending-thumb {
    width: 100%;
    height: 120px;
    overflow: hidden;
    position: relative;
    background: var(--bg-surface-elevated);
}

.trending-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.trending-card:hover .trending-thumb img {
    transform: scale(1.08);
}

.trending-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 2rem;
}

.trending-rank {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.trending-info {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
}

.trending-title {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-card:hover .trending-title {
    color: var(--accent);
}

.trending-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 0.4rem;
}

/* ─── New Badge ───────────────────────────────────── */
.badge-new {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.badge-new--abs {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
}

/* ─── Category Sections ───────────────────────────── */
.category-sections-wrapper {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.cat-section {
    border-top: 1px solid var(--border-color);
    padding-top: 1.8rem;
}

.cat-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cat-section-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.cat-section-title a {
    color: var(--text-main);
    transition: color 0.2s;
}

.cat-section-title a:hover {
    color: var(--accent);
}

.see-all-link {
    font-size: 0.88rem;
    color: var(--accent);
    font-weight: 600;
    transition: opacity 0.2s;
}

.see-all-link:hover {
    opacity: 0.75;
}

/* 3-column row per category */
.cat-story-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
}

.cat-story-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
}

.cat-story-card:hover {
    transform: translateY(-4px);
    border-color: rgba(225, 29, 72, 0.4);
    box-shadow: 0 10px 24px -8px rgba(0,0,0,0.3);
}

.cat-story-thumb {
    width: 100%;
    height: 140px;
    overflow: hidden;
    position: relative;
    background: var(--bg-surface-elevated);
    flex-shrink: 0;
}

.cat-story-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cat-story-card:hover .cat-story-thumb img {
    transform: scale(1.06);
}

.cat-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--bg-surface-elevated), var(--bg-surface));
}

.cat-story-info {
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cat-story-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.35rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-story-card:hover .cat-story-title {
    color: var(--accent);
}

.cat-story-excerpt {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.6rem;
}

.cat-story-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
    .stats-bar {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .stats-bar-divider {
        display: none;
    }

    .stats-bar-item {
        flex: 1 1 calc(33% - 1rem);
        justify-content: center;
    }

    .stats-bar-number {
        font-size: 1.3rem;
    }

    /* Trending: no x-scroll on tablet — 3-column wrap */
    .trending-strip {
        overflow-x: visible;
        flex-wrap: wrap;
        scroll-snap-type: none;
    }

    .trending-card {
        width: auto;
        flex: 1 1 calc(33.333% - 0.7rem);
        min-width: 0;
    }

    .cat-story-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-bar {
        flex-direction: row;
        padding: 0.8rem;
    }

    .stats-bar-number {
        font-size: 1.1rem;
    }

    .stats-bar-label {
        font-size: 0.7rem;
    }

    .stats-bar-icon {
        font-size: 1.3rem;
    }

    /* Trending: 2-column wrap on mobile */
    .trending-strip {
        overflow-x: visible;
        flex-wrap: wrap;
        scroll-snap-type: none;
    }

    .trending-card {
        width: auto;
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 0;
    }

    .trending-thumb {
        height: 110px;
    }

    .cat-story-row {
        grid-template-columns: 1fr;
    }

    .cat-story-thumb {
        height: 180px;
    }

    .category-sections-wrapper {
        margin-top: 2rem;
        gap: 1.8rem;
    }
}

/* Category Pills Bar */
.category-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    /* Desktop: horizontal scroll if too many pills */
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    scrollbar-width: thin;
}

.category-pill {
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
    flex-shrink: 0;
}

.category-pill:hover, .category-pill.active {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* ── Tablet/Mobile: wrap into rows, no x-scroll ───── */
@media (max-width: 768px) {
    .category-bar {
        overflow-x: visible;
        flex-wrap: wrap;
        padding-bottom: 0;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .category-pill {
        flex-shrink: 1;
        padding: 0.45rem 1rem;
        font-size: 0.88rem;
    }
}

@media (max-width: 480px) {
    .category-bar {
        gap: 0.4rem;
    }

    .category-pill {
        padding: 0.4rem 0.85rem;
        font-size: 0.82rem;
    }
}

/* Story Grid */
.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.8rem;
}

.story-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
}

.story-card:hover {
    transform: translateY(-6px);
    border-color: rgba(225, 29, 72, 0.4);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.4);
}

.story-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--bg-surface-elevated);
}

.story-content {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.story-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.cat-badge {
    background-color: rgba(225, 29, 72, 0.15);
    color: var(--accent);
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}

.story-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    line-height: 1.4;
    color: var(--text-main);
}

.story-title a:hover {
    color: var(--accent);
}

.story-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.story-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 0.9rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Single Story View Layout */
.single-story-container {
    max-width: 820px;
    margin: 0 auto;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
}

@media (max-width: 768px) {
    .single-story-container {
        padding: 1.5rem;
    }
}

.story-header {
    text-align: center;
    margin-bottom: 2rem;
}

.story-header-title {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 1rem 0;
    font-family: var(--font-heading);
}

.story-header-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.featured-img-wrap {
    margin: 2rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    max-height: 420px;
}

.featured-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-body {
    font-family: var(--font-reading);
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--text-story);
    margin-bottom: 3rem;
}

.story-body p {
    margin-bottom: 1.5rem;
}

.story-body h2, .story-body h3 {
    font-family: var(--font-heading);
    color: var(--text-main);
    margin: 2rem 0 1rem;
}

.story-body blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1.2rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-muted);
}

/* Social Share Bar */
.share-section {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.2rem 0;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.btn-share {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-whatsapp { background-color: #25D366; }
.btn-facebook { background-color: #1877F2; }
.btn-copy { background-color: var(--bg-surface-elevated); color: var(--text-main); }

.btn-share:hover { opacity: 0.9; transform: translateY(-2px); }

/* Comments Section */
.comments-container {
    margin-top: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.comment-form {
    background: var(--bg-surface-elevated);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Honeypot field (hidden from human users) */
.hp-field {
    display: none !important;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.comment-item {
    background-color: var(--bg-surface-elevated);
    padding: 1.2rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
}

.comment-author {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: var(--text-main);
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.comment-text {
    color: var(--text-story);
    line-height: 1.5;
}

/* ─── Related Stories Section ─────────────────────── */
.related-stories-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* 4-col grid on desktop, responsive below */
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.2rem;
}

/* Compact horizontal card */
.related-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    color: var(--text-main);
    text-decoration: none;
}

.related-card:hover {
    transform: translateY(-4px);
    border-color: rgba(225, 29, 72, 0.4);
    box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.35);
}

.related-thumb {
    width: 100%;
    height: 130px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-surface);
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-card:hover .related-thumb img {
    transform: scale(1.06);
}

.related-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--bg-surface-elevated), var(--bg-surface));
}

.related-info {
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.related-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.4rem;
    color: var(--text-main);
    /* clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card:hover .related-title {
    color: var(--accent);
}

.related-excerpt {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 0.6rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* Responsive breakpoints for related grid */
@media (max-width: 900px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .related-thumb {
        height: 100px;
    }

    .related-title {
        font-size: 0.85rem;
    }

    .related-excerpt {
        display: none; /* hide excerpt on tiny screens */
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-item {
    padding: 0.5rem 1rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 600;
    transition: var(--transition);
}

.page-item:hover, .page-item.active {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Footer */
.site-footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    margin-top: auto;
    font-size: 0.95rem;
}

/* Search Box Modal / Drawer */
.search-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    place-items: center;
    z-index: 2000;
}

.search-modal.active {
    display: grid;
}

.search-box-card {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 550px;
    border: 1px solid var(--border-color);
}

/* =============================================
   HAMBURGER MENU (Mobile)
   ============================================= */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
    flex-shrink: 0;
}

.hamburger:hover {
    border-color: var(--accent);
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 850;
}
.nav-overlay.active { display: block; }

/* =============================================
   DRAWER THEME TOGGLE ROW
   ============================================= */
.drawer-theme-row {
    display: none; /* hidden on desktop, shown inside drawer on mobile */
    list-style: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    gap: 0.5rem;
}

.drawer-theme-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1rem;
    color: var(--text-main);
}

.drawer-theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

/* Pill toggle track */
.drawer-toggle-track {
    display: block;
    width: 46px;
    height: 26px;
    border-radius: 99px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    position: relative;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.drawer-toggle-thumb {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-muted);
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease, background 0.3s ease;
}

/* Light-mode active state */
[data-theme="light"] .drawer-toggle-track {
    background: var(--accent);
    border-color: var(--accent);
}
[data-theme="light"] .drawer-toggle-thumb {
    transform: translateX(20px);
    background: #fff;
}

/* =============================================
   LAPTOP — 1024px
   ============================================= */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0.75rem 1.2rem;
    }

    .main-wrapper {
        padding: 0 1.2rem;
        margin: 1.5rem auto;
    }

    .story-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.4rem;
    }

    .hero-banner h1 {
        font-size: 2.2rem;
    }

    .single-story-container {
        padding: 2rem;
    }

    .story-header-title {
        font-size: 2rem;
    }
}

/* =============================================
   TABLET — 768px
   ============================================= */
@media (max-width: 768px) {
    /* Nav */
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(300px, 80vw);
        height: 100vh;
        background: var(--bg-surface);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        padding: 5rem 1.2rem 2rem;
        z-index: 900;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }

    .nav-links.open {
        right: 0;
        box-shadow: -8px 0 40px rgba(0,0,0,0.35);
    }

    .nav-link {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .nav-actions {
        gap: 0.6rem;
    }

    /* Hide navbar theme toggle — it moves into the drawer */
    #theme-toggle {
        display: none;
    }

    /* Show theme row inside the drawer */
    .drawer-theme-row {
        display: flex;
    }

    /* Hero */
    .hero-banner {
        padding: 2rem 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-banner h1 {
        font-size: 1.75rem;
    }

    .hero-banner p {
        font-size: 1rem;
    }

    /* Grid */
    .story-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.2rem;
    }

    /* Main wrapper */
    .main-wrapper {
        padding: 0 1rem;
        margin: 1.2rem auto;
    }

    /* Single Story */
    .single-story-container {
        padding: 1.5rem;
        border-radius: var(--radius-md);
    }

    .story-header-title {
        font-size: 1.65rem;
    }

    .story-body {
        font-size: 1.1rem;
    }

    /* Share section */
    .share-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    /* Search box */
    .search-box-card {
        padding: 1.5rem;
        width: 92%;
    }

    /* Pagination */
    .pagination {
        gap: 0.35rem;
        flex-wrap: wrap;
        margin-top: 2rem;
    }

    .page-item {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    /* Footer */
    .site-footer {
        font-size: 0.9rem;
        padding: 1.5rem 0;
    }
}

/* =============================================
   MOBILE — 480px
   ============================================= */
@media (max-width: 480px) {
    /* Nav */
    .brand-logo {
        font-size: 1.2rem;
    }

    .brand-logo .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .btn-icon {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    /* Hero */
    .hero-banner {
        padding: 1.5rem 0.75rem;
    }

    .hero-banner h1 {
        font-size: 1.45rem;
    }

    .hero-banner p {
        font-size: 0.92rem;
    }

    /* Category pills */
    .category-bar {
        gap: 0.5rem;
        margin-bottom: 1.2rem;
    }

    .category-pill {
        padding: 0.4rem 0.9rem;
        font-size: 0.85rem;
    }

    /* Story grid: single column */
    .story-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .story-thumb {
        height: 180px;
    }

    .story-title {
        font-size: 1.15rem;
    }

    .story-content {
        padding: 1.1rem;
    }

    /* Single story */
    .single-story-container {
        padding: 1rem;
        border-radius: var(--radius-sm);
        margin: 0;
    }

    .story-header-title {
        font-size: 1.35rem;
    }

    .story-body {
        font-size: 1rem;
        line-height: 1.8;
    }

    .story-header-meta {
        gap: 0.6rem;
        font-size: 0.85rem;
    }

    /* Share buttons */
    .btn-share {
        padding: 0.45rem 0.75rem;
        font-size: 0.82rem;
    }

    /* Comment form */
    .comment-form {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    /* Main wrapper */
    .main-wrapper {
        padding: 0 0.75rem;
        margin: 1rem auto;
    }

    /* Pagination */
    .pagination {
        gap: 0.3rem;
        margin-top: 1.5rem;
    }

    .page-item {
        padding: 0.35rem 0.65rem;
        font-size: 0.85rem;
    }
}

/* =============================================
   VERY SMALL — 360px
   ============================================= */
@media (max-width: 360px) {
    .hero-banner h1 {
        font-size: 1.25rem;
    }

    .brand-logo {
        font-size: 1.05rem;
    }

    .share-buttons {
        gap: 0.4rem;
    }

    .btn-share {
        font-size: 0.78rem;
        padding: 0.4rem 0.6rem;
    }
}

/* =============================================
   CONTACT & DONATION / BUY ME A COFFEE STYLES
   ============================================= */
.contact-hero {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: linear-gradient(180deg, var(--bg-surface) 0%, transparent 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.contact-hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-main), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* 2-Column Main Layout */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 3rem;
}

.contact-left, .contact-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Contact Info Cards */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.contact-info-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--card-shadow);
}

.contact-info-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.contact-info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.contact-info-value {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
    word-break: break-all;
    transition: var(--transition);
}

.contact-info-value:hover {
    color: var(--accent);
}

/* Form Styles */
.contact-form-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.alert {
    padding: 0.85rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Donation / Support Section */
.support-hero-card {
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.12), rgba(245, 158, 11, 0.12));
    border: 1px solid rgba(225, 29, 72, 0.3);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.support-hero-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: floatCoffee 3s ease-in-out infinite;
}

@keyframes floatCoffee {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.support-hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.support-hero-text {
    font-size: 0.95rem;
    color: var(--text-story);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.support-hero-tagline {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Support Method Cards (bKash & Bank) */
.support-method-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.support-method-card:hover {
    border-color: rgba(225, 29, 72, 0.3);
}

.bkash-card {
    border-left: 4px solid #e2136e;
}

.bank-card {
    border-left: 4px solid #f59e0b;
}

.support-method-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.support-method-logo {
    font-weight: 800;
    font-size: 1.2rem;
}

.bkash-logo {
    color: #e2136e;
}

.bank-logo {
    font-size: 1.5rem;
}

.support-method-badge {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
}

.support-method-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.support-number {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-main);
    margin-bottom: 0.8rem;
    font-family: monospace;
}

.copy-btn {
    background: rgba(225, 29, 72, 0.12);
    color: var(--accent);
    border: 1px solid rgba(225, 29, 72, 0.25);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.copy-btn:hover {
    background: var(--accent);
    color: white;
}

.copy-btn--secondary {
    background: var(--bg-surface-elevated);
    color: var(--text-main);
    border-color: var(--border-color);
}

.copy-btn--secondary:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--accent);
    color: var(--accent);
}

.support-method-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.8rem;
    line-height: 1.4;
}

/* Bank Details Table */
.bank-details {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.bank-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px dashed var(--border-color);
}

.bank-row:last-child {
    border-bottom: none;
}

.bank-key {
    color: var(--text-muted);
}

.bank-value {
    font-weight: 600;
    color: var(--text-main);
}

.support-thankyou {
    text-align: center;
    padding: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Responsive adjustments for Contact & Support */
@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .contact-hero {
        padding: 1.8rem 1rem;
    }
    
    .contact-hero h1 {
        font-size: 1.6rem;
    }

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

    .contact-form-card, .support-hero-card, .support-method-card {
        padding: 1.25rem;
    }

    .support-number {
        font-size: 1.2rem;
    }
}

