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

:root {
  --bg: #ffffff;
  --surface: #f8f9fa;
  --border: #e9ecef;
  --text: #212529;
  --muted: #6c757d;
  --accent: #e63946;
  --accent-hover: #c1121f;
  --font: 'Segoe UI', system-ui, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* HEADER */
header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}

nav { display: flex; gap: 0.5rem; flex-wrap: wrap; }
nav a {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
nav a:hover { color: var(--text); background: var(--surface); }

/* CONTAINER */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* FEATURED */
#featured { background: var(--surface); border-bottom: 1px solid var(--border); }
.featured-card {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
  cursor: pointer;
  color: inherit;
}
.featured-card:hover .featured-info h1 { color: var(--accent); }
.featured-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.featured-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.featured-info h1 {
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  transition: color 0.2s;
}
.featured-info p { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.featured-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

/* CATEGORY BADGE */
.category {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
}

/* SECTION TITLE */
.section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

/* ARTICLES GRID */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.1); transform: translateY(-2px); }
.card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.card-info { padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card-info h2 { font-size: 0.95rem; font-weight: 600; line-height: 1.4; color: var(--text); }
.card-info p { font-size: 0.83rem; color: var(--muted); flex: 1; }

.empty { color: var(--muted); padding: 2rem 0; }

/* ARTICLE PAGE */
.article-page { max-width: 800px; }

.article-meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.date { color: var(--muted); font-size: 0.85rem; }

.article-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.article-hero {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 2rem;
  display: block;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #374151;
}
.article-body p { margin-bottom: 1.2rem; }
.article-body h2 { font-size: 1.4rem; margin: 2rem 0 0.8rem; color: var(--text); }
.article-body h3 { font-size: 1.1rem; margin: 1.5rem 0 0.6rem; color: var(--text); }
.article-body img { max-width: 100%; border-radius: 6px; margin: 1rem 0; }
.article-body a { color: var(--accent); text-decoration: underline; }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.article-body li { margin-bottom: 0.4rem; }

.back-link {
  display: inline-block;
  margin-top: 2.5rem;
  color: var(--accent);
  font-weight: 600;
}
.back-link:hover { text-decoration: underline; }

.loading { color: var(--muted); }

/* FOOTER */
footer {
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.2rem 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--muted);
  font-size: 0.82rem;
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--text); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-card img { height: 220px; }
  .articles-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .articles-grid { grid-template-columns: 1fr; }
}
