/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Sector Colors */
    --solar: #f59e0b;
    --wind: #3b82f6;
    --ev: #8b5cf6;
    --hydrogen: #06b6d4;
    --oil-gas: #ef4444;
    --policy: #10b981;
    
    /* Base Colors */
    --primary: #0f172a;
    --secondary: #64748b;
    --background: #fafbfc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    
    /* Spacing */
    --container-width: 1400px;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(to bottom, #fafbfc 0%, #ffffff 100%);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

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

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 50%, #3b82f6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.logo-icon.small {
    width: 40px;
    height: 40px;
    font-size: 20px;
}

.logo-text h1 {
    font-family: 'Sora', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.tagline {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

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

.nav-link {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: white;
}

.nav-link.active {
    color: white;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
}

.subscribe-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Filter Bar */
.filter-bar {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.current-week {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.week-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.week-text strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-family: 'Sora', sans-serif;
    font-weight: 700;
}

.week-text span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    border: 2px solid transparent;
    padding: 0.5rem 1.2rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.filter-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.filter-dot.solar { background: var(--solar); box-shadow: 0 0 8px var(--solar); }
.filter-dot.wind { background: var(--wind); box-shadow: 0 0 8px var(--wind); }
.filter-dot.ev { background: var(--ev); box-shadow: 0 0 8px var(--ev); }
.filter-dot.hydrogen { background: var(--hydrogen); box-shadow: 0 0 8px var(--hydrogen); }
.filter-dot.oil-gas { background: var(--oil-gas); box-shadow: 0 0 8px var(--oil-gas); }
.filter-dot.policy { background: var(--policy); box-shadow: 0 0 8px var(--policy); }

.search-box input {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 0.875rem;
    width: 200px;
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    width: 250px;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

/* Timeline Container */
.timeline-container {
    padding: 4rem 0;
    min-height: 80vh;
}

.timeline-wrapper {
    display: flex;
    gap: 3rem;
    position: relative;
}

/* Timeline Rail (Left Side) */
.timeline-rail {
    position: relative;
    width: 4px;
    background: linear-gradient(180deg, #f59e0b 0%, #3b82f6 50%, #10b981 100%);
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
    min-height: 1200px;
}

.timeline-node {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid #f59e0b;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    z-index: 10;
}

.timeline-node.active {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    border: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4), 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(245, 158, 11, 0.6), 0 0 0 10px rgba(245, 158, 11, 0);
    }
}

/* Timeline Content (Right Side) */
.timeline-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Week Marker */
.week-marker {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    width: fit-content;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.3);
    font-size: 1.05rem;
}

.week-marker::before {
    content: '📅';
    font-size: 1.2rem;
}

.week-marker.previous {
    background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
    opacity: 0.8;
}

/* Story Cards */
.story-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 2px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInSlide 0.6s forwards;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--card-color) 0%, transparent 100%);
}

.story-card.solar { --card-color: #f59e0b; }
.story-card.wind { --card-color: #3b82f6; }
.story-card.ev { --card-color: #8b5cf6; }
.story-card.hydrogen { --card-color: #06b6d4; }
.story-card.oil-gas { --card-color: #ef4444; }
.story-card.policy { --card-color: #10b981; }

.story-card:hover {
    transform: translateX(8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--card-color);
}

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

.sector-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sector-badge.solar {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: #ea580c;
}

.sector-badge.wind {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
    color: #2563eb;
}

.sector-badge.ev {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
    color: #7c3aed;
}

.sector-badge.hydrogen {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(6, 182, 212, 0.05) 100%);
    color: #0891b2;
}

.sector-badge.oil-gas {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: #dc2626;
}

.sector-badge.policy {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #059669;
}

.company-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.story-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.4;
    font-family: 'Sora', sans-serif;
}

.story-summary {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 1rem;
    line-height: 1.7;
}

.why-matters {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.02) 100%);
    border-left: 4px solid var(--card-color);
    padding: 1.2rem 1.25rem;
    border-radius: 0 12px 12px 0;
    font-size: 0.95rem;
    line-height: 1.7;
}

.why-matters strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
    font-family: 'Sora', sans-serif;
    font-weight: 700;
}

.why-matters strong::before {
    content: '💡';
    font-size: 1.1rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 2px solid #f1f5f9;
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Archive Preview */
.archive-preview {
    text-align: center;
    margin: 3rem 0 2rem;
}

.view-archive-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #1e293b 100%);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.2);
}

.view-archive-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.3);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary) 0%, #1e293b 100%);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

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

.footer-logo h4 {
    font-family: 'Sora', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #f59e0b;
}

.subscribe-footer-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    border: none;
    padding: 0.7rem 1.8rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.subscribe-footer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* Hidden class for filtering */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 968px) {
    .timeline-wrapper {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .nav {
        width: 100%;
        justify-content: space-between;
    }

    .filter-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .search-box input {
        width: 100%;
    }

    .timeline-wrapper {
        gap: 1.5rem;
    }

    .timeline-rail {
        width: 3px;
    }

    .story-card {
        padding: 1.5rem;
    }

    .story-title {
        font-size: 1.15rem;
    }

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

@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 1.2rem;
    }

    .week-text strong {
        font-size: 1rem;
    }

    .filters {
        width: 100%;
    }

    .filter-btn {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
}
