/* styles.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fb;
  color: #222;
  line-height: 1.6;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrapper {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* Header & nav */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0 16px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 24px;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e293b;
}

.site-subtitle {
  font-size: 0.9rem;
  color: #64748b;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.9rem;
}

nav a {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 500;
}

nav a:hover {
  background: #2563eb;
  color: #fff;
}

/* Main content */
main h1 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: #0f172a;
}

main h2 {
  font-size: 1.2rem;
  margin: 20px 0 10px;
  color: #0f172a;
}

main p {
  margin-bottom: 10px;
  color: #334155;
}

/* Card grid trên trang Home */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.card {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font-weight: 600;
  color: #0f172a;
}

.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  margin-bottom: 4px;
}

.card p {
  font-size: 0.9rem;
}

.card-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn,
.btn-outline {
  display: inline-block;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 500;
  border: 1px solid transparent;
}

.btn {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.btn:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.btn-outline {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5f5;
}

.btn-outline:hover {
  background: #e5edff;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 10px;
  color: #64748b;
}

.breadcrumb a {
  color: #64748b;
}

.breadcrumb span {
  margin: 0 4px;
}

/* Section box trên trang con */
.section-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
  margin-top: 10px;
}

.section-list {
  margin: 8px 0 4px;
  padding-left: 20px;
}

.section-list li {
  margin-bottom: 4px;
}

.note {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 8px;
}

/* Hình minh họa */
.preview {
  margin: 14px 0 4px;
  text-align: center;
}

.preview img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.preview figcaption {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 6px;
}

/* Footer */
.site-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Responsive nhỏ */
@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul {
    justify-content: flex-start;
  }
}
