body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  background-color: #f8f9fa;
  color: #202122;
  line-height: 1.6;
}

/* Header */
header {
  background-color: #3366cc;
  color: white;
  text-align: center;
  padding: 25px 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

header h1 {
  margin: 0;
  font-size: 2.2em;
}

/* Layout chính */
main {
  display: grid;
  grid-template-columns: 3fr 1.2fr;
  gap: 20px;
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 15px;
}

/* Mục lục */
#toc {
  background-color: #fff;
  border: 1px solid #a2a9b1;
  border-radius: 6px;
  padding: 10px 15px;
  width: 70%;
  font-size: 0.95em;
  margin-bottom: 25px;
}

#toc h2 {
  color: #3366cc;
  margin-top: 0;
  font-size: 1.2em;
  border-bottom: 1px solid #a2a9b1;
  padding-bottom: 4px;
}

#toc a {
  color: #0645ad;
  text-decoration: none;
}

#toc a:hover {
  text-decoration: underline;
}

/* Bài viết */
article {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #dcdcdc;
}

article h2 {
  color: #3366cc;
  border-bottom: 1px solid #a2a9b1;
  padding-bottom: 4px;
}

article p {
  margin-top: 10px;
}

article img {
  width: 100%;
  border-radius: 6px;
  margin: 10px 0 20px 0;
}

/* Infobox */
.infobox {
  background-color: #fff;
  border: 1px solid #a2a9b1;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.9em;
}

.infobox h3 {
  text-align: center;
  color: #3366cc;
  margin-top: 5px;
}

.infobox img {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 10px;
}

.infobox table {
  width: 100%;
  border-collapse: collapse;
}

.infobox th {
  text-align: left;
  color: #0645ad;
  width: 35%;
}

.infobox td {
  color: #333;
  padding: 2px 0;
}

.infobox tr {
  border-bottom: 1px solid #eee;
}

/* Footer */
footer {
  background-color: #3366cc;
  color: white;
  text-align: center;
  padding: 12px;
  font-size: 0.9em;
  margin-top: 40px;
}

/* Hiệu ứng cuộn mượt */
html {
  scroll-behavior: smooth;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin: 15px 0;
}

.gallery img {
  width: 100%;
  border-radius: 8px;
  transition: transform 0.3s ease;
  border: 1px solid #ddd;
}

.gallery img:hover {
  transform: scale(1.05);
}

figcaption {
  font-size: 0.9em;
  color: #555;
  text-align: center;
  margin-bottom: 20px;
}
