/**
 * PoliticalBlog.eu - Main Stylesheet
 * Professional Geopolitics & Economy Blog Design
 */

/* ============================================
   CSS Variables & Theme
   ============================================ */
:root {
    /* Colors - Dark Theme (Default) */
    --bg-primary: #0a0f1a;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2332;
    --bg-card: #151d2e;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --accent-gold: #fbbf24;
    --accent-red: #ef4444;

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

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --container-max: 1280px;
    --container-padding: 1.5rem;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

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

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ============================================
   Layout & Container
   ============================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ============================================
   Header
   ============================================ */
.main-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--accent-gold);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-text .accent {
    color: var(--accent-primary);
}

/* Navigation */
.main-nav ul {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width var(--transition-normal);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-primary);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

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

.language-switcher {
    display: flex;
    gap: 0.25rem;
    margin-right: 0.5rem;
}

.lang-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.lang-btn:hover,
.lang-btn.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.search-btn,
.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.search-btn:hover,
.theme-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    padding: 2.5rem 0;
    background: var(--bg-primary);
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

.featured-main {
    position: relative;
    display: flex;
}

.featured-main a {
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    width: 100%;
}

.featured-main .article-image {
    position: relative;
    flex: 1;
    min-height: 300px;
}

.featured-main .article-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-main .article-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.featured-main h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: #fff;
}

.featured-main .excerpt {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.featured-side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.featured-small {
    flex: 1;
    display: flex;
}

.featured-small a {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    width: 100%;
}

.featured-small a:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.featured-small .article-image {
    position: relative;
    aspect-ratio: 16 / 9;
}

.featured-small .article-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.featured-small .article-content {
    padding: 1rem;
}

.featured-small h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

/* Placeholder Images with Gradients */
.placeholder-image {
    width: 100%;
    height: 100%;
    position: relative;
}

.gradient-1 { background: linear-gradient(135deg, #1a365d 0%, #2563eb 50%, #1e40af 100%); }
.gradient-2 { background: linear-gradient(135deg, #064e3b 0%, #059669 50%, #047857 100%); }
.gradient-3 { background: linear-gradient(135deg, #7c2d12 0%, #ea580c 50%, #c2410c 100%); }
.gradient-4 { background: linear-gradient(135deg, #581c87 0%, #9333ea 50%, #7c3aed 100%); }
.gradient-5 { background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 50%, #0369a1 100%); }
.gradient-6 { background: linear-gradient(135deg, #1e3a5f 0%, #3b82f6 50%, #1d4ed8 100%); }
.gradient-7 { background: linear-gradient(135deg, #4a1d96 0%, #7c3aed 50%, #6d28d9 100%); }

/* Category Badge */
.category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--accent-primary);
    color: #fff;
    border-radius: 4px;
}

/* Article Meta */
.article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.featured-main .article-meta {
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   News Ticker
   ============================================ */
.news-ticker {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    overflow: hidden;
}

.news-ticker .container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ticker-label {
    flex-shrink: 0;
    padding: 0.25rem 0.75rem;
    background: var(--accent-red);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ticker-content {
    overflow: hidden;
    white-space: nowrap;
}

.ticker-content p {
    display: inline-block;
    animation: scroll 30s linear infinite;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    padding: 3rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
    align-items: start;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
}

.view-all {
    font-weight: 600;
    color: var(--accent-primary);
}

.view-all:hover {
    color: var(--accent-secondary);
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.article-card {
    display: flex;
}

.article-card a {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.article-card a:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.article-card .article-image {
    height: 160px;
    position: relative;
}

.article-card .article-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card .article-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card .category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.article-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.article-card .excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.article-card .article-meta {
    margin-top: auto;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem 1.75rem 1.8rem 1.75rem;
    margin-bottom: 1.52rem;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-widget h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1.35rem;
    padding-bottom: 0.85rem;
    border-bottom: 2px solid var(--accent-primary);
}

/* Regions Widget */
.region-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.region-list li:last-child {
    border-bottom: none;
}

.region-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.region-list a:hover {
    color: var(--accent-primary);
}

.region-icon {
    font-size: 1.25rem;
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-card) 100%);
}

.newsletter-widget p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-form input {
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.newsletter-form button {
    padding: 0.85rem 1.5rem;
    background: var(--accent-primary);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    transition: background var(--transition-fast);
}

.newsletter-form button:hover {
    background: var(--accent-secondary);
}

/* Trending Widget */
.trending-list {
    counter-reset: trending;
}

.trending-list li {
    counter-increment: trending;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border-color);
}

.trending-list li:last-child {
    border-bottom: none;
}

.trending-list a {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.trending-list a::before {
    content: counter(trending);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 6px;
}

.trending-list a:hover {
    color: var(--accent-primary);
}

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumbs {
    padding: 0.75rem 0;
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
    color: var(--accent-primary);
}

.breadcrumbs [aria-current="page"] span {
    color: var(--text-muted);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

/* ============================================
   Footer
   ============================================ */
.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 0;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-brand {
    flex: 1;
    max-width: 350px;
}

.footer-nav-group {
    display: flex;
    gap: 3rem;
}

.footer-nav {
    text-align: right;
}

.footer-nav ul {
    text-align: right;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--accent-primary);
    color: #fff;
}

.footer-nav h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.footer-nav a {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================
   Cookie Banner
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1.25rem;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
}

.cookie-banner.hidden {
    display: none;
}

.cookie-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cookie-content a {
    color: var(--accent-primary);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-accept {
    padding: 0.6rem 1.25rem;
    background: var(--accent-primary);
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
    transition: background var(--transition-fast);
}

.btn-accept:hover {
    background: var(--accent-secondary);
}

.btn-settings {
    padding: 0.6rem 1.25rem;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.btn-settings:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* ============================================
   Search Overlay
   ============================================ */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.search-overlay-content {
    width: 100%;
    max-width: 700px;
    padding: 0 1.5rem;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.search-overlay.active .search-overlay-content {
    transform: translateY(0);
}

.search-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    font-size: 2rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

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

.search-overlay-form {
    display: flex;
    gap: 0;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border-light);
}

.search-overlay-form input {
    flex: 1;
    padding: 1.25rem 1.5rem;
    font-size: 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
}

.search-overlay-form input:focus {
    outline: none;
}

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

.search-overlay-form button {
    padding: 1.25rem 1.5rem;
    background: var(--accent-primary);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-overlay-form button:hover {
    background: var(--accent-secondary);
}

.search-results-live {
    margin-top: 1.5rem;
    max-height: 50vh;
    overflow-y: auto;
}

.search-results-live a {
    display: block;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: background 0.2s ease;
}

.search-results-live a:hover {
    background: var(--bg-tertiary);
}

.search-results-live .result-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 0.25rem;
}

.search-results-live .result-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-primary);
}

.search-results-live .no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .sidebar-widget {
        margin-bottom: 0;
    }
}

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

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

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .featured-main .article-image {
        min-height: 250px;
    }

    .featured-main h1 {
        font-size: 1.5rem;
    }

    .featured-side {
        flex-direction: row;
        gap: 1rem;
    }

    .featured-small .article-image {
        min-height: 100px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        flex-wrap: wrap;
    }

    .footer-brand {
        flex: 1 1 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .footer-nav-group {
        flex: 1;
        justify-content: flex-end;
    }

    .footer-nav {
        text-align: left;
    }

    .footer-nav ul {
        text-align: left;
    }

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

@media (max-width: 480px) {
    .header-content {
        height: 60px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .language-switcher {
        display: none;
    }

    .featured-side {
        flex-direction: column;
    }

    .footer-grid {
        flex-direction: column;
    }

    .footer-nav-group {
        flex-direction: column;
        gap: 1.5rem;
    }

    .footer-nav {
        text-align: left;
    }

    .cookie-actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-actions button {
        width: 100%;
    }
}

/* ============================================
   Error Pages (404)
   ============================================ */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 0;
}

.error-content h1 {
    font-size: 8rem;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--accent-primary);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: var(--accent-secondary);
}

.btn-secondary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

/* ============================================
   Article Detail Page
   ============================================ */
.article-hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 3rem 0 2rem;
}

.article-hero .container {
    max-width: 900px;
}

.article-hero .category-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--accent-primary);
    color: #fff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
    position: static;
}

.article-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.article-hero .excerpt {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.article-hero .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.article-featured-image {
    margin: -1rem auto 2rem;
    max-width: 900px;
    padding: 0 1rem;
}

.article-featured-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.article-body {
    max-width: 750px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.article-body .content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-body .content h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
}

.article-body .content h3 {
    font-size: 1.25rem;
    margin: 2rem 0 0.75rem;
}

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

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

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

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

.article-body .content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.related-articles {
    background: var(--bg-secondary);
    padding: 3rem 0;
}

.related-articles h2 {
    margin-bottom: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ============================================
   Category Page
   ============================================ */
.category-hero {
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.category-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.category-hero .container {
    position: relative;
    z-index: 1;
}

.category-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.category-hero .description {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 600px;
    line-height: 1.8;
    margin-top: 1rem;
}

/* Featured Article on Category */
.category-featured {
    padding: 3rem 0;
    position: relative;
    background: var(--bg-primary);
}

.featured-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.featured-card .image {
    position: relative;
    min-height: 350px;
}

.featured-card .image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.featured-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.featured-card h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.featured-card .excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.featured-card .meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.featured-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    color: var(--accent-primary);
    font-weight: 600;
    transition: gap 0.2s ease;
}

.featured-card:hover .read-more {
    gap: 0.75rem;
}

/* Category Content Grid */
.category-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    padding: 3rem 0;
}

.category-main h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

/* Category Sidebar */
.category-sidebar .widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.category-sidebar .widget h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-primary);
}

.other-categories a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    transition: color 0.2s ease;
}

.other-categories a:last-child {
    border-bottom: none;
}

.other-categories a:hover {
    color: var(--text-primary);
}

.other-categories .color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.category-sidebar .newsletter-widget {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, var(--bg-card) 100%);
}

.category-sidebar .newsletter-widget p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.category-sidebar .newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-sidebar .newsletter-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.category-sidebar .newsletter-form button {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.category-sidebar .newsletter-form button:hover {
    background: var(--accent-secondary);
}

@media (max-width: 1024px) {
    .category-content {
        grid-template-columns: 1fr;
    }

    .category-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-card .image {
        min-height: 200px;
    }

    .featured-card .content {
        padding: 1.5rem;
    }

    .category-sidebar {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Static Page
   ============================================ */
.page-hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.page-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0;
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.page-content h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
}

.page-content h3 {
    font-size: 1.35rem;
    margin: 1.5rem 0 0.75rem;
}

.page-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.page-content ul,
.page-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.page-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.page-content a {
    color: var(--accent-primary);
}

.page-content a:hover {
    text-decoration: underline;
}

/* ============================================
   Search Page
   ============================================ */
.search-hero {
    background: var(--bg-secondary);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.search-form {
    display: flex;
    gap: 0.75rem;
    max-width: 600px;
}

.search-form input {
    flex: 1;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.search-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.search-form button {
    padding: 1rem 2rem;
    background: var(--accent-primary);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-form button:hover {
    background: var(--accent-secondary);
}

.search-results {
    padding: 2rem 0;
}

.search-results h2 {
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

.result-item {
    display: block;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.result-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.result-item .category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.result-item h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.result-item .excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.result-item .meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.no-results svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}
