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

:root {
  --bg: #faf9f6;
  --text: #1a1a1a;
  --text-secondary: #555;
  --accent: #c0392b;
  --border: #ddd;
  --card-bg: #fff;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Header */
header {
  border-bottom: 3px double var(--border);
  padding: 0 20px;
  background: var(--card-bg);
}

.header-top {
  text-align: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.header-main {
  text-align: center;
  padding: 24px 0 16px;
}

.logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
}

.tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-style: italic;
}

nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 12px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-btn {
  background: none;
  border: none;
  padding: 8px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 20px;
  transition: all 0.2s;
  white-space: nowrap;
}

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

/* Loading / Error */
.loading, .error {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error button {
  margin-top: 12px;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Featured */
.featured {
  max-width: 1200px;
  margin: 32px auto 0;
  padding: 0 20px;
}

.featured-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.featured-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

.featured-img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.featured-content {
  padding: 32px 32px 32px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-content .category-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  width: fit-content;
}

.featured-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.25;
  margin-bottom: 12px;
}

.featured-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.meta {
  font-size: 0.8rem;
  color: #888;
}

.meta .source { font-weight: 600; color: var(--accent); }

/* Grid */
.articles-grid {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.article-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-card .card-body {
  padding: 20px;
}

.article-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.35;
  margin-bottom: 8px;
}

.article-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer */
footer {
  text-align: center;
  padding: 32px 20px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-content { padding: 24px; }
  .featured-img { min-height: 220px; }
  .articles-grid { grid-template-columns: 1fr; }
  nav { justify-content: flex-start; padding: 12px 8px; }
}
