/* ======================================
   MODERN SOZIALPOLITIK THEME v5.0
   Professional Newsletter Design
   ====================================== */

:root {
    --color-primary: #1e3a8a;
    --color-primary-light: #3b82f6;
    --color-accent: #0ea5e9;
    --color-text-primary: #0f172a;
    --color-text-secondary: #334155;
    --color-text-muted: #64748b;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-bg-subtle: #f1f5f9;
    --color-bg-muted: #e2e8f0;
    --color-success: #059669;
    --color-warning: #d97706;
    --color-error: #dc2626;
    --color-chart-1: #3b82f6;
    --color-chart-2: #10b981;
    --color-chart-3: #f59e0b;
    --color-chart-4: #ef4444;
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --container-max: 1280px;
    --header-height: 72px;
    --sidebar-width: 380px;
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ======================================
   RESET & BASE STYLES
   ====================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text-secondary);
    background: var(--color-bg-subtle);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--color-text-primary);
    line-height: 1.3;
}

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

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

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

*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: var(--space-sm);
    background: var(--color-text-primary);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    font-weight: 600;
    z-index: 1000;
    transition: top var(--transition);
}

.skip-link:focus {
    top: var(--space-sm);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ======================================
   NEWS TICKER
   ====================================== */

.news-ticker {
    background: var(--color-primary);
    color: white;
    padding: var(--space-xs) 0;
    font-size: 0.875rem;
    overflow: hidden;
}

.ticker-content {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.ticker-label {
    font-weight: 700;
    background: var(--color-error);
    padding: 0 var(--space-xs);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.ticker-text {
    white-space: nowrap;
    animation: ticker-scroll 30s linear infinite;
}

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

/* ======================================
   HEADER & NAVIGATION
   ====================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-bg-muted);
    height: var(--header-height);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-main {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.desktop-nav {
    display: flex;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
    align-items: center;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    padding: var(--space-xs) 0;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: white;
    min-width: 280px;
    padding: var(--space-sm);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-bg-muted);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 50;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(4px);
}

.dropdown-link {
    display: block;
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.dropdown-link:hover {
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

.nav-cta {
    background: var(--color-primary);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    transition: all var(--transition);
}

.nav-cta:hover {
    background: var(--color-primary-light);
    transform: translateY(-1px);
    color: white;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    flex-direction: column;
    gap: 4px;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ======================================
   OFF-CANVAS MOBILE MENU
   ====================================== */

.off-canvas-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(350px, 80vw);
    height: 100vh;
    background: white;
    z-index: 200;
    transition: right var(--transition);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.off-canvas-menu.active {
    right: 0;
}

.off-canvas-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-bg-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.off-canvas-title {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-text-primary);
}

.close-menu {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    color: var(--color-text-muted);
}

.mobile-nav {
    padding: var(--space-md);
    overflow-y: auto;
    flex: 1;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav li {
    margin-bottom: var(--space-sm);
}

.mobile-nav a {
    display: block;
    padding: var(--space-sm) 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-bg-alt);
    transition: color var(--transition);
}

.mobile-nav a:hover,
.mobile-nav .highlight-link {
    color: var(--color-primary);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

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

/* ======================================
   HERO SECTION
   ====================================== */

.hero-featured {
    background: white;
    padding: var(--space-xl) 0;
    border-bottom: 1px solid var(--color-bg-muted);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-xl);
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-error), var(--color-warning));
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.hero-headline {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin: var(--space-sm) 0 var(--space-md);
    color: var(--color-text-primary);
}

.hero-lead {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
    max-width: 55ch;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.author-name {
    font-weight: 600;
    color: var(--color-text-primary);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.chart-card {
    background: white;
    border: 1px solid var(--color-bg-muted);
    border-radius: var(--radius-xl);
    padding: var(--space-md);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.chart-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    text-align: center;
}

.professional-chart-container {
    width: 100%;
    height: auto;
    margin-bottom: var(--space-sm);
}

.professional-chart {
    width: 100%;
    height: auto;
    overflow: visible;
}

.chart-caption {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
    font-style: italic;
}

/* ======================================
   TOPICS SHOWCASE
   ====================================== */

.topics-showcase {
    background: var(--color-bg-alt);
    padding: var(--space-xl) 0;
}

.section-title-center {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--space-xl);
    color: var(--color-text-primary);
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.topic-card {
    background: white;
    border: 1px solid var(--color-bg-muted);
    border-radius: var(--radius-xl);
    padding: var(--space-md);
    text-align: center;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

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

.topic-card.primary {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
}

.topic-card.primary .topic-icon,
.topic-card.primary h3,
.topic-card.primary p {
    color: white;
}

.topic-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
    display: block;
}

.topic-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--color-text-primary);
}

.topic-card p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
    line-height: 1.5;
}

.topic-status {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.topic-status.hot {
    background: var(--color-error);
    color: white;
}

.topic-status.warning {
    background: var(--color-warning);
    color: white;
}

.topic-status:not(.hot):not(.warning) {
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
}

/* ======================================
   MAIN LAYOUT - FIXED GRID
   ====================================== */

.main-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--space-xl);
    padding: var(--space-xl) 0;
    align-items: start;
}

/* ======================================
   CONTENT FEED
   ====================================== */

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--color-bg-muted);
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.feed-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-primary);
}

.content-filters {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: 1px solid var(--color-bg-muted);
    color: var(--color-text-muted);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* ======================================
   ARTICLES
   ====================================== */

.news-article {
    background: white;
    border: 1px solid var(--color-bg-muted);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.news-article:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.news-article.featured {
    border-left: 5px solid var(--color-primary);
}

.article-badge {
    position: absolute;
    top: -12px;
    left: var(--space-lg);
    background: linear-gradient(135deg, var(--color-warning), var(--color-error));
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.category-tag {
    padding: var(--space-xs) var(--space-sm);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-tag.rente {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-chart-1);
}

.category-tag.buergergeld {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-chart-2);
}

.category-tag.pflege {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-chart-3);
}

.category-tag.arbeitsmarkt {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-chart-4);
}

.article-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin: var(--space-sm) 0;
    color: var(--color-text-primary);
}

.article-excerpt {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.article-full-content {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px dashed var(--color-bg-muted);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-full-content h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: var(--space-lg) 0 var(--space-sm);
    color: var(--color-text-primary);
}

.article-full-content p {
    margin-bottom: var(--space-sm);
}

.info-panel {
    margin: var(--space-lg) 0;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    border-left: 4px solid;
}

.info-panel.success {
    background: rgba(5, 150, 105, 0.05);
    border-left-color: var(--color-success);
}

.info-panel h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--color-success);
}

.info-panel ul {
    margin: 0;
    padding-left: var(--space-md);
}

.info-panel li {
    margin-bottom: var(--space-xs);
}

.expand-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-md);
    background: none;
    border: none;
    color: var(--color-primary);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color var(--transition);
}

.expand-btn:hover {
    color: var(--color-primary-light);
}

.expand-btn.expanded .btn-arrow {
    transform: rotate(180deg);
}

.btn-arrow {
    transition: transform var(--transition);
}

.mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin: var(--space-md) 0;
    padding: var(--space-sm);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-lg);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary);
    font-family: monospace;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Chart Container */
.chart-container {
    margin: var(--space-lg) 0;
    padding: var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-bg-muted);
}

.chart-container h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    text-align: center;
    color: var(--color-text-primary);
}

/* ======================================
   SIDEBAR - FIXED LAYOUT
   ====================================== */

.sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--space-md));
    height: fit-content;
}

.sidebar-widget {
    background: white;
    border: 1px solid var(--color-bg-muted);
    border-radius: var(--radius-xl);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.widget-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: var(--space-sm);
    color: var(--color-text-primary);
    border-bottom: 2px solid var(--color-bg-alt);
    padding-bottom: var(--space-xs);
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white;
    border: none;
}

.newsletter-widget .widget-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.widget-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.newsletter-form .form-group {
    margin-bottom: var(--space-sm);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: rgba(255, 255, 255, 0.9);
}

.form-input {
    width: 100%;
    padding: var(--space-xs);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.875rem;
    transition: all var(--transition);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.checkbox-label {
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.8);
}

.checkbox-label a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    padding: var(--space-xs);
    background: white;
    color: var(--color-primary);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-submit:hover {
    background: var(--color-bg-alt);
    transform: translateY(-1px);
}

.form-status {
    margin-top: var(--space-xs);
    padding: var(--space-xs);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
}

.form-status.success {
    background: rgba(5, 150, 105, 0.2);
    color: #bbf7d0;
}

.form-status.error {
    background: rgba(220, 38, 38, 0.2);
    color: #fecaca;
}

.form-note {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--space-xs);
    text-align: center;
}

/* Stats Widget - FIXED */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-card {
    text-align: center;
    padding: var(--space-sm);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-lg);
    min-width: 0;
}

.stat-card .stat-value {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--color-primary);
    font-family: monospace;
    display: block;
    margin-bottom: var(--space-xs);
}

.stat-card .stat-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
    line-height: 1.2;
}

.stat-trend {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
    text-transform: uppercase;
    display: inline-block;
}

.stat-trend.up {
    background: rgba(5, 150, 105, 0.1);
    color: var(--color-success);
}

.stat-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
}

.stat-trend.neutral {
    background: var(--color-bg-muted);
    color: var(--color-text-muted);
}

/* Trending Widget */
.trending-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.trending-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs);
    border-radius: var(--radius-lg);
    transition: background var(--transition);
}

.trending-item:hover {
    background: var(--color-bg-alt);
}

.trending-rank {
    width: 24px;
    height: 24px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.trending-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.trending-title {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 0.875rem;
    line-height: 1.3;
}

.trending-views {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* About Widget */
.about-content p {
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.author-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: var(--space-md) 0;
    padding: var(--space-sm);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-lg);
}

.author-avatar-large {
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.author-details {
    font-size: 0.875rem;
    line-height: 1.4;
}

.author-role {
    color: var(--color-text-muted);
    font-weight: 600;
}

.author-org {
    color: var(--color-text-muted);
}

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

.footer {
    background: var(--color-text-primary);
    color: rgba(255, 255, 255, 0.8);
    margin-top: var(--space-xl);
    padding: var(--space-xl) 0 var(--space-lg);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: var(--space-xs);
}

.footer-tagline {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: var(--space-sm);
}

.footer-description {
    max-width: 400px;
    line-height: 1.6;
    font-size: 0.875rem;
}

.footer-social h5 {
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.social-links {
    display: flex;
    gap: var(--space-xs);
}

.social-link {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    transition: all var(--transition);
}

.social-link:hover {
    background: white;
    color: var(--color-primary);
    transform: translateY(-2px);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.footer-column-title {
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.footer-links li {
    margin-bottom: var(--space-xs);
}

.footer-links a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.footer-bottom-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.copyright {
    color: white;
    font-weight: 600;
}

.organization {
    color: rgba(255, 255, 255, 0.6);
}

.footer-update {
    color: rgba(255, 255, 255, 0.5);
}

/* ======================================
   RESPONSIVE DESIGN
   ====================================== */

@media (max-width: 1200px) {
    :root {
        --sidebar-width: 320px;
        --space-xl: 3rem;
    }
    
    .main-layout {
        gap: var(--space-lg);
    }
    
    .hero-grid {
        gap: var(--space-lg);
    }
}

@media (max-width: 900px) {
    .desktop-nav {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .hero-visual {
        order: -1;
    }
    
    .main-layout {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .sidebar {
        position: static;
        margin-top: var(--space-lg);
        border-top: 2px solid var(--color-bg-muted);
        padding-top: var(--space-lg);
    }
    
    .footer-top {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    :root {
        --space-lg: 2rem;
        --space-xl: 2.5rem;
    }
    
    .container {
        padding: 0 var(--space-sm);
    }
    
    .hero-featured {
        padding: var(--space-lg) 0;
    }
    
    .topics-showcase {
        padding: var(--space-lg) 0;
    }
    
    .main-layout {
        padding: var(--space-lg) 0;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
    }
    
    .mini-stats {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo-main {
        font-size: 1.25rem;
    }
    
    .hero-headline {
        font-size: 1.75rem;
    }
    
    .off-canvas-menu {
        width: 90vw;
    }
    
    .news-article {
        padding: var(--space-md);
        margin-bottom: var(--space-md);
    }
    
    .article-title {
        font-size: 1.25rem;
    }
}

/* ======================================
   UTILITY CLASSES
   ====================================== */

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ======================================
   FIX: HORIZONTAL OVERFLOW ON MOBILE
   ====================================== */

/* 1. PRIMARY FIX: Prevent horizontal scrolling */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* 2. CONTAINER SAFETY: Ensure all containers respect viewport */
.container,
.hero-featured,
.topics-showcase,
.main-layout,
.footer {
    max-width: 100%;
    overflow-x: hidden;
}

/* 3. HEADER FIX: Prevent header overflow */
.header,
.header-inner {
    max-width: 100%;
    overflow-x: hidden;
}

/* 4. CONTENT ELEMENTS: Fix articles and widgets */
.news-article,
.sidebar-widget,
.chart-card,
.article-content,
.article-full-content {
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 5. MEDIA ELEMENTS: Fix images, SVGs, and charts */
img,
svg,
.professional-chart,
.professional-chart-container,
.chart-container {
    max-width: 100%;
    height: auto;
    overflow: visible;
}

/* 6. GRID SYSTEMS: Prevent grid overflow */
.main-layout,
.hero-grid,
.topics-grid,
.stats-grid,
.mini-stats {
    max-width: 100%;
    overflow-x: hidden;
}

/* 7. TEXT OVERFLOW: Handle long words and URLs */
h1, h2, h3, h4, h5, h6,
p, span, div, a {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* 8. MOBILE MENU FIX: Ensure off-canvas doesn't trigger scroll */
.off-canvas-menu {
    max-width: min(350px, 85vw);
    overflow-x: hidden;
}

/* 9. TICKER FIX: Prevent news ticker overflow */
.news-ticker,
.ticker-content {
    max-width: 100%;
    overflow-x: hidden;
}

/* 10. MOBILE-SPECIFIC OPTIMIZATIONS */
@media (max-width: 900px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
        width: 100%;
    }
    
    /* Ensure all major sections fit */
    .hero-grid,
    .topics-grid {
        width: 100%;
        max-width: 100%;
    }
    
    /* Fix chart containers on mobile */
    .chart-container,
    .professional-chart-container {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Reduce font sizes to prevent overflow */
    .hero-headline {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .article-title {
        font-size: 1.25rem;
        line-height: 1.3;
    }
}

/* 11. SAFETY NET: Catch any remaining overflow sources */
* {
    box-sizing: border-box;
}

*:not(svg):not(path):not(circle):not(line):not(rect):not(text) {
    max-width: 100%;
}

