:root {
    --bg: #f4f6fb;
    --card: #ffffff;
    --text: #0a1a3a;
    --muted: #5b6b8c;
    --accent: #0068f8;
    --accent-light: #00b4f8;
    --border: #e2e6f0;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
    position: relative;
    padding: 20px 16px;
    text-align: center;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}
.site-header .logo { height: 112px; width: auto; display: inline-block; }
.tagline { color: var(--muted); font-size: 0.9rem; margin: 8px 0 0; font-family: Arial, sans-serif; }

.lang-switcher {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
}
.lang-switcher a { color: var(--muted); }
.lang-switcher a.active { color: var(--accent); }
.lang-switcher span { color: var(--border); }

.dept-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    justify-content: center;
    padding: 10px 16px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
}
.dept-nav a {
    color: var(--muted);
    padding: 5px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.dept-nav a:hover { color: var(--text); text-decoration: none; background: var(--bg); }
.dept-nav a.active { color: #fff; background: var(--accent); }

.dept-item { position: relative; }
.dept-caret { font-size: 0.6rem; margin-left: 2px; }

.dept-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column;
    gap: 2px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px;
    min-width: 170px;
    box-shadow: 0 8px 20px rgba(10, 26, 58, 0.12);
    z-index: 20;
}
.dept-item:hover .dept-submenu,
.dept-item:focus-within .dept-submenu {
    display: flex;
}
.dept-submenu a {
    padding: 7px 10px;
    border-radius: 6px;
    text-align: left;
}
.dept-submenu a:hover { background: var(--bg); }
.dept-submenu a.active { background: var(--accent); color: #fff; }

.badge-category { background: #f0e8fd; color: #7b3fe4; }

.city-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    justify-content: center;
    padding: 10px 16px 0;
    font-family: Arial, sans-serif;
    font-size: 0.8rem;
}
.city-filter a { color: var(--muted); padding: 3px 8px; border-radius: 20px; border: 1px solid var(--border); white-space: nowrap; }
.city-filter a:hover { color: var(--text); text-decoration: none; }
.city-filter a.active { color: #fff; background: var(--accent-light); border-color: var(--accent-light); }
.category-filter a.active { background: #7b3fe4; border-color: #7b3fe4; }

.featured-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 16px 0;
}

.article-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    align-items: start;
}

/* Reutiliza el grid de .article-list, pero sin su max-width/padding propios
   (ya los pone el <section> que la envuelve) y con un separador abajo */
.featured-list {
    max-width: none;
    margin: 0;
    padding: 0 0 20px;
    border-bottom: 1px solid var(--border);
}

/* Fondo distinto para que las tarjetas destacadas se diferencien del resto
   del mosaico a simple vista, sin necesitar un título "Destacados" */
.featured-list .card {
    background: linear-gradient(160deg, #e8effd 0%, #f4f6fb 100%);
    border-color: var(--accent-light);
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 10px rgba(10, 26, 58, 0.05);
}
.card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.card-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.card h2 { margin: 0 0 8px; font-size: 1.15rem; line-height: 1.3; }
.card h2 a { color: var(--text); }
.excerpt { color: var(--muted); margin: 0 0 10px; font-size: 0.95rem; flex: 1; }
.meta { color: var(--muted); font-size: 0.8rem; margin: 0; font-family: Arial, sans-serif; }

.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    font-family: Arial, sans-serif;
}
.badge-verified { background: #e3f7ea; color: #1a7f4a; }
.badge-unverified { background: #fff3e0; color: #b3660a; }
.badge-excerpt { background: #e8effd; color: #0068f8; }

.ad-card { position: relative; }
.ad-card a { display: block; height: 100%; position: relative; }
.ad-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-card .ad-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(10, 26, 58, 0.75);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: Arial, sans-serif;
}

.ad-banner {
    max-width: 1200px;
    margin: 12px auto;
    padding: 0 16px;
    text-align: center;
}
.ad-banner img { width: 100%; max-height: 150px; object-fit: cover; border-radius: 8px; display: block; }
.ad-banner .ad-label { display: block; margin-top: 4px; }

.btn-read-source {
    display: inline-block;
    margin: 8px 0 16px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #0068f8, #00b4f8);
    color: #fff !important;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 0.95rem;
    border-radius: 8px;
    text-decoration: none !important;
}
.btn-read-source:hover { opacity: 0.92; }

.pagination {
    max-width: 1200px;
    margin: 10px auto 30px;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: Arial, sans-serif;
    color: var(--muted);
}

.article-detail { max-width: 700px; margin: 0 auto; padding: 24px 16px; }
.article-detail .badge { margin-bottom: 12px; }
.article-detail h1 { font-size: 2rem; margin-bottom: 6px; color: var(--text); }
.article-detail .cover { width: 100%; border-radius: 12px; margin: 16px 0; }
.article-detail .body p { font-size: 1.1rem; }
.en-summary {
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text);
    border-left: 3px solid var(--accent);
    padding-left: 14px;
    margin: 16px 0 4px;
}
.body-lang-notice {
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0 0 20px;
}

.attribution {
    margin-top: 30px;
    padding: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
}
.attribution .disclaimer { color: var(--muted); font-size: 0.8rem; margin-top: 8px; margin-bottom: 0; }
.verified-coverage { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.source-list { margin: 8px 0; padding-left: 20px; }
.source-list li { margin-bottom: 4px; }

.back-link { text-align: center; font-family: Arial, sans-serif; font-size: 0.9rem; margin: 24px 16px 0; }

.legal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 16px 48px;
}
.legal-page h1 { font-size: 1.8rem; margin-bottom: 4px; }
.legal-updated { color: var(--muted); font-size: 0.85rem; font-family: Arial, sans-serif; margin-bottom: 24px; }
.legal-page h2 { font-size: 1.2rem; margin: 28px 0 8px; font-family: Arial, sans-serif; }
.legal-page p, .legal-page li { font-size: 1rem; }
.legal-page ul { padding-left: 20px; }
.legal-page li { margin-bottom: 10px; }

.contact-form { display: grid; gap: 14px; max-width: 480px; font-family: Arial, sans-serif; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.contact-form input, .contact-form textarea {
    background: var(--card); border: 1px solid var(--border); color: var(--text);
    padding: 10px; border-radius: 6px; font-family: Georgia, serif; font-size: 1rem;
}
.contact-form button {
    padding: 12px; background: var(--accent); border: 0; border-radius: 6px;
    color: #fff; font-weight: bold; cursor: pointer; width: fit-content; padding-left: 24px; padding-right: 24px;
}
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.contact-ok { background: #e3f7ea; color: #1a7f4a; padding: 12px 16px; border-radius: 8px; font-family: Arial, sans-serif; }
.contact-error { background: #fff3e0; color: #b3660a; padding: 12px 16px; border-radius: 8px; font-family: Arial, sans-serif; margin-bottom: 16px; }

.banner-embed-preview {
    background: var(--card);
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 16px;
    display: inline-block;
    margin-bottom: 8px;
}
.code-snippet {
    width: 100%;
    max-width: 560px;
    display: block;
    background: #0a1a3a;
    color: #e8effd;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    padding: 12px;
    border-radius: 8px;
    border: 0;
    resize: vertical;
    margin-bottom: 20px;
}

.site-footer {
    text-align: center;
    padding: 20px 16px 40px;
    color: var(--muted);
    font-size: 0.8rem;
    font-family: Arial, sans-serif;
}
.footer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.footer-nav a { color: var(--text); font-size: 0.85rem; }
.footer-nav a:hover { color: var(--accent); }
