/* =========================
   RESET & BASE
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f5f7fa;
  color: #0b1f33;
  line-height: 1.7;
}

/* =========================
   HEADER
========================= */
header {
  background: linear-gradient(135deg, #0b2d52, #123e72);
  color: #ffffff;
  padding: 28px 16px;
  text-align: center;
}

header h1 {
  font-size: 2.2rem;
  font-weight: 800;
}

header p {
  margin-top: 6px;
  font-size: 1rem;
  opacity: 0.9;
}

header input {
  margin-top: 14px;
  width: 100%;
  max-width: 420px;
  padding: 12px 14px;
  font-size: 1rem;
  border-radius: 10px;
  border: none;
  outline: none;
}

/* =========================
   NAVIGATION
========================= */
nav {
  background: #ffffff;
  border-bottom: 1px solid #dde6f0;
}

.nav-inner {
  width: 80%;
  max-width: 1400px;
  margin: auto;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.nav-inner a {
  background: #eef4fb;
  color: #123e72;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

/* =========================
   LAYOUT (KEY FIX)
========================= */
.container {
  width: 80%;              /* 👈 covers 80% of screen */
  max-width: 1400px;       /* 👈 prevents over-stretch */
  margin: auto;
  padding: 24px 16px;
}

/* =========================
   CARD BASE
========================= */
.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

/* =========================
   ARTICLE PAGE
========================= */
article.card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 20px;
}

article.card h2 {
  text-align: center;
  font-size: 1.8rem;
  line-height: 1.35;
  margin-bottom: 10px;
  color: #0b2d52;
}

article.card small {
  display: block;
  text-align: left;
  color: #6b7c93;
  margin-bottom: 18px;
  font-size: 0.9rem;
}

article.card p {
  text-align: left;
  font-size: 1.05rem;
  color: #1f3349;
  margin-bottom: 1.2em;
}

/* =========================
   CATEGORY LIST VIEW
========================= */
.card-article {
  display: flex;
  gap: 18px;
  align-items: stretch;
}

.card-article img {
  width: 180px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.card-article > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-article h2 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  line-height: 1.35;
}

.card-article h2 a {
  color: #0b2d52;
  text-decoration: none;
}

.card-article p {
  font-size: 0.95rem;
  color: #334e68;
  margin-bottom: 8px;
  line-height: 1.6;
}

.card-article .read-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: #123e72;
}

.card-article small {
  color: #6b7c93;
  font-size: 0.85rem;
}

/* =========================
   MOBILE ADJUSTMENTS
========================= */
@media (max-width: 768px) {

  .container,
  .nav-inner {
    width: 100%;
  }

  article.card h2 {
    font-size: 1.5rem;
  }

  .card-article {
    flex-direction: column;
  }

  .card-article img {
    width: 100%;
  }
}

/* =========================
   FOOTER
========================= */
footer {
  background: #0b2d52;
  color: #ffffff;
  text-align: center;
  padding: 16px;
  font-size: 0.9rem;
  margin-top: 40px;
}
