* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --accent: #0ea5e9;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #0f172a;
    --text-medium: #334155;
    --text-light: #64748b;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --success: #10b981;
    --error: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Navigation Bar */
.navbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.025em;
}

.logo-icon {
    width: 32px;
    height: 32px;
    display: block;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.btn-nav {
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-nav:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 48px 24px;
    border-bottom: 4px solid var(--primary);
}

.hero h1 {
    font-size: 2.5rem;
    margin: 0 auto 12px;
    font-weight: 800;
    letter-spacing: -0.025em;
    max-width: 1280px;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.95;
    max-width: 1280px;
    margin: 0 auto;
    font-weight: 400;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Controls Section */
.controls {
    background: var(--bg-white);
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 32px;
}

.controls-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 200px;
}

.control-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
    letter-spacing: -0.01em;
}

.controls select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: var(--bg-white);
    color: var(--text-dark);
    cursor: pointer;
}

.controls select:hover {
    border-color: var(--border-hover);
}

.controls select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.form-group input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.subscribe-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    display: none;
}

.subscribe-message.success {
    display: block;
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.subscribe-message.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 80px 20px;
}

.spinner {
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.news-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.news-card-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
}

.news-card-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-language {
    background: var(--primary);
    color: white;
}

.badge-source {
    background: var(--bg-light);
    color: var(--text-medium);
    border: 1px solid var(--border);
    flex: 1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-card h3 {
    color: var(--text-dark);
    font-size: 1.125rem;
    line-height: 1.5;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.news-card-body {
    padding: 20px 24px;
    flex: 1;
}

.summary {
    color: var(--text-medium);
    line-height: 1.6;
    font-size: 0.95rem;
}

.news-card-footer {
    padding: 16px 24px;
    background: var(--bg-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

.date {
    color: var(--text-light);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    transition: color 0.2s;
}

.news-card:hover .read-more {
    color: var(--primary-dark);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 40px;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    margin: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 32px 40px 24px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-medium);
}

.modal-close:hover {
    background: var(--border);
    color: var(--text-dark);
}

.modal-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.3;
    margin: 0;
    letter-spacing: -0.025em;
    padding-right: 40px;
}

.modal-body {
    padding: 32px 40px 40px;
}

.article-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-medium);
    white-space: pre-wrap;
}

.article-content p {
    margin-bottom: 1.5em;
}

/* ============================================================================
   CONTEXT SECTIONS (NEW) - Must be BEFORE media queries!
   ============================================================================ */

.context-sections {
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
}

.context-box {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid;
    align-items: flex-start;
}

.context-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    line-height: 1;
}

.context-content {
    flex: 1;
}

.context-content h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    letter-spacing: -0.01em;
}

.context-content p {
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

/* Context box color variants */
.context-takeaway {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.context-takeaway .context-content h3 {
    color: #78350f;
}

.context-takeaway .context-content p {
    color: #92400e;
}

.context-why {
    background: #eff6ff;
    border-left-color: #3b82f6;
}

.context-why .context-content h3 {
    color: #1e3a8a;
}

.context-why .context-content p {
    color: #1e40af;
}

.context-means {
    background: #ecfdf5;
    border-left-color: #10b981;
}

.context-means .context-content h3 {
    color: #064e3b;
}

.context-means .context-content p {
    color: #065f46;
}

.context-watch {
    background: #faf5ff;
    border-left-color: #a855f7;
}

.context-watch .context-content h3 {
    color: #581c87;
}

.context-watch .context-content p {
    color: #6b21a8;
}

/* Context divider */
.context-divider {
    border-top: 1px solid var(--border);
    margin: 32px 0;
}

/* Article section */
.article-section {
    margin-top: 32px;
}

.article-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-medium);
    font-size: 1rem;
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Loading text */
.loading p {
    color: var(--text-medium);
    font-size: 1rem;
    font-weight: 500;
}

/* ============================================================================
   ABOUT PAGE STYLES
   ============================================================================ */

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 64px;
}

.about-section h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 24px;
    letter-spacing: -0.025em;
}

.about-section p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-medium);
    margin-bottom: 16px;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.feature-card {
    background: var(--bg-white);
    padding: 32px 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.6;
    margin: 0;
}

/* Why List */
.why-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.why-item {
    background: var(--bg-white);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.why-item strong {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.why-item p {
    font-size: 0.95rem;
    color: var(--text-medium);
    margin: 0;
}

/* Audience List */
.audience-list {
    list-style: none;
    padding: 0;
    margin-top: 24px;
}

.audience-list li {
    background: var(--bg-white);
    padding: 16px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    margin-bottom: 12px;
    font-size: 1.0625rem;
    color: var(--text-medium);
}

.audience-list li strong {
    color: var(--text-dark);
}

/* Process Steps */
.process-steps {
    display: grid;
    gap: 24px;
    margin-top: 32px;
}

.process-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: var(--bg-white);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.step-content p {
    font-size: 0.95rem;
    color: var(--text-medium);
    margin: 0;
}

/* CTA Section */
.about-cta {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    padding: 48px 40px;
    border-radius: 16px;
    text-align: center;
    margin: 64px 0;
}

.about-cta h2 {
    color: white;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.about-cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: 32px;
}

.btn-large {
    padding: 14px 32px;
    font-size: 1.0625rem;
}

/* Email Link */
.email-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.email-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Active Nav Link */
.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

/* ============================================================================
   RESPONSIVE DESIGN - Media queries at the END
   ============================================================================ */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.875rem;
    }

    .hero p {
        font-size: 1rem;
    }
    
    .nav-container {
        padding: 0 16px;
    }
    
    .nav-links {
        gap: 16px;
    }
    
    .nav-link {
        display: none;
    }
    
    .container {
        padding: 24px 16px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .news-card-badges {
        flex-wrap: wrap;
    }
    
    .badge-source {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .modal-content {
        margin: 10px;
    }

    .modal-header {
        padding: 24px 24px 20px;
    }

    .modal-body {
        padding: 24px;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .article-content {
        font-size: 1rem;
    }
    
    /* Context sections responsive */
    .context-box {
        padding: 16px;
        gap: 12px;
    }
    
    .context-icon {
        font-size: 1.125rem;
    }
    
    .context-content h3 {
        font-size: 0.875rem;
    }
    
    .context-content p {
        font-size: 0.8125rem;
    }
    
    /* About page responsive */
    .about-section h2 {
        font-size: 1.5rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .why-list {
        grid-template-columns: 1fr;
    }

    .about-cta {
        padding: 32px 24px;
    }

    .about-cta h2 {
        font-size: 1.5rem;
    }

    .about-cta p {
        font-size: 1rem;
    }

    .process-step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .controls-row {
        flex-direction: column;
    }

    .control-group {
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}