/**
 * NewsPress CMS - Frontend Stylesheet
 * Complete CSS for all frontend pages
 * Version: 1.0
 */

/* =============================================
   1. CSS RESET & BASE
   ============================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-body);
    background-color: var(--bg-page);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    width: 100%;
}

/* =============================================
   2. CSS CUSTOM PROPERTIES
   ============================================= */
:root {
    /* Primary Colors */
    --red: #e63329;
    --red-dark: #b71c1c;
    --red-light: #ff6b6b;
    --red-gradient: linear-gradient(135deg, #e63329, #ff6b6b);

    /* Neutrals */
    --black: #0f1117;
    --dark: #1a1d27;
    --white: #ffffff;
    --gray-soft: #f4f6f8;
    --gray-border: #e8eaed;
    --text-primary: #1a1d27;
    --text-secondary: #555f6d;
    --text-muted: #9aa0ab;
    --footer-bg: #0f1117;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.14);
    --shadow-glow: 0 0 20px rgba(230,51,41,0.18);

    /* Borders & Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --transition: 0.25s ease;

    /* Layout */
    --container-max: 1320px;
    --sidebar-width: 320px;
    --header-height: 70px;
    --topbar-height: 40px;

    /* Theme Variables (Light Mode Default) */
    --bg-page: #ffffff;
    --bg-card: #ffffff;
    --bg-sidebar: #f9fafb;
    --border-color: #e8eaed;
    --text-body: #1a1d27;
}

/* =============================================
   2b. DARK MODE
   ============================================= */
[data-theme="dark"] {
    --bg-page: #0f1117;
    --bg-card: #1a1d27;
    --bg-sidebar: #13161f;
    --border-color: #2a2d3a;
    --text-body: #e8eaed;
    --text-secondary: #9aa0ab;
    --gray-soft: #1a1d27;
    --white: #1a1d27;
    --card-bg: #1a1d27;
    --sidebar-bg: #13161f;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
}

/* =============================================
   3. TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-body);
    margin-bottom: 0.6em;
}

h1 { font-size: 2.25rem; font-weight: 800; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p {
    margin-bottom: 1.2em;
    color: var(--text-body);
}

a {
    color: var(--red);
    transition: color var(--transition), opacity var(--transition);
}
a:hover {
    color: var(--red-dark);
}

strong, b { font-weight: 600; }
em, i { font-style: italic; }
small { font-size: 0.85em; color: var(--text-muted); }

blockquote {
    margin: 1.5em 0;
    padding: 1.2em 1.5em;
    border-left: 4px solid var(--red);
    background: var(--gray-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-secondary);
}
blockquote p:last-child { margin-bottom: 0; }

code {
    font-family: 'Courier New', Courier, monospace;
    background: var(--gray-soft);
    padding: 0.2em 0.5em;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--red-dark);
}

pre {
    background: var(--dark);
    color: #e8eaed;
    padding: 1.2em;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1.5em 0;
    line-height: 1.5;
}
pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.9em;
}

table {
    margin: 1.5em 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
th, td {
    padding: 0.75em 1em;
    border: 1px solid var(--border-color);
    text-align: left;
}
th {
    background: var(--red);
    color: #fff;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
tr:nth-child(even) td {
    background: var(--gray-soft);
}

/* =============================================
   4. CONTAINER
   ============================================= */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}
.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* =============================================
   5. UTILITY CLASSES
   ============================================= */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.truncate-1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hidden { display: none !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.rounded { border-radius: var(--radius-md); }
.shadow { box-shadow: var(--shadow-md); }

/* =============================================
   6. TOP BAR
   ============================================= */
.top-bar {
    height: var(--topbar-height);
    background: var(--black);
    color: #fff;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    position: relative;
    z-index: 200;
}
.top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.trending {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    flex: 1;
}
.trending-label {
    background: var(--red);
    color: #fff;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    animation: pulse 2s infinite;
}
.trending-text {
    white-space: nowrap;
    overflow: hidden;
}
.trending-text a {
    color: #ccc;
    transition: color 0.2s;
}
.trending-text a:hover {
    color: #fff;
}
.trending-text .marquee {
    display: inline-block;
    animation: marquee 20s linear infinite;
    padding-left: 100%;
}
.top-socials {
    display: flex;
    align-items: center;
    gap: 12px;
}
.top-socials a {
    color: #aaa;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.top-socials a:hover {
    color: var(--red-light);
}

/* =============================================
   7. MAIN HEADER
   ============================================= */
.main-header {
    height: var(--header-height);
    background: var(--card-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    transition: box-shadow var(--transition), background-color 0.3s ease;
}
.main-header.scrolled {
    box-shadow: var(--shadow-md);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.logo-img {
    height: 40px;
    width: auto;
}
.logo-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-body);
    line-height: 1.2;
}
.logo-title span {
    color: var(--red);
}
.logo-tagline {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
}

/* Main Navigation */
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 5px;
}
.main-nav ul li {
    position: relative;
}
.main-nav ul li a {
    display: block;
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-body);
    border-radius: var(--radius-sm);
    position: relative;
    transition: color var(--transition);
}
.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 15px;
    right: 15px;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s ease;
}
.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--red);
}
.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    transform: scaleX(1);
}

/* Dropdown */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 300;
}
.main-nav ul li:hover > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown li a {
    padding: 8px 20px;
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
}
.nav-dropdown li a::after {
    display: none;
}
.nav-dropdown li a:hover {
    background: var(--gray-soft);
    color: var(--red);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.search-btn, .darkmode-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-body);
    font-size: 1.1rem;
    transition: background var(--transition), color var(--transition);
}
.search-btn:hover, .darkmode-btn:hover {
    background: var(--gray-soft);
    color: var(--red);
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 400;
}
.search-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.search-dropdown input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: border-color var(--transition);
}
.search-dropdown input:focus {
    outline: none;
    border-color: var(--red);
}
.search-results {
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
}
.search-results .result-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
}
.search-results .result-item:hover {
    background: var(--gray-soft);
}
.search-results .result-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}
.search-results .result-item .result-info h4 {
    font-size: 0.85rem;
    margin-bottom: 2px;
    font-weight: 600;
}
.search-results .result-item .result-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Hamburger */
.hamburger {
    width: 40px;
    height: 40px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-body);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* =============================================
   8. BREAKING NEWS BAR
   ============================================= */
.breaking-bar {
    background: var(--red);
    color: #fff;
    height: 36px;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.breaking-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}
.breaking-label {
    background: rgba(0,0,0,0.3);
    padding: 3px 12px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}
.breaking-text {
    font-size: 0.88rem;
    font-weight: 500;
}
.breaking-text a {
    color: #fff;
}

/* =============================================
   9. NEWS TICKER
   ============================================= */
.ticker-wrap {
    height: 40px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    display: flex;
    align-items: center;
    overflow: hidden;
}
.ticker-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.ticker-label {
    background: var(--red);
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.ticker-marquee {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 20px;
}
.ticker-track {
    display: flex;
    gap: 40px;
    animation: tickerScroll 30s linear infinite;
    white-space: nowrap;
}
.ticker-track a {
    color: var(--text-body);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}
.ticker-track a:hover {
    color: var(--red);
}

/* =============================================
   10. MOBILE MENU
   ============================================= */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}
.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: var(--card-bg);
    z-index: 600;
    overflow-y: auto;
    padding: 20px;
    transition: right 0.35s ease;
    box-shadow: var(--shadow-lg);
}
.mobile-menu.active {
    right: 0;
}
.mobile-menu .mobile-close {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}
.mobile-menu .mobile-close button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-soft);
    font-size: 1.2rem;
    color: var(--text-body);
    display: flex;
    align-items: center;
    justify-content: center;
}
.mobile-menu ul li a {
    display: block;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-body);
    border-bottom: 1px solid var(--border-color);
}
.mobile-menu ul li a:hover {
    color: var(--red);
}
.mobile-menu .mobile-sub {
    padding-left: 20px;
}
.mobile-menu .mobile-sub li a {
    font-weight: 500;
    font-size: 0.9rem;
}
.mobile-socials {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}
.mobile-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-body);
    transition: all 0.2s;
}
.mobile-socials a:hover {
    background: var(--red);
    color: #fff;
}

/* =============================================
   11. HERO SECTION
   ============================================= */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    margin: 30px 0 40px;
    min-height: 450px;
}
.hero-featured {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 450px;
}
.hero-featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.hero-featured:hover img {
    transform: scale(1.05);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.05) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
}
.hero-overlay .category-label {
    display: inline-block;
    background: var(--red);
    color: #fff;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
    width: fit-content;
}
.hero-overlay h2 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.3;
}
.hero-overlay h2 a { color: #fff; }
.hero-overlay h2 a:hover { color: var(--red-light); }
.hero-overlay .post-meta {
    color: rgba(255,255,255,0.8);
    font-size: 0.82rem;
}
.hero-overlay .post-meta a {
    color: #fff;
}
.hero-side {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.hero-side-card {
    display: flex;
    gap: 15px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
    flex: 1;
    align-items: center;
}
.hero-side-card:hover {
    border-color: var(--red-light);
    box-shadow: var(--shadow-sm);
}
.hero-side-card img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.hero-side-card .side-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.4;
}
.hero-side-card .side-info .post-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =============================================
   12. POST CARD
   ============================================= */
.post-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: var(--red-light);
}
.post-card .card-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--gray-soft);
}
.post-card .card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.post-card:hover .card-img-wrap img {
    transform: scale(1.08);
}
.post-card .card-body {
    padding: 18px;
}
.post-card .category-label {
    display: inline-block;
    background: var(--red);
    color: #fff;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.post-card .card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}
.post-card .card-title a {
    color: var(--text-body);
}
.post-card .card-title a:hover {
    color: var(--red);
}
.post-card .card-excerpt {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}
.post-card .card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.post-card .card-meta img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}
.post-card .card-meta a {
    color: var(--text-body);
    font-weight: 500;
}
.post-card .card-meta a:hover {
    color: var(--red);
}
.post-card .card-meta .separator {
    width: 3px;
    height: 3px;
    background: var(--text-muted);
    border-radius: 50%;
}

/* Featured post card variant */
.post-card.featured {
    grid-column: span 2;
}
.post-card.featured .card-img-wrap {
    aspect-ratio: 16/8;
}
.post-card.featured .card-title {
    font-size: 1.3rem;
}

/* Horizontal card variant */
.post-card.horizontal {
    display: flex;
    flex-direction: row;
}
.post-card.horizontal .card-img-wrap {
    width: 200px;
    flex-shrink: 0;
    aspect-ratio: auto;
}
.post-card.horizontal .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* =============================================
   13. SECTION HEADINGS
   ============================================= */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--red);
}
.section-title h2 {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
    color: var(--text-body);
}
.section-title .view-all {
    margin-left: auto;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.section-title .view-all:hover {
    color: var(--red-dark);
}

/* =============================================
   14. CATEGORY GRID LAYOUTS
   ============================================= */
/* Layout A: 1 big left + 4 small right */
.layout-a {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.layout-a .big-card {
    grid-row: span 2;
}
.layout-a .big-card .post-card {
    height: 100%;
}
.layout-a .small-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
}
.layout-a .small-cards .post-card.horizontal {
    flex-direction: row;
}
.layout-a .small-cards .card-img-wrap {
    width: 90px;
    flex-shrink: 0;
    aspect-ratio: 1/1;
}
.layout-a .small-cards .card-title {
    font-size: 0.88rem;
}

/* Layout B: 3-column equal grid */
.layout-b {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Layout C: horizontal list */
.layout-c {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.layout-c .post-card.horizontal .card-img-wrap {
    width: 180px;
    aspect-ratio: 16/10;
}

/* =============================================
   15. TRENDING SECTION
   ============================================= */
.trending-section {
    margin: 40px 0;
}
.trending-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}
.trending-card {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 20px 15px 15px;
    transition: all var(--transition);
    overflow: hidden;
}
.trending-card:hover {
    border-color: var(--red-light);
    box-shadow: var(--shadow-md);
}
.trending-card .trend-number {
    position: absolute;
    top: -5px;
    right: 10px;
    font-size: 3rem;
    font-weight: 800;
    color: var(--gray-border);
    line-height: 1;
    z-index: 0;
    transition: color 0.3s;
}
.trending-card:hover .trend-number {
    color: var(--red-light);
}
.trending-card .card-body {
    position: relative;
    z-index: 1;
}
.trending-card .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.trending-card .card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =============================================
   16. NEWSLETTER BAND
   ============================================= */
.newsletter-band {
    background: var(--red-gradient);
    padding: 40px;
    border-radius: var(--radius-lg);
    margin: 40px 0;
    text-align: center;
    color: #fff;
}
.newsletter-band h2 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 8px;
}
.newsletter-band p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
    font-size: 0.95rem;
}
.newsletter-band form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 10px;
}
.newsletter-band input[type="email"] {
    flex: 1;
    padding: 12px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-primary);
}
.newsletter-band input[type="email"]:focus {
    outline: 2px solid rgba(255,255,255,0.5);
}
.newsletter-band button {
    padding: 12px 30px;
    background: var(--black);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}
.newsletter-band button:hover {
    background: #000;
}

/* =============================================
   17. CONTENT GRID (2-column layout)
   ============================================= */
.content-grid {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 30px;
    margin: 30px 0;
}
.left-content {
    min-width: 0;
}
.sidebar {
    min-width: 0;
}

/* =============================================
   18. BREADCRUMBS
   ============================================= */
.breadcrumb {
    margin-bottom: 15px;
    font-size: 0.85rem;
}
.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}
.breadcrumb-item {
    color: var(--text-muted);
}
.breadcrumb-item a {
    color: var(--text-secondary);
    font-weight: 500;
}
.breadcrumb-item a:hover {
    color: var(--red);
}
.breadcrumb-separator {
    color: var(--text-muted);
    margin: 0 3px;
    font-size: 0.8rem;
    user-select: none;
}
.breadcrumb-current {
    color: var(--text-body);
    font-weight: 500;
}

/* =============================================
   19. SINGLE POST PAGE
   ============================================= */
.single-header {
    margin-bottom: 20px;
}
.single-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.single-categories .category-label {
    background: var(--red);
    color: #fff;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}
.single-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--text-body);
}

/* Single Meta */
.single-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.single-meta img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.single-meta a {
    color: var(--text-body);
    font-weight: 600;
}
.single-meta a:hover {
    color: var(--red);
}
.single-meta .meta-sep {
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
}
.single-meta i {
    color: var(--red);
    margin-right: 3px;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px 0;
}
.share-buttons span {
    font-weight: 600;
    font-size: 0.85rem;
    margin-right: 5px;
    color: var(--text-secondary);
}
.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    transition: transform 0.2s, opacity 0.2s;
}
.share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}
.share-btn.fb { background: #1877f2; }
.share-btn.twitter { background: #0f1419; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.copy { background: var(--text-secondary); }

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--red);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s linear;
}

/* Table of Contents */
.toc-box {
    background: var(--gray-soft);
    border-left: 4px solid var(--red);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 20px;
    margin-bottom: 25px;
}
.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin-bottom: 12px;
}
.toc-header h3 {
    font-size: 1.1rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.toc-toggle {
    font-size: 0.85rem;
    color: var(--red);
    font-weight: 600;
}
.toc-list {
    list-style: none;
}
.toc-list li {
    margin-bottom: 8px;
}
.toc-list li a {
    display: flex;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 5px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}
.toc-list li a:hover,
.toc-list li a.active {
    background: rgba(230,51,41,0.08);
    color: var(--red);
}
.toc-list li.toc-h3 {
    padding-left: 20px;
}
.toc-list .toc-number {
    color: var(--red);
    font-weight: 700;
    font-size: 0.8rem;
    min-width: 20px;
}

/* Post Content */
.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-body);
    margin-bottom: 30px;
}
.post-content h2 {
    font-size: 1.5rem;
    margin-top: 2em;
    margin-bottom: 0.8em;
    padding-bottom: 0.4em;
    border-bottom: 2px solid var(--border-color);
}
.post-content h3 {
    font-size: 1.25rem;
    margin-top: 1.8em;
    margin-bottom: 0.7em;
}
.post-content h4 {
    font-size: 1.1rem;
    margin-top: 1.5em;
    margin-bottom: 0.6em;
}
.post-content p {
    margin-bottom: 1.3em;
}
.post-content img {
    border-radius: var(--radius-md);
    margin: 1.5em 0;
}
.post-content ul, .post-content ol {
    margin: 1em 0 1.5em 1.5em;
}
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li {
    margin-bottom: 0.5em;
    line-height: 1.7;
}
.post-content a {
    color: var(--red);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.post-content a:hover {
    color: var(--red-dark);
}

/* Inline Related Block (Also Read) */
.inline-related-block {
    background: var(--gray-soft);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--red);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 20px;
    margin: 25px 0;
}
.inline-related-block .irb-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.inline-related-block .irb-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-body);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.inline-related-block .irb-list {
    list-style: none;
}
.inline-related-block .irb-item {
    margin-bottom: 8px;
}
.inline-related-block .irb-link {
    color: var(--text-body);
    font-weight: 500;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.inline-related-block .irb-link::before {
    content: '→';
    color: var(--red);
    font-weight: 700;
}
.inline-related-block .irb-link:hover {
    color: var(--red);
}

/* Ad in content */
.content-ad {
    text-align: center;
    padding: 15px 0;
    margin: 25px 0;
}
.content-ad-mid {
    background: var(--gray-soft);
    border-radius: var(--radius-sm);
    padding: 20px;
}

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.post-tags span {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-body);
}
.tag-pill {
    display: inline-block;
    padding: 4px 14px;
    background: var(--gray-soft);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s;
}
.tag-pill:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

/* Reaction Bar */
.reaction-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 15px 0;
    margin: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.reaction-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: var(--gray-soft);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: var(--text-secondary);
}
.reaction-btn:hover {
    border-color: var(--red);
    background: rgba(230,51,41,0.05);
}
.reaction-btn.active {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}
.reaction-btn .reaction-count {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Join Block */
.join-block {
    background: var(--gray-soft);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 25px 0;
    text-align: center;
}
.join-block h4 {
    margin-bottom: 12px;
    font-size: 1rem;
}
.join-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.join-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    color: #fff;
}
.join-btn.whatsapp {
    background: #25d366;
}
.join-btn.telegram {
    background: #0088cc;
}
.join-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Author Box */
.author-box {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: var(--gray-soft);
    border-radius: var(--radius-md);
    margin: 30px 0;
    border: 1px solid var(--border-color);
}
.author-box img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.author-box .author-info h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}
.author-box .author-info h4 a {
    color: var(--text-body);
}
.author-box .author-info .author-designation {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.author-box .author-info .author-bio {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.5;
}
.author-box .author-socials {
    display: flex;
    gap: 10px;
}
.author-box .author-socials a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.2s;
}
.author-box .author-socials a:hover {
    color: var(--red);
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}
.post-nav-item {
    flex: 1;
    max-width: 48%;
}
.post-nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-body);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.post-nav-item a:hover {
    color: var(--red);
}
.post-nav-item .nav-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.post-nav-item.prev a { flex-direction: row; }
.post-nav-item.next a {
    flex-direction: row-reverse;
    text-align: right;
}

/* Related Posts Grid */
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}
.related-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition);
}
.related-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}
.related-card img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}
.related-card .related-body {
    padding: 12px;
}
.related-card .category-label {
    font-size: 0.65rem;
    padding: 2px 8px;
    margin-bottom: 6px;
}
.related-card .related-title {
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.4;
}
.related-card .related-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* =============================================
   19b. COMMENTS SECTION
   ============================================= */
.comments-section {
    margin-top: 40px;
}
.comments-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

/* Comment Item */
.comment-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}
.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gray-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--red);
    flex-shrink: 0;
    font-size: 1rem;
    overflow: hidden;
}
.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.comment-body {
    flex: 1;
}
.comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 0.85rem;
}
.comment-meta .comment-author {
    font-weight: 600;
    color: var(--text-body);
}
.comment-meta .comment-date {
    color: var(--text-muted);
    font-size: 0.78rem;
}
.comment-content {
    font-size: 0.92rem;
    color: var(--text-body);
    line-height: 1.6;
    margin-bottom: 8px;
}
.comment-reply-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--red);
    cursor: pointer;
}
.comment-reply-link:hover {
    color: var(--red-dark);
}

/* Nested Replies */
.comment-replies {
    margin-left: 40px;
    padding-left: 20px;
    border-left: 2px solid var(--border-color);
}

/* Comment Form */
.comment-form-wrap {
    margin-top: 30px;
    padding: 25px;
    background: var(--gray-soft);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.comment-form h4 {
    margin-bottom: 15px;
    font-size: 1.05rem;
}
.comment-form .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: var(--card-bg);
    color: var(--text-body);
    transition: border-color 0.2s;
}
.comment-form input:focus {
    outline: none;
    border-color: var(--red);
}
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    min-height: 120px;
    resize: vertical;
    background: var(--card-bg);
    color: var(--text-body);
    transition: border-color 0.2s;
    margin-bottom: 15px;
}
.comment-form textarea:focus {
    outline: none;
    border-color: var(--red);
}
.comment-form button[type="submit"] {
    padding: 10px 30px;
    background: var(--red);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}
.comment-form button[type="submit"]:hover {
    background: var(--red-dark);
}

/* =============================================
   20. SIDEBAR
   ============================================= */
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 20px);
    align-self: start;
}
.sidebar-widget {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 25px;
}
.widget-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    color: var(--text-body);
}
.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--red);
}

/* Sidebar Search */
.sb-search {
    display: flex;
}
.sb-search input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 0.85rem;
    background: var(--card-bg);
    color: var(--text-body);
}
.sb-search input:focus {
    outline: none;
    border-color: var(--red);
}
.sb-search button {
    padding: 10px 15px;
    background: var(--red);
    color: #fff;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.sb-search button:hover {
    background: var(--red-dark);
}

/* Popular Posts Widget */
.popular-posts .pop-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.popular-posts .pop-item:last-child {
    border-bottom: none;
}
.popular-posts .pop-item img {
    width: 70px;
    height: 55px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.popular-posts .pop-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 3px;
}
.popular-posts .pop-info .pop-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Categories Widget */
.categories-list li {
    border-bottom: 1px solid var(--border-color);
}
.categories-list li:last-child {
    border-bottom: none;
}
.categories-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-body);
    transition: color 0.2s;
}
.categories-list li a:hover {
    color: var(--red);
}
.categories-list .cat-count {
    background: var(--gray-soft);
    color: var(--text-muted);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
}
.categories-list li a:hover .cat-count {
    background: var(--red);
    color: #fff;
}

/* Tags Cloud Widget */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tags-cloud .tag-pill {
    font-size: 0.78rem;
}

/* Follow Buttons Widget */
.follow-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.follow-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    transition: transform 0.2s;
}
.follow-btn:hover {
    transform: scale(1.05);
}
.follow-btn.fb { background: #1877f2; }
.follow-btn.tw { background: #0f1419; }
.follow-btn.ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.follow-btn.yt { background: #ff0000; }
.follow-btn.in { background: #0077b5; }

/* Sidebar Newsletter */
.sidebar-newsletter input[type="email"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 10px;
    background: var(--card-bg);
    color: var(--text-body);
}
.sidebar-newsletter button {
    width: 100%;
    padding: 10px;
    background: var(--red);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}
.sidebar-newsletter button:hover {
    background: var(--red-dark);
}

/* Ad Placeholder */
.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

/* =============================================
   21. PAGINATION
   ============================================= */
.pagination {
    display: flex;
    justify-content: center;
    margin: 40px 0 20px;
}
.pagination-list {
    display: flex;
    align-items: center;
    gap: 5px;
}
.pagination-item {
    list-style: none;
}
.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-body);
    background: var(--card-bg);
    transition: all 0.2s;
}
.pagination-link:hover {
    border-color: var(--red);
    color: var(--red);
}
.pagination-link.current {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}
.pagination-dots {
    padding: 0 5px;
    color: var(--text-muted);
}
.pagination-item.disabled .pagination-link {
    opacity: 0.4;
    pointer-events: none;
}

/* =============================================
   22. ARCHIVE HEADER (Category/Tag/Search)
   ============================================= */
.archive-header {
    background: var(--gray-soft);
    border-radius: var(--radius-md);
    padding: 30px;
    margin-bottom: 25px;
    text-align: center;
    border: 1px solid var(--border-color);
}
.archive-title {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.archive-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    max-width: 600px;
    margin: 0 auto 10px;
}
.archive-count {
    display: inline-block;
    background: var(--red);
    color: #fff;
    padding: 3px 14px;
    border-radius: 15px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* =============================================
   23. AUTHOR PROFILE CARD
   ============================================= */
.author-profile-card {
    display: flex;
    gap: 25px;
    background: var(--gray-soft);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    align-items: center;
}
.author-profile-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--red);
}
.author-profile-info h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}
.author-profile-info .author-role {
    color: var(--red);
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 8px;
}
.author-profile-info .author-bio {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
}
.author-profile-info .author-meta-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
}
.author-profile-info .author-meta-stats span {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.author-profile-info .author-meta-stats strong {
    color: var(--text-body);
}
.author-profile-info .author-socials {
    display: flex;
    gap: 12px;
}
.author-profile-info .author-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.author-profile-info .author-socials a:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

/* =============================================
   24. SEARCH PAGE
   ============================================= */
.search-header {
    text-align: center;
    margin-bottom: 30px;
}
.search-header h1 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}
.search-header .search-query {
    color: var(--red);
}
.no-results {
    text-align: center;
    padding: 60px 20px;
}
.no-results .no-results-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}
.no-results h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}
.no-results p {
    color: var(--text-secondary);
}

/* =============================================
   25. FOOTER
   ============================================= */
.site-footer {
    background: var(--footer-bg);
    color: #bbb;
    margin-top: 50px;
}
.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    padding: 50px 0;
}
.footer-title {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    position: relative;
}
.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--red);
}
.footer-desc {
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 15px;
}
.footer-col p {
    color: #999;
    font-size: 0.88rem;
}
.footer-links li {
    margin-bottom: 10px;
}
.footer-links li a {
    color: #999;
    font-size: 0.88rem;
    transition: color 0.2s;
}
.footer-links li a:hover {
    color: var(--red-light);
    padding-left: 5px;
}
.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}
.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.2s;
}
.footer-socials a:hover {
    background: var(--red);
    color: #fff;
}
.footer-newsletter input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.85rem;
    margin-bottom: 10px;
}
.footer-newsletter button {
    width: 100%;
    padding: 10px;
    background: var(--red);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 10px;
}
.footer-bottom p {
    color: #777;
    margin-bottom: 0;
}
.footer-bottom-links {
    display: flex;
    gap: 15px;
}
.footer-bottom-links a {
    color: #777;
    font-size: 0.8rem;
    transition: color 0.2s;
}
.footer-bottom-links a:hover {
    color: var(--red-light);
}

/* =============================================
   26. 404 PAGE
   ============================================= */
.page-404 {
    text-align: center;
    padding: 80px 20px;
}
.page-404 .err-code {
    font-size: 8rem;
    font-weight: 800;
    color: var(--red);
    line-height: 1;
    margin-bottom: 10px;
}
.page-404 h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}
.page-404 p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}
.page-404 .back-home {
    display: inline-block;
    padding: 12px 30px;
    background: var(--red);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}
.page-404 .back-home:hover {
    background: var(--red-dark);
    color: #fff;
}

/* =============================================
   27. FLOATING ELEMENTS
   ============================================= */

/* Social Share Float (left side, desktop) */
.social-float {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.social-float.visible {
    opacity: 1;
    visibility: visible;
}
.social-float .share-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
    z-index: 80;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    cursor: pointer;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--red-dark);
    transform: translateY(-3px);
}

/* =============================================
   28. COOKIE BANNER
   ============================================= */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark);
    color: #ccc;
    padding: 15px 20px;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.cookie-banner p {
    margin-bottom: 0;
    color: #ccc;
    max-width: 600px;
}
.cookie-banner a {
    color: var(--red-light);
    text-decoration: underline;
}
.cookie-banner .cookie-btns {
    display: flex;
    gap: 10px;
}
.cookie-banner .cookie-btns button {
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.82rem;
}
.cookie-banner .cookie-accept {
    background: var(--red);
    color: #fff;
}
.cookie-banner .cookie-decline {
    background: rgba(255,255,255,0.1);
    color: #ccc;
}

/* =============================================
   29. JOIN POPUP
   ============================================= */
.join-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.join-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}
.join-popup {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 30px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-lg);
}
.join-popup .popup-close {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.join-popup .popup-close:hover {
    background: var(--gray-soft);
    color: var(--text-body);
}
.join-popup h3 {
    margin-bottom: 8px;
    font-size: 1.3rem;
}
.join-popup p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* =============================================
   30. ALERTS
   ============================================= */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 4px solid;
}
.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #4caf50;
}
.alert-error {
    background: #ffebee;
    color: #c62828;
    border-color: #f44336;
}
.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border-color: #ff9800;
}
.alert-info {
    background: #e3f2fd;
    color: #0d47a1;
    border-color: #2196f3;
}

[data-theme="dark"] .alert-success {
    background: rgba(76,175,80,0.1);
}
[data-theme="dark"] .alert-error {
    background: rgba(244,67,54,0.1);
}
[data-theme="dark"] .alert-warning {
    background: rgba(255,152,0,0.1);
}
[data-theme="dark"] .alert-info {
    background: rgba(33,150,243,0.1);
}

/* =============================================
   31. DARK MODE OVERRIDES (additional)
   ============================================= */
[data-theme="dark"] .main-header {
    background: var(--card-bg);
}
[data-theme="dark"] .ticker-wrap {
    background: var(--card-bg);
}
[data-theme="dark"] .post-card {
    background: var(--card-bg);
}
[data-theme="dark"] .sidebar-widget {
    background: var(--bg-sidebar);
}
[data-theme="dark"] .comment-form-wrap {
    background: var(--card-bg);
}
[data-theme="dark"] .author-box {
    background: var(--card-bg);
}
[data-theme="dark"] .author-profile-card {
    background: var(--card-bg);
}
[data-theme="dark"] .toc-box {
    background: var(--card-bg);
}
[data-theme="dark"] .inline-related-block {
    background: var(--card-bg);
}
[data-theme="dark"] .archive-header {
    background: var(--card-bg);
}
[data-theme="dark"] .newsletter-band {
    background: linear-gradient(135deg, #b71c1c, #d32f2f);
}
[data-theme="dark"] .comment-form input,
[data-theme="dark"] .comment-form textarea,
[data-theme="dark"] .sb-search input,
[data-theme="dark"] .sidebar-newsletter input {
    background: var(--dark);
    color: var(--text-body);
}
[data-theme="dark"] .hero-side-card {
    background: var(--card-bg);
}
[data-theme="dark"] .trending-card {
    background: var(--card-bg);
}
[data-theme="dark"] .pagination-link {
    background: var(--card-bg);
}
[data-theme="dark"] .join-popup {
    background: var(--card-bg);
}

/* =============================================
   32. ANIMATIONS
   ============================================= */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--gray-soft) 25%, var(--border-color) 50%, var(--gray-soft) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}
.skeleton-title {
    height: 24px;
    width: 70%;
    margin-bottom: 10px;
}
.skeleton-image {
    aspect-ratio: 16/10;
    width: 100%;
}
.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* =============================================
   33. RESPONSIVE DESIGN
   ============================================= */

/* Large Tablets & Small Desktops (max 1320px) */
@media (max-width: 1320px) {
    .hero-section {
        grid-template-columns: 1fr 320px;
    }
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .trending-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablets (max 1024px) */
@media (max-width: 1024px) {
    .main-nav { display: none; }
    .hamburger { display: flex; }

    .content-grid {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .sidebar-widget {
        margin-bottom: 0;
    }
    .sidebar .sidebar-widget:last-child {
        grid-column: span 2;
    }

    .hero-section {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .hero-featured {
        min-height: 350px;
    }
    .hero-side {
        flex-direction: row;
        overflow-x: auto;
    }
    .hero-side-card {
        min-width: 250px;
        flex-shrink: 0;
    }

    .layout-a {
        grid-template-columns: 1fr;
    }
    .layout-a .small-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .layout-b {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-main {
        grid-template-columns: repeat(2, 1fr);
    }

    .social-float {
        display: none;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trending-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .trending-grid .trending-card:last-child {
        display: none;
    }
}

/* Small Tablets (max 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .top-bar { display: none; }

    .single-title {
        font-size: 1.5rem;
    }
    .single-meta {
        gap: 8px;
        font-size: 0.78rem;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .author-box .author-socials {
        justify-content: center;
    }

    .author-profile-card {
        flex-direction: column;
        text-align: center;
    }
    .author-profile-info .author-socials {
        justify-content: center;
    }
    .author-profile-info .author-meta-stats {
        justify-content: center;
    }

    .post-navigation {
        flex-direction: column;
        gap: 15px;
    }
    .post-nav-item {
        max-width: 100%;
    }

    .comment-form .form-row {
        flex-direction: column;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }
    .sidebar .sidebar-widget:last-child {
        grid-column: span 1;
    }

    .layout-b {
        grid-template-columns: 1fr 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-band form {
        flex-direction: column;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trending-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .trending-grid .trending-card:nth-child(n+4) {
        display: none;
    }

    .search-dropdown {
        width: 280px;
        right: -60px;
    }
}

/* Mobile (max 480px) */
@media (max-width: 480px) {
    .logo-title {
        font-size: 1.2rem;
    }
    .hero-featured {
        min-height: 250px;
    }
    .hero-overlay {
        padding: 20px;
    }
    .hero-overlay h2 {
        font-size: 1.2rem;
    }
    .hero-side {
        flex-direction: column;
    }
    .hero-side-card {
        min-width: auto;
    }

    .layout-a .small-cards {
        grid-template-columns: 1fr;
    }
    .layout-b {
        grid-template-columns: 1fr;
    }
    .layout-a .small-cards .card-img-wrap {
        width: 70px;
    }

    .single-title {
        font-size: 1.3rem;
    }

    .reaction-bar {
        gap: 5px;
    }
    .reaction-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .related-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cookie-banner {
        flex-direction: column;
        text-align: center;
    }

    .page-404 .err-code {
        font-size: 5rem;
    }

    .join-buttons {
        flex-direction: column;
    }
}

/* =============================================
   34. PRINT STYLES
   ============================================= */
@media print {
    .top-bar,
    .main-header,
    .breaking-bar,
    .ticker-wrap,
    .sidebar,
    .footer,
    .social-float,
    .back-to-top,
    .cookie-banner,
    .join-popup-overlay,
    .reading-progress,
    .reaction-bar,
    .share-buttons,
    .share-bottom,
    .join-block,
    .newsletter-band,
    .comment-form-wrap,
    .pagination {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 14px;
        line-height: 1.5;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .post-content a {
        color: #000;
        text-decoration: underline;
    }

    .post-content a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    h2, h3, h4 {
        page-break-after: avoid;
    }

    p, li, blockquote {
        orphans: 3;
        widows: 3;
    }

    .post-content {
        font-size: 13px;
    }

    .single-title {
        font-size: 1.5rem;
    }

    .site-footer {
        background: none;
        color: #000;
        border-top: 1px solid #ccc;
        margin-top: 20px;
        padding-top: 10px;
    }

    .footer-bottom p {
        color: #666;
    }
}

/* =============================================
   END OF FRONTEND CSS
   ============================================= */