/* assets/style.css - Bài tập tại lớp Buổi 4: Chia layout
   Trạng thái tích lũy: buoc-4 (4/7 yêu cầu của Buổi 4) */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: #172033;
  background: #f2fbf9;
  line-height: 1.55;
}

a { color: #0f766e; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}


/* ===== Yêu cầu 1: bố cục trang chủ bằng Flexbox ===== */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: #0f766e;
  color: #fff;
  padding: 18px 20px;
}

.site-header h1 { margin: 0; font-size: 22px; }
.site-header p { margin: 2px 0 0; font-size: 13px; color: #d1fae5; }

.layout-chinh {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 20px;
  flex-wrap: wrap;
}

.noi-dung-chinh { flex: 3 1 600px; }
.sidebar {
  flex: 1 1 240px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 16px 18px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: #115e59;
  color: #ecfdf5;
  padding: 24px 20px;
}

.site-footer .cot-footer { flex: 1 1 200px; }
.site-footer h3 { color: #fff; font-size: 15px; margin: 0 0 8px; }
.site-footer ul { margin: 0; padding-left: 18px; }


/* ===== Yêu cầu 2: menu điều hướng Flexbox ngang, căn đều ===== */
.main-nav ul {
  display: flex;
  justify-content: space-around;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 12px 20px;
  background: #134e4a;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background-color: #0f766e;
}


/* ===== Yêu cầu 3: lưới thẻ "Nội dung học phần" bằng Flexbox, kích thước không đều ===== */
.luoi-mon-hoc {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.the-mon-hoc {
  background: #fff;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.08);
}

/* Không dùng width bằng nhau: điều khiển bằng flex-grow và flex-basis */
.the-mon-hoc.buoi-1 { flex: 1 1 160px; }
.the-mon-hoc.buoi-2 { flex: 1 1 160px; }
.the-mon-hoc.buoi-3 { flex: 2 1 220px; }
.the-mon-hoc.buoi-4 { flex: 3 1 260px; background: #d1fae5; border-color: #0f766e; }
.the-mon-hoc.buoi-5 { flex: 1 1 160px; }

.the-mon-hoc h3 { margin: 0 0 6px; font-size: 16px; color: #115e59; }
.the-mon-hoc p { margin: 0; font-size: 13.5px; color: #33415c; }


/* ===== Yêu cầu 4: menu dính khi cuộn trang bằng position: sticky ===== */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
