/*
Theme Name: Đề Án Ngoại Ngữ
Theme URI: https://deanngoaingu.test
Author: Ban Quản Lý Đề Án Ngoại Ngữ
Author URI: https://deanngoaingu.test
Description: Theme WordPress chuẩn SEO, siêu tốc, chuẩn giao diện theo đề án ngoại ngữ quốc gia với mục lục tự động, đánh giá 5 sao chuẩn Schema, bài viết có sidebar, danh mục full-width tối ưu di động và desktop.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: deanngoaingu
*/

:root {
  --primary: #0066cc;
  --primary-hover: #0052a3;
  --primary-dark: #0a1f38;
  --secondary: #14b8a6;
  --accent: #f59e0b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08);
  --shadow-card: 0 4px 20px rgba(0,0,0,0.04);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1200px;
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-white);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-logo-img {
  height: 48px;
  width: auto;
  max-width: 74px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.logo-icon-svg {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.logo-text-group {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: #0b2f64;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.72rem;
  font-weight: 500;
  color: #4b6282;
  letter-spacing: 0.2px;
  line-height: 1.2;
}

.main-navigation {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  position: relative;
  list-style: none;
}

.nav-menu a {
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  padding: 28px 0;
  display: inline-flex;
  align-items: center;
  position: relative;
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
  color: var(--primary);
}

.nav-menu .current-menu-item > a::after,
.nav-menu .current_page_item > a::after,
.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary);
  border-radius: 2px 2px 0 0;
}

/* Dropdown / Sub-menu */
.nav-menu .menu-item-has-children > a {
  padding-right: 14px;
}

.nav-menu .menu-item-has-children > a::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-60%) rotate(45deg);
  border-radius: 0;
  background: transparent;
}

.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 200;
}

.nav-menu .menu-item-has-children:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu .sub-menu li {
  width: 100%;
}

.nav-menu .sub-menu a {
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
  display: block;
  white-space: nowrap;
}

.nav-menu .sub-menu a:hover {
  background-color: #f0f7ff;
  color: var(--primary);
}

.nav-menu .sub-menu a::after {
  display: none !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-search-trigger {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #475569;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-search-trigger:hover {
  background-color: #f1f5f9;
  color: var(--primary);
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #1e293b;
}

/* ==========================================================================
   HERO BANNER SECTION
   ========================================================================== */
.hero-section {
  background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 50%, #f4f8ff 100%);
  padding: 50px 0 60px 0;
  overflow: hidden;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
}

.hero-content {
  max-width: 600px;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: #0b2545;
  line-height: 1.22;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.hero-desc {
  font-size: 1.15rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 28px;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #0066cc;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 14px 30px;
  border-radius: 50px;
  box-shadow: 0 6px 18px rgba(0, 102, 204, 0.28);
  transition: var(--transition);
}

.hero-cta-btn:hover {
  background-color: #0052a3;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 102, 204, 0.35);
}

.hero-cta-btn svg {
  transition: transform 0.2s;
}

.hero-cta-btn:hover svg {
  transform: translateX(4px);
}

.hero-slogan {
  margin-top: 32px;
  font-size: 1rem;
  color: #4b607c;
  font-style: italic;
  font-weight: 500;
}

.hero-media {
  position: relative;
}

.hero-img-wrap {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(11, 37, 69, 0.1);
  position: relative;
  background-color: #ffffff;
}

.hero-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   4 FEATURE CARDS (QUICK ACTION)
   ========================================================================== */
.feature-cards-section {
  padding: 40px 0;
  background-color: #ffffff;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 26px 22px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  min-height: 175px;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-theme-blue {
  background-color: #f0f7ff;
}
.card-theme-green {
  background-color: #eefbf4;
}
.card-theme-orange {
  background-color: #fff6ee;
}
.card-theme-purple {
  background-color: #f7f2fe;
}

.feature-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card-theme-blue .feature-icon-box {
  background-color: #0066cc;
  color: #ffffff;
}

.card-theme-green .feature-icon-box {
  background-color: #10b981;
  color: #ffffff;
}

.card-theme-orange .feature-icon-box {
  background-color: #f97316;
  color: #ffffff;
}

.card-theme-purple .feature-icon-box {
  background-color: #8b5cf6;
  color: #ffffff;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.3;
}

.feature-desc {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.45;
  margin-bottom: 14px;
}

.feature-arrow {
  align-self: flex-end;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.card-theme-blue .feature-arrow { color: #0066cc; }
.card-theme-green .feature-arrow { color: #10b981; }
.card-theme-orange .feature-arrow { color: #f97316; }
.card-theme-purple .feature-arrow { color: #8b5cf6; }

.feature-card:hover .feature-arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   SECTION HEADER (BLUE VERTICAL BAR)
   ========================================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title-bar {
  width: 6px;
  height: 28px;
  background-color: #0066cc;
  border-radius: 4px;
}

.section-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: #0b2545;
}

.section-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0066cc;
  transition: var(--transition);
}

.section-view-all:hover {
  color: #004b99;
  gap: 10px;
}

/* ==========================================================================
   LATEST NEWS SECTION
   ========================================================================== */
.news-section {
  padding: 40px 0 50px 0;
  background-color: #ffffff;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.news-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.news-thumb-link {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-color: #f1f5f9;
}

.news-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.news-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-date {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 10px;
  font-weight: 500;
}

.news-card-title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.45;
  color: #0b2545;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.news-excerpt {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 18px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0066cc;
  transition: var(--transition);
  margin-top: auto;
}

.news-read-more:hover {
  color: #004b99;
  gap: 10px;
}

/* ==========================================================================
   RESOURCE CENTER SECTION (KHO HỌC LIỆU)
   ========================================================================== */
.resource-section {
  padding: 40px 0 50px 0;
  background-color: #ffffff;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.resource-card {
  background: #ffffff;
  border: 1px solid #e9eef5;
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: var(--transition);
  text-decoration: none;
}

.resource-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

.resource-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  transition: transform 0.25s ease;
}

.resource-card:hover .resource-icon-wrap {
  transform: scale(1.1);
}

.res-pdf {
  background-color: #fef2f2;
  color: #dc2626;
}

.res-video {
  background-color: #eff6ff;
  color: #2563eb;
}

.res-docs {
  background-color: #ecfdf5;
  color: #059669;
}

.res-exam {
  background-color: #f5f3ff;
  color: #7c3aed;
}

.resource-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
}

/* ==========================================================================
   BOTTOM CALL TO ACTION BANNER
   ========================================================================== */
.cta-banner-section {
  padding: 40px 0 70px 0;
}

.cta-banner-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-height: 280px;
  display: flex;
  align-items: center;
  background-color: #dbeafe;
}

.cta-banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: 1;
}

.cta-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(235, 245, 255, 0.95) 0%, rgba(235, 245, 255, 0.85) 45%, rgba(235, 245, 255, 0.15) 100%);
  z-index: 2;
}

.cta-banner-content {
  position: relative;
  z-index: 3;
  padding: 50px;
  max-width: 580px;
}

.cta-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: #0b2545;
  line-height: 1.25;
  margin-bottom: 12px;
}

.cta-desc {
  font-size: 1.1rem;
  color: #334155;
  line-height: 1.5;
  margin-bottom: 24px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #0066cc;
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 28px;
  border-radius: 50px;
  box-shadow: 0 4px 14px rgba(0, 102, 204, 0.3);
  transition: var(--transition);
}

.cta-btn:hover {
  background-color: #0052a3;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.4);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: #0b213b;
  color: #cbd5e1;
  margin-top: auto;
}

.footer-top {
  padding: 55px 0 45px 0;
}

.footer-grid-4col {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.15fr 1.25fr;
  gap: 36px;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-widget {
  margin-bottom: 24px;
}

.footer-widget:last-child {
  margin-bottom: 0;
}

.footer-widget-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 20px;
  padding-bottom: 10px;
  position: relative;
  letter-spacing: 0.2px;
}

.footer-widget-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 2px;
  background-color: #0066cc;
  border-radius: 2px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.footer-logo-wrap {
  background: #ffffff;
  padding: 4px 6px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.footer-logo-img {
  height: 38px;
  width: auto;
  max-width: 60px;
  object-fit: contain;
  display: block;
}

.footer-logo .logo-title {
  color: #ffffff;
  font-size: 1.12rem;
  font-weight: 800;
}

.footer-logo .logo-subtitle {
  color: #94a3b8;
  font-size: 0.7rem;
}

.footer-about-text {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.65;
  margin-bottom: 20px;
}

.footer-socials-list {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: var(--transition);
}

.social-link:hover {
  background-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 102, 204, 0.4);
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links-list li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 8px;
}

.footer-links-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.footer-links-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: #cbd5e1;
  transition: var(--transition);
}

.footer-links-list a::before {
  content: '›';
  font-size: 1.1rem;
  color: #60a5fa;
  transition: transform 0.2s;
}

.footer-links-list a:hover {
  color: #60a5fa;
  transform: translateX(4px);
}

.footer-links-list a:hover::before {
  transform: translateX(2px);
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.55;
}

.footer-contact-list svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: #60a5fa;
}

/* WordPress Standard Widgets Support in Footer */
.footer-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-widget ul li a {
  color: #cbd5e1;
  font-size: 0.92rem;
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}

.footer-widget ul li a:hover {
  color: #60a5fa;
  transform: translateX(4px);
}

.footer-widget p {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.65;
  margin-bottom: 14px;
}

.footer-widget input[type="text"],
.footer-widget input[type="search"] {
  width: 100%;
  padding: 10px 14px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.9rem;
  outline: none;
}

.footer-widget input[type="text"]:focus,
.footer-widget input[type="search"]:focus {
  border-color: #60a5fa;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
  font-size: 0.88rem;
  color: #94a3b8;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   SINGLE POST LAYOUT (CÓ SIDEBAR)
   ========================================================================== */
.post-page-wrapper {
  padding: 35px 0 60px 0;
  background-color: #fafbfc;
}

.post-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: start;
}

.single-main-content {
  background: #ffffff;
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

/* Breadcrumbs */
.breadcrumb-trail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.88rem;
  color: #64748b;
  margin-bottom: 20px;
}

.breadcrumb-trail a {
  color: #0066cc;
}

.breadcrumb-trail a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  color: #cbd5e1;
}

/* Single Header */
.single-post-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  color: #0b2545;
  margin-bottom: 16px;
}

.single-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
  color: #64748b;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item svg {
  color: #94a3b8;
}

.meta-item.meta-cat a {
  background-color: #eef6ff;
  color: #0066cc;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
}

/* 5-STAR RATING WIDGET */
.star-rating-widget {
  background: linear-gradient(135deg, #f8faff 0%, #edf4fe 100%);
  border: 1px solid #d8e6f8;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.rating-info-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rating-score-badge {
  font-size: 1.6rem;
  font-weight: 800;
  color: #f59e0b;
  line-height: 1;
}

.rating-details {
  display: flex;
  flex-direction: column;
}

.rating-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.rating-count-text {
  font-size: 0.8rem;
  color: #64748b;
}

.rating-stars-interactive {
  display: flex;
  align-items: center;
  gap: 4px;
}

.star-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #cbd5e1;
  transition: transform 0.15s, color 0.15s;
}

.star-btn:hover {
  transform: scale(1.2);
}

.star-btn.active,
.star-btn.hovered {
  color: #f59e0b;
}

.rating-feedback {
  width: 100%;
  font-size: 0.82rem;
  color: #10b981;
  font-weight: 600;
  display: none;
}

/* TABLE OF CONTENTS (MỤC LỤC BÀI VIẾT) */
.toc-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0066cc;
  border-radius: var(--radius-md);
  margin: 30px 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.toc-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f1f5f9;
  cursor: pointer;
  user-select: none;
}

.toc-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  color: #0b2545;
}

.toc-toggle-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0066cc;
  cursor: pointer;
  transition: var(--transition);
}

.toc-toggle-btn:hover {
  background-color: #0066cc;
  color: #ffffff;
  border-color: #0066cc;
}

/* Initially Hidden as requested: "Phần bài viết có mục lục (ẩn ban đầu)" */
.toc-content-list {
  display: none;
  padding: 18px 22px;
  max-height: 480px;
  overflow-y: auto;
}

.toc-content-list.expanded {
  display: block;
}

.toc-content-list ol {
  counter-reset: toc-item;
  list-style: none;
}

.toc-content-list li {
  margin: 8px 0;
  line-height: 1.4;
}

.toc-content-list li a {
  color: #334155;
  font-size: 0.93rem;
  display: inline-block;
  transition: color 0.15s;
}

.toc-content-list li a:hover {
  color: #0066cc;
  text-decoration: underline;
}

.toc-content-list .toc-h2 {
  font-weight: 600;
}

.toc-content-list .toc-h3 {
  padding-left: 20px;
  font-size: 0.88rem;
  color: #64748b;
}

/* Post Typography & Content */
.post-entry-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #273444;
}

.post-entry-content p {
  margin-bottom: 22px;
}

.post-entry-content h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: #0b2545;
  margin: 38px 0 16px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #eef2f6;
  scroll-margin-top: 100px;
}

.post-entry-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin: 28px 0 14px 0;
  scroll-margin-top: 100px;
}

.post-entry-content ul, 
.post-entry-content ol {
  margin: 16px 0 24px 24px;
}

.post-entry-content ul {
  list-style: disc;
}

.post-entry-content ol {
  list-style: decimal;
}

.post-entry-content li {
  margin-bottom: 8px;
}

.post-entry-content blockquote {
  border-left: 4px solid #0066cc;
  background-color: #f8faff;
  padding: 18px 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 26px 0;
  font-style: italic;
  color: #334155;
}

.post-entry-content img {
  border-radius: var(--radius-md);
  margin: 24px auto;
}

/* Post Tags & Share */
.post-footer-extra {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.post-tags-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tag-item {
  font-size: 0.85rem;
  background-color: #f1f5f9;
  color: #475569;
  padding: 5px 12px;
  border-radius: 20px;
}

.post-tag-item:hover {
  background-color: #0066cc;
  color: #ffffff;
}

/* RELATED POSTS (BÀI VIẾT LIÊN QUAN) */
.related-posts-section {
  margin-top: 50px;
  padding-top: 36px;
  border-top: 2px solid #f1f5f9;
}

.related-posts-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0b2545;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.related-posts-title::before {
  content: '';
  width: 5px;
  height: 22px;
  background-color: #0066cc;
  border-radius: 3px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.related-thumb-link {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #f1f5f9;
  display: block;
}

.related-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.related-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.related-date {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 6px;
}

.related-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0b2545;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-title a:hover {
  color: #0066cc;
}

/* ==========================================================================
   SIDEBAR (BÀI VIẾT XEM NHIỀU, DANH MỤC, BÀI MỚI NHẤT)
   ========================================================================== */
.sidebar-area {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sidebar-widget {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0b2545;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: #0066cc;
}

/* Widget: Bài viết xem nhiều (Popular Posts) */
.popular-posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.popular-post-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.popular-rank {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background-color: #f1f5f9;
  color: #64748b;
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.popular-rank.top-1 {
  background-color: #fee2e2;
  color: #ef4444;
}

.popular-rank.top-2 {
  background-color: #fef3c7;
  color: #f59e0b;
}

.popular-rank.top-3 {
  background-color: #e0e7ff;
  color: #6366f1;
}

.popular-thumb-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background-color: #f1f5f9;
}

.popular-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popular-info {
  flex: 1;
  min-width: 0;
}

.popular-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-title a:hover {
  color: #0066cc;
}

.popular-meta {
  font-size: 0.78rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Widget: Danh mục (Categories) */
.category-widget-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-widget-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background-color: #f8fafc;
  color: #334155;
  font-size: 0.93rem;
  font-weight: 500;
  transition: var(--transition);
}

.category-widget-item a:hover {
  background-color: #eef5ff;
  color: #0066cc;
  padding-left: 18px;
}

.cat-count-badge {
  background-color: #e2e8f0;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.category-widget-item a:hover .cat-count-badge {
  background-color: #0066cc;
  color: #ffffff;
}

/* Widget: Bài viết mới nhất (Recent Posts) */
.recent-posts-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recent-post-item {
  display: flex;
  gap: 12px;
}

.recent-thumb-wrap {
  width: 70px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.recent-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-post-info {
  flex: 1;
}

.recent-post-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-post-title a:hover {
  color: #0066cc;
}

.recent-post-date {
  font-size: 0.78rem;
  color: #94a3b8;
}

/* ==========================================================================
   CATEGORY / ARCHIVE PAGE (KHÔNG CÓ SIDEBAR)
   ========================================================================== */
.category-archive-page {
  padding: 40px 0 70px 0;
  background-color: #fafbfc;
}

.category-hero-header {
  background: linear-gradient(135deg, #0b2545 0%, #004b99 100%);
  color: #ffffff;
  padding: 45px 0;
  margin-bottom: 40px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.category-main-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.category-main-desc {
  font-size: 1.05rem;
  max-width: 700px;
  margin: 0 auto;
  color: #dbeafe;
}

/* Full-width Category Grid (Không sidebar) */
.category-posts-grid-full {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* Pagination */
.theme-pagination {
  margin-top: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.theme-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-color);
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  transition: var(--transition);
}

.theme-pagination .page-numbers:hover,
.theme-pagination .page-numbers.current {
  background-color: #0066cc;
  color: #ffffff;
  border-color: #0066cc;
}

/* ==========================================================================
   SEARCH MODAL
   ========================================================================== */
.search-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 37, 69, 0.65);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.search-modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.search-modal-box {
  background: #ffffff;
  width: 90%;
  max-width: 600px;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  position: relative;
  transform: translateY(-20px);
  transition: transform 0.25s ease;
}

.search-modal-backdrop.active .search-modal-box {
  transform: translateY(0);
}

.search-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
}

.search-form-modal {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.search-input-modal {
  flex: 1;
  padding: 12px 18px;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-md);
  outline: none;
  font-size: 1rem;
}

.search-input-modal:focus {
  border-color: #0066cc;
}

.search-submit-modal {
  background-color: #0066cc;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 24px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.search-submit-modal:hover {
  background-color: #0052a3;
}

/* ==========================================================================
   MOBILE MENU DRAWER
   ========================================================================== */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -340px;
  width: min(320px, 85vw);
  height: 100%;
  background: #ffffff;
  box-shadow: -8px 0 32px rgba(11, 37, 69, 0.2);
  z-index: 1001;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}

.mobile-drawer-close {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.mobile-drawer-close:hover {
  background-color: #fee2e2;
  color: #ef4444;
}

.mobile-menu-wrap {
  flex: 1;
  overflow-y: auto;
}

.mobile-menu-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-menu-list li {
  list-style: none;
}

.mobile-menu-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 0.98rem;
  font-weight: 600;
  color: #1e293b;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.mobile-menu-list a:hover,
.mobile-menu-list .current-menu-item > a,
.mobile-menu-list .current_page_item > a {
  background-color: #f0f7ff;
  color: #0066cc;
}

.mobile-menu-list .sub-menu {
  padding-left: 14px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
}

.mobile-menu-list .sub-menu a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #64748b;
  padding: 8px 12px;
}

.mobile-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 37, 69, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.mobile-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   RESPONSIVE DESIGN (BREAKPOINTS)
   ========================================================================== */
/* Medium Desktop: 993px - 1180px */
@media (max-width: 1180px) and (min-width: 993px) {
  .nav-menu {
    gap: 16px;
  }
  .nav-menu a {
    font-size: 0.88rem;
    padding: 24px 0;
  }
  .site-logo {
    gap: 8px;
  }
  .site-logo-img {
    height: 42px;
  }
  .logo-title {
    font-size: 1.05rem;
  }
}

/* Tablet & Mobile: 992px and below -> Switch to clean mobile drawer */
@media (max-width: 992px) {
  .main-navigation {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .hero-content {
    max-width: 100%;
    text-align: center;
  }
  
  .hero-title {
    font-size: 2.25rem;
  }
  
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .post-layout-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid-4col {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.85rem;
  }
  
  .hero-img {
    height: 280px;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cta-banner-content {
    padding: 30px 20px;
  }
  
  .cta-title {
    font-size: 1.6rem;
  }
  
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
  
  .single-main-content {
    padding: 20px;
  }
  
  .single-post-title {
    font-size: 1.6rem;
  }
  
  .footer-bottom-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* Small mobile screens (<= 576px): phones */
@media (max-width: 576px) {
  .header-inner {
    height: 68px;
  }
  
  .site-logo {
    gap: 8px;
  }
  
  .site-logo-img {
    height: 38px;
    max-width: 58px;
  }
  
  .logo-title {
    font-size: 1.05rem;
    line-height: 1.15;
  }
  
  .logo-subtitle {
    display: none; /* Hide subtitle on small phones for a clean, non-cramped header */
  }
  
  .header-actions {
    gap: 4px;
  }
  
  .btn-search-trigger,
  .mobile-menu-toggle {
    width: 38px;
    height: 38px;
    padding: 6px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .resource-grid {
    grid-template-columns: 1fr;
  }
  
  .category-posts-grid-full {
    grid-template-columns: 1fr;
  }

  .footer-grid-4col {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
