/* ========== FONTS ========== */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

/* ========== CSS VARIABLES ========== */
:root {
  --primary: #1a3a5c;
  --primary-dark: #0d2137;
  --primary-light: #2a5a8c;
  --accent: #c8102e;
  --accent-dark: #a00d24;
  --gold: #d4a843;
  --gold-light: #f0d78c;
  --bg-light: #f4f6f8;
  --bg-white: #ffffff;
  --text-dark: #1a1a2e;
  --text-body: #333;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
  --radius: 6px;
  --transition: .3s ease;
}

/* ========== RESET ========== */
* { box-sizing: border-box; }
body {
  font-family: 'Roboto', sans-serif;
  color: var(--text-body);
  background: var(--bg-light);
  margin: 0;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }

/* ========== TOP BAR ========== */
.top-bar {
  background: var(--primary-dark);
  color: rgba(255,255,255,.8);
  font-size: .8rem;
  padding: 6px 0;
}
.top-bar a { color: rgba(255,255,255,.8); }
.top-bar a:hover { color: var(--gold); }
.top-bar .bi { margin-right: 4px; }

/* ========== HEADER ========== */
.site-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 16px 0;
  position: relative;
}
.site-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent));
}
.header-logo { display: flex; align-items: center; gap: 14px; }
.header-logo img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.3)); }
.header-logo .site-title { color: #fff; }
.header-logo .site-title h1 { font-size: 1.35rem; font-weight: 700; margin: 0; text-transform: uppercase; letter-spacing: .5px; text-shadow: 0 1px 4px rgba(0,0,0,.3); }
.header-logo .site-title p { font-size: .82rem; margin: 2px 0 0; opacity: .85; }
.header-search .form-control {
  border: none; border-radius: 20px; padding: 8px 16px;
  font-size: .85rem; background: rgba(255,255,255,.15); color: #fff;
}
.header-search .form-control::placeholder { color: rgba(255,255,255,.6); }
.header-search .form-control:focus { background: rgba(255,255,255,.25); box-shadow: none; color: #fff; }
.header-search .btn { border-radius: 20px; background: var(--accent); border: none; color: #fff; padding: 8px 16px; }
.header-search .btn:hover { background: var(--accent-dark); }

/* ========== NAVIGATION ========== */
.main-nav {
  background: var(--accent);
  position: sticky; top: 0; z-index: 1030;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.main-nav .navbar { padding: 0; }
.main-nav .nav-link {
  color: #fff !important;
  font-weight: 500;
  font-size: .88rem;
  padding: 12px 16px !important;
  text-transform: uppercase;
  letter-spacing: .3px;
  transition: background var(--transition);
  position: relative;
}
.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  background: rgba(0,0,0,.2);
}
.main-nav .nav-link::after { display: none; }
.main-nav .dropdown-menu {
  border: none; border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0; min-width: 240px;
  border-top: 3px solid var(--gold);
}
.main-nav .dropdown-item {
  padding: 10px 18px; font-size: .85rem;
  border-bottom: 1px solid #f0f0f0;
}
.main-nav .dropdown-item:hover { background: var(--bg-light); color: var(--accent); }
.main-nav .navbar-toggler { border-color: rgba(255,255,255,.5); }
.main-nav .navbar-toggler-icon { filter: brightness(10); }

/* ========== HERO / CAROUSEL ========== */
.hero-carousel {
  background: var(--bg-light);
  padding: 20px 0;
}
.hero-carousel .carousel {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-carousel .carousel-item img { width: 100%; height: 380px; object-fit: cover; display: block; }
.hero-carousel .carousel-caption {
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  bottom: 0; left: 0; right: 0; padding: 24px 30px 20px;
  text-align: left; border-radius: 0;
}
.hero-carousel .carousel-caption h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.hero-carousel .carousel-caption p { font-size: .88rem; opacity: .9; margin: 0; }
.hero-carousel .carousel-indicators button { width: 10px; height: 10px; border-radius: 50%; }

/* ========== SECTION HEADINGS ========== */
.section-heading {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; border-bottom: 2px solid var(--accent);
  padding-bottom: 10px;
  flex-wrap: wrap;
  clear: both;
}
.section-heading h2 {
  font-size: 1.15rem; font-weight: 700;
  color: var(--accent); text-transform: uppercase;
  margin: 0; letter-spacing: .3px;
  flex-shrink: 0;
}
.section-heading .bi { font-size: 1.3rem; color: var(--accent); flex-shrink: 0; }
.section-heading .view-all {
  margin-left: auto; font-size: .82rem;
  color: var(--primary); font-weight: 500;
  white-space: nowrap; flex-shrink: 0;
}

/* ========== NEWS CARDS ========== */
a.text-decoration-none {
  display: block;
}
.news-card {
  background: #fff; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.news-card .card-img { width: 100%; height: 200px; object-fit: cover; display: block; }
.news-card .card-body { padding: 14px; }
.news-card .card-title {
  font-size: .92rem; font-weight: 600; line-height: 1.4;
  color: var(--text-dark);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin: 0;
}
.news-card .card-title:hover { color: var(--accent); }
.news-card .card-date { font-size: .78rem; color: var(--text-muted); margin-top: 8px; }
.news-card .card-date .bi { margin-right: 4px; }

/* Featured card */
.news-card-featured .card-img { height: 280px; }
.news-card-featured .card-title { font-size: 1.1rem; -webkit-line-clamp: 2; }

/* Horizontal news item */
.news-item-hz {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid #eee;
}
.news-item-hz img { width: 110px; height: 75px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.news-item-hz .news-info h4 {
  font-size: .85rem; font-weight: 600; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  color: var(--text-dark); line-height: 1.4;
}
.news-item-hz .news-info h4:hover { color: var(--accent); }
.news-item-hz .news-info .date { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

/* News list item */
.news-list-item {
  padding: 8px 0; border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: flex-start; gap: 8px;
}
.news-list-item::before {
  content: ''; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
  flex-shrink: 0; margin-top: 8px;
}
.news-list-item a {
  font-size: .85rem; color: var(--text-dark); line-height: 1.5;
}
.news-list-item a:hover { color: var(--accent); }

/* ========== SIDEBAR ========== */
.sidebar-box {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden;
}
.sidebar-box .box-header {
  background: var(--primary);
  color: #fff; padding: 12px 16px;
  font-weight: 700; font-size: .92rem;
  text-transform: uppercase;
}
.sidebar-box .box-body { padding: 14px; }

/* ========== BREADCRUMB ========== */
.breadcrumb-section {
  background: #fff; border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
}
.breadcrumb-section .breadcrumb { margin: 0; font-size: .82rem; }
.breadcrumb-section .breadcrumb-item a { color: var(--primary); }
.breadcrumb-section .breadcrumb-item.active { color: var(--text-muted); }

/* ========== ARTICLE DETAIL ========== */
.article-detail { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.article-detail .article-title { font-size: 1.5rem; font-weight: 700; color: var(--text-dark); margin-bottom: 12px; line-height: 1.4; }
.article-detail .article-meta { font-size: .82rem; color: var(--text-muted); margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.article-detail .article-meta .bi { margin-right: 4px; }
.article-detail .article-desc { font-weight: 600; font-size: 1rem; line-height: 1.7; margin-bottom: 20px; }
.article-detail .article-content { font-size: .95rem; line-height: 1.8; }
.article-detail .article-content p { margin-bottom: 14px; }
.article-detail .article-content img { border-radius: var(--radius); margin: 16px 0; }
.article-tags { margin-top: 24px; padding-top: 16px; border-top: 1px solid #eee; }
.article-tags .badge { font-weight: 500; padding: 6px 12px; margin-right: 6px; margin-bottom: 6px; }

/* ========== CATEGORY PAGE ========== */
.category-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 30px 0; color: #fff;
}
.category-header h1 { font-size: 1.5rem; font-weight: 700; text-transform: uppercase; margin: 0; }
.pagination .page-link { color: var(--primary); border-radius: 4px; margin: 0 2px; }
.pagination .page-item.active .page-link { background: var(--accent); border-color: var(--accent); }

/* ========== TTHC (Admin Procedures) ========== */
.tthc-field-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
  text-align: center; transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
}
.tthc-field-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.tthc-field-card .icon-wrap {
  width: 70px; height: 70px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; color: #fff; font-size: 1.8rem;
}
.tthc-field-card h4 { font-size: .92rem; font-weight: 600; color: var(--text-dark); }
.tthc-field-card .count { font-size: .8rem; color: var(--text-muted); }

.tthc-list-item {
  background: #fff; padding: 16px 20px;
  border-left: 4px solid var(--primary);
  margin-bottom: 10px; border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
  transition: border-color var(--transition);
}
.tthc-list-item:hover { border-left-color: var(--accent); }
.tthc-list-item h5 { font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.tthc-list-item h5 a { color: var(--text-dark); }
.tthc-list-item h5 a:hover { color: var(--accent); }
.tthc-list-item .tthc-meta { font-size: .78rem; color: var(--text-muted); }

.tthc-detail-box {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.tthc-detail-box .detail-header {
  background: var(--primary); color: #fff;
  padding: 18px 24px;
}
.tthc-detail-box .detail-header h2 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.tthc-detail-box .detail-body { padding: 24px; }
.tthc-detail-box .detail-body table th {
  background: var(--bg-light); font-weight: 600;
  width: 200px; vertical-align: top; font-size: .88rem;
}
.tthc-detail-box .detail-body table td { font-size: .88rem; }

/* ========== ABOUT / INTRO ========== */
.intro-content { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.intro-content h2 { color: var(--primary); font-size: 1.3rem; font-weight: 700; margin: 20px 0 12px; }
.intro-content p { line-height: 1.8; }
.leader-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  text-align: center; transition: transform var(--transition);
}
.leader-card:hover { transform: translateY(-4px); }
.leader-card img { width: 100%; height: 260px; object-fit: cover; }
.leader-card .leader-info { padding: 14px; }
.leader-card .leader-info h5 { font-size: .95rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.leader-card .leader-info p { font-size: .82rem; color: var(--text-muted); margin: 0; }

/* ========== QUICK LINKS BAR ========== */
.quick-links {
  background: var(--bg-light);
  padding: 0 0 10px;
}
.quick-links .container .row {
  background: var(--primary);
  border-radius: var(--radius);
  padding: 10px 0;
  box-shadow: var(--shadow);
}
.quick-link-item {
  display: flex; align-items: center; gap: 10px;
  color: #fff; padding: 8px 14px;
  border-radius: var(--radius);
  transition: background var(--transition);
  font-size: .85rem; font-weight: 500;
}
.quick-link-item:hover { background: rgba(255,255,255,.1); color: var(--gold); }
.quick-link-item .bi { font-size: 1.3rem; color: var(--gold); }

/* ========== TICKER ========== */
.news-ticker {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0; overflow: hidden;
}
.ticker-label {
  background: var(--accent); color: #fff;
  padding: 6px 16px; font-weight: 700;
  font-size: .82rem; text-transform: uppercase;
  white-space: nowrap; border-radius: 0 var(--radius) var(--radius) 0;
}
.ticker-content {
  overflow: hidden; white-space: nowrap;
  position: relative;
}
.ticker-content .ticker-scroll {
  display: inline-block;
  animation: ticker 30s linear infinite;
}
.ticker-content .ticker-scroll a {
  padding: 0 30px; font-size: .85rem; font-weight: 500;
}
@keyframes ticker {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ========== FOOTER ========== */
.site-footer {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: rgba(255,255,255,.85);
  padding: 40px 0 0;
}
.site-footer h5 { color: var(--gold); font-size: .95rem; font-weight: 700; margin-bottom: 16px; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { padding: 4px 0; }
.site-footer ul li a { color: rgba(255,255,255,.75); font-size: .85rem; }
.site-footer ul li a:hover { color: var(--gold); }
.site-footer .footer-contact p { font-size: .85rem; margin-bottom: 6px; }
.site-footer .footer-contact .bi { color: var(--gold); margin-right: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  margin-top: 30px; padding: 16px 0;
  font-size: .8rem; text-align: center;
}

/* ========== STATS BAR ========== */
.stats-bar { background: var(--primary-dark); padding: 24px 0; }
.stat-item { text-align: center; color: #fff; }
.stat-item .stat-number { font-size: 2rem; font-weight: 900; color: var(--gold); }
.stat-item .stat-label { font-size: .82rem; opacity: .8; margin-top: 4px; }

/* ========== SCROLL TO TOP ========== */
.scroll-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 50%;
  font-size: 1.2rem; cursor: pointer;
  opacity: 0; visibility: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
}
.scroll-top.show { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--accent-dark); transform: translateY(-2px); }

/* ========== RESPONSIVE ========== */
@media (max-width: 991px) {
  .hero-carousel .carousel-item img { height: 280px; }
  .header-logo img { width: 48px; height: 48px; }
  .header-logo .site-title h1 { font-size: 1rem; }
  .main-nav .nav-link { padding: 10px 14px !important; font-size: .82rem; }
}
@media (max-width: 767px) {
  .hero-carousel .carousel-item img { height: 200px; }
  .hero-carousel .carousel-caption h3 { font-size: 1rem; }
  .news-item-hz img { width: 90px; height: 62px; }
  .article-detail { padding: 18px; }
  .article-detail .article-title { font-size: 1.2rem; }
  .tthc-detail-box .detail-body table th { width: 120px; }
  .top-bar .text-end { display: none; }
}
