/* ================================
   Bo mon CNKT Dieu khien & Tu dong hoa
   Design system
================================== */
:root {
  --primary: #123a6b;
  --primary-dark: #0a2547;
  --primary-light: #1f5c9e;
  --accent: #e0a319;
  --accent-dark: #b6820f;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --text: #1f2937;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(15, 35, 70, 0.08);
  --shadow-hover: 0 8px 24px rgba(15, 35, 70, 0.14);
  --container: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Be Vietnam Pro", "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--accent-dark); }

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

h1, h2, h3, h4 { color: var(--primary-dark); margin: 0 0 12px; line-height: 1.3; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: rgba(224,163,25,.12);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 48px 0 20px;
  flex-wrap: wrap;
}
.section-title h2 { margin: 0; font-size: 26px; }
.section-title p { color: var(--text-muted); margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent); color: var(--primary-dark); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); }
.btn-outline { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-ghost { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-ghost:hover { background: var(--primary); color: #fff; }

/* ============ HEADER ============ */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--surface); box-shadow: var(--shadow); }

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo { width: 54px; height: 54px; object-fit: contain; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title {
  font-weight: 800;
  color: var(--primary-dark);
  font-size: 16.5px;
  line-height: 1.25;
}
.brand-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.nav-toggle {
  display: none;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 20px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.main-nav { background: var(--primary); }
.nav-inner { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-inner a {
  color: #dce7f6;
  padding: 13px 18px;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 3px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.nav-inner a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-inner a.active { color: #fff; border-bottom-color: var(--accent); background: rgba(255,255,255,.06); }

/* ============ HERO ============ */
.hero {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary) 60%, var(--primary-light));
  color: #fff;
  padding: 56px 0 70px;
}
.hero .container { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.hero-content { flex: 1 1 420px; }
.hero-content h1 { color: #fff; font-size: 34px; margin-bottom: 14px; }
.hero-content p { color: #dce7f6; font-size: 16.5px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.hero-visual {
  flex: 1 1 320px;
  min-height: 220px;
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}

.page-hero {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 44px 0;
}
.page-hero h1 { color: #fff; margin-bottom: 8px; }
.page-hero p { color: #dce7f6; max-width: 640px; margin: 0; }

/* ============ CARDS: NEWS ============ */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.news-thumb {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #fff;
}
.news-thumb-img { padding: 0; overflow: hidden; }
.news-thumb-img img { width: 100%; height: 100%; object-fit: cover; }

.news-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-date { font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.news-card h3 { font-size: 17px; margin: 0; }
.news-card p { color: var(--text-muted); font-size: 14.5px; margin: 0; flex: 1; }
.news-card .btn-ghost { align-self: flex-start; padding: 7px 16px; font-size: 13.5px; margin-top: 6px; }

.news-card.featured { grid-column: span 2; grid-row: span 2; }
.news-card.featured .news-thumb { height: 100%; min-height: 220px; }
.news-card.featured h3 { font-size: 21px; }

.tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(18,58,107,.08);
  color: var(--primary);
  width: fit-content;
}

/* thumbnail color variants */
.thumb-1 { background: linear-gradient(135deg,#1f5c9e,#123a6b); }
.thumb-2 { background: linear-gradient(135deg,#e0a319,#b6820f); }
.thumb-3 { background: linear-gradient(135deg,#2a7de1,#123a6b); }
.thumb-4 { background: linear-gradient(135deg,#4b5563,#1f2937); }
.thumb-5 { background: linear-gradient(135deg,#0e9f6e,#0a2547); }

/* ============ QUICK LINKS ============ */
.quick-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 40px 0; }
.quick-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.quick-card .icon { font-size: 34px; margin-bottom: 10px; }
.quick-card h3 { font-size: 16px; margin-bottom: 6px; }
.quick-card p { color: var(--text-muted); font-size: 13.5px; margin: 0; }

/* ============ SUBJECTS / HOC LIEU ============ */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 28px 0 10px;
}
.filter-bar input[type="search"] {
  flex: 1 1 260px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 14.5px;
  background: var(--surface);
}
.filter-bar input[type="search"]:focus { outline: 2px solid var(--primary-light); }
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--primary-light); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.subject-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 22px 0 40px; }
.subject-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.subject-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.subject-code { font-size: 12px; font-weight: 700; color: var(--accent-dark); background: rgba(224,163,25,.12); padding: 3px 10px; border-radius: 6px; }
.subject-card h3 { font-size: 17.5px; margin: 0 0 4px; }
.subject-meta { font-size: 13.5px; color: var(--text-muted); margin-bottom: 14px; }
.doc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.doc-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: background .15s ease, border-color .15s ease;
}
.doc-list li a:hover { background: rgba(18,58,107,.05); border-color: var(--primary-light); color: var(--primary); }
.doc-list li a::before { content: "📄"; font-size: 15px; }

/* ============ TEACHERS ============ */
.teacher-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 22px 0 40px; }
.teacher-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.teacher-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 26px;
}
.teacher-card h3 { font-size: 17px; margin-bottom: 2px; }
.teacher-role { color: var(--accent-dark); font-weight: 600; font-size: 13.5px; margin-bottom: 10px; }
.teacher-subjects { color: var(--text-muted); font-size: 13.5px; margin-bottom: 12px; }
.teacher-contact { font-size: 13px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; }

/* ============ COURSES ============ */
.course-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 22px 0 40px; }
.course-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  border-top: 4px solid var(--accent);
}
.course-card h3 { font-size: 19px; }
.course-meta { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0 14px; font-size: 13.5px; color: var(--text-muted); }
.course-meta span { display: flex; align-items: center; gap: 6px; }
.course-card ul { margin: 0 0 16px; padding-left: 20px; color: var(--text); font-size: 14.5px; }
.course-card ul li { margin-bottom: 6px; }

/* ============ ABOUT ============ */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 22px 0 40px; }
.about-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.about-card .icon { font-size: 30px; margin-bottom: 10px; }

.timeline { list-style: none; margin: 24px 0 40px; padding: 0; border-left: 3px solid var(--border); }
.timeline li { position: relative; padding: 4px 0 22px 26px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline .year { font-weight: 700; color: var(--primary); display: block; margin-bottom: 2px; }

.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; margin: 22px 0 50px; align-items: stretch; }
.contact-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.contact-row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.contact-row:last-child { border-bottom: none; }
.contact-row .icon { font-size: 20px; }
.map-box {
  border-radius: var(--radius);
  min-height: 260px;
  height: 100%;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-box iframe { display: block; }

/* ============ SCORE TABLES (DIEM CHUAN) ============ */
.score-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 4px 0 24px;
}
.score-legend .swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: rgba(224,163,25,.28);
  border-left: 4px solid var(--accent);
  flex-shrink: 0;
}

.year-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 8px; }
.year-tabs a {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 14.5px;
}
.year-tabs a:hover { border-color: var(--primary-light); color: var(--primary); }

.table-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 18px 0 44px;
  scroll-margin-top: 90px;
}
.table-card .table-card-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.table-card .table-card-head h3 { margin: 0; font-size: 19px; }
.table-card .table-card-head span { font-size: 13px; color: var(--text-muted); }
.table-wrap { overflow-x: auto; }

table.score-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.score-table thead th {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  text-align: center;
  padding: 12px 10px;
  white-space: nowrap;
}
.score-table thead th:nth-child(2),
.score-table thead th:nth-child(3) { text-align: left; }
.score-table thead th small { display: block; font-weight: 500; opacity: .8; font-size: 11px; }
.score-table td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.score-table td:nth-child(2),
.score-table td:nth-child(3) { text-align: left; white-space: normal; }
.score-table tbody tr:nth-child(even) { background: rgba(18,58,107,.03); }
.score-table tbody tr.highlight td {
  background: rgba(224,163,25,.16);
  font-weight: 700;
  color: var(--primary-dark);
}
.score-table tbody tr.highlight td:first-child { border-left: 4px solid var(--accent); }
.table-note { padding: 14px 22px 18px; font-size: 12.5px; color: var(--text-muted); }
.table-note a { font-weight: 600; }

/* ============ FOOTER ============ */
.site-footer { background: var(--primary-dark); color: #cbd8ea; margin-top: 60px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 32px;
  padding: 48px 20px 28px;
}
.footer-grid h4 { color: #fff; font-size: 15.5px; margin-bottom: 14px; }
.footer-grid p { margin: 0 0 8px; font-size: 14px; color: #a9bad4; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: #a9bad4; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  text-align: center;
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
  color: #8296b5;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-card.featured { grid-column: span 2; grid-row: span 1; }
  .news-card.featured .news-thumb { min-height: 160px; }
  .quick-links { grid-template-columns: repeat(2, 1fr); }
  .subject-grid { grid-template-columns: 1fr; }
  .teacher-grid { grid-template-columns: repeat(2, 1fr); }
  .course-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .nav-inner { flex-direction: column; gap: 0; padding: 8px 0; }
  .nav-inner a { border-bottom: none; border-left: 3px solid transparent; }
  .nav-inner a.active { border-left-color: var(--accent); border-bottom: none; }
  .hero-content h1 { font-size: 26px; }
  .news-grid { grid-template-columns: 1fr; }
  .news-card.featured { grid-column: span 1; }
  .quick-links { grid-template-columns: 1fr; }
  .teacher-grid { grid-template-columns: 1fr; }
  .brand-title { font-size: 14.5px; }
  .brand-sub { font-size: 11.5px; }
  .logo { width: 42px; height: 42px; }
}
