:root {
  --primary: #0a4e8f;
  --muted: #6b7280;
  --bg: #ffffff;
  --max-width: 1100px;
  --container-pad: 16px;
  --radius: 10px;
  --accent: #ef4444;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

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

html,
body {
  height: 100%;
  background: var(--bg);
  color: #111;
}

.container {
  max-width: var(--max-width);
  margin: 24px auto;
  padding: var(--container-pad);
}

.header {
  display: flex;
  align-items: center;
  justify-content: center; /* centers the logo horizontally */
  padding: 12px 0;
}

.logo {
  height: 64px;
  width: auto;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.tagline {
  font-size: 0.95rem;
  color: var(--muted);
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 12px;
  background: linear-gradient(180deg, #f8fafc, white);
  border-radius: 8px;
  margin: 16px 0;
}

.hero h1 {
  font-size: 1.6rem;
}

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

.articles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.card {
  border: 1px solid #eee;
  padding: 12px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.footer {
  margin-top: 24px;
  padding: 18px;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer .links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 800px) {
  .articles {
    grid-template-columns: 1fr;
  }
  .header {
    gap: 10px;
  }
  .site-title {
    font-size: 1.1rem;
  }
  .logo {
    height: 52px;
  }
  .hero h1 {
    font-size: 1.3rem;
  }
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.5rem;
}

.news-list li {
  border: 1px solid #eee; /* changed from #ddd to match new lighter border */
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg); /* white background */
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.news-list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: var(--primary);
}

.news-list a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.news-list figure {
  margin: 0;
  width: 100%;
  overflow: hidden;
}

.news-list figure img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.3s;
}

.news-list li:hover figure img {
  transform: scale(1.05);
}

.news-list h3 {
  font-size: 1.1rem;
  padding: 0.75rem 1rem;
  line-height: 1.4;
  color: var(--primary); /* updated to primary color */
}

.news-list .update-date {
  display: block;
  font-size: 0.85rem;
  color: var(--muted); /* muted color for dates */
  padding: 0 1rem 0.75rem;
}

/* Responsive */
@media(min-width: 768px) {
  .news-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(min-width: 1200px) {
  .news-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =======================
   Article Page Styles
   Matches new theme colors & fonts
======================= */
.custom-article {
  padding: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  font-family: inherit; /* inherits Inter/system-ui from :root */
  line-height: 1.7;
  color: #111; /* base text */
  background: var(--bg);
}

/* ------------------ H1 ------------------ */
.custom-article h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--primary);
  line-height: 1.3;
  position: relative;
}

/* H1 subtle news-style underline */
.custom-article h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background: var(--accent);
  margin: 0.6rem auto 0 auto;
  border-radius: 2px;
  opacity: 0.85;
}

/* ------------------ Figure ------------------ */
.custom-article figure {
  margin: 1.25rem 0;
  text-align: center;
}

.custom-article figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* ------------------ Section & H2 ------------------ */
.custom-article section {
  margin: 1.75rem 0;
}

.custom-article section h2 {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
  color: var(--primary);
  border-left: 4px solid var(--accent);
  padding-left: 0.6rem;
  position: relative;
  line-height: 1.4;
  padding-bottom: 0.4rem;
}

/* H2 subtle underline */
.custom-article section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  opacity: 0.7;
}

.custom-article section p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* ------------------ Responsive Typography ------------------ */
@media (min-width: 768px) {
  .custom-article h1 {
    font-size: 2.3rem;
  }

  .custom-article section h2 {
    font-size: 1.6rem;
  }

  .custom-article section p {
    font-size: 1.05rem;
  }
}

@media (min-width: 1200px) {
  .custom-article {
    padding: 2rem;
  }

  .custom-article h1 {
    font-size: 2.3rem;
  }

  .custom-article section h2 {
    font-size: 1.8rem;
  }

  .custom-article section p {
    font-size: 1.15rem;
  }
}


/* Base styling for H1 and H2 */
h1, h2 {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.3;
  margin: 0 0 1rem 0;
  font-weight: 700;
  text-align: center;
  color: #222;
}

/* H1 default (desktop) */
h1 {
  font-size: 2.5rem; /* ~40px */
  color: #111;
}

/* H2 default (desktop) */
h2 {
  font-size: 1.5rem; /* ~24px */
  font-weight: 600;
  color: #444;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  h1 {
    font-size: 1.8rem; /* ~28px */
  }
  h2 {
    font-size: 1.2rem; /* ~19px */
  }
}

/* Very small screens */
@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem; /* ~24px */
  }
  h2 {
    font-size: 1rem; /* ~16px */
  }
}

/* Optional: Add subtle underline effect for news feel */
h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background: #e63946;
  margin: 0.5rem auto 0 auto;
  border-radius: 2px;
}
