/* =====================================================
   ITA NPU 2026 - Main CSS
   Colors: Primary #1a4b8c (NPU Blue), Gold #c8a951
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&family=Noto+Sans+Thai:wght@300;400;500;600;700&display=swap');

:root {
  --primary:     #1a4b8c;
  --primary-dark:#123366;
  --primary-light:#2a6bb5;
  --gold:        #c8a951;
  --gold-dark:   #a88a3e;
  --accent:      #2e7d32;
  --danger:      #c62828;
  --text:        #1a1a2e;
  --text-muted:  #6c757d;
  --bg:          #f5f7fb;
  --bg-card:     #ffffff;
  --border:      #dee2e6;
  --shadow:      0 2px 12px rgba(26,75,140,0.10);
  --shadow-lg:   0 8px 32px rgba(26,75,140,0.15);
  --radius:      10px;
  --radius-lg:   16px;
  --font:        'Sarabun', 'Noto Sans Thai', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-light); }

img { max-width: 100%; height: auto; }

/* ---- Topbar ---- */
.topbar {
  background: var(--primary-dark);
  color: #fff;
  font-size: 13px;
  padding: 6px 0;
}
.topbar a { color: rgba(255,255,255,.8); }
.topbar a:hover { color: #fff; }

/* ---- Navbar ---- */
.navbar-main {
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar-brand-logo { height: 52px; }
.navbar-brand-text { color: #fff !important; font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.navbar-main .nav-link {
  color: rgba(255,255,255,.9) !important;
  font-weight: 500;
  padding: .6rem 1rem;
  border-radius: 6px;
  transition: background .2s;
}
.navbar-main .nav-link:hover,
.navbar-main .nav-link.active { background: rgba(255,255,255,.15); color: #fff !important; }
.navbar-main .dropdown-menu { border: none; box-shadow: var(--shadow-lg); border-radius: var(--radius); }
.navbar-main .dropdown-item { padding: .65rem 1.25rem; font-size: .95rem; }
.navbar-main .dropdown-item:hover { background: var(--bg); color: var(--primary); }

/* ---- Hero ---- */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #0d2346 100%);
  color: #fff;
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-badge {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 30px;
  letter-spacing: .5px;
  margin-bottom: 16px;
}
.hero-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.3; margin-bottom: 16px; }
.hero-subtitle { font-size: 1.1rem; opacity: .9; max-width: 580px; }
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  transition: all .25s;
  text-decoration: none;
}
.hero-btn-gold { background: var(--gold); color: #fff; }
.hero-btn-gold:hover { background: var(--gold-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,169,81,.4); }
.hero-btn-outline { border: 2px solid rgba(255,255,255,.7); color: #fff; }
.hero-btn-outline:hover { background: rgba(255,255,255,.1); color: #fff; transform: translateY(-2px); }

/* ---- Quick Links ---- */
.quick-links-section { padding: 60px 0; }
.quick-card {
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all .25s;
  box-shadow: var(--shadow);
  height: 100%;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.quick-card:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  color: var(--primary);
}
.quick-card-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 16px;
}
.quick-card-icon.blue { background: rgba(26,75,140,.1); color: var(--primary); }
.quick-card-icon.gold { background: rgba(200,169,81,.1); color: var(--gold-dark); }
.quick-card-icon.green { background: rgba(46,125,50,.1); color: var(--accent); }
.quick-card-icon.red  { background: rgba(198,40,40,.1); color: var(--danger); }
.quick-card h4 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.quick-card p  { font-size: .87rem; color: var(--text-muted); margin: 0; }

/* ---- Section Titles ---- */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 32px;
}
.section-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 48px; height: 3px;
  background: var(--gold);
  border-radius: 2px;
}
.section-title.centered { text-align: center; }
.section-title.centered::after { left: 50%; transform: translateX(-50%); }

/* ---- Category Cards ---- */
.cat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
  transition: all .25s;
  text-decoration: none;
  color: var(--text);
  display: block;
  height: 100%;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--primary); }
.cat-card-code { font-size: .8rem; font-weight: 700; color: var(--primary); letter-spacing: 1px; text-transform: uppercase; }
.cat-card-name { font-size: 1.05rem; font-weight: 600; margin: 6px 0; }
.cat-card-count { font-size: .85rem; color: var(--text-muted); }

/* ---- News Cards ---- */
.news-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all .25s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.news-card-img { height: 180px; object-fit: cover; width: 100%; background: var(--bg); }
.news-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-card-date { font-size: .8rem; color: var(--text-muted); margin-bottom: 8px; }
.news-card-title { font-weight: 600; font-size: 1rem; color: var(--text); line-height: 1.4; flex: 1; }
.news-card-title a { color: inherit; }
.news-card-title a:hover { color: var(--primary); }

/* ---- Document List ---- */
.doc-table th { background: var(--primary); color: #fff; white-space: nowrap; }
.doc-table .badge-pdf    { background: #e53935; }
.doc-table .badge-docx   { background: #1565c0; }
.doc-table .badge-xlsx   { background: #2e7d32; }
.doc-table .badge-pptx   { background: #ef6c00; }
.doc-table .badge-zip    { background: #6a1b9a; }
.doc-table .badge-img    { background: #00838f; }
.doc-table .badge-other  { background: #757575; }

/* ---- Breadcrumb ---- */
.breadcrumb-section {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.breadcrumb { margin: 0; font-size: .88rem; }
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-muted); }

/* ---- EIT Banner ---- */
.eit-banner {
  background: linear-gradient(120deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin: 48px 0;
}
.eit-banner h3 { font-weight: 700; margin-bottom: 8px; }
.eit-banner-btn { background: #fff; color: var(--gold-dark); font-weight: 700; border-radius: 50px; padding: 10px 28px; transition: all .2s; }
.eit-banner-btn:hover { background: var(--primary); color: #fff; }

/* ---- FAQ ---- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  padding: 18px 0;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  transition: color .2s;
}
.faq-question:hover { color: var(--primary); }
.faq-answer { padding-bottom: 18px; color: var(--text-muted); line-height: 1.8; }

/* ---- Complaint ---- */
.channel-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 4px solid var(--primary);
  transition: transform .2s;
}
.channel-card:hover { transform: translateY(-4px); }
.channel-card .icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 16px; }

/* ---- Links Page ---- */
.link-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
  transition: all .2s;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.link-card:hover { border-left-color: var(--primary); transform: translateX(4px); color: var(--primary); }

/* ---- Indicators sidebar ---- */
.indicator-nav {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.indicator-nav-header {
  background: var(--primary);
  color: #fff;
  padding: 14px 20px;
  font-weight: 600;
  font-size: .95rem;
}
.indicator-nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: .9rem;
  transition: background .15s;
  text-decoration: none;
}
.indicator-nav a:hover { background: var(--bg); color: var(--primary); }
.indicator-nav a.active { background: rgba(26,75,140,.07); color: var(--primary); font-weight: 600; }
.indicator-nav .badge { background: var(--primary); color: #fff; font-size: .72rem; border-radius: 12px; padding: 2px 8px; }

/* ---- Alerts ---- */
.alert { border-radius: var(--radius); border: none; font-size: .93rem; }

/* ---- Buttons ---- */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }

/* ---- Footer ---- */
.footer-main {
  background: var(--primary-dark);
  color: rgba(255,255,255,.85);
  padding: 48px 0 24px;
  margin-top: 60px;
}
.footer-main h5 { color: var(--gold); font-weight: 700; margin-bottom: 16px; }
.footer-main a { color: rgba(255,255,255,.75); font-size: .9rem; }
.footer-main a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  margin-top: 36px;
  padding-top: 20px;
  font-size: .85rem;
  text-align: center;
  color: rgba(255,255,255,.5);
}

/* ---- Search Bar ---- */
.search-bar {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

/* ---- Utility ---- */
.text-primary { color: var(--primary) !important; }
.text-gold    { color: var(--gold) !important; }
.bg-primary-subtle { background: rgba(26,75,140,.07); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-section { padding: 50px 0 40px; }
  .hero-title   { font-size: 1.6rem; }
  .eit-banner   { padding: 24px 20px; }
  .quick-card   { padding: 20px 16px; }
}
