﻿/* ==========================================================================
   CỔNG THÔNG TIN ĐIỆN TỬ
   TRUNG TÂM HỌC TẬP CỘNG ĐỒNG & PHÒNG VĂN HÓA - XÃ HỘI XÃ QUẢNG ĐỨC
   Tên miền phụ: phongvhxhquangduc807.mbws.vn
   Hệ thống Typography chuẩn: Be Vietnam Pro & Montserrat & Gilroy
   Khắc phục 100% lỗi dấu tiếng Việt
   ========================================================================== */

@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;0,900;1,400;1,700&family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,700&family=Roboto:wght@300;400;500;700&display=swap');
/* ==========================================================================
   ĐỊNH NGHĨA BỘ FONT GILROY
   ========================================================================== */
@font-face {
  font-family: 'Gilroy';
  src: url('../assets/font/Gilroy-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('../assets/font/Gilroy-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('../assets/font/Gilroy-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('../assets/font/Gilroy-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('../assets/font/Gilroy-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('../assets/font/Gilroy-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}


/* === MERGED BASE DEMO CSS === */
﻿/* ==========================================================================
   DỰNG MẪU DEMO - CỔNG THÔNG TIN ĐIỆN TỬ
   TRUNG TÂM HỌC TẬP CỘNG ĐỒNG XÃ QUẢNG ĐỨC
   Tên miền phụ: phongvhxhquangduc807.mbws.vn
   Quy tắc: Chỉnh sửa trực tiếp tại file CSS này (KHÔNG dùng SCSS)
   ========================================================================== */

:root {
  --primary-red: #da251d;
  --secondary-red: #ba1c15;
  --dark-red: #991b1b;
  --accent-gold: #ffde00;
  --gold-dark: #d4a017;
  --portal-blue: #0056b3;
  --portal-darkblue: #0b3c6d;
  --portal-green: #198754;
  --portal-bg: #f4f6f9;
  --portal-border: #e2e8f0;
  --text-main: #212529;
  --text-muted: #64748b;
  --font-base-size: 16px;
}

html {
  font-size: var(--font-base-size);
  scroll-behavior: smooth;
}

body {
  font-family: 'Be Vietnam Pro', 'Montserrat', 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-main);
  background-color: var(--portal-bg);
  line-height: 1.6;
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Be Vietnam Pro', 'Montserrat', 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.font-serif-title {
  font-family: 'Be Vietnam Pro', 'Montserrat', 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   TOPBAR UTILITY & GOVERNMENT RIBBON
   ========================================================================== */
.ribbon-bar {
  background: linear-gradient(90deg, #c01313 0%, #da251d 35%, #e63946 50%, #da251d 65%, #c01313 100%);
  position: relative;
  box-shadow: 0 2px 8px rgba(218, 37, 29, 0.3);
}

.ribbon-bar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ffb703 0%, #ffde00 50%, #ffb703 100%);
}

/* ==========================================================================
   PANORAMIC BANNER HEADER (THEO MẪU ẢNH 2 - XÃ THANH AN / QUẢNG ĐỨC)
   - Trống đồng tách nền trong suốt nằm bên trái
   - Phía bên phải: Slider ảnh đổi sau mỗi 3 giây
   - Đường cong lượn trắng phân tách giữa chữ và ảnh
   - Nền màu đỏ chủ đạo chuẩn Cổng TTĐT
   ========================================================================== */
#site-header {
  background: linear-gradient(135deg, #881337 0%, #991b1b 35%, #b91c1c 70%, #7f1d1d 100%);
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid #f59e0b;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#header-banner-container {
  display: flex;
  position: relative;
  min-height: 165px;
  width: 100%;
}

/* Khối bên trái: Chứa Logo, Tiêu đề, và Trống đồng trong suốt */
#header-banner-left {
  flex: 1 1 60%;
  position: relative;
  display: flex;
  align-items: center;
  padding: 18px 24px;
  z-index: 5;
}

#header-trong-dong-watermark {
  position: absolute;
  top: 50%;
  left: 24px;
  transform: translateY(-50%);
  width: 440px;
  height: 440px;
  background-image: url('../assets/images/trong-dong-transparent.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.32;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 0 14px rgba(255, 222, 0, 0.45));
  animation: drumRotateSlow 160s linear infinite;
  will-change: transform;
}

@keyframes drumRotateSlow {
  from { transform: translateY(-50%) rotate(0deg); }
  to { transform: translateY(-50%) rotate(360deg); }
}

/* Khối bên phải: Slider ảnh đổi sau mỗi 3 giây (Theo mẫu ảnh 2) */
#header-banner-right {
  flex: 0 0 40%;
  position: relative;
  overflow: hidden;
  min-height: 165px;
  clip-path: polygon(12% 0%, 100% 0%, 100% 100%, 0% 100%);
}

/* Đường viền trắng chéo/lượn sóng phân tách chữ và ảnh theo mẫu ảnh 2 */
#header-banner-right::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  clip-path: polygon(12% 0%, 14.5% 0%, 2.5% 100%, 0% 100%);
  background: #ffffff;
  z-index: 10;
  pointer-events: none;
}

.header-slide-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 6s ease-out;
  transform: scale(1.02);
  z-index: 1;
}

.header-slide-item.active {
  opacity: 1;
  transform: scale(1.08);
  z-index: 2;
}

.header-slide-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gradient overlay trên ảnh phải */
#header-right-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.3) 0%, transparent 40%, rgba(0,0,0,0.4) 100%);
  z-index: 3;
  pointer-events: none;
}

/* Nhãn chú thích ảnh trên banner */
#header-slide-caption {
  display: none !important;
  position: absolute;
  bottom: 8px;
  right: 14px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffde00;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 222, 0, 0.3);
  z-index: 4;
}

/* Responsive cho Header Banner */
@media (max-width: 1024px) {
  #header-banner-left {
    flex: 1 1 65%;
  }
  #header-banner-right {
    flex: 0 0 35%;
  }
  #header-trong-dong-watermark {
    width: 320px;
    height: 320px;
    left: 20px;
    right: auto;
    opacity: 0.28;
  }
}

@media (max-width: 768px) {
  #header-banner-container {
    flex-direction: column;
    min-height: auto;
  }
  #header-banner-left {
    width: 100%;
    padding: 14px;
  }
  #header-banner-right {
    width: 100%;
    height: 130px;
    min-height: 130px;
    clip-path: none;
    border-left: none;
    border-top: 3px solid #ffde00;
  }
}

/* ==========================================================================
   NAVIGATION & HOVER DROPDOWN SUBMENU
   ========================================================================== */
.main-nav-ribbon {
  background: linear-gradient(180deg, #b91c1c 0%, #881337 100%);
  border-top: 2px solid #fbbf24;
  border-bottom: 3px solid #7f1d1d;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.nav-link-gov {
  position: relative;
  transition: all 0.25s ease;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.nav-link-gov::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0%;
  height: 3px;
  background-color: #fef08a;
  transition: width 0.25s ease;
}

.nav-link-gov:hover::after,
.nav-link-gov.active::after,
.nav-item-dropdown:hover > .nav-link-gov::after {
  width: 80%;
}

.nav-link-gov:hover,
.nav-link-gov.active,
.nav-item-dropdown:hover > .nav-link-gov {
  background-color: rgba(255, 255, 255, 0.15);
  color: #fffbeb;
}

/* Hover Dropdown Submenu Container */
.nav-item-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: 3px solid #f59e0b;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 6px 6px;
  padding: 6px 0;
  display: none;
  z-index: 100;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item-dropdown:hover .nav-dropdown-menu {
  display: block;
  border-top-color: #f59e0b;
}

.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  color: #1e293b;
  font-size: 0.82rem;
  font-weight: 500;
  border-bottom: 1px dashed #f1f5f9;
  transition: all 0.2s ease;
  text-transform: none;
}

.nav-dropdown-item:last-child {
  border-bottom: none;
}

.nav-dropdown-item:hover {
  background-color: #fefce8;
  color: #b45309;
  padding-left: 20px;
}

.nav-dropdown-item i {
  color: #d97706;
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.nav-dropdown-item:hover i {
  color: #d97706;
  transform: translateX(3px);
}

/* ==========================================================================
   PHẦN TRỌNG ĐIỂM (SPOTLIGHT SLIDER - 3 GIÂY ĐỔI 1 BÀI VIẾT QUAN TRỌNG)
   Bố cục: Ảnh phía trên, Tiêu đề & Nội dung ngắn ở khoảng trống trắng phía dưới
   ========================================================================== */
#hero-main-card {
  position: relative;
  min-height: 490px;
  height: 100%;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
}

.spotlight-slide-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
  transform: scale(0.99);
  z-index: 1;
}

.spotlight-slide-item.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  z-index: 2;
}

/* Khối ảnh phía trên */
.spotlight-media-box {
  position: relative;
  height: 265px;
  width: 100%;
  overflow: hidden;
  background-color: #0f172a;
  flex-shrink: 0;
}

.spotlight-media-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.spotlight-slide-item:hover .spotlight-media-box img {
  transform: scale(1.04);
}

/* Khoảng trống trắng chứa Tiêu đề & Nội dung ngắn phía dưới */
.spotlight-content-box {
  padding: 16px 20px 18px 20px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

/* Chấm điều khiển slider bài viết trọng điểm */
#spotlight-slider-dots {
  position: absolute;
  bottom: 12px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 20;
}

.spotlight-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
  border: 1px solid #94a3b8;
  cursor: pointer;
  transition: all 0.3s ease;
}

.spotlight-dot.active {
  width: 24px;
  border-radius: 6px;
  background: #b91c1c;
  border-color: #b91c1c;
}

/* ==========================================================================
   WIDGET TITLE RIBBONS & SPECIAL CARDS
   ========================================================================== */
.gov-title-ribbon {
  display: flex;
  align-items: center;
  position: relative;
  padding: 10px 16px;
  background: linear-gradient(90deg, #991b1b 0%, #b91c1c 85%, #dc2626 100%);
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  border-radius: 4px 4px 0 0;
  border-left: 5px solid #f59e0b;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.gov-title-ribbon-blue {
  background: linear-gradient(90deg, #1e3a8a 0%, #1d4ed8 85%, #2563eb 100%);
  border-left: 5px solid #38bdf8;
}

.gov-title-ribbon-green {
  background: linear-gradient(90deg, #14532d 0%, #15803d 85%, #16a34a 100%);
  border-left: 5px solid #86efac;
}

.special-link-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
}

.special-link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -6px rgba(0, 0, 0, 0.2);
}

.special-link-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  transition: all 0.7s ease;
}

.special-link-card:hover::before {
  left: 200%;
}

/* Ticker text banner */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
}

.ticker-move {
  display: inline-block;
  white-space: nowrap;
  animation: tickerScroll 35s linear infinite;
}

.ticker-move:hover {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.flag-corner-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 40px solid #da251d;
  border-left: 40px solid transparent;
}

body.high-contrast {
  filter: contrast(125%);
  background-color: #ffffff;
  color: #000000;
}

body.text-lg-active {
  --font-base-size: 18px;
}

body.text-xl-active {
  --font-base-size: 20px;
}

.portal-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.gov-table th {
  background-color: #f1f5f9;
  color: #334155;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  padding: 12px 14px;
}

.gov-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.gov-table tr:hover td {
  background-color: #f8fafc;
}

.media-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.media-play-overlay:hover {
  background: rgba(0, 0, 0, 0.5);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}


/* ==========================================================================
   TỐI ƯU HÓA GIAO DIỆN MOBILE CHUYÊN NGHIỆP (MAX-WIDTH: 768PX)
   ========================================================================== */

@media (max-width: 768px) {
  /* Chống tràn ngang tuyệt đối */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  /* 1. Topbar trên mobile: Căn giữa, padding gọn gàng */
  #topbar-inner-container {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 4px !important;
    padding: 6px 8px !important;
  }

  #topbar-left-wrapper {
    justify-content: center !important;
    width: 100% !important;
  }

  #topbar-divider-1, #topbar-subdomain-badge {
    display: none !important;
  }

  #topbar-clock-badge {
    font-size: 11px !important;
  }

  #topbar-right-wrapper {
    justify-content: center !important;
    width: 100% !important;
    gap: 6px !important;
  }

  /* 2. Banner Header trên mobile: Cân đối Logo & Chữ cơ quan */
  #header-banner-container {
    flex-direction: column !important;
    min-height: auto !important;
  }

  #header-banner-left {
    padding: 14px 10px 12px !important;
    width: 100% !important;
  }

  #header-brand-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  #header-logo-badge {
    width: 52px !important;
    height: 52px !important;
    padding: 2px !important;
  }

  #header-sub-agency {
    font-size: 10.5px !important;
    letter-spacing: 0.02em !important;
    line-height: 1.25 !important;
  }

  #header-main-title {
    font-size: 14.5px !important;
    line-height: 1.25 !important;
    margin: 2px 0 !important;
    white-space: normal !important;
  }

  #header-trong-dong-watermark {
    width: 220px !important;
    height: 220px !important;
    left: 16px !important;
    right: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    opacity: 0.25 !important;
    display: block !important;
  }

  /* 3. Slider ảnh bên phải trên mobile: XÓA HOÀN TOÀN VẠCH CẮT TRẮNG VÀ CÂN ĐỐI ẢNH */
  #header-banner-right {
    width: 100% !important;
    height: 140px !important;
    min-height: 140px !important;
    flex: none !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
    border-top: 2px solid #fbbf24 !important;
    border-bottom: 2px solid rgba(0, 0, 0, 0.2) !important;
  }

  /* BẮT BUỘC ẨN VẠCH CẮT TRẮNG TRÊN MOBILE */
  #header-banner-right::before {
    display: none !important;
    content: none !important;
  }

  #header-slide-caption {
  display: none !important;
    font-size: 0.65rem !important;
    bottom: 6px !important;
    right: 8px !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
  }

  /* 4. Thanh điều hướng Ribbon trên mobile */
  .main-nav-ribbon {
    padding: 2px 0 !important;
  }

  #btn-mobile-menu-toggle {
    padding: 5px 12px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    background-color: rgba(127, 29, 29, 0.7) !important;
    border: 1px solid rgba(251, 191, 36, 0.6) !important;
  }

  #header-search-form {
    margin: 2px 0 !important;
  }

  #header-search-form input {
    width: 160px !important;
    max-width: 180px !important;
    font-size: 11.5px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    padding-left: 10px !important;
  }

  /* 5. Ticker trên mobile */
  #ticker-badge-box {
    padding: 2px 6px !important;
    font-size: 10.5px !important;
    margin-right: 6px !important;
  }

  /* 6. Nội dung bài viết chi tiết & Grid trên mobile */
  #article-detail-column {
    padding: 16px 12px !important;
  }

  #article-main-title {
    font-size: 1.25rem !important;
    line-height: 1.4 !important;
  }

  #article-action-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  #article-lead-excerpt {
    padding: 12px !important;
    margin-bottom: 16px !important;
  }

  .article-body p {
    font-size: 14.5px !important;
    line-height: 1.7 !important;
    text-align: left !important;
  }

  /* Course cards & News grid mobile */
  #courses-cards-grid, #news-subgrid-items, #related-articles-grid {
    grid-template-columns: 1fr !important;
  }
}
/* ==========================================================================
   FOOTER NỀN ĐỎ & TRỐNG ĐỒNG XOAY GIỐNG BANNER ĐẦU TRANG
   ========================================================================== */
#site-footer {
  background: linear-gradient(135deg, #881337 0%, #991b1b 35%, #b91c1c 70%, #7f1d1d 100%) !important;
  position: relative !important;
  overflow: hidden !important;
  border-top: 4px solid #f59e0b !important;
  color: #ffe4e6 !important;
}

#footer-trong-dong-watermark {
  position: absolute;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  width: 480px;
  height: 480px;
  background-image: url('../assets/images/trong-dong-transparent.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.18;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 0 16px rgba(255, 222, 0, 0.45));
  animation: drumRotateSlow 160s linear infinite;
}

#footer-inner-container {
  position: relative !important;
  z-index: 5 !important;
}

#site-footer a {
  color: #fecdd3;
  transition: color 0.2s ease;
}

#site-footer a:hover {
  color: #fde047 !important;
}

#site-footer .border-slate-800,
#site-footer .border-slate-700 {
  border-color: rgba(254, 205, 211, 0.2) !important;
}

#site-footer .text-slate-400,
#site-footer .text-slate-300 {
  color: #fecdd3 !important;
}

#site-footer .text-slate-500 {
  color: #fca5a5 !important;
}

@media (max-width: 768px) {
  #footer-trong-dong-watermark {
    width: 260px !important;
    height: 260px !important;
    right: -40px !important;
    opacity: 0.12 !important;
  }
}


/* Áp dụng font hình học chuẩn tiếng Việt: Be Vietnam Pro và Montserrat đi đầu để không bao giờ bị lỗi dấu */
html, body {
  font-family: 'Be Vietnam Pro', 'Montserrat', 'Gilroy', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Be Vietnam Pro', 'Gilroy', sans-serif !important;
}

p, span:not([class*="fa"]), a, div, li, strong, b, em, label,
button, input, select, textarea, table, th, td, blockquote {
  font-family: 'Be Vietnam Pro', 'Montserrat', 'Gilroy', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Bảo toàn tuyệt đối cho icon FontAwesome */
.fa, .fas, .far, .fab, .fal, .fad, i[class*="fa-"] {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}

/* Line đỉnh của dropdown submenu khi hover đổi sang màu vàng */
.nav-dropdown-menu {
  border-top: 3px solid #f59e0b !important;
}

.nav-item-dropdown:hover .nav-dropdown-menu {
  border-top-color: #f59e0b !important;
}

/* Trống đồng Đông Sơn xoay làm watermark lớp nền phía dưới banner, tuyệt đối không tràn hay đè lên tấm banner ảnh */
#header-banner-left {
  overflow: hidden !important;
  position: relative !important;
}

#header-trong-dong-watermark {
  z-index: 1 !important;
  pointer-events: none !important;
}

#header-brand-wrapper {
  position: relative !important;
  z-index: 10 !important;
}

#header-banner-right {
  position: relative !important;
  z-index: 5 !important;
}

.nav-dropdown-item:hover {
  background-color: #fefce8 !important;
  color: #b45309 !important;
  border-left: 3px solid #f59e0b;
  padding-left: 20px !important;
}

.nav-dropdown-item:hover i {
  color: #d97706 !important;
  transform: translateX(3px);
}

/* ==========================================================================
   TỐI ƯU HÓA GIAO DIỆN MOBILE CHUYÊN NGHIỆP (MAX-WIDTH: 768PX)
   ========================================================================== */

@media (max-width: 768px) {
  /* Chống tràn ngang tuyệt đối nhưng bảo toàn position: sticky cho menu trên mobile */
  html, body {
    overflow-x: clip !important;
    width: 100% !important;
  }

  /* 1. Topbar trên mobile: Căn giữa, padding gọn gàng */
  #topbar-inner-container {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 4px !important;
    padding: 6px 8px !important;
  }

  #topbar-left-wrapper {
    justify-content: center !important;
    width: 100% !important;
  }

  #topbar-divider-1, #topbar-subdomain-badge {
    display: none !important;
  }

  #topbar-clock-badge {
    font-size: 11px !important;
  }

  #topbar-right-wrapper {
    justify-content: center !important;
    width: 100% !important;
    gap: 6px !important;
  }

  /* 2. Banner Header trên mobile: Cân đối Logo & Chữ cơ quan */
  #header-banner-container {
    flex-direction: column !important;
    min-height: auto !important;
  }

  #header-banner-left {
    padding: 14px 10px 12px !important;
    width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
  }

  #header-brand-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  #header-logo-badge {
    width: 52px !important;
    height: 52px !important;
    padding: 2px !important;
  }

  #header-sub-agency {
    font-size: 10.5px !important;
    letter-spacing: 0.02em !important;
    line-height: 1.25 !important;
  }

  #header-main-title {
    font-size: 14.5px !important;
    line-height: 1.25 !important;
    margin: 2px 0 !important;
    white-space: normal !important;
  }

  #header-trong-dong-watermark {
    width: 220px !important;
    height: 220px !important;
    left: 16px !important;
    right: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    opacity: 0.25 !important;
    display: block !important;
  }

  /* 3. Slider ảnh bên phải trên mobile: XÓA HOÀN TOÀN VẠCH CẮT TRẮNG VÀ CÂN ĐỐI ẢNH */
  #header-banner-right {
    width: 100% !important;
    height: 140px !important;
    min-height: 140px !important;
    flex: none !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
    border-top: 2px solid #fbbf24 !important;
    border-bottom: 2px solid rgba(0, 0, 0, 0.2) !important;
  }

  /* BẮT BUỘC ẨN VẠCH CẮT TRẮNG TRÊN MOBILE */
  #header-banner-right::before {
    display: none !important;
    content: none !important;
  }

  #header-slide-caption {
  display: none !important;
    font-size: 0.65rem !important;
    bottom: 6px !important;
    right: 8px !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
  }

  /* 4. Thanh điều hướng Ribbon trên mobile: ĐỨNG CỐ ĐỊNH TRÊN ĐẦU (STICKY TOP) KHI CUỘN TRANG */
  #main-navigation-bar,
  .main-nav-ribbon {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    padding: 2px 0 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35) !important;
  }

  #btn-mobile-menu-toggle {
    padding: 5px 12px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    background-color: rgba(127, 29, 29, 0.7) !important;
    border: 1px solid rgba(251, 191, 36, 0.6) !important;
  }

  #header-search-form {
    margin: 2px 0 !important;
  }

  #header-search-form input {
    width: 160px !important;
    max-width: 180px !important;
    font-size: 11.5px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    padding-left: 10px !important;
  }

  /* 5. Card Bình dân học vụ số & Học tập suốt đời trên mobile: BẰNG NHAU 100% */
  #spotlight-buttons-group {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  #spotlight-buttons-group button,
  #spotlight-buttons-group a {
    width: 100% !important;
    min-height: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 14px !important;
    font-size: 11.5px !important;
    box-sizing: border-box !important;
  }

  #spotlight-buttons-group a span {
    flex: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-right: 8px !important;
  }

  #spotlight-buttons-group a i {
    flex-shrink: 0 !important;
  }

  /* 6. Ticker trên mobile */
  #ticker-badge-box {
    padding: 2px 6px !important;
    font-size: 10.5px !important;
    margin-right: 6px !important;
  }

  /* 6. Nội dung bài viết chi tiết & Grid trên mobile */
  #article-detail-column {
    padding: 16px 12px !important;
  }

  #article-main-title {
    font-size: 1.25rem !important;
    line-height: 1.4 !important;
  }

  #article-action-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  #article-lead-excerpt {
    padding: 12px !important;
    margin-bottom: 16px !important;
  }

  .article-body p {
    font-size: 14.5px !important;
    line-height: 1.7 !important;
    text-align: left !important;
  }

  /* Course cards & News grid mobile */
  #courses-cards-grid, #news-subgrid-items, #related-articles-grid {
    grid-template-columns: 1fr !important;
  }
}
/* ==========================================================================
   TỐI ƯU HÓA TYPOGRAPHY & CHỐNG RỚT CHỮ TRÊN TOÀN GIAO DIỆN (ĐẶC BIỆT LÀ MOBILE)
   ========================================================================== */

/* Cân đối ngắt dòng cho tất cả tiêu đề và văn bản */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance !important;
  word-break: normal !important;
}

p, .article-body p, .article-excerpt {
  text-wrap: pretty !important;
  overflow-wrap: break-word !important;
}

/* ==========================================================================
   FOOTER NỀN ĐỎ & TRỐNG ĐỒNG XOAY GIỐNG BANNER ĐẦU TRANG
   ========================================================================== */
#site-footer {
  background: linear-gradient(135deg, #881337 0%, #991b1b 35%, #b91c1c 70%, #7f1d1d 100%) !important;
  position: relative !important;
  overflow: hidden !important;
  border-top: 4px solid #f59e0b !important;
  color: #ffe4e6 !important;
}

#footer-trong-dong-watermark {
  position: absolute;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  width: 480px;
  height: 480px;
  background-image: url('../assets/images/trong-dong-transparent.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.18;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 0 16px rgba(255, 222, 0, 0.45));
  animation: drumRotateSlow 160s linear infinite;
}

#footer-inner-container {
  position: relative !important;
  z-index: 5 !important;
}

#site-footer a {
  color: #fecdd3;
  transition: color 0.2s ease;
}

#site-footer a:hover {
  color: #fde047 !important;
}

#site-footer .border-slate-800,
#site-footer .border-slate-700 {
  border-color: rgba(254, 205, 211, 0.2) !important;
}

#site-footer .text-slate-400,
#site-footer .text-slate-300 {
  color: #fecdd3 !important;
}

#site-footer .text-slate-500 {
  color: #fca5a5 !important;
}

/* Khối thông tin cơ quan ở Footer */
#footer-agency-brand-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  margin-bottom: 12px !important;
}

#footer-logo-wrapper {
  flex-shrink: 0 !important;
  width: 48px !important;
  height: 48px !important;
}

#footer-agency-title-box {
  flex: 1 !important;
  min-width: 0 !important;
}

#footer-agency-label {
  font-size: 10px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: rgba(254, 240, 138, 0.9) !important;
  font-weight: 700 !important;
  display: block !important;
  margin-bottom: 2px !important;
  line-height: 1.2 !important;
}

#footer-agency-name {
  font-size: 14.5px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  letter-spacing: 0.015em !important;
  color: #ffffff !important;
  text-wrap: balance !important;
}

#footer-sub-agency-name {
  font-size: 12px !important;
  color: #fde047 !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  margin-top: 3px !important;
  text-wrap: balance !important;
}

/* Căn đều đầu dòng tuyệt đối cho các dòng thông tin liên hệ ở Footer */
#footer-contact-details {
  display: flex !important;
  flex-direction: column !important;
  gap: 9px !important;
}

#footer-contact-details p {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  margin: 0 !important;
  line-height: 1.5 !important;
  text-align: left !important;
}

#footer-contact-details p i {
  flex-shrink: 0 !important;
  width: 16px !important;
  text-align: center !important;
  margin-top: 2px !important;
  margin-right: 0 !important;
  color: #f59e0b !important;
  font-size: 13px !important;
}

#footer-contact-details p span {
  flex: 1 !important;
  min-width: 0 !important;
  word-break: break-word !important;
  line-height: 1.45 !important;
}

#footer-editorial-note {
  margin-left: 26px !important;
  font-size: 11px !important;
  line-height: 1.5 !important;
  display: block !important;
  color: rgba(254, 240, 138, 0.85) !important;
  font-style: italic !important;
}

/* Danh sách liên kết nhanh ở Footer: Chống rớt chữ dưới mũi tên › */
#footer-nav-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
}

#footer-nav-list li a {
  display: flex !important;
  align-items: flex-start !important;
  gap: 6px !important;
  line-height: 1.45 !important;
}

#footer-nav-list li a::before {
  content: "›";
  color: #f59e0b;
  font-weight: bold;
  flex-shrink: 0;
  display: inline-block;
  margin-top: -1px;
}

/* ==========================================================================
   TINH CHỈNH RIÊNG TRÊN THIẾT BỊ DI ĐỘNG (MAX-WIDTH: 768PX)
   ========================================================================== */
@media (max-width: 768px) {
  #footer-trong-dong-watermark {
    width: 250px !important;
    height: 250px !important;
    right: -40px !important;
    opacity: 0.12 !important;
  }

  #footer-agency-name {
    font-size: 13px !important;
    line-height: 1.3 !important;
  }

  #footer-sub-agency-name {
    font-size: 11px !important;
    line-height: 1.3 !important;
  }

  #footer-contact-details p {
    font-size: 11.5px !important;
    gap: 8px !important;
  }

  #footer-contact-details p i {
    width: 14px !important;
    font-size: 12px !important;
  }

  #footer-editorial-note {
    margin-left: 22px !important;
    font-size: 10.5px !important;
  }

  /* Menu accordion trên điện thoại: thụt lề chuẩn, không rớt chữ vụn */
  #mobile-nav-panel div[id^="m-sub-"] a {
    font-size: 12px !important;
    line-height: 1.4 !important;
    text-wrap: pretty !important;
  }

  /* Breadcrumb & Tiêu đề trang con trên mobile */
  .page-banner-title {
    font-size: 1.15rem !important;
    line-height: 1.35 !important;
    text-wrap: balance !important;
  }
}

/* ==========================================================================
   TỐI ƯU HÓA WATERMARK TRỐNG ĐỒNG CHO MÀN HÌNH NHỎ (<= 480PX)
   ========================================================================== */
@media (max-width: 480px) {
  #header-main-title {
    font-size: 13.5px !important;
    line-height: 1.25 !important;
  }

  #header-trong-dong-watermark {
    width: 170px !important;
    height: 170px !important;
    left: 14px !important;
    right: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    opacity: 0.22 !important;
    display: block !important;
  }

  #footer-trong-dong-watermark {
    width: 200px !important;
    height: 200px !important;
    left: auto !important;
    right: -25px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    opacity: 0.14 !important;
    display: block !important;
  }
}




/* ==========================================================================
   NAVIGATION 1 HÀNG KHÔNG RỚT DÒNG & THANH TÌM KIẾM SỔ NGANG (EXPANDABLE)
   ========================================================================== */
#desktop-nav-menu-list {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  white-space: nowrap !important;
}

#desktop-nav-menu-list > li {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

#desktop-nav-menu-list > li > a {
  white-space: nowrap !important;
}

/* Thanh tìm kiếm sổ ngang */
#header-search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-expandable {
  width: 0 !important;
  opacity: 0 !important;
  padding: 0 !important;
  border: none !important;
  pointer-events: none !important;
  position: absolute !important;
  right: 100% !important;
  margin-right: 6px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
  z-index: 50 !important;
}

#header-search-form.search-open .header-search-expandable {
  width: 220px !important;
  opacity: 1 !important;
  padding: 6px 14px !important;
  pointer-events: auto !important;
}

@media (min-width: 1280px) {
  #header-search-form.search-open .header-search-expandable {
    width: 260px !important;
  }
}