/* Eco Current - Data-Driven Environmental Journalism */

:root {
    --primary: #047857;
    --primary-dark: #065f46;
    --primary-light: #059669;
    --secondary: #0d9488;
    --tertiary: #14b8a6;
    
    --text: #0f172a;
    --text-medium: #334155;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    
    --bg: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e8f5f1;
    --card-bg: #ffffff;
    
    --border: #cbd5e1;
    --border-light: #e2e8f0;
    --border-dark: #94a3b8;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'kern' 1, 'liga' 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background: white;
    color: var(--text);
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    margin-bottom: 75px;
}

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

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(4, 120, 87, 0.2));
}

.brand h1 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand h1 a {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: opacity 0.2s;
}

.brand h1 a:hover {
    opacity: 0.8;
}

.tagline {
    font-size: 0.6875rem;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-top: 0.375rem;
}

.location {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
    padding: 0.5rem 0.875rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border-light);
}

.location-icon {
    font-size: 1rem;
}

/* Main Content */
main {
    padding: 3.5rem 0 5rem;
    min-height: calc(100vh - 250px);
}

/* Page Layout */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    align-items: start;
}

/* Featured Story Section */
.featured-section {
    position: relative;
}

.featured-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.label-icon {
    font-size: 0.875rem;
}

.featured-story {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.featured-story::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--tertiary) 100%);
}

.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.featured-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    color: var(--primary-dark);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid var(--border);
}

.featured-date {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.featured-headline {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1.25rem;
    letter-spacing: -0.025em;
}

.featured-headline a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
}

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

.featured-lede {
    font-size: 1.1875rem;
    line-height: 1.65;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    max-width: 90%;
    font-weight: 500;
    font-style: italic;
    padding-left: 1rem;
    border-left: 3px solid var(--primary);
}

.featured-content {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.featured-content p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 1.25rem;
}

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

.featured-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-light);
}

.featured-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-light);
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-light);
}

.badge-icon {
    font-size: 0.875rem;
}

.featured-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9375rem;
    border-radius: 6px;
    transition: all 0.3s;
    white-space: nowrap;
}

.featured-cta:hover {
    background: var(--primary-dark);
    gap: 0.75rem;
    box-shadow: var(--shadow-md);
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: calc(80px + 2rem);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.015em;
}

.story-count {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    background: var(--bg-tertiary);
    color: var(--primary-dark);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.sidebar-stories {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-story {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s;
    position: relative;
}

.sidebar-story::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--tertiary) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 8px 0 0 8px;
}

.sidebar-story:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
    transform: translateX(2px);
}

.sidebar-story:hover::before {
    opacity: 1;
}

.sidebar-story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.sidebar-category {
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    color: var(--primary-dark);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--border-light);
}

.sidebar-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar-headline {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.875rem;
    letter-spacing: -0.01em;
}

.sidebar-headline a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

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

.sidebar-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.sidebar-read-time {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 600;
}

.sidebar-link {
    font-size: 0.8125rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.sidebar-link:hover {
    color: var(--primary-dark);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 2px dashed var(--border);
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.empty-hint {
    font-size: 1rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
}

.api-info {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.api-info strong {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-medium);
    font-weight: 700;
}

.api-info code {
    display: block;
    padding: 1rem;
    background: var(--bg);
    border-radius: 6px;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    overflow-x: auto;
    border: 1px solid var(--border);
    font-family: 'Monaco', 'Courier New', monospace;
}

/* Full Story Page */
.story-full {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.story-full::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--tertiary) 100%);
}

.breadcrumb {
    font-size: 0.875rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    font-weight: 500;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: var(--text-muted);
}

.story-category {
    margin-bottom: 1.5rem;
}

.category-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    color: var(--primary-dark);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid var(--border);
}

.story-headline {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 2rem;
    color: var(--text);
    letter-spacing: -0.025em;
}

.story-meta {
    display: flex;
    gap: 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    border: 1px solid var(--border-light);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-medium);
    font-weight: 600;
}

.meta-icon {
    font-size: 1.125rem;
}

.meta-text {
    font-weight: 600;
}

.story-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text);
    max-width: 740px;
}

.story-content p {
    margin-bottom: 1.75rem;
}

.story-content p:first-of-type {
    font-size: 1.1875rem;
    line-height: 1.75;
    color: var(--text-medium);
    font-weight: 400;
}

/* Inline links in article content */
.story-content .inline-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: var(--bg-tertiary);
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    transition: all 0.2s;
    margin: 0 0.25rem;
}

.story-content .inline-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.story-content .inline-link::after {
    content: '↗';
    font-size: 0.75rem;
    opacity: 0.7;
}

.story-actions {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-light);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 6px;
    transition: all 0.3s;
}

.back-button:hover {
    background: var(--primary-dark);
    gap: 0.75rem;
}

/* Article content inline links */
.article-content .inline-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: var(--bg-tertiary);
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875em;
    border-radius: 4px;
    border: 1px solid var(--border);
    transition: all 0.2s;
    margin: 0 0.25rem;
}

.article-content .inline-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.article-content .inline-link::after {
    content: '↗';
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Footer */
footer {
    background: var(--text);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 5rem;
    border-top: 4px solid var(--primary);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

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

.footer-icon {
    font-size: 1.5rem;
}

.footer-brand strong {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.footer-brand p {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-top: 0.5rem;
}

.footer-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
}

.footer-mission {
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 500;
}

.footer-location {
    font-size: 0.9375rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 1024px) {
    .page-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .sidebar {
        position: static;
    }

    .featured-story {
        padding: 2rem;
    }

    .featured-headline {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    main {
        padding: 2.5rem 0 4rem;
    }

    .featured-story {
        padding: 1.5rem;
    }

    .featured-headline {
        font-size: 1.75rem;
    }

    .featured-lede {
        font-size: 1.0625rem;
        max-width: 100%;
        padding-left: 0.75rem;
    }

    .featured-content p {
        font-size: 0.9375rem;
    }

    .featured-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .featured-meta {
        justify-content: flex-start;
    }

    .featured-cta {
        text-align: center;
        justify-content: center;
    }

    .story-full {
        padding: 2rem 1.5rem;
    }

    .story-headline {
        font-size: 2rem;
    }

    .story-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .story-content {
        font-size: 1rem;
    }

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

    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .logo-icon {
        font-size: 1.5rem;
    }

    .brand h1 {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 0.6875rem;
    }

    .featured-headline {
        font-size: 1.5rem;
    }

    .story-headline {
        font-size: 1.75rem;
    }

    .container {
        padding: 0 1rem;
    }
}
