/* TechWatch - Styles CSS */

/* Variables CSS */
:root {
    --primary-dark: #1a2332;
    --primary-blue: #2563eb;
    --secondary-blue: #3b82f6;
    --light-gray: #f1f5f9;
    --medium-gray: #64748b;
    --dark-gray: #334155;
    --white: #ffffff;
    --neutral-green: #10b981;
    --commercial-yellow: #f59e0b;
    --oriented-orange: #ef4444;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
}

/* Header */
header {
    background: var(--primary-dark);
    color: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-top {
    background: #0f172a;
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--medium-gray);
}

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

.header-top a {
    color: var(--medium-gray);
    text-decoration: none;
    margin-left: 20px;
}

.header-top a:hover {
    color: var(--secondary-blue);
}

nav {
    padding: 1rem 0;
}

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

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--secondary-blue);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--secondary-blue);
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: background 0.3s;
}

.search-bar:focus-within {
    background: rgba(255,255,255,0.15);
}

.search-bar input {
    background: none;
    border: none;
    color: var(--white);
    outline: none;
    width: 250px;
    font-size: 0.9rem;
}

.search-bar input::placeholder {
    color: var(--medium-gray);
}

.search-bar i {
    color: var(--medium-gray);
    margin-right: 10px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a5f 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    color: var(--light-gray);
    max-width: 700px;
    margin: 0 auto;
}

/* Category Filter */
.category-filter {
    background: var(--white);
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 72px;
    z-index: 999;
}

.filter-tabs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-tab {
    padding: 0.7rem 1.5rem;
    background: var(--light-gray);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.filter-tab:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.filter-tab.active {
    background: var(--primary-blue);
    color: var(--white);
}

/* Main Content */
main {
    padding: 3rem 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title i {
    color: var(--primary-blue);
}

/* Story Grid */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.story-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
    cursor: pointer;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.story-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
}

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

.story-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.story-date {
    color: var(--medium-gray);
    font-size: 0.85rem;
}

.story-title {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--primary-dark);
    font-weight: 700;
    line-height: 1.4;
}

.story-excerpt {
    color: var(--dark-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Source Coverage */
.source-coverage {
    padding: 1rem 1.5rem;
    background: var(--light-gray);
}

.coverage-title {
    font-size: 0.85rem;
    color: var(--medium-gray);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.source-badges {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.source-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid;
}

.source-badge.neutral {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--neutral-green);
    color: var(--neutral-green);
}

.source-badge.commercial {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--commercial-yellow);
    color: var(--commercial-yellow);
}

.source-badge.oriented {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--oriented-orange);
    color: var(--oriented-orange);
}

.source-badge .count {
    background: currentColor;
    color: var(--white);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Trending Topics */
.trending-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.trending-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.trending-item {
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
    cursor: pointer;
}

.trending-item:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.trending-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.trending-item:hover .trending-number {
    color: var(--white);
}

.trending-text {
    flex: 1;
}

.trending-topic {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.trending-sources {
    font-size: 0.85rem;
    color: var(--medium-gray);
}

.trending-item:hover .trending-sources {
    color: rgba(255,255,255,0.8);
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--secondary-blue);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--medium-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--medium-gray);
}

/* Legend */
.legend {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.legend h3 {
    margin-bottom: 1rem;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.legend-items {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid;
}

.legend-color.neutral {
    border-color: var(--neutral-green);
    background: rgba(16, 185, 129, 0.2);
}

.legend-color.commercial {
    border-color: var(--commercial-yellow);
    background: rgba(245, 158, 11, 0.2);
}

.legend-color.oriented {
    border-color: var(--oriented-orange);
    background: rgba(239, 68, 68, 0.2);
}

.legend-text {
    font-weight: 600;
    color: var(--dark-gray);
}

.legend-desc {
    font-size: 0.85rem;
    color: var(--medium-gray);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

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

    .search-bar input {
        width: 150px;
    }

    .legend-items {
        flex-direction: column;
    }

    .container {
        padding: 0 1rem;
    }

    .filter-tabs {
        gap: 0.5rem;
    }

    .filter-tab {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}