:root {
  --primary: #1e3a8a;
  --primary-light: #3b5bdb;
  --accent: #f59e0b;
  --text: #1f2937;
  --muted: #6b7280;
  --bg: #f8fafc;
  --white: #ffffff;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--primary-light); text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 90%; max-width: 1150px; margin: 0 auto; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--primary);
  color: #dbe4ff;
  font-size: 0.85rem;
  padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Header / Nav ---------- */
header {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--primary); font-weight: 700; font-size: 1.25rem; }
.logo-badge {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: var(--accent);
  display: grid; place-items: center; font-weight: 800; font-size: 1rem;
}
.logo small { display: block; font-size: 0.7rem; color: var(--muted); font-weight: 500; }

.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a { color: var(--text); font-weight: 500; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary-light); }

.menu-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.92), rgba(59, 91, 219, 0.85)),
    url("https://images.unsplash.com/photo-1580582932707-520aed937b7b?w=1600") center/cover;
  color: var(--white);
  padding: 110px 0 90px;
  text-align: center;
}
.hero h1 { font-size: 2.8rem; margin-bottom: 12px; }
.hero p { font-size: 1.15rem; max-width: 650px; margin: 0 auto 28px; color: #e0e7ff; }

.btn {
  display: inline-block; padding: 12px 28px; border-radius: 30px;
  font-weight: 600; transition: transform 0.2s, background 0.2s; cursor: pointer; border: none; font-size: 1rem;
}
.btn-primary { background: var(--accent); color: #1f2937; }
.btn-primary:hover { transform: translateY(-2px); background: #fbbf24; }
.btn-outline { border: 2px solid var(--white); color: var(--white); margin-left: 10px; }
.btn-outline:hover { background: var(--white); color: var(--primary); }

/* ---------- Sections ---------- */
section { padding: 70px 0; }
.section-title { text-align: center; margin-bottom: 45px; }
.section-title h2 { font-size: 2rem; color: var(--primary); }
.section-title p { color: var(--muted); }
.section-title h2::after {
  content: ""; display: block; width: 60px; height: 4px;
  background: var(--accent); margin: 10px auto 0; border-radius: 2px;
}

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: center; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card {
  background: var(--white); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); transition: transform 0.25s;
}
.card:hover { transform: translateY(-5px); }
.card .icon { font-size: 2.2rem; margin-bottom: 12px; }
.card h3 { color: var(--primary); margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.95rem; }

.about-img { border-radius: var(--radius); box-shadow: var(--shadow); }
.about-text h3 { color: var(--primary); margin: 16px 0 6px; }
.about-text ul { padding-left: 20px; color: var(--muted); }

/* ---------- Stats ---------- */
.stats { background: var(--primary); color: var(--white); text-align: center; padding: 50px 0; }
.stat h3 { font-size: 2.4rem; color: var(--accent); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--primary); color: var(--white); }
tr:last-child td { border-bottom: none; }

/* ---------- Notice board ---------- */
.notice-list { list-style: none; }
.notice-list li { padding: 12px 0; border-bottom: 1px dashed var(--border); display: flex; gap: 14px; }
.notice-list li:last-child { border-bottom: none; }
.notice-date { background: var(--accent); color: #1f2937; font-weight: 700; font-size: 0.8rem; border-radius: 6px; padding: 4px 10px; white-space: nowrap; height: fit-content; }

/* ---------- Contact ---------- */
.alt-bg { background: var(--white); }
form .form-group { margin-bottom: 16px; }
form label { display: block; font-weight: 500; margin-bottom: 6px; }
form input, form textarea, form select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 8px; font: inherit; background: var(--bg);
}
form input:focus, form textarea:focus, form select:focus { outline: 2px solid var(--primary-light); border-color: transparent; }
.form-msg { margin-top: 12px; font-weight: 500; }
.form-msg.success { color: #16a34a; }
.form-msg.error { color: #dc2626; }
.contact-info p { margin-bottom: 14px; }
.map { width: 100%; height: 260px; border: 0; border-radius: var(--radius); margin-top: 10px; }

/* ---------- Legal pages ---------- */
.page-banner { background: var(--primary); color: var(--white); padding: 60px 0; text-align: center; }
.page-banner h1 { font-size: 2.3rem; }
.page-banner p { color: #c7d2fe; }
.legal { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; margin: -30px auto 60px; position: relative; max-width: 900px; }
.legal h2 { color: var(--primary); margin: 28px 0 10px; font-size: 1.3rem; }
.legal h2:first-of-type { margin-top: 0; }
.legal p, .legal li { color: #374151; margin-bottom: 8px; }
.legal ul { padding-left: 22px; }
.updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }

/* ---------- Footer ---------- */
footer { background: #0f172a; color: #cbd5e1; padding: 50px 0 20px; }
footer h4 { color: var(--white); margin-bottom: 14px; }
footer ul { list-style: none; }
footer li { margin-bottom: 8px; }
footer a { color: #cbd5e1; }
footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 30px; padding-top: 18px; text-align: center; font-size: 0.9rem; }

/* ---------- Back to top ---------- */
#backToTop {
  position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); border: none; font-size: 1.2rem; cursor: pointer;
  box-shadow: var(--shadow); display: none;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--white);
    flex-direction: column; gap: 0; display: none; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: 14px 5%; border-top: 1px solid var(--border); }
  .hero h1 { font-size: 2rem; }
  .btn-outline { margin: 12px 0 0; }
  .legal { padding: 24px; }
}
