/* ============================================================
   Autom84You Blog — Production CSS
   Matches the Autom84You landing page theme system exactly.
   Works WITH Bootstrap 5.0.2 (loaded before this file).
   ============================================================ */

/* ==========================================================
   1. THEME VARIABLES
   ========================================================== */
:root {
    --brand-primary: #6366f1;
    --brand-secondary: #8b5cf6;
    --brand-accent: #ec4899;
    --brand-success: #10b981;
    --brand-danger: #ef4444;
    --brand-warning: #f59e0b;
    --brand-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-navbar: rgba(255, 255, 255, 0.95);
    --bg-navbar-scrolled: rgba(255, 255, 255, 0.98);
    --bg-footer: #1e293b;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-on-dark: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 40px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.1);
    --shadow-primary: 0 10px 30px rgba(99,102,241,0.2);
    --shadow-card-hover: 0 20px 60px rgba(99,102,241,0.15);
    --navbar-shadow: 0 2px 20px rgba(0,0,0,0.1);
    --input-bg: #ffffff;
    --input-border: #e2e8f0;
    --nav-link-color: #1e293b;
    --navbar-collapse-bg: white;
    --dropdown-bg: #ffffff;
    --glass-bg: transparent;
    --glass-border: transparent;
    --scrollbar-track: #f1f5f9;
    --scrollbar-thumb: var(--brand-gradient);
    --modal-bg: #ffffff;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-navbar: rgba(15, 23, 42, 0.9);
    --bg-navbar-scrolled: rgba(15, 23, 42, 0.95);
    --bg-footer: #0f172a;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-on-dark: #ffffff;
    --border-color: rgba(148, 163, 184, 0.15);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 10px 40px rgba(0,0,0,0.4);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
    --shadow-primary: 0 10px 30px rgba(99,102,241,0.3);
    --shadow-card-hover: 0 20px 60px rgba(99,102,241,0.25);
    --navbar-shadow: 0 2px 20px rgba(0,0,0,0.3);
    --input-bg: rgba(30, 41, 59, 0.6);
    --input-border: rgba(148, 163, 184, 0.2);
    --nav-link-color: #e2e8f0;
    --navbar-collapse-bg: #1e293b;
    --dropdown-bg: #1e293b;
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(148, 163, 184, 0.12);
    --scrollbar-track: #1e293b;
    --scrollbar-thumb: var(--brand-gradient);
    --modal-bg: #1e293b;
}

/* ==========================================================
   2. GLOBAL BASE & RESETS
   ========================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.3s;
}

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

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

::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--brand-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-secondary);
}

/* ==========================================================
   3. READING PROGRESS BAR
   ========================================================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--brand-gradient);
    z-index: 1100;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ==========================================================
   4. NAVBAR (exact copy from landing page)
   ========================================================== */
.navbar {
    background: var(--bg-navbar);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1030;
    transition: all 0.3s;
    border-bottom: 1px solid transparent;
    padding: 0.75rem 0;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background: var(--bg-navbar-scrolled);
    box-shadow: var(--navbar-shadow);
    border-bottom-color: var(--border-color);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    display: none;
}

[data-theme="dark"] .navbar-brand .logo-dark { display: block; }
[data-theme="dark"] .navbar-brand .logo-light { display: none; }
[data-theme="light"] .navbar-brand .logo-dark { display: none; }
[data-theme="light"] .navbar-brand .logo-light { display: block; }

.nav-link {
    font-weight: 500;
    color: var(--nav-link-color) !important;
    margin: 0 0.5rem;
    transition: all 0.3s;
    position: relative;
}

.nav-link:hover {
    color: var(--brand-primary) !important;
}

.nav-link:not(.dropdown-toggle)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--brand-gradient);
    transition: transform 0.3s;
}

.nav-link:not(.dropdown-toggle):hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-link.active-link {
    color: var(--brand-primary) !important;
}

.nav-link.active-link:not(.dropdown-toggle)::after {
    transform: translateX(-50%) scaleX(1);
}

.dropdown-menu {
    box-shadow: var(--shadow-md);
    border-radius: 14px;
    padding: 0.65rem;
    margin-top: 0.5rem;
    background: var(--dropdown-bg);
    border: 1px solid var(--border-color);
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--brand-gradient);
    color: white !important;
}

.dropdown-divider {
    border-color: var(--border-color);
}

[data-theme="dark"] .navbar-toggler-icon {
    filter: invert(1);
}

.navbar-toggler {
    border-color: var(--border-color);
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--navbar-collapse-bg);
        border-radius: 14px;
        padding: 1rem;
        margin-top: 0.5rem;
        border: 1px solid var(--border-color);
    }

    .nav-link {
        margin: 0;
        padding: 0.6rem 1rem !important;
        border-radius: 8px;
    }

    .nav-link:hover {
        background: var(--bg-tertiary);
    }

    .nav-link:not(.dropdown-toggle)::after {
        display: none;
    }
}

/* ==========================================================
   5. THEME TOGGLE (exact from landing page)
   ========================================================== */
.theme-toggle {
    cursor: pointer;
}

.theme-toggle-track {
    width: 52px;
    height: 28px;
    background: var(--bg-tertiary);
    border-radius: 14px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

.theme-toggle.dark .theme-toggle-track {
    background: #334155;
}

.theme-toggle-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand-gradient);
    position: absolute;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.theme-toggle.dark .theme-toggle-thumb {
    transform: translateX(24px);
}

.theme-icon-light,
.theme-icon-dark {
    font-size: 0.7rem;
    z-index: 1;
}

.theme-icon-light {
    color: #f59e0b;
    opacity: 1;
}

.theme-icon-dark {
    color: #e2e8f0;
    opacity: 0.5;
}

.theme-toggle.dark .theme-icon-light {
    opacity: 0.5;
}

.theme-toggle.dark .theme-icon-dark {
    color: #fbbf24;
    opacity: 1;
}

/* ==========================================================
   6. BLOG MAIN WRAPPER
   ========================================================== */
.blog-main {
    padding-top: 76px;
    min-height: 100vh;
}

/* ==========================================================
   7. BLOG HERO — Animated, dynamic, magazine-style
   ========================================================== */
.blog-hero {
    position: relative;
    background: var(--brand-gradient);
    padding: 3rem 0 2.5rem;
    text-align: center;
    overflow: hidden;
}

/* Animated floating shapes */
.blog-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    animation: heroFloat 8s ease-in-out infinite;
    pointer-events: none;
}

.blog-hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -40px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    animation: heroFloat 10s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -30px) rotate(5deg); }
    50% { transform: translate(-10px, 20px) rotate(-3deg); }
    75% { transform: translate(15px, 10px) rotate(2deg); }
}

/* Decorative dots */
.blog-hero .container {
    position: relative;
    z-index: 2;
}

.blog-hero .container::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 10%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    animation: heroDot 6s ease-in-out infinite;
    pointer-events: none;
}

.blog-hero .container::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 15%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    animation: heroDot 5s ease-in-out infinite 1s;
    pointer-events: none;
}

@keyframes heroDot {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50% { transform: translateY(-15px) scale(1.3); opacity: 1; }
}

.blog-hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 1rem;
    line-height: 1.15;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-hero-description {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* Hero search bar */
.blog-hero-search {
    max-width: 560px;
    margin: 0 auto;
}

.blog-hero-search-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 60px;
    padding: 0.35rem 0.35rem 0.35rem 1.25rem;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.blog-hero-search-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.blog-hero-search-wrapper > i {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.blog-hero-search-wrapper input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: inherit;
    padding: 0.6rem 0.75rem;
}

.blog-hero-search-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.blog-hero-search-wrapper button {
    background: #ffffff;
    color: var(--brand-primary);
    border: none;
    border-radius: 60px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}

.blog-hero-search-wrapper button:hover {
    background: #f0f0ff;
    transform: scale(1.02);
}

/* Search page reuses this wrapper in a non-hero context */
.blog-search-page-form {
    max-width: 560px;
    margin: 0 auto;
}

.blog-search-page-form .blog-hero-search-wrapper {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

.blog-search-page-form .blog-hero-search-wrapper > i {
    color: var(--text-muted);
}

.blog-search-page-form .blog-hero-search-wrapper input {
    color: var(--text-primary);
}

.blog-search-page-form .blog-hero-search-wrapper input::placeholder {
    color: var(--text-muted);
}

.blog-search-page-form .blog-hero-search-wrapper button {
    background: var(--brand-gradient);
    color: #ffffff;
}

.blog-search-page-form .blog-hero-search-wrapper button:hover {
    opacity: 0.9;
    background: var(--brand-gradient);
}

/* ==========================================================
   8. BLOG LAYOUT (content + sidebar)
   ========================================================== */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    padding: 2.5rem 0 4rem;
    align-items: start;
}

.blog-content {
    min-width: 0;
}

/* ==========================================================
   9. BLOG POST CARDS — Magazine quality
   ========================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
    margin-bottom: 2.5rem;
}

.blog-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

/* Card image */
.blog-card-image {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

/* Placeholder gradient when no featured image */
.blog-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-gradient);
    color: rgba(255, 255, 255, 0.35);
    font-size: 2.5rem;
}

/* Card body */
.blog-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Category pill */
.blog-card-category {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
    width: fit-content;
    margin-bottom: 0.75rem;
}

.blog-card-category:hover {
    opacity: 0.8;
    color: inherit;
}

.blog-card-category i {
    font-size: 0.7rem;
}

/* Card title */
.blog-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 0.6rem;
}

.blog-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Card excerpt */
.blog-card-excerpt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card meta */
.blog-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
}

.blog-card-meta-sep {
    opacity: 0.5;
}

.blog-card-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 0.25rem;
}

/* Featured card — full width, horizontal layout */
.blog-card-featured {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    border-radius: 20px;
    margin-bottom: 2rem;
}

.blog-card-featured .blog-card-image,
.blog-card-image-featured {
    aspect-ratio: auto;
    min-height: 300px;
    border-radius: 20px 0 0 20px;
}

.blog-card-body-featured {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 2.5rem;
}

.blog-card-title-featured {
    font-size: 1.6rem;
    line-height: 1.3;
}

/* ==========================================================
   10. SECTION TITLES
   ========================================================== */
.blog-section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.blog-section-title i {
    color: var(--brand-primary);
    font-size: 1.1rem;
}

/* ==========================================================
   11. CATEGORIES SECTION (index page)
   ========================================================== */
.blog-categories-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.blog-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.blog-category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.blog-category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--cat-color, var(--brand-primary));
    color: inherit;
}

.blog-category-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.blog-category-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.35rem;
}

.blog-category-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 0.75rem;
    flex: 1;
}

.blog-category-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
}

/* ==========================================================
   12. SIDEBAR
   ========================================================== */
.blog-sidebar {
    position: sticky;
    top: 92px;
}

.blog-sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: box-shadow 0.3s ease;
}

.blog-sidebar-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.blog-sidebar-title i {
    color: var(--brand-primary);
    font-size: 0.85rem;
}

.blog-sidebar-empty {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    padding: 1rem 0;
}

/* Sidebar post list */
.blog-sidebar-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-sidebar-posts li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.blog-sidebar-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.blog-sidebar-post-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: opacity 0.2s;
    border-radius: 8px;
    padding: 0.25rem;
    margin: -0.25rem;
    color: inherit;
}

.blog-sidebar-post-link:hover {
    opacity: 0.85;
    color: inherit;
}

.blog-sidebar-post-link.active {
    background: rgba(99, 102, 241, 0.08);
}

.blog-sidebar-post-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.blog-sidebar-post-thumb-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.blog-sidebar-post-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-sidebar-post-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Sidebar categories */
.blog-sidebar-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-sidebar-categories li {
    margin-bottom: 0.15rem;
}

.blog-sidebar-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.blog-sidebar-category-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.blog-sidebar-category-link.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--brand-primary);
}

.blog-sidebar-category-link span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-sidebar-category-count {
    background: var(--bg-tertiary);
    padding: 0.1rem 0.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 24px;
    text-align: center;
}

/* Tag cloud */
.blog-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-tag {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    border: 1px solid transparent;
}

.blog-tag:hover {
    background: rgba(99, 102, 241, 0.15);
    color: var(--brand-primary);
    border-color: rgba(99, 102, 241, 0.3);
}

.blog-tag-sm {
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
}

/* Table of contents (sidebar, single post) */
.blog-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-toc-list li {
    margin-bottom: 0.1rem;
}

.blog-toc-list li a {
    display: block;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: all 0.2s;
}

.blog-toc-list li a:hover,
.blog-toc-list li a.active {
    color: var(--brand-primary);
    background: rgba(99, 102, 241, 0.06);
    border-left-color: var(--brand-primary);
}

/* ==========================================================
   13. PAGINATION
   ========================================================== */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 0;
    flex-wrap: wrap;
}

.blog-pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.15rem;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.blog-pagination-btn:hover {
    background: var(--bg-tertiary);
    color: var(--brand-primary);
    border-color: rgba(99, 102, 241, 0.3);
}

.blog-pagination-disabled {
    opacity: 0.4;
    pointer-events: none;
    color: var(--text-muted);
}

.blog-pagination-disabled:hover {
    background: var(--bg-card);
    color: var(--text-muted);
}

.blog-pagination-pages {
    display: flex;
    gap: 0.35rem;
}

.blog-pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.blog-pagination-page:hover {
    background: var(--bg-tertiary);
    color: var(--brand-primary);
    border-color: rgba(99, 102, 241, 0.3);
}

.blog-pagination-current {
    background: var(--brand-gradient);
    color: #ffffff;
    border-color: transparent;
}

.blog-pagination-current:hover {
    background: var(--brand-gradient);
    color: #ffffff;
}

/* ==========================================================
   14. EMPTY STATE
   ========================================================== */
.blog-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.blog-empty i {
    font-size: 3.5rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    opacity: 0.5;
    display: block;
}

.blog-empty h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.blog-empty p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

/* ==========================================================
   15. BLOG BUTTONS
   ========================================================== */
.blog-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.blog-btn-primary {
    background: var(--brand-gradient);
    color: #ffffff;
}

.blog-btn-primary:hover {
    opacity: 0.9;
    color: #ffffff;
    transform: translateY(-1px);
}

.blog-btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.blog-btn-outline:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.blog-btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
}

/* ==========================================================
   16. SINGLE POST — ARTICLE TYPOGRAPHY
   ========================================================== */
.blog-post {
    padding-bottom: 2rem;
}

/* Breadcrumb */
.blog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    padding: 1.5rem 0 0;
    flex-wrap: wrap;
}

.blog-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

.blog-breadcrumb span {
    color: var(--text-muted);
}

.blog-breadcrumb-sep {
    font-size: 0.65rem;
    opacity: 0.5;
}

/* Post header */
.blog-post-header {
    margin-bottom: 2rem;
}

.blog-post-title {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0.75rem 0 1.25rem;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.blog-post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

.blog-post-meta-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.blog-post-author {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.blog-post-meta-details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Featured image */
.blog-post-featured-image {
    margin: 0 0 2rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.blog-post-featured-image img {
    width: 100%;
    display: block;
}

/* Post content — beautiful article typography */
.blog-post-content {
    max-width: 720px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.blog-post-content h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 2.5rem 0 1rem;
    padding-left: 1rem;
    border-left: 4px solid var(--brand-primary);
    line-height: 1.3;
}

.blog-post-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2rem 0 0.75rem;
    line-height: 1.35;
}

.blog-post-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.6rem;
}

.blog-post-content p {
    margin: 0 0 1.35rem;
}

.blog-post-content a {
    color: var(--brand-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.blog-post-content a:hover {
    border-bottom-color: var(--brand-primary);
}

.blog-post-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.blog-post-content blockquote {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid;
    border-image: var(--brand-gradient) 1;
    background: var(--bg-secondary);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.blog-post-content blockquote p:last-child {
    margin-bottom: 0;
}

.blog-post-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.7;
}

.blog-post-content code {
    font-family: 'SFMono-Regular', 'Menlo', 'Consolas', monospace;
    font-size: 0.875em;
}

.blog-post-content p code,
.blog-post-content li code {
    background: var(--bg-tertiary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--brand-primary);
}

.blog-post-content ul,
.blog-post-content ol {
    margin: 1rem 0 1.5rem;
    padding-left: 1.5rem;
}

.blog-post-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.35rem;
}

.blog-post-content ul li::marker {
    color: var(--brand-primary);
}

.blog-post-content ol li::marker {
    color: var(--brand-primary);
    font-weight: 600;
}

.blog-post-content img {
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin: 1.5rem 0;
    display: block;
    max-width: 100%;
}

.blog-post-content figure {
    margin: 1.5rem 0;
}

.blog-post-content figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

.blog-post-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

.blog-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.blog-post-content th,
.blog-post-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.blog-post-content th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
}

/* Post tags */
.blog-post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.blog-post-tags > i {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================================
   17. SHARE BUTTONS
   ========================================================== */
.blog-share {
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
}

.blog-share-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: block;
}

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

.blog-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.blog-share-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.blog-share-copy.copied {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--brand-success);
}

.blog-share-twitter:hover {
    background: rgba(29, 155, 240, 0.1);
    border-color: rgba(29, 155, 240, 0.3);
    color: #1d9bf0;
}

/* ==========================================================
   18. AUTHOR BIO CARD
   ========================================================== */
.blog-author-card {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin: 2rem 0;
}

.blog-author-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    flex-shrink: 0;
}

.blog-author-info {
    flex: 1;
}

.blog-author-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.4rem;
}

.blog-author-bio {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 0.5rem;
}

.blog-author-social {
    font-size: 0.82rem;
    color: var(--brand-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.blog-author-social:hover {
    color: var(--brand-secondary);
}

/* ==========================================================
   19. RELATED POSTS
   ========================================================== */
.blog-related {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* ==========================================================
   20. COMMENTS SECTION
   ========================================================== */
.blog-comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.blog-comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.blog-comment {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    transition: border-color 0.2s;
}

.blog-comment:hover {
    border-color: rgba(99, 102, 241, 0.2);
}

.blog-comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

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

.blog-comment-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.blog-comment-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.blog-comment-date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.blog-comment-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

.blog-comments-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

/* Comment Form */
.blog-comment-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
}

.blog-comment-form-wrapper h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.25rem;
}

.blog-comment-form-message {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.blog-comment-form-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--brand-success);
}

.blog-comment-form-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--brand-danger);
}

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

.blog-comment-form-group {
    margin-bottom: 1rem;
}

.blog-comment-form-group:last-child {
    margin-bottom: 0;
}

.blog-comment-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.blog-comment-form-group .required {
    color: var(--brand-danger);
}

.blog-comment-form-group .optional {
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.blog-comment-form-group input,
.blog-comment-form-group textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.blog-comment-form-group input:focus,
.blog-comment-form-group textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.blog-comment-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ==========================================================
   21. CATEGORY PAGE HEADER
   ========================================================== */
.blog-category-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0 2.5rem;
}

.blog-category-header .blog-breadcrumb {
    padding-top: 0;
    margin-bottom: 1.25rem;
}

.blog-category-header-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.blog-category-header-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.blog-category-header-title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.blog-category-header-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0 0 0.35rem;
    line-height: 1.5;
}

.blog-category-header-count {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ==========================================================
   22. SEARCH PAGE
   ========================================================== */
.blog-search-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0 2.5rem;
}

.blog-search-header .blog-breadcrumb {
    padding-top: 0;
    margin-bottom: 1.25rem;
}

.blog-search-page-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.blog-search-page-title i {
    color: var(--brand-primary);
}

.blog-search-result-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 1.5rem;
}

/* Search results list */
.blog-search-results {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.blog-search-result-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-search-result-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.blog-search-result-image {
    width: 180px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-search-result-body {
    flex: 1;
    min-width: 0;
}

.blog-search-result-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0.4rem 0 0.5rem;
    line-height: 1.35;
}

.blog-search-result-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.blog-search-result-title a:hover {
    color: var(--brand-primary);
}

.blog-search-result-excerpt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 0.75rem;
}

.blog-search-result-excerpt mark,
.blog-search-result-title mark {
    background: rgba(99, 102, 241, 0.2);
    color: var(--brand-primary);
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
}

.blog-search-result-tags {
    display: inline-flex;
    gap: 0.35rem;
}

.blog-search-suggestions {
    margin-top: 2.5rem;
}

.blog-search-suggestions h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.25rem;
}

/* ==========================================================
   23. SEARCH OVERLAY (full-screen)
   ========================================================== */
.blog-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1050;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.blog-search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.blog-search-container {
    width: 100%;
    max-width: 640px;
    padding: 0 1.5rem;
}

.blog-search-form {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0.5rem 0.75rem 0.5rem 1.25rem;
    box-shadow: var(--shadow-lg);
}

.blog-search-icon {
    color: var(--text-muted);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.blog-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.15rem;
    font-family: inherit;
    padding: 0.75rem;
}

.blog-search-input::placeholder {
    color: var(--text-muted);
}

.blog-search-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.blog-search-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ==========================================================
   24. FLASH MESSAGES
   ========================================================== */
.flash-message {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    z-index: 1040;
    padding: 0.85rem 0;
    animation: flashSlideDown 0.4s ease-out;
}

@keyframes flashSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.flash-message .container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.flash-success {
    background: rgba(16, 185, 129, 0.12);
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.flash-error {
    background: rgba(239, 68, 68, 0.12);
    border-bottom: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.flash-message i {
    font-size: 1rem;
}

.flash-message span {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.6;
    transition: opacity 0.2s;
    line-height: 1;
}

.flash-close:hover {
    opacity: 1;
}

/* ==========================================================
   25. FOOTER (exact from landing page)
   ========================================================== */
footer {
    background: var(--bg-footer);
    padding: 4rem 0 2rem;
    color: #94a3b8;
}

.footer-brand {
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
}

footer h5 {
    color: #e2e8f0;
    font-weight: 700;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: #94a3b8;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.social-links a:hover {
    color: white;
    transform: translateY(-2px);
}

.powered-by-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem 0;
    margin-top: 1rem;
}

.powered-by-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.powered-by-logos {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.powered-by-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.powered-by-logo svg {
    height: 18px;
    width: 18px;
    fill: #64748b;
    transition: all 0.3s;
}

.powered-by-logo .powered-by-name {
    font-size: 0.75rem;
    color: #64748b;
    transition: all 0.3s;
}

.powered-by-logo[data-brand="stripe"]:hover svg { fill: #635bff; }
.powered-by-logo[data-brand="stripe"]:hover .powered-by-name { color: #635bff; }
.powered-by-logo[data-brand="claude"]:hover svg { fill: #da7756; }
.powered-by-logo[data-brand="claude"]:hover .powered-by-name { color: #da7756; }
.powered-by-logo[data-brand="gemini"]:hover svg { fill: #4285f4; }
.powered-by-logo[data-brand="gemini"]:hover .powered-by-name { color: #4285f4; }
.powered-by-logo[data-brand="kraken"]:hover svg { fill: #7b3fe4; }
.powered-by-logo[data-brand="kraken"]:hover .powered-by-name { color: #7b3fe4; }

/* Footer HR override */
footer hr {
    border-color: rgba(148, 163, 184, 0.15);
}

/* ==========================================================
   26. ANIMATIONS
   ========================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* data-animate for elements revealed on scroll (JS toggles .animated) */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================
   27. LIGHT THEME SPECIFIC OVERRIDES
   ========================================================== */
[data-theme="light"] .blog-card {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .blog-card:hover {
    box-shadow: var(--shadow-card-hover);
}

[data-theme="light"] .blog-sidebar-widget {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .blog-comment {
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

[data-theme="light"] .blog-comment-form-wrapper {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .blog-author-card {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .blog-category-card {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .blog-empty {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .blog-search-result-item {
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

[data-theme="light"] .blog-pagination-page,
[data-theme="light"] .blog-pagination-btn {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

[data-theme="light"] .blog-pagination-current {
    background: var(--brand-gradient);
    box-shadow: var(--shadow-primary);
}

[data-theme="light"] .blog-post-content pre {
    background: #1e293b;
    color: #e2e8f0;
}

[data-theme="light"] .blog-search-overlay {
    background: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .blog-search-form {
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

[data-theme="light"] .flash-success {
    background: rgba(16, 185, 129, 0.08);
}

[data-theme="light"] .flash-error {
    background: rgba(239, 68, 68, 0.08);
}

[data-theme="light"] .blog-comments-empty {
    background: #ffffff;
}

[data-theme="light"] .blog-category-header {
    background: #f8fafc;
}

[data-theme="light"] .blog-search-header {
    background: #f8fafc;
}

/* Footer stays dark in both themes */
[data-theme="light"] footer {
    background: #1e293b;
    color: #94a3b8;
}

/* ==========================================================
   28. RESPONSIVE BREAKPOINTS
   ========================================================== */

/* Large desktops — 3 columns */
@media (min-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Medium (tablets landscape) */
@media (max-width: 1199.98px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (max-width: 991.98px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .blog-sidebar {
        position: static;
    }

    .blog-hero-title {
        font-size: 2.5rem;
    }

    .blog-post-title {
        font-size: 2rem;
    }

    .blog-card-featured {
        grid-template-columns: 1fr;
    }

    .blog-card-featured .blog-card-image,
    .blog-card-featured .blog-card-image-featured {
        border-radius: 20px 20px 0 0;
        min-height: 220px;
    }

    .blog-card-body-featured {
        padding: 1.5rem;
    }

    .blog-card-title-featured {
        font-size: 1.3rem;
    }

    .blog-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-category-header-title {
        font-size: 1.6rem;
    }
}

/* Small tablets / large phones */
@media (max-width: 767.98px) {
    .blog-hero {
        padding: 3.5rem 0 3rem;
    }

    .blog-hero-title {
        font-size: 2rem;
    }

    .blog-hero-description {
        font-size: 1rem;
    }

    .blog-post-title {
        font-size: 1.65rem;
    }

    .blog-post-content {
        font-size: 1rem;
    }

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

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

    .blog-search-result-item {
        flex-direction: column;
    }

    .blog-search-result-image {
        width: 100%;
        height: 180px;
    }

    .blog-author-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .blog-comment {
        flex-direction: column;
    }

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

    .blog-category-header-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .blog-search-page-title {
        font-size: 1.35rem;
    }
}

/* Mobile phones */
@media (max-width: 575.98px) {
    .blog-grid,
    .blog-grid-3 {
        grid-template-columns: 1fr;
    }

    .blog-categories-grid {
        grid-template-columns: 1fr;
    }

    .blog-hero {
        padding: 2.5rem 0 2rem;
    }

    .blog-hero-title {
        font-size: 1.75rem;
    }

    .blog-hero-search-wrapper {
        flex-direction: column;
        border-radius: 16px;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .blog-hero-search-wrapper > i {
        display: none;
    }

    .blog-hero-search-wrapper input {
        width: 100%;
        text-align: center;
        padding: 0.5rem;
    }

    .blog-hero-search-wrapper button {
        width: 100%;
        padding: 0.65rem;
    }

    .blog-card-body {
        padding: 1rem 1.25rem 1.25rem;
    }

    .blog-post-title {
        font-size: 1.45rem;
    }

    .blog-post-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-share-buttons {
        flex-direction: column;
    }

    .blog-share-btn {
        justify-content: center;
    }

    .blog-comment-form-wrapper {
        padding: 1.25rem;
    }

    .blog-pagination {
        gap: 0.35rem;
    }

    .blog-pagination-btn {
        padding: 0.45rem 0.85rem;
        font-size: 0.8rem;
    }

    .blog-pagination-page {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .powered-by-section {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ==========================================================
   29. BOOTSTRAP OVERRIDES (work WITH, not against)
   ========================================================== */

/* Override Bootstrap text-muted to use our variable */
.text-muted {
    color: var(--text-muted) !important;
}

/* Override Bootstrap modal backgrounds */
.modal-content {
    background: var(--modal-bg);
    border-color: var(--border-color);
}

/* Override Bootstrap form controls */
.form-control {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

.form-control:focus {
    background-color: var(--input-bg);
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    color: var(--text-primary);
}

/* Override Bootstrap card if used */
.card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

/* ==========================================================
   30. ADMIN STYLES (base — each admin page adds inline overrides)
   ========================================================== */
.admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-header h1 i {
    color: var(--brand-primary);
}

.admin-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0;
}

.admin-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Admin buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
    color: #fff;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.btn-danger {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

/* ==========================================================
   31. UTILITY CLASSES
   ========================================================== */
.required {
    color: var(--brand-danger);
}

.optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.8em;
}

/* Smooth entrance for main content */
.blog-main > .container,
.blog-main > section {
    animation: fadeInUp 0.4s ease-out;
}

/* ==========================================================
   33. MISSING CLASSES — View-to-CSS integration fixes
   ========================================================== */

/* --- Hero background & shapes (index.php uses these) --- */
.blog-hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.blog-hero-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.blog-hero-shape--1 {
    width: 300px; height: 300px; top: -80px; right: -60px;
    animation: heroFloat 8s ease-in-out infinite;
}
.blog-hero-shape--2 {
    width: 200px; height: 200px; bottom: -60px; left: 10%;
    animation: heroFloat 10s ease-in-out infinite reverse;
}
.blog-hero-shape--3 {
    width: 120px; height: 120px; top: 40%; right: 20%;
    animation: heroFloat 7s ease-in-out infinite 1s;
}
.blog-hero-shape--4 {
    width: 80px; height: 80px; bottom: 20%; left: 5%;
    animation: heroFloat 9s ease-in-out infinite 0.5s;
}
.blog-hero-shape--5 {
    width: 60px; height: 60px; top: 20%; left: 25%;
    animation: heroFloat 6s ease-in-out infinite 2s;
}

/* --- Hero gradient text --- */
.blog-hero-gradient-text {
    background: linear-gradient(135deg, #fbbf24, #f472b6, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Hero subtitle (views use this instead of blog-hero-description) --- */
.blog-hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* --- Hero search box (views use .blog-hero-search-box, CSS had .blog-hero-search-wrapper) --- */
.blog-hero-search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 60px;
    padding: 0.35rem 0.35rem 0.35rem 1.25rem;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.blog-hero-search-box:focus-within {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.blog-hero-search-box > i {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.blog-hero-search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: inherit;
    padding: 0.6rem 0.75rem;
}

.blog-hero-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.blog-hero-search-box button {
    background: #ffffff;
    color: var(--brand-primary);
    border: none;
    border-radius: 60px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}

.blog-hero-search-box button:hover {
    background: #f0f0ff;
    transform: scale(1.02);
}

/* Search page reuses .blog-hero-search-box in non-hero context */
.blog-search-page-form .blog-hero-search-box {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

.blog-search-page-form .blog-hero-search-box > i {
    color: var(--text-muted);
}

.blog-search-page-form .blog-hero-search-box input {
    color: var(--text-primary);
}

.blog-search-page-form .blog-hero-search-box input::placeholder {
    color: var(--text-muted);
}

.blog-search-page-form .blog-hero-search-box button {
    background: var(--brand-gradient);
    color: #ffffff;
}

.blog-search-page-form .blog-hero-search-box button:hover {
    opacity: 0.9;
    background: var(--brand-gradient);
}

@media (max-width: 575.98px) {
    .blog-hero-search-box {
        flex-direction: column;
        border-radius: 16px;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .blog-hero-search-box > i {
        display: none;
    }

    .blog-hero-search-box input {
        width: 100%;
        text-align: center;
        padding: 0.5rem;
    }

    .blog-hero-search-box button {
        width: 100%;
        padding: 0.65rem;
    }
}

/* --- Hero stats (index.php) --- */
.blog-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
    flex-wrap: wrap;
}

.blog-hero-stats i {
    margin-right: 0.3rem;
}

.blog-hero-stats-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
}

/* --- Section heading (views use .blog-section-heading, CSS had .blog-section-title) --- */
.blog-section-heading {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.blog-section-heading i {
    color: var(--brand-primary);
    font-size: 1.1rem;
}

/* --- Featured post (index.php uses .blog-featured instead of .blog-card-featured) --- */
.blog-featured {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-featured:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.blog-featured-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    max-height: 400px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.blog-featured-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.15);
}

.blog-featured-image-overlay {
    position: absolute;
    inset: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
}

.blog-featured-label {
    align-self: flex-end;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
    color: #fff;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.blog-featured-body {
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.blog-featured-title {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 0.5rem 0 0.75rem;
    word-wrap: break-word;
}

.blog-featured-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-featured-title a:hover {
    color: var(--brand-primary);
}

.blog-featured-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 1rem;
}

.blog-featured-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.blog-featured-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.blog-featured-author {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.blog-featured-details {
    display: flex;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.blog-featured-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
    transition: gap 0.2s;
}

.blog-featured-read-more:hover {
    gap: 0.75rem;
    color: var(--brand-secondary);
}

/* --- Featured image: real <img> support --- */
.blog-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* Hide gradient icon/placeholder when a real image is present */
.blog-featured-image img ~ .blog-featured-icon,
.blog-card-image img ~ .blog-card-gradient {
    display: none;
}

/* Tighten gap between hero and content */
.blog-hero + .container {
    margin-top: -1rem;
    position: relative;
    z-index: 5;
}

@media (max-width: 991.98px) {
    .blog-featured .row {
        flex-direction: column;
    }

    .blog-featured-body {
        padding: 1.5rem;
    }

    .blog-featured-title {
        font-size: 1.3rem;
    }

    .blog-featured-image {
        min-height: 200px;
        max-height: 250px;
    }
}

/* --- Card badge (views use .blog-card-badge, CSS had .blog-card-category) --- */
.blog-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    z-index: 2;
}

.blog-card-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.blog-card-badge-inline:hover {
    opacity: 0.8;
}

/* --- Card gradient placeholder (views use .blog-card-gradient + .blog-card-icon) --- */
.blog-card-gradient {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-icon {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.2);
}

/* --- Category card sub-classes (views use blog-category-card-*) --- */
.blog-category-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 1rem;
}

.blog-category-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.35rem;
}

.blog-category-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 0.75rem;
    flex: 1;
}

.blog-category-card-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.blog-category-card--compact {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
}

.blog-category-card--compact .blog-category-card-icon {
    margin-bottom: 0;
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

/* --- Tags section (index.php) --- */
.blog-tags-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    padding-bottom: 3rem;
    border-top: 1px solid var(--border-color);
}

/* --- Post banner (post.php uses blog-post-banner instead of blog-post-header) --- */
.blog-post-banner {
    position: relative;
    padding: 2.5rem 0 3rem;
    overflow: hidden;
    color: #fff;
}

.blog-post-banner .blog-breadcrumb a,
.blog-post-banner .blog-breadcrumb span {
    color: rgba(255, 255, 255, 0.7);
}

.blog-post-banner .blog-breadcrumb a:hover {
    color: #fff;
}

.blog-post-banner-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.blog-post-banner-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.blog-post-banner-shape--1 {
    width: 250px; height: 250px; top: -80px; right: -60px;
    animation: heroFloat 9s ease-in-out infinite;
}

.blog-post-banner-shape--2 {
    width: 180px; height: 180px; bottom: -60px; left: 10%;
    animation: heroFloat 11s ease-in-out infinite reverse;
}

.blog-post-banner-content {
    text-align: center;
}

.blog-post-banner-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.15);
    display: block;
    margin-bottom: 1rem;
}

.blog-post-banner-title {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1.2;
    margin: 0.75rem 0 1.25rem;
    color: #fff;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.blog-post-banner-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.blog-post-banner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.blog-post-banner-meta > div {
    text-align: left;
}

.blog-post-banner-author {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    display: block;
}

.blog-post-banner-details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.blog-post-edit-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.blog-post-edit-link:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

@media (max-width: 767.98px) {
    .blog-post-banner-title {
        font-size: 1.65rem;
    }

    .blog-post-banner-meta {
        flex-direction: column;
    }
}

/* --- Post article wrapper --- */
.blog-post-article {
    padding-top: 2rem;
}

/* --- Category banner (category.php) --- */
.blog-category-banner {
    position: relative;
    padding: 2.5rem 0 3rem;
    overflow: hidden;
    color: #fff;
}

.blog-category-banner .blog-breadcrumb a,
.blog-category-banner .blog-breadcrumb span {
    color: rgba(255, 255, 255, 0.7);
}

.blog-category-banner .blog-breadcrumb a:hover {
    color: #fff;
}

.blog-category-banner-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.blog-category-banner-content {
    text-align: center;
}

.blog-category-banner-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    margin-bottom: 1rem;
}

.blog-category-banner-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    margin: 0 0 0.5rem;
}

.blog-category-banner-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
    margin: 0 auto 0.75rem;
    line-height: 1.6;
}

.blog-category-banner-count {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.12);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    display: inline-block;
}

@media (max-width: 767.98px) {
    .blog-category-banner-title {
        font-size: 1.6rem;
    }
}

/* --- Search result item (search.php uses .blog-search-result, CSS had .blog-search-result-item) --- */
.blog-search-result {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 1.25rem;
}

.blog-search-result:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.blog-search-result .blog-search-result-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.5rem;
}

@media (max-width: 767.98px) {
    .blog-search-result {
        flex-direction: column;
    }

    .blog-search-result .blog-search-result-image {
        width: 100%;
        height: 120px;
    }
}

[data-theme="light"] .blog-search-result {
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* --- TOC widget (JS selector + sub-items) --- */
.blog-toc-widget {
    /* Shown by JS when headings exist; inherits blog-sidebar-widget styles */
}

.blog-toc-item {
    /* default heading style */
}

.blog-toc-sub a {
    padding-left: 1.5rem;
    font-size: 0.78rem;
}

/* --- Form message (JS uses .blog-form-message-success / .blog-form-message-error) --- */
.blog-form-message {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-form-message-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--brand-success);
}

.blog-form-message-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--brand-danger);
}

/* --- Tag small variant (search.php uses .blog-tag--sm) --- */
.blog-tag--sm {
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
}

/* --- Share button copied state (JS adds .copied to [data-share-copy] .blog-share-btn) --- */
.blog-share-btn.copied {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--brand-success);
}

/* --- Empty state used in views (views use .blog-empty-state) --- */
.blog-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.blog-empty-state i {
    display: block;
    font-size: 3.5rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    opacity: 0.5;
}

.blog-empty-state h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.blog-empty-state p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

[data-theme="light"] .blog-empty-state {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

/* --- Data-category gradient selectors (for card hover accents) --- */
[data-category="web-development"] .blog-card-gradient { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
[data-category="ai-automation"] .blog-card-gradient { background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%); }
[data-category="marketing"] .blog-card-gradient { background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%); }
[data-category="case-studies"] .blog-card-gradient { background: linear-gradient(135deg, #22d3ee 0%, #0891b2 100%); }
[data-category="tech-insights"] .blog-card-gradient { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); }
[data-category="small-business"] .blog-card-gradient { background: linear-gradient(135deg, #34d399 0%, #059669 100%); }

.blog-card[data-category="web-development"]:hover { border-color: rgba(102, 126, 234, 0.4); }
.blog-card[data-category="ai-automation"]:hover { border-color: rgba(168, 85, 247, 0.4); }
.blog-card[data-category="marketing"]:hover { border-color: rgba(244, 114, 182, 0.4); }
.blog-card[data-category="case-studies"]:hover { border-color: rgba(34, 211, 238, 0.4); }
.blog-card[data-category="tech-insights"]:hover { border-color: rgba(251, 191, 36, 0.4); }
.blog-card[data-category="small-business"]:hover { border-color: rgba(52, 211, 153, 0.4); }

/* ==========================================================
   34. PRINT STYLES
   ========================================================== */
@media print {
    .navbar,
    .blog-sidebar,
    .blog-share,
    .blog-comments,
    .reading-progress,
    footer,
    .blog-search-overlay,
    .flash-message {
        display: none !important;
    }

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

    .blog-post-content {
        max-width: 100%;
    }

    body {
        color: #000;
        background: #fff;
    }

    .blog-main {
        padding-top: 0;
    }
}
