:root {
    color-scheme: light;
    --accent: #185FA5;
    --accent-hover: #124b84;
    --ink: #172033;
    --muted: #52606b;
    --line: #d8e2e8;
    --teal: var(--accent);
    --pale: #edf7f8;
    --bg-body: #f6f8fa;
    --bg-card: #ffffff;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-pill: 999px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg-body);
    color: var(--ink);
    font: 15px/1.65 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.hemeroteca-header {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: flex-end;
    padding: 42px max(24px, calc((100vw - 1120px) / 2));
    background: #13202b;
    color: #fff;
}

.hemeroteca-eyebrow {
    margin: 0 0 5px;
    color: #28b9ca;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hemeroteca-header h1 {
    margin: 0;
    font: 700 clamp(2rem, 5vw, 3.2rem) / 1.08 Outfit, sans-serif;
}

.hemeroteca-header p {
    margin: 12px 0 0;
    max-width: 720px;
    color: #cbd5df;
    font-size: 1rem;
    line-height: 1.5;
}

.hemeroteca-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.hemeroteca-nav-btn {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.15s ease;
}

.hemeroteca-nav-btn:hover {
    background: var(--accent-hover);
    color: #fff;
}

.hemeroteca-nav-btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hemeroteca-nav-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
}

.hemeroteca-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.hemeroteca-toolbar {
    margin-bottom: 28px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.hemeroteca-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.hemeroteca-search-input {
    width: 100%;
    min-height: 2.75rem;
    padding: 10px 16px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hemeroteca-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.hemeroteca-select {
    min-height: 2.75rem;
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease;
}

.hemeroteca-select:focus {
    border-color: var(--accent);
}

.hemeroteca-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hemeroteca-chip-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 4px;
}

.hemeroteca-chip {
    min-height: 2.25rem;
    padding: 6px 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-pill);
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.hemeroteca-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.hemeroteca-chip[aria-pressed="true"] {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent);
    font-weight: 700;
}

.hemeroteca-reset-btn {
    min-height: 2.25rem;
    padding: 6px 14px;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-left: auto;
}

.hemeroteca-reset-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

.hemeroteca-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;
}

.hemeroteca-counter {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.hemeroteca-feed {
    display: grid;
    gap: 18px;
}

.hemeroteca-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.hemeroteca-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.hemeroteca-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.hemeroteca-source-badge {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: #e2e8f0;
    color: #1e293b;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hemeroteca-date {
    color: var(--muted);
    font-size: 0.85rem;
}

.hemeroteca-topic-tag {
    margin-left: auto;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.hemeroteca-topic-tag[data-topic="siniestro"] {
    background: #fee2e2;
    color: #991b1b;
}

.hemeroteca-topic-tag[data-topic="seguridad vial"] {
    background: #e0f2fe;
    color: #0369a1;
}

.hemeroteca-topic-tag[data-topic="política pública"] {
    background: #fef3c7;
    color: #92400e;
}

.hemeroteca-topic-tag[data-topic="infraestructura"] {
    background: #ede9fe;
    color: #6d28d9;
}

.hemeroteca-card-title {
    margin: 0 0 12px;
    font: 700 1.25rem / 1.3 Outfit, sans-serif;
}

.hemeroteca-card-title a {
    color: var(--ink);
    text-decoration: none;
    transition: color 0.15s ease;
}

.hemeroteca-card-title a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.hemeroteca-card-resumen {
    margin: 0 0 16px;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.6;
}

.hemeroteca-card-footer {
    display: flex;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}

.hemeroteca-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s ease;
}

.hemeroteca-card-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.hemeroteca-empty {
    padding: 64px 24px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
}

.hemeroteca-empty-icon {
    margin-bottom: 16px;
    font-size: 3rem;
    color: #94a3b8;
}

.hemeroteca-empty h3 {
    margin: 0 0 8px;
    font: 700 1.4rem Outfit, sans-serif;
    color: var(--ink);
}

.hemeroteca-empty p {
    margin: 0 auto;
    max-width: 520px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.hemeroteca-footer {
    padding: 32px 24px;
    background: #e8eef2;
    color: var(--muted);
    text-align: center;
    font-size: 0.85rem;
}

.hemeroteca-footer a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.hemeroteca-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .hemeroteca-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 20px;
    }

    .hemeroteca-container {
        padding: 20px 14px 60px;
    }

    .hemeroteca-toolbar {
        padding: 18px 14px;
    }

    .hemeroteca-search-row {
        grid-template-columns: 1fr;
    }

    .hemeroteca-chips-wrap {
        gap: 6px;
    }

    .hemeroteca-chip {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .hemeroteca-topic-tag {
        margin-left: 0;
    }

    .hemeroteca-card {
        padding: 18px 16px;
    }

    .hemeroteca-reset-btn {
        margin-left: 0;
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}
