:root {
  --bg-color: #f4f6f8;
  --card-bg: #ffffff;
  --text-main: #2d3748;
  --text-muted: #718096;
  --primary: #3182ce;
  --border: #e2e8f0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 20px;
  gap: 30px;
}

main {
  flex: 1 1 65%;
  min-width: 300px;
}

aside {
  flex: 1 1 30%;
  min-width: 280px;
}

.ad-space {
  background-color: #edf2f7;
  border: 2px dashed #cbd5e0;
  color: #a0aec0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  min-height: 250px;
}

.article-card {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  overflow: hidden;        /* ← esto hace que la imagen respete el border-radius */
  padding: 2px;
}

.article-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;           /* ← sin márgenes, sin bordes, pegada arriba */
}

.category-tag {
  background: #ebf8ff;
  color: #2b6cb0;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.article-card h2 {
  margin: 1rem 0 0.5rem 0;
  font-size: 1.8rem;
  line-height: 1.2;
}

.meta-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.article-options {
  background: var(--bg-color);
  padding: 1rem 2rem;
  border-radius: 6px;
  margin: 1.5rem 0;
}

.article-options li {
  margin-bottom: 0.5rem;
}

.source-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.source-link:hover {
  border-bottom: 1px solid var(--primary);
}

.loader {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
}