/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* Color Variables and Theme Setup */
:root {
  --primary: #2560a9;
  --primary-dark: #1a4a8a;
  --primary-light: #3a7bc8;
  --accent: #f6c730;
  --accent-dark: #e0b020;
  --white: #ffffff;
  --light-bg: #f4f7fb;
  --border: #dee2e6;
  --text-main: #212529;
  --text-muted: #6c757d;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
}

/* Accessibility Font Adjustments */
html.font-size-sm {
  font-size: 14px;
}

html.font-size-md {
  font-size: 16px;
}

html.font-size-lg {
  font-size: 18px;
}

body {
  font-family: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
  color: var(--text-main);
  background-color: #f8fafc;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Common Styles */
a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

.bg-primary-custom {
  background-color: var(--primary);
}

.bg-primary-dark-custom {
  background-color: var(--primary-dark);
}

.text-accent {
  color: var(--accent);
}

.text-primary-custom {
  color: var(--primary);
}

.btn-accent {
  background-color: var(--accent);
  color: var(--primary-dark);
  font-weight: 600;
  border: none;
  transition: var(--transition);
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-sm);
}

.btn-accent:hover {
  background-color: var(--accent-dark);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-primary-custom {
  background-color: var(--primary);
  color: var(--white);
  font-weight: 600;
  border: none;
  transition: var(--transition);
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-sm);
}

.btn-primary-custom:hover {
  background-color: var(--primary-dark);
  color: var(--white);
}

.section-padding {
  padding: 60px 0;
}

.section-title {
  position: relative;
  margin-bottom: 2.5rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 60px;
  height: 4px;
  background-color: var(--accent);
  border-radius: 2px;
}

.section-title.center-title {
  text-align: center;
}

.section-title.center-title::after {
  left: 50%;
  transform: translateX(-50%);
}

/* 1. TOP BAR */
.top-bar {
  height: 36px;
  background-color: var(--primary-dark);
  color: var(--white);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
}

.top-bar a {
  color: rgba(255, 255, 255, 0.9);
}

.top-bar a:hover {
  color: var(--accent);
}

.top-bar .social-icons a {
  margin-left: 10px;
}

.top-bar .font-adjuster button {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  font-size: 0.75rem;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: 3px;
  transition: var(--transition);
}

.top-bar .font-adjuster button:hover,
.top-bar .font-adjuster button.active {
  background-color: var(--accent);
  color: var(--primary-dark);
  border-color: var(--accent);
}

/* 2. HEADER */
#mainHeader {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

#mainHeader.header-scrolled {
  box-shadow: var(--shadow-md);
}

.logo-title-sub {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 3px;
  line-height: 1.2;
}

.logo-title-main {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0;
  line-height: 1.2;
}

.search-box-container {
  max-width: 400px;
  width: 100%;
}

.search-box-container .form-control {
  border-radius: 20px 0 0 20px;
  border-color: var(--border);
}

.search-box-container .btn {
  border-radius: 0 20px 20px 0;
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.search-box-container .btn:hover {
  background-color: var(--primary-dark);
}

.quick-links-zone .btn {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Search Overlay */
#searchOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 74, 138, 0.95);
  z-index: 1060;
  align-items: center;
  justify-content: center;
}

#searchOverlay .search-modal-content {
  width: 80%;
  max-width: 600px;
  position: relative;
}

#searchOverlay .close-search-btn {
  position: absolute;
  right: 0;
  top: -50px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition);
}

#searchOverlay .close-search-btn:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

#searchOverlay input {
  background: transparent;
  border: none;
  border-bottom: 3px solid var(--white);
  color: var(--white);
  font-size: 1.8rem;
  padding: 10px;
  width: 100%;
  text-align: center;
  transition: var(--transition);
}

#searchOverlay input:focus {
  outline: none;
  border-color: var(--accent);
}

#searchOverlay input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* 3. NAVBAR */
.navbar-custom {
  background-color: var(--primary);
  padding: 0;
}

.navbar-custom .navbar-nav .nav-link {
  color: var(--white) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 15px 18px !important;
  position: relative;
}

.navbar-custom .navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background-color: var(--accent);
  transition: var(--transition);
  transform: translateX(-50%);
  border: none;
}

.navbar-custom .navbar-nav .nav-link:hover::after {
  width: 100%;
}

.navbar-custom .navbar-nav .nav-item.active .nav-link,
.navbar-custom .navbar-nav .nav-link.active {
  background-color: var(--accent) !important;
  color: var(--primary-dark) !important;
}

.navbar-custom .navbar-nav .nav-item.active .nav-link::after,
.navbar-custom .navbar-nav .nav-link.active::after {
  display: none;
}

.navbar-custom .dropdown-menu {
  border: none;
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  margin-top: 0;
}

.navbar-custom .dropdown-item {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 20px;
  color: var(--text-main);
}

.navbar-custom .dropdown-item:hover {
  background-color: var(--light-bg);
  color: var(--primary);
  padding-left: 25px;
}

/* Off-canvas menu styles */
#mobileNav {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background-color: var(--white);
  box-shadow: var(--shadow-lg);
  z-index: 1050;
  transition: var(--transition);
  overflow-y: auto;
  padding: 20px;
}

#mobileNav.active {
  left: 0;
}

#mobileNav .mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

#mobileNav .nav-link {
  color: var(--text-main);
  padding: 12px 10px;
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: block;
}

#mobileNav .nav-link:hover,
#mobileNav .nav-link.active {
  background-color: var(--light-bg);
  color: var(--primary);
  border-left: 4px solid var(--accent);
  padding-left: 14px;
}

#mobileNav .dropdown-container {
  display: none;
  background-color: #f8fafc;
  padding-left: 15px;
}

#mobileNav .dropdown-item-mobile {
  display: block;
  padding: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

#mobileNav .dropdown-item-mobile:hover {
  color: var(--primary);
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1045;
}

.mobile-overlay.active {
  display: block;
}

/* 4. HERO BANNER */
.hero-carousel {
  height: 500px;
}

.hero-carousel .carousel-item {
  height: 500px;
  position: relative;
  background-color: #000;
}

.hero-carousel .carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.hero-carousel .carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(37, 96, 169, 0.7), rgba(26, 74, 138, 0.4));
}

/* Container wrapper to center caption absolutely over cover image */
.carousel-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.carousel-container .carousel-caption {
  pointer-events: auto;
}

.hero-carousel .carousel-caption {
  text-align: left;
  left: 15px;
  right: auto;
  width: calc(100% - 30px);
  bottom: 20%;
  z-index: 10;
  /* max-width: 800px; */
  padding: 0;
}

.hero-carousel .badge-tag {
  background-color: var(--accent);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 1rem;
  display: inline-block;
  text-transform: uppercase;
}

.hero-carousel .carousel-caption h2 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 5. SERVICES GRID */
.bg-services-section {
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f6 100%);
  border-bottom: 1px solid var(--border);
}

.service-card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.service-card .icon-wrapper {
  width: 70px;
  height: 70px;
  background-color: var(--light-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-size: 1.8rem;
  transition: var(--transition);
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-bottom: 4px solid var(--accent);
}

.service-card:hover .icon-wrapper {
  background-color: var(--primary);
  color: var(--white);
  transform: rotateY(360deg);
}

/* 6. STATISTICS COUNTER */
.stats-counter-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 60px 0;
  position: relative;
}

.counter-box {
  text-align: center;
}

.counter-box .icon-box {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.counter-box .counter-value {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -1px;
}

.counter-box p {
  font-size: 1.05rem;
  font-weight: 500;
  opacity: 0.9;
  margin-bottom: 0;
}

/* 7. NEWS HIGHLIGHTS */
.news-tabs {
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
}

.news-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 20px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.news-tab:hover,
.news-tab.active {
  color: var(--primary);
}

.news-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary);
}

.news-featured-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
}

.news-featured-card .img-wrapper {
  height: 300px;
  overflow: hidden;
  position: relative;
}

.news-featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.news-featured-card:hover img {
  transform: scale(1.05);
}

.news-featured-card .card-body {
  padding: 2rem;
}

.news-featured-card .cat-badge {
  background-color: var(--primary-light);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 1rem;
}

.news-featured-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.news-featured-card h3 a {
  color: var(--primary-dark);
}

.news-featured-card h3 a:hover {
  color: var(--primary);
}

.news-featured-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.news-featured-card:hover {
  box-shadow: var(--shadow-md);
}

.news-list-item {
  background-color: var(--white);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 0;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1.25rem;
  transition: var(--transition);
}

.news-list-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.news-list-item .item-img-wrapper {
  width: 120px;
  height: 95px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.news-list-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-list-item .item-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-list-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.news-list-item h4 a {
  color: var(--text-main);
}

.news-list-item h4 a:hover {
  color: var(--primary);
}

.news-list-item .meta-info {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sidebar-widget {
  background-color: var(--white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--primary);
}

.sidebar-widget h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--primary-dark);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.widget-list-item {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.88rem;
}

.widget-list-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.widget-list-item a {
  color: var(--text-main);
  font-weight: 500;
  display: block;
  line-height: 1.4;
}

.widget-list-item a:hover {
  color: var(--primary);
}

.widget-list-item .widget-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 5px;
}

/* 8. VIDEO GALLERY */
.video-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.video-card .video-thumb {
  position: relative;
  height: 200px;
  overflow: hidden;
  cursor: pointer;
}

.video-card .video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.video-card:hover .video-thumb img {
  transform: scale(1.05);
}

.video-card .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background-color: rgba(37, 96, 169, 0.9);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  padding-left: 4px;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.video-card:hover .play-btn {
  background-color: var(--accent);
  color: var(--primary-dark);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-card .card-body {
  padding: 1.25rem;
}

.video-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0;
}

.video-card h4 a {
  color: var(--text-main);
}

.video-card h4 a:hover {
  color: var(--primary);
}

#videoModal .modal-content {
  background-color: #000;
  border: none;
}

#videoModal .modal-header {
  border-bottom: none;
  padding: 10px;
}

#videoModal .btn-close {
  filter: invert(1);
}

#videoModal .modal-body {
  padding: 0;
}

#videoModal iframe {
  width: 100%;
  height: 450px;
  border: none;
}

/* 9. EXECUTIVE DOCUMENTS */
.document-table {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.document-table th {
  background-color: var(--primary);
  color: var(--white);
  font-weight: 600;
  border: none;
  font-size: 0.9rem;
}

.document-table td {
  padding: 15px;
  vertical-align: middle;
  font-size: 0.88rem;
  border-color: #f1f5f9;
}

.document-table tr:hover td {
  background-color: var(--light-bg);
}

.document-table .download-link {
  color: #dc3545;
  font-size: 1.1rem;
}

.document-table .download-link:hover {
  color: #a71d2a;
}

.schedule-widget {
  background-color: var(--white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--accent);
}

.schedule-widget h4 {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1.25rem;
}

.schedule-item {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.88rem;
}

.schedule-item:last-child {
  border-bottom: none;
}

.schedule-item .time {
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 3px;
}

/* 10. DATABASE & RESEARCH CARDS */
.research-card {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.research-card .card-head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.research-card .card-icon {
  font-size: 2.2rem;
  color: var(--primary);
}

.research-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0;
}

.research-card .stats-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
}

.research-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.research-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

/* 11. COMMUNITY INTERACTION */
.interaction-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
}

.interaction-card {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 2rem;
  height: 100%;
}

.interaction-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
}

.survey-options .form-check {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 12px 15px 12px 40px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.survey-options .form-check:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.survey-result-bar {
  display: none;
}

.survey-result-bar .progress {
  height: 12px;
  background-color: rgba(255, 255, 255, 0.2);
}

.survey-result-bar .progress-bar {
  background-color: var(--accent);
}

.interaction-card input,
.interaction-card textarea {
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
}

.interaction-card input:focus,
.interaction-card textarea:focus {
  background-color: var(--white);
  box-shadow: 0 0 0 0.25rem rgba(246, 199, 48, 0.25);
}

/* 12. PARTNER ECOSYSTEM */
.partner-logo-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  align-items: center;
}

.partner-logo-item {
  width: 160px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  filter: grayscale(1);
  opacity: 0.7;
  transition: var(--transition);
  cursor: pointer;
}

.partner-logo-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.partner-logo-item:hover {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.05);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-light);
}

/* 13. FOOTER */
footer {
  background-color: var(--primary-dark);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}

footer h4 {
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 10px;
}

footer h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background-color: var(--accent);
}

footer a {
  color: rgba(255, 255, 255, 0.8);
}

footer a:hover {
  color: var(--accent);
  padding-left: 5px;
}

footer .footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer .footer-links li {
  margin-bottom: 10px;
}

footer .qr-code {
  max-width: 100px;
  border-radius: 4px;
}

.footer-bottom {
  background-color: #123461;
  padding: 15px 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

/* 14. FLOATING ELEMENTS */
#backToTop {
  display: none;
  position: fixed;
  bottom: 85px;
  right: 25px;
  width: 45px;
  height: 45px;
  background-color: var(--accent);
  color: var(--primary-dark);
  border-radius: 50%;
  border: none;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  z-index: 999;
  cursor: pointer;
  transition: var(--transition);
}

#backToTop:hover {
  background-color: var(--accent-dark);
  transform: translateY(-3px);
}

.chatbot-bubble {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  cursor: pointer;
  transition: var(--transition);
}

.chatbot-bubble:hover {
  background-color: var(--primary-light);
  transform: scale(1.1);
}

/* Sub-page Specific Styles */

/* Blog Layout */
.breadcrumb-custom {
  background-color: var(--light-bg);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 2rem;
  font-size: 0.88rem;
}

.breadcrumb-custom a {
  font-weight: 500;
}

.news-grid-card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.news-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.news-grid-card .img-wrapper {
  height: 180px;
  overflow: hidden;
}

.news-grid-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.news-grid-card:hover img {
  transform: scale(1.05);
}

.news-grid-card .card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-grid-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.news-grid-card h3 a {
  color: var(--text-main);
}

.news-grid-card h3 a:hover {
  color: var(--primary);
}

.news-grid-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.news-grid-card .meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}

/* Blog Detail Page */
.detail-content {
  background-color: var(--white);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.detail-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.detail-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.3;
}

.detail-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.detail-meta-list i {
  color: var(--primary);
  margin-right: 5px;
}

.detail-body {
  font-size: 1.05rem;
  line-height: 1.8;
}

.detail-body p {
  margin-bottom: 1.5rem;
}

.detail-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

.detail-toc {
  background-color: var(--light-bg);
  border-left: 4px solid var(--primary);
  padding: 1.25rem;
  margin-bottom: 2rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.detail-toc h5 {
  font-weight: 700;
  margin-bottom: 10px;
}

.detail-toc ul {
  padding-left: 20px;
  margin-bottom: 0;
}

.detail-toc li {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.share-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.share-buttons a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  margin-left: 8px;
  font-size: 0.9rem;
}

.share-buttons .share-fb {
  background-color: #3b5998;
}

.share-buttons .share-zalo {
  background-color: #0068ff;
}

.share-buttons .share-tw {
  background-color: #1da1f2;
}

/* Document Layout */
.document-filter-box {
  background-color: var(--white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--accent);
}

.doc-meta-table th {
  width: 250px;
  background-color: var(--light-bg);
  font-weight: 700;
  color: var(--primary-dark);
}

/* Chatbot UI Modal */
.chatbot-chat-window {
  display: none;
  position: fixed;
  bottom: 85px;
  right: 25px;
  width: 380px;
  height: 500px;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
}

.chatbot-chat-window.active {
  display: flex;
}

.chatbot-chat-header {
  background-color: var(--primary);
  color: var(--white);
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-chat-header h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0;
}

.chatbot-chat-messages {
  flex-grow: 1;
  padding: 15px;
  overflow-y: auto;
  background-color: #f8fafc;
}

.chat-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.chat-msg.bot {
  background-color: var(--white);
  color: var(--text-main);
  border-bottom-left-radius: 2px;
  box-shadow: var(--shadow-sm);
  align-self: flex-start;
}

.chat-msg.user {
  background-color: var(--primary);
  color: var(--white);
  border-bottom-right-radius: 2px;
  align-self: flex-end;
  margin-left: auto;
}

.chatbot-chat-input-area {
  padding: 12px;
  border-top: 1px solid var(--border);
  background-color: var(--white);
  display: flex;
  gap: 8px;
}

.chatbot-chat-input-area input {
  flex-grow: 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 15px;
  font-size: 0.9rem;
}

.chatbot-chat-input-area input:focus {
  outline: none;
  border-color: var(--primary);
}

.chatbot-chat-input-area button {
  background-color: var(--primary);
  color: var(--white);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.chatbot-chat-input-area button:hover {
  background-color: var(--primary-dark);
}

/* Responsiveness adjustments */
@media (max-width: 1199px) {

  .hero-carousel,
  .hero-carousel .carousel-item {
    height: 400px;
  }

  .hero-carousel .carousel-caption h2 {
    font-size: 2.2rem;
  }
}

@media (max-width: 991px) {

  .hero-carousel,
  .hero-carousel .carousel-item {
    height: 350px;
  }

  .hero-carousel .carousel-caption h2 {
    font-size: 1.8rem;
  }

  .navbar-custom .navbar-nav .nav-link {
    padding: 10px 12px !important;
    font-size: 0.88rem;
  }

  .section-padding {
    padding: 40px 0;
  }
}

@media (max-width: 767px) {
  .top-bar {
    display: none !important;
  }

  .hero-carousel,
  .hero-carousel .carousel-item {
    height: 250px;
  }

  .hero-carousel .carousel-caption {
    left: 12px;
    right: auto;
    width: calc(100% - 24px);
    bottom: 10%;
  }

  .hero-carousel .carousel-caption h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }

  .hero-carousel .badge-tag {
    font-size: 0.7rem;
    padding: 4px 8px;
    margin-bottom: 0.5rem;
  }

  .hero-carousel .btn-accent {
    font-size: 0.8rem;
    padding: 0.35rem 1rem;
  }

  .news-list-item {
    flex-direction: column;
  }

  .news-list-item .item-img-wrapper {
    width: 100%;
    height: 180px;
  }

  .document-table th,
  .document-table td {
    padding: 8px;
    font-size: 0.8rem;
  }

  .chatbot-chat-window {
    width: 90%;
    right: 5%;
    bottom: 80px;
  }
}

/* ==========================================================================
   Homepage Custom Overrides (Moved from internal styles block)
   ========================================================================== */

/* 1. Tăng padding topbar */
.top-bar {
  height: auto !important;
  padding: 10px 0 !important;
}

/* 4. Ô tìm kiếm đổi hiệu ứng đẹp, mượt khi focus */
.search-box-container {
  max-width: 420px !important;
  transition: max-width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.search-box-container:focus-within {
  max-width: 450px !important;
}

.search-box-container .form-control {
  font-size: .85rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  border: 1px solid var(--border) !important;
  border-radius: 20px 0 0 20px !important;
  box-shadow: none !important;
  padding: .5rem .75rem .5rem 1.2rem;
}

.search-box-container .form-control:focus {
  border-color: var(--primary) !important;
  background-color: var(--white) !important;
  box-shadow: 0 4px 12px rgba(37, 96, 169, 0.15) !important;
}

.search-box-container .btn {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  border-radius: 0 20px 20px 0 !important;
}

.search-box-container .form-control:focus+.btn {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  color: var(--accent) !important;
}

/* 5. Button liên hệ, hỏi đáp, chatbot fix cho cân đối */
.quick-links-zone-btns {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quick-links-zone-btns .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 38px !important;
  padding: 0 16px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  border-radius: var(--radius-sm) !important;
  transition: var(--transition) !important;
  white-space: nowrap !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.quick-links-zone-btns .btn-outline-primary {
  border: 1.5px solid var(--primary) !important;
  color: var(--primary) !important;
  background: transparent !important;
}

.quick-links-zone-btns .btn-outline-primary:hover {
  background-color: var(--primary) !important;
  color: var(--white) !important;
}

.quick-links-zone-btns .btn-primary-custom {
  background-color: var(--primary) !important;
  color: var(--white) !important;
  border: none !important;
}

.quick-links-zone-btns .btn-primary-custom:hover {
  background-color: var(--primary-dark) !important;
}

/* 6. Text menu không bị xuống dòng bừa bãi, cân đối layout */
.navbar-custom .navbar-nav {
  width: 100% !important;
  display: flex !important;
  justify-content: space-between !important;
}

.navbar-custom .navbar-nav .nav-item {
  flex: 1 1 auto !important;
  text-align: center !important;
}

.navbar-custom .navbar-nav .nav-link {
  white-space: normal !important;
  text-align: center !important;
  font-size: 0.9rem !important;
  padding: 15px 8px !important;
  line-height: 1.3 !important;
  min-height: 52px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: var(--transition) !important;
}

/* Laptop screens adjustment */
@media (max-width: 1200px) {
  .navbar-custom .navbar-nav .nav-link {
    font-size: 0.82rem !important;
    padding: 12px 4px !important;
  }
}

/* Logo image and EN button custom classes to avoid inline style css */
.logo-img {
  height: 65px !important;
  width: auto !important;
  object-fit: contain !important;
}

.lang-selector-btn {
  font-size: 0.75rem !important;
}

/* Desktop Dropdown Hover menu support */
@media (min-width: 992px) {
  .navbar-custom .nav-item.dropdown:hover .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }

  .navbar-custom .nav-item.dropdown .dropdown-menu {
    display: block !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(8px) !important;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  }
}

/* Footer Custom Styles to avoid inline style attributes */
.logo-title-sub-footer {
  font-size: 1.1rem !important;
  letter-spacing: 0.5px !important;
  margin-bottom: 6px;
}

.logo-title-main-footer {
  font-size: 1.1rem !important;
}

.footer-social-btn {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

.qr-title {
  font-size: 0.85rem !important;
}

.qr-desc {
  font-size: 0.75rem !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

/* ==========================================================================
   Partner Carousel Custom Layout
   ========================================================================== */
.partner-carousel-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 10px 0;
}

.partner-carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  width: max-content;
}

.partner-carousel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  box-sizing: border-box;
  text-align: center;
}

.partner-logo-box {
  width: 160px;
  height: 80px;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  padding: 10px;
}

.partner-logo-box img {
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  transition: var(--transition) !important;
}

.partner-carousel-item:hover .partner-logo-box {
  opacity: 1;
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.partner-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 12px;
  margin-bottom: 0;
  transition: var(--transition);
}

.partner-carousel-item:hover .partner-name {
  color: var(--primary-dark);
}

.bg-light-custom-gray {
  background-color: var(--light-bg);
}

/* Partner Carousel Navigation Wrapper and Buttons */
.partner-carousel-wrapper {
  position: relative;
  width: 100%;
}

.partner-carousel-btn {
  display: none !important;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--white);
  border: 1px solid var(--border);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  z-index: 10;
  transition: var(--transition);
}

.partner-carousel-btn:hover {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.partner-carousel-btn.prev {
  left: -20px;
}

.partner-carousel-btn.next {
  right: -20px;
}

/* Responsive adjustment for controls layout */
@media (max-width: 1200px) {
  .partner-carousel-btn.prev {
    left: -10px;
  }

  .partner-carousel-btn.next {
    right: -10px;
  }
}

@media (max-width: 767px) {
  .partner-carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .partner-carousel-btn.prev {
    left: -5px;
  }

  .partner-carousel-btn.next {
    right: -5px;
  }
}