/* ============================
   🌐 Base Font & Layout
============================ */
body {
  font-family: 'Prompt', sans-serif;
  background-color: #1a1a1a;
  color: #ececf1;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ============================
   📚 Blog Grid Layout
============================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.article-card {
  background-color: #2c2c2e;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.article-card h2 {
  font-size: 1.5rem;
  color: #ececf1;
  margin-bottom: 0.5rem;
}

.article-card p {
  font-size: 1rem;
  color: #cfcfd4;
  margin-bottom: 1rem;
}

.article-card a {
  color: #7c3aed;
  font-weight: 500;
  text-decoration: none;
}

.article-card a:hover {
  text-decoration: underline;
}

/* ============================
   🔗 Links & Buttons
============================ */
a {
  color: #7c3aed;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

a:hover {
  text-decoration: underline;
}

.button {
  display: inline-block;
  background-color: #7c3aed;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 2rem;
  transition: all 0.2s ease-in-out;
}

.button:hover {
  opacity: 0.9;
}

/* ============================
   🧱 Header
============================ */
.topbar {
  background: linear-gradient(to right, #000000, #2c2c2c);
  padding: 0.75rem 1rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.brand {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.5rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.2s ease-in-out;
}

.brand:hover {
  opacity: 0.85;
}

nav {
  background-color: #2c2c2e;
  padding: 1rem;
  text-align: center;
}

nav a {
  margin: 0 1rem;
  text-decoration: none;
  color: #ececf1;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

nav a:hover {
  text-decoration: underline;
}

/* ============================
   📱 Responsive Typography
============================ */
@media (max-width: 600px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  p {
    font-size: 1rem;
  }
}

/* ============================
   ✍️ Typography for Blog Title
============================ */
h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: #ececf1;
  text-align: center;
  line-height: 1.4;
}

/* ============================
   Images for Blog
============================ */

.blog-image img {
  width: 380px;
  height: 380px;         /* ✅ ปรับขนาดความสูงที่เหมาะสม */
  object-fit: cover;     /* ✅ ตัดภาพให้พอดี ไม่ยืด */
  border-radius: 12px 12px 0 0;  /* ✅ มุมโค้งด้านบน */
  display: block;
}

