/*
Theme Name: WooPilot Landing Theme
Description: Beautiful dark Apple-inspired landing layout for WooPilot
Author: GitHub Copilot
Version: 1.2
Text Domain: woopilot-landing
License: GPL v2 or later
*/

:root {
    color-scheme: dark;
    --bg: #0a0a0f;
    --bg-panel: rgba(18, 25, 42, 0.95);
    --bg-panel-strong: rgba(22, 32, 62, 0.98);
    --border: rgba(255, 255, 255, 0.08);
    --text: #f8f9ff;
    --text-muted: rgba(248, 249, 255, 0.65);
    --accent: #7c3aed;
    --accent-strong: #a855f7;
    --accent-soft: rgba(124, 58, 237, 0.15);
    --outline: rgba(255, 255, 255, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    font-family: 'Vazirmatn', 'SF Pro Display', 'Inter', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

/* Ensure images can't force horizontal scroll */
img { max-width: 100%; height: auto; display: block; }

a {
    color: inherit;
}

html, body {
    margin: 0;
    background: radial-gradient(circle at top right, #1a1a2e, transparent 50%),
        radial-gradient(circle at bottom left, #16213e, transparent 50%),
        linear-gradient(180deg, #0a0a0f, #000);
    color: var(--text);
    direction: rtl;
    min-height: 100vh;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Header / Container base layout (landing theme) */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

.site-header {
    position: relative;
    z-index: 60;
    padding: 1rem 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
}

.brand { display: flex; flex-direction: column; gap: 0.25rem; }

.brand-name { font-size: 1.25rem; font-weight: 700; color: var(--accent); }

.brand-tagline { font-size: 0.85rem; color: var(--text-muted); }

/* Primary nav (desktop) */
.primary {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.primary a {
    color: var(--text);
    text-decoration: none;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.16s ease;
}

.primary a:hover { transform: translateY(-2px); }

/* Toggle for mobile */
.menu-toggle {
    display: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.6rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(10px);
    color: var(--text);
}

.header-cta { display: flex; align-items: center; gap: 0.5rem; }

/* Visually hide element but remain accessible to screen readers */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Skip link appearance when focused */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -40px;
    background: var(--accent);
    color: var(--bg);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    z-index: 1000;
    text-decoration: none;
}
.skip-link:focus {
    top: 1rem;
}

@media (max-width: 960px) {
    .primary {
        position: fixed;
        top: 78px;
        right: 12px;
        left: auto;
        flex-direction: column;
        background: var(--bg-panel-strong);
        border: 1px solid var(--border);
        padding: 1rem;
        border-radius: 1rem;
        transform-origin: top right;
        transform: scale(0.95) translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
        gap: 0.9rem;
        width: min(230px, 80vw);
        backdrop-filter: blur(20px);
    }

    .primary.is-open {
        transform: scale(1) translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .header-cta {
        display: none;
    }
}

header,
footer {
    font-family: 'Vazirmatn', 'SF Pro Display', sans-serif;
}

section {
    position: relative;
    padding: 5rem 0;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.eyebrow {
    text-transform: uppercase;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.hero-trust {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    display: inline-flex;
    color: var(--text-muted);
    font-size: 0.88rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
}

.hero-visual {
    display: grid;
    justify-items: center;
    gap: 1.25rem;
}

.device-frame {
    width: 320px;
    max-width: 100%;
    border-radius: 2rem;
    padding: 1rem;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
    box-shadow: 0 30px 65px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(20px);
}

.device-frame img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-badge {
    text-align: center;
    background: var(--glass-bg);
    border-radius: 1.25rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--glass-border);
    width: min(280px, 100%);
    backdrop-filter: blur(15px);
}

.hero-badge span {
    color: var(--accent);
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

.hero-badge p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Landing page hero layout */
.hero {
    position: relative;
    padding: 5rem 0;
    overflow-x: hidden; /* prevent decorative elements from adding horizontal scroll */
}

.hero-glow {
    position: absolute;
    inset: -5% -10% auto -10%;
    width: 140%;
    height: 50%;
    background: radial-gradient(closest-side at 25% 20%, rgba(124, 58, 237, 0.09), rgba(124,58,237,0) 35%);
    pointer-events: none;
    z-index: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr minmax(220px, 420px);
    gap: 2rem;
    align-items: center;
}

.hero-copy { z-index: 1; min-width: 0; }

.hero-lede {
    color: var(--text-muted);
    margin-top: 0.8rem;
    font-size: 1.05rem;
}

.hero-actions { display: flex; gap: 0.8rem; margin-top: 1.25rem; z-index: 1; }

.hero-metrics {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(100px, 1fr));
    gap: 1rem;
    color: var(--text-muted);
    z-index: 1;
}

.hero-visual { z-index: 1; min-width: 0; }

/* Add min-width: 0 on grid children to avoid content forcing overflow on narrow viewports */
.pillars-grid, .features-grid, .posts-grid, .testimonials-carousel {
    min-width: 0;
}

@media (max-width: 960px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .device-frame { transform: translateY(0); }
    .hero-actions { justify-content: center; }
}

.btn {
    border-radius: 999px;
    padding: 0.85rem 2.4rem;
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid transparent;
    transition: border 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #0a0c1c;
    box-shadow: 0 15px 45px rgba(124, 58, 237, 0.35);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 70px rgba(124, 58, 237, 0.45);
}

.btn-ghost {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text);
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text);
    background: transparent;
}

.btn-clicked {
    transform: scale(0.96);
}

section.pillars,
section.process,
section.features,
section.testimonials,
section.final-cta {
    background: var(--bg-panel);
    margin: 0 auto;
    z-index: 1;
    border-radius: 2.5rem;
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.section-heading {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 2.5rem auto;
}

.section-heading h2 {
    font-size: clamp(2.25rem, 3vw, 3rem);
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg, var(--text), rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-heading p {
    color: var(--text-muted);
}

.pillars-grid,
.features-grid,
.testimonials-carousel {
    display: grid;
    gap: 1.75rem;
}

.pillars-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.pillar-card,
.feature-card {
    padding: 1.75rem;
    border-radius: 1.5rem;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    min-height: 220px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.pillar-card::before,
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.pillar-card:hover::before,
.feature-card:hover::before {
    opacity: 1;
}

.pillar-card:hover,
.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.pillar-card h3,
.feature-card h3 {
    margin-top: 1rem;
    margin-bottom: 0.6rem;
    font-size: 1.3rem;
    color: var(--text);
}

.feature-card.lift {
    transform: translateY(-12px) scale(1.01);
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.35);
}

.pillar-card p,
.feature-card p {
    color: var(--text-muted);
    margin: 0;
}

.feature-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1rem;
    background: var(--accent-soft);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: grid;
    place-items: center;
    backdrop-filter: blur(10px);
}

.feature-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    fill: none;
    stroke: var(--accent);
}

section.process .process-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1rem;
}

.process-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-radius: 1.25rem;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
}

.process-list .step {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    background: var(--accent-soft);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

.testimonials-carousel {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.testimonial-card {
    padding: 1.75rem;
    border-radius: 1.5rem;
    background: linear-gradient(160deg, rgba(124, 58, 237, 0.12), rgba(22, 32, 62, 0.9));
    border: 1px solid var(--glass-border);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.testimonial-card p {
    color: var(--text-muted);
    font-size: 1rem;
    flex: 1;
}

.testimonial-card cite {
    color: var(--text);
    font-style: normal;
    margin-top: 1.2rem;
    font-size: 0.95rem;
}

.final-cta {
    padding: 5rem 0;
}

.cta-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
    align-items: center;
}

.cta-content h2 {
    font-size: clamp(2.2rem, 2.8vw, 3rem);
    margin-top: 0;
    margin-bottom: 0.3rem;
    background: linear-gradient(135deg, var(--text), rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.cta-content p {
    color: var(--text-muted);
    max-width: 540px;
}

footer {
    margin-top: 2rem;
    background: transparent;
    padding: 2rem 0;
}

.btn:hover {
    border-color: transparent;
}

@media (max-width: 768px) {
    .hero-grid {
        text-align: center;
    }

    .cta-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-metrics {
        grid-template-columns: repeat(3, minmax(100px, 1fr));
    }
}

@media (min-width: 1200px) {
    .pillars-grid {
        grid-template-columns: repeat(3, minmax(260px, 1fr));
    }
    .features-grid {
        grid-template-columns: repeat(3, minmax(260px, 1fr));
    }
    .testimonials-carousel {
        grid-template-columns: repeat(3, minmax(260px, 1fr));
    }
}

/* Blog Theme Body Styles */
body.blog-theme {
    background: #ffffff;
    color: #1a202c;
    font-family: 'Vazirmatn', 'SF Pro Display', 'Inter', system-ui, sans-serif;
    line-height: 1.7;
}

/* Override dark theme styles for blog pages */
.blog-theme .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Ensure blog pages don't inherit dark theme styles */
.blog-theme .site-header:not(.blog-header),
.blog-theme .site-footer:not(.blog-footer) {
    display: none;
}

.blog-header .blog-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.blog-header .search-field::placeholder {
    color: #a0aec0;
}

.blog-header .search-submit {
    border: none;
    background: transparent;
    color: #718096;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.blog-header .search-submit:hover {
    color: #7c3aed;
}

.header-cta .btn {
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    font-weight: 600;
    text-transform: none;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.3);
    border: 0;
}

.header-cta .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(124, 58, 237, 0.35);
}

.blog-footer .social-links a:hover {
    background: #7c3aed;
    transform: translateY(-2px);
}

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

.blog-footer .footer-section h4 {
    color: #f8f9fa;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.blog-footer .footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.blog-footer .footer-section a {
    color: #a0aec0;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.blog-footer .footer-section a:hover {
    color: #7c3aed;
}

.blog-footer .footer-bottom {
    padding: 2rem 0;
    text-align: center;
}

.blog-footer .footer-bottom p {
    margin: 0.5rem 0;
    color: #718096;
    font-size: 0.875rem;
}

/* Responsive Blog Header */
@media (max-width: 768px) {
    .blog-header .header-inner {
        flex-direction: column;
        gap: 1rem;
    }

    .blog-header .blog-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .blog-header .header-actions {
        order: 2;
    }

    .blog-header .search-field {
        width: 150px;
    }

    .blog-footer .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .blog-footer .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.blog-main,
.single-post {
    background: #ffffff;
    color: #1a202c;
    font-family: 'Vazirmatn', 'SF Pro Display', 'Inter', system-ui, sans-serif;
    line-height: 1.7;
}

.blog-main .container,
.single-post .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Blog Header */
.blog-header {
    text-align: center;
    padding: 4rem 0 2rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 3rem;
}

.blog-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
}

.blog-header p {
    font-size: 1.125rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Post Card */
.post-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-width: 0; /* avoid intrinsic size causing overflow */
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #cbd5e0;
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
}

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

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

.post-content {
    padding: 1.5rem;
}

.post-header {
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 0.75rem;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.post-title a {
    color: #1a202c;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: #7c3aed;
}

.post-excerpt {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #7c3aed;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.read-more:hover {
    color: #6b46c1;
    gap: 0.75rem;
}

.read-more svg {
    transition: transform 0.2s ease;
}

.read-more:hover svg {
    transform: translateX(2px);
}

/* Single Post Styles */
.post-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.post-article .post-categories {
    margin-bottom: 1rem;
}

.post-article .post-categories a {
    display: inline-block;
    background: #f7fafc;
    color: #7c3aed;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #e2e8f0;
}

.post-article .post-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1a202c;
    margin-bottom: 1.5rem;
}

.post-article .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.post-article .post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-article .post-thumbnail {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.post-article .post-thumbnail img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
}

.post-article .post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #2d3748;
    margin-bottom: 2rem;
}

.post-article .post-content h2,
.post-article .post-content h3,
.post-article .post-content h4 {
    color: #1a202c;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-article .post-content p {
    margin-bottom: 1.5rem;
}

.post-article .post-content ul,
.post-article .post-content ol {
    margin-bottom: 1.5rem;
    padding-right: 1.5rem;
}

.post-article .post-content li {
    margin-bottom: 0.5rem;
}

.post-article .post-content blockquote {
    border-right: 4px solid #7c3aed;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: #f8f9fa;
    font-style: italic;
    color: #4a5568;
}

.post-article .post-footer {
    border-top: 1px solid #e2e8f0;
    padding-top: 2rem;
    margin-top: 3rem;
}

.post-tags {
    margin-bottom: 2rem;
}

.post-tags span {
    font-weight: 600;
    color: #1a202c;
    margin-left: 0.5rem;
}

.post-tags a {
    display: inline-block;
    background: #f7fafc;
    color: #7c3aed;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    text-decoration: none;
    margin: 0.25rem 0.5rem 0.25rem 0;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.post-tags a:hover {
    background: #7c3aed;
    color: white;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.nav-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #4a5568;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #7c3aed;
    color: white;
    border-color: #7c3aed;
}

.nav-link.prev {
    justify-content: flex-start;
}

.nav-link.next {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.nav-link.next svg {
    transform: rotate(180deg);
}

/* Archive Header */
.archive-header {
    text-align: center;
    padding: 4rem 0 2rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 3rem;
}

.archive-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
}

.archive-description {
    font-size: 1.125rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 4rem 0;
}

.no-posts h2 {
    color: #1a202c;
    margin-bottom: 1rem;
}

.no-posts p {
    color: #718096;
    margin-bottom: 2rem;
}

.no-posts .btn {
    display: inline-block;
    background: #7c3aed;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.no-posts .btn:hover {
    background: #6b46c1;
}

/* Pagination */
.posts-pagination {
    margin-top: 3rem;
    text-align: center;
}

.posts-pagination .page-numbers {
    display: inline-block;
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    background: #f8f9fa;
    color: #4a5568;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.posts-pagination .page-numbers:hover,
.posts-pagination .page-numbers.current {
    background: #7c3aed;
    color: white;
    border-color: #7c3aed;
}

/* Comments */
.comments-area {
    max-width: 800px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.comments-title {
    font-size: 1.5rem;
    color: #1a202c;
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.comment-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.comment-author .fn {
    font-weight: 600;
    color: #1a202c;
}

.comment-meta {
    font-size: 0.875rem;
    color: #718096;
}

.comment-content {
    color: #2d3748;
    line-height: 1.6;
}

/* Comment Form */
.comment-form {
    margin-top: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.comment-form-comment label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
    display: block;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.comment-form-comment textarea,
.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.875rem;
}

.comment-form-comment textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-submit {
    margin-top: 1rem;
    text-align: left;
}

.form-submit input[type="submit"] {
    background: #7c3aed;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.form-submit input[type="submit"]:hover {
    background: #6b46c1;
}

/* Search Header */
.search-header {
    text-align: center;
    padding: 4rem 0 2rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 3rem;
}

.search-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
}

.search-header p {
    font-size: 1.125rem;
    color: #718096;
}

/* Search Suggestions */
.search-suggestions {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: center;
}

.search-suggestions h3 {
    color: #1a202c;
    margin-bottom: 1rem;
}

.search-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #4a5568;
}

.search-suggestions li {
    margin-bottom: 0.5rem;
}

.search-again {
    margin: 2rem 0;
    text-align: center;
}

.search-again h3 {
    color: #1a202c;
    margin-bottom: 1rem;
}

.search-again .search-form {
    max-width: 400px;
    margin: 0 auto;
}

.search-again .search-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.search-again .search-submit {
    background: #7c3aed;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s ease;
}

.search-again .search-submit:hover {
    background: #6b46c1;
}

/* ===== BLOG THEME (LIGHT) ===== */
.blog-theme {
    --bg: #ffffff;
    --text: #1a1a1a;
    --text-muted: #6b7280;
    --accent: #7c3aed;
    --accent-strong: #a855f7;
    --blog-header-bg: #ffffff;
    --blog-header-text: #1a1a1a;
    --blog-footer-bg: #f8f9fa;
    --blog-footer-text: #1a1a1a;
    --blog-footer-accent: #7c3aed;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
}

.blog-theme body {
    background: var(--bg);
    color: var(--text);
}

/* ===== BLOG HEADER ===== */
.blog-header {
    background: var(--blog-header-bg, #ffffff);
    border-bottom: 1px solid rgba(229, 231, 235, 0.7);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px var(--shadow);
}

.blog-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    min-height: 4rem;
}

.blog-header .brand {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.blog-header .brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.blog-header .brand-tagline {
    font-size: 0.875rem;
    color: var(--blog-header-text, var(--text-muted));
}

.blog-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.blog-nav .nav-link {
    color: var(--blog-header-text, var(--text));
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s ease;
}

.blog-nav .nav-link:hover,
.blog-nav .nav-link.active {
    color: var(--accent);
}

.blog-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

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

.search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: #ffffff;
    color: var(--text);
    font-size: 0.875rem;
    width: 200px;
    transition: all 0.2s ease;
}

.search-field:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.search-submit {
    position: absolute;
    right: 0.5rem;
    padding: 0.25rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.search-submit:hover {
    color: var(--accent);
}

/* ===== BLOG MAIN CONTENT ===== */
.blog-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.single-post .container {
    max-width: 800px;
}

.post-article {
    background: #ffffff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow);
}

.post-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.post-categories {
    margin-bottom: 1rem;
}

.post-categories a {
    display: inline-block;
    background: rgba(124, 58, 237, 0.1);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.post-meta svg {
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
}

.post-content {
    padding: 2rem;
    line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 2rem 0 1rem 0;
    font-weight: 700;
    line-height: 1.3;
}

.post-content h1 { font-size: 2rem; }
.post-content h2 { font-size: 1.75rem; }
.post-content h3 { font-size: 1.5rem; }
.post-content h4 { font-size: 1.25rem; }
.post-content h5 { font-size: 1.125rem; }
.post-content h6 { font-size: 1rem; }

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-right: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-right: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: rgba(124, 58, 237, 0.05);
    font-style: italic;
}

.post-content code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875em;
}

.post-content pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

/* Prevent tables in post content from causing overflow on small viewports */
.post-content table {
    width: 100%;
    max-width: 100%;
    display: block;
    overflow-x: auto;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* ===== BLOG FOOTER ===== */

.blog-footer {
    background: var(--blog-footer-bg, #f8f9fa);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    margin-top: 4rem;
}

.blog-footer .footer-content {
    padding: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 1.5rem;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.08);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--blog-footer-text, var(--text));
}

.footer-brand p {
    color: var(--blog-footer-text, var(--text-muted));
    line-height: 1.6;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--blog-footer-accent, var(--accent));
    color: white;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 1.25rem;
}

.social-links a:hover {
    background: var(--blog-footer-accent, var(--accent-strong));
    transform: translateY(-2px);
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--blog-footer-text, var(--text));
    margin-bottom: 1rem;
}

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

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

.footer-links a {
    color: var(--blog-footer-text, var(--text-muted));
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--blog-footer-accent, var(--accent));
}

.footer-bottom {
    padding: 2rem 0;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    text-align: center;
}

.footer-bottom p {
    color: var(--blog-footer-text, var(--text-muted));
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.footer-bottom p:last-child {
    margin-bottom: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .blog-header .header-inner {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .blog-nav {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .header-cta {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .header-cta .btn {
        width: 100%;
        max-width: 320px;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .search-field {
        width: 100%;
        max-width: 300px;
    }

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

    .blog-footer .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    /* Ensure posts grid uses single column on narrow viewports to avoid horizontal overflow */
    .posts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .blog-nav {
        display: none;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .post-content {
        padding: 1.5rem;
    }
}
