/* News-Co - BBC-inspired Design */
:root {
    --primary: #bb1919;
    --primary-dark: #8b0000;
    --bg-dark: #0f0f0f;
    --bg-card: #1a1a1a;
    --bg-hover: #252525;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #707070;
    --border-color: #333333;
    --accent-tech: #3b82f6;
    --accent-at: #ef4444;
    --accent-kaernten: #10b981;
    --accent-gme: #8b5cf6;
    --accent-gouda: #f97316;
    --accent-sport: #22c55e;
    --accent-finance: #fbbf24;
    --positive: #22c55e;
    --negative: #ef4444;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Stock Ticker */
.ticker {
    background: #000;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.ticker-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticker-label {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ticker-price {
    font-weight: 600;
    font-size: 0.9rem;
}

.ticker-change {
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 3px;
}

.ticker-change.positive {
    background: rgba(34, 197, 94, 0.2);
    color: var(--positive);
}

.ticker-change.negative {
    background: rgba(239, 68, 68, 0.2);
    color: var(--negative);
}

.ticker-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Header */
.header {
    background: var(--primary);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    border-radius: 4px;
}

.logo-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
}

.nav {
    display: flex;
    gap: 5px;
}

.nav-link {
    padding: 8px 16px;
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
}

.search-toggle {
    padding: 10px;
    cursor: pointer;
    color: #fff;
    transition: opacity 0.2s;
}

.search-toggle:hover {
    opacity: 0.8;
}

/* Search Bar */
.search-bar {
    background: var(--bg-card);
    padding: 15px 0;
    display: none;
    border-bottom: 1px solid var(--border-color);
}

.search-bar.active {
    display: block;
}

.search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 1rem;
}

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

.search-btn {
    padding: 12px 24px;
    background: var(--primary);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* Main Content */
.main {
    padding: 30px 0;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 50px;
}

.hero-main {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    transition: background 0.2s;
}

.hero-main:hover {
    background: var(--bg-hover);
}

.hero-category {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
    margin-bottom: 15px;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
}

.hero-summary {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.hero-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-item {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    border-left: 3px solid var(--border-color);
    transition: all 0.2s;
}

.sidebar-item:hover {
    background: var(--bg-hover);
    border-left-color: var(--primary);
}

.sidebar-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

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

/* Category Sections */
.category-section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 700;
}

.section-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 4px;
    color: #fff;
}

.section-icon.tech { background: var(--accent-tech); }
.section-icon.at { background: var(--accent-at); }
.section-icon.kaernten { background: var(--accent-kaernten); }
.section-icon.gme { background: var(--accent-gme); }
.section-icon.gouda { background: var(--accent-gouda); }
.section-icon.sport { background: var(--accent-sport); }
.section-icon.finance { background: var(--accent-finance); color: #000; }
.section-icon.latest { background: var(--primary); }

.section-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.section-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.news-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    border-left: 3px solid var(--border-color);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.news-card.tech { border-left-color: var(--accent-tech); }
.news-card.at { border-left-color: var(--accent-at); }
.news-card.kaernten { border-left-color: var(--accent-kaernten); }
.news-card.gme { border-left-color: var(--accent-gme); }
.news-card.gouda { border-left-color: var(--accent-gouda); }
.news-card.sport { border-left-color: var(--accent-sport); }

.news-card .source {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.news-card h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    flex-grow: 1;
}

.news-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: auto;
}

/* Finance Section */
.finance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.finance-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.finance-card:hover {
    background: var(--bg-hover);
    border-color: var(--accent-finance);
}

.finance-header {
    margin-bottom: 15px;
}

.finance-symbol {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-finance);
}

.finance-name {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.finance-price {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.finance-change {
    font-size: 0.9rem;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

.finance-change.positive {
    background: rgba(34, 197, 94, 0.2);
    color: var(--positive);
}

.finance-change.negative {
    background: rgba(239, 68, 68, 0.2);
    color: var(--negative);
}

.finance-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--accent-gme);
    font-size: 0.85rem;
    font-weight: 500;
}

.finance-link:hover {
    text-decoration: underline;
}

/* Latest Section */
.latest-section {
    margin-top: 50px;
}

.latest-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.latest-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    transition: background 0.2s;
}

.latest-item:hover {
    background: var(--bg-hover);
}

.latest-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 80px;
}

.latest-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.latest-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-category {
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
}

.latest-category.tech { background: var(--accent-tech); }
.latest-category.at { background: var(--accent-at); }
.latest-category.kaernten { background: var(--accent-kaernten); }
.latest-category.gme { background: var(--accent-gme); }
.latest-category.gouda { background: var(--accent-gouda); }
.latest-category.sport { background: var(--accent-sport); }

/* Footer */
.footer {
    background: #000;
    padding: 40px 0;
    margin-top: 50px;
    border-top: 4px solid var(--primary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
}

.footer-brand .logo-icon {
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-info {
    text-align: right;
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

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

@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
        height: auto;
        padding: 15px 20px;
    }

    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 15px;
        flex-wrap: wrap;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

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

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

    .latest-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .latest-time {
        order: 2;
    }

    .latest-category {
        order: 1;
        justify-self: start;
    }

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

    .footer-info {
        text-align: center;
    }

    .ticker-content {
        gap: 15px;
    }
}

/* Loading State */
.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Article Link Styles */
.news-card a,
.sidebar-item a,
.latest-item a {
    color: inherit;
}

.news-card a:hover h3,
.sidebar-item a:hover h3,
.latest-item a:hover h3 {
    color: var(--primary);
}

/* Weather Section */
.weather-section {
    margin-bottom: 30px;
}

.weather-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d1b2a 100%);
    border-radius: 12px;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 30px;
    border: 1px solid #2a4a6a;
}

.weather-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7eb8da;
    font-size: 0.9rem;
    min-width: 180px;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weather-icon {
    font-size: 2.5rem;
}

.weather-temp {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
}

.weather-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.weather-desc {
    color: #b0c4d8;
    font-size: 1rem;
}

.weather-wind {
    color: #7eb8da;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .weather-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .weather-location {
        justify-content: center;
    }
}
