@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --accent: #f59e0b;
    --bg-main: #f8fafc;
    --sidebar-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
aside {
    width: 280px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid #e2e8f0;
    height: 100vh;
    position: fixed;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    z-index: 100;
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

.section-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.state-list {
    list-style: none;
}

.state-item {
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--text-muted);
    transition: var(--transition);
    margin-bottom: 0.25rem;
}

.state-item:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

.state-item.active {
    background-color: #eff6ff;
    color: var(--primary);
    font-weight: 600;
}

/* Main Content */
main {
    flex: 1;
    margin-left: 280px;
    padding: 2.5rem 3rem;
}

header {
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-content h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: linear-gradient(to right, var(--text-main), #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.whatsapp-badge {
    background-color: #25d366;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(37, 211, 102, 0.2);
}

.whatsapp-badge:hover {
    background-color: #128c7e;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(37, 211, 102, 0.3);
}

.header-content p {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-top: 0.5rem;
}

.categories {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.category-chip {
    padding: 0.5rem 1.25rem;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.category-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.category-chip.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

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

.news-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: var(--card-shadow);
    border: 1px solid transparent;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: #e2e8f0;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

.news-source {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

.news-source::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.news-excerpt {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.news-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.read-more {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--primary-dark);
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    width: 100%;
    grid-column: 1 / -1;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-bottom-color: var(--primary);
    border-radius: 50%;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    aside {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    aside.open {
        transform: translateX(0);
    }
    
    main {
        margin-left: 0;
        padding: 1.5rem;
    }
}
