/* 
   Milan Fashion Campus Inspired Theme
   - Primary Red:  #E74C3C
   - Deep Black:   #151515
   - Light Gray:   #F9F9F9
   - Pure White:   #FFFFFF
*/

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Quicksand:wght@300;400;500;600;700&display=swap");

:root {
  --primary-color: #e74c3c !important;
  --fs-color-primary: #e74c3c !important;
  --fs-color-secondary: #151515 !important;
  --fs-color-success: #2ecc71 !important;
  --fs-color-alert: #e74c3c !important;
  --fs-experimental-link-color: #e74c3c !important;
  --fs-experimental-link-color-hover: #363636 !important;

  /* Custom Variables */
  --tqt-red: #e74c3c;
  --tqt-black: #151515;
  --tqt-white: #ffffff;
  --tqt-gray-light: #f9f9f9;
  --tqt-bg-alt: #f9f9f9;

  /* Typography - Updated to All Sans-Serif as requested */
  --tqt-font-heading: "Inter", sans-serif;
  --tqt-font-body: "Quicksand", sans-serif;

  /* Category Backgrounds */
  --tqt-bg-thoi-trang: #f1cbd9;
  --tqt-bg-sang-tao: #f8dfa5;
  --tqt-bg-rap: #b6ffd3;
  --tqt-bg-cat-may: #acc2ff;
  --tqt-bg-san-xuat: #d1e4ff;
}

/* Category Background Classes */
.tqt-bg-thoi-trang {
  background-color: var(--tqt-bg-thoi-trang) !important;
}
.tqt-bg-sang-tao {
  background-color: var(--tqt-bg-sang-tao) !important;
}
.tqt-bg-rap {
  background-color: var(--tqt-bg-rap) !important;
}
.tqt-bg-cat-may {
  background-color: var(--tqt-bg-cat-may) !important;
}
.tqt-bg-san-xuat {
  background-color: var(--tqt-bg-san-xuat) !important;
}

/* CUSTOM MODERN SCROLLBAR */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--tqt-gray-light);
}

::-webkit-scrollbar-thumb {
  background: #cccccc;
  border-radius: 10px;
  border: 2px solid var(--tqt-gray-light);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--tqt-red);
}

/* GLOBAL FONT OVERRIDE */
html,
body,
p,
div,
span,
li,
a,
input,
textarea,
button,
strong,
em {
  font-family: var(--tqt-font-body) !important;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.entry-title,
.widget-title,
.section-title-main,
.post-title,
.box-text h4 {
  font-family: var(--tqt-font-heading) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

/* Override Flatsome Header & Top Bar */
.header-main,
.header-wrapper,
#header {
  background-color: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
}

.top-bar {
  background-color: var(--tqt-black) !important;
}

.header-nav-main > li > a {
  color: var(--tqt-black) !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
}

.header-nav-main > li > a:hover,
.header-nav-main > li.active > a,
.header-nav-main > li.current > a {
  color: var(--tqt-red) !important;
}

/* Buttons */
.button.primary,
.is-outline.primary,
.btn-primary,
button[type="submit"] {
  background-color: var(--tqt-red) !important;
  border-color: var(--tqt-red) !important;
  color: #fff !important;
  border-radius: 4px !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
}

.button.primary:hover {
  background-color: #363636 !important;
  border-color: #363636 !important;
}

/* Links & Widgets */
a {
  color: var(--tqt-red);
}
a:hover {
  color: #363636;
}

.widget-title {
  color: var(--tqt-black) !important;
  border-bottom: 3px solid var(--tqt-red) !important;
  font-family: var(--tqt-font-heading) !important;
  padding-bottom: 10px !important;
  margin-bottom: 15px !important;
}

/* Archive & Post Colors */
.category-page-title {
  background-color: var(--tqt-black) !important;
  color: #ffffff !important;
}

.post-item .box-text {
  background-color: #fff !important;
}

/* Footer Overrides for all pages */
#footer,
.footer-wrapper {
  background-color: var(--tqt-black) !important;
  color: #ffffff !important;
}

#footer a {
  color: #ffffff !important;
  opacity: 0.8 !important;
}

#footer a:hover {
  color: var(--tqt-red) !important;
  opacity: 1 !important;
}

/* Deep Overrides for Flatsome Sub-pages */
[id^="section_"],
[id^="row_"],
.section,
.footer-wrapper,
.absolute-footer {
  background-color: transparent !important;
}

/* Standardizing Global Backgrounds (Kill pink gradients from child theme) */
body.wp-theme-flatsome,
body.wp-theme-flatsome #wrapper,
body.wp-theme-flatsome .page-header-wrapper,
body.wp-theme-flatsome .page-title,
body.wp-theme-flatsome .title-breadcrumbs {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
}

body.wp-theme-flatsome {
  background-color: #ffffff !important;
}

#wrapper {
  background-color: #ffffff !important;
}

/* SEO & Cleanup: Remove Redundant H1s from Title Bar on specific pages */
.blog-single .page-title h1.entry-title,
.post-template-default .page-title h1.entry-title {
  font-size: 1.2rem !important;
  opacity: 0.8 !important;
  text-transform: none !important;
}

/* Sidebar Image Injection Styling */
.tqt-sidebar-promo {
  margin-bottom: 2.5rem;
  border: 1px solid #eeeeee;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  box-shadow: none !important;
}

/* Page Title / Breadcrumb Refinement: Milan Minimalist (Single Line Left) */
/* Standardizing Course Page Header & Title (Resolving pink background artifacts) */
.page-header-wrapper,
.page-title,
#page-header-219167017 {
  background-color: #ffffff !important;
  background-image: none !important; /* Prevent legacy background images */
  position: relative;
  z-index: 10;
}

body.tqt-has-shared-header,
#wrapper {
  background-color: #ffffff !important;
}

.page-title {
  padding: 10px 0 !important;
  border-bottom: 1px solid #f0f0f0 !important;
}

/* Nuclear Override: Kill pink gradients and artifacts from child theme */
body.wp-theme-flatsome,
body.wp-theme-flatsome #wrapper,
body.wp-theme-flatsome #main,
body.wp-theme-flatsome .page-header-wrapper,
body.wp-theme-flatsome .page-title,
body.wp-theme-flatsome .title-breadcrumbs {
  background: #ffffff !important; /* Shorthand to kill gradients */
  background-image: none !important;
  background-color: #ffffff !important;
}

/* Hide legacy background artifacts from old HTML structures */
.page-title-bg,
.title-overlay,
.title-bg {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Neutralize pink header borders and backgrounds from Flatsome/Child theme */
body.wp-theme-flatsome .header-main,
body.wp-theme-flatsome .stuck .header-main,
body.wp-theme-flatsome .header.show-on-scroll .header-main {
  border-bottom: 1px solid #f0f0f0 !important;
  background: rgba(255, 255, 255, 0.98) !important;
}

.page-title-bg,
.title-overlay {
  display: none !important;
}

/* Align breadcrumb to the left in 1 line */
.page-header-wrapper .page-title-inner,
.page-title .page-title-inner,
#page-header-219167017 .page-title-inner {
  min-height: auto !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
}

/* Hide the big redundant H1 in the header bar */
.page-title h1.entry-title {
  display: none !important;
}

/* Style the minimalist breadcrumb line */
.page-title-sub,
.rank-math-breadcrumb,
.breadcrumb,
.rank-math-breadcrumb p {
  font-family: var(--tqt-font-body) !important;
  font-size: 0.95rem !important;
  font-weight: 400 !important;
  color: #888888 !important;
  opacity: 1 !important;
  margin: 0 !important;
}

.rank-math-breadcrumb a {
  color: #999999 !important;
  text-decoration: none !important;
}

.rank-math-breadcrumb a:hover {
  color: var(--tqt-red) !important;
}

.rank-math-breadcrumb .separator {
  margin: 0 10px !important;
  color: #cccccc !important;
}

/* Make the last item (current page) bold to act as a title */
.rank-math-breadcrumb span.last,
.breadcrumb .current,
.rank-math-breadcrumb span:last-child {
  font-weight: 700 !important;
  color: var(--tqt-black) !important;
}

/* Custom Width Overrides to fill whitespace - Forced for desktop */
@media (min-width: 901px) {
  html body #wrapper .container,
  html body #wrapper .row,
  html body #wrapper .page-wrapper,
  html body #wrapper .blog-wrapper,
  html body #wrapper #main,
  #wrapper .page-title-inner.container {
    max-width: 1700px !important;
    width: 96% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* TQT Global: Minimalist Course Cards (Ngành đào tạo) */
.post-item .from_the_blog_excerpt,
.post-item .is-divider {
  display: none !important;
}

.post-item .post-meta {
  display: block !important;
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
  opacity: 0.7 !important;
  margin-bottom: 0.2rem !important;
}

.post-item .box-text {
  padding: 15px 20px !important;
  background-color: transparent !important;
}

.post-item .post-title {
  font-family: var(--tqt-font-heading) !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: var(--tqt-black) !important;
  text-transform: none !important;
  margin-top: 0.5rem !important;
  line-height: 1.4 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Allow 2 lines for title if needed, but clean */
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.post-item .box-image {
  overflow: hidden !important;
}

/* Card Ratio & Hover restoration */
/* Card Ratio & Hover restoration */
.post-item .box-image,
.news-card .news-img {
  border-radius: 0 !important; /* Let parent card clip the top corners */
  overflow: hidden !important;
  aspect-ratio: 3 / 2 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.category-tin-tuc .post-item .box-image .image-cover {
  padding-top: 0 !important;
  height: 100% !important;
}

.post-item .box-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Ensure hover animations are active */
.post-item,
.news-card {
  transition: transform 0.3s ease !important;
}

/* --- FL-ICONS RESTORATION (Standardizing Icons) --- */
@font-face {
  font-family: "fl-icons";
  src:
    url("/wp-content/themes/flatsome/assets/css/icons/fl-icons6107.woff2")
      format("woff2"),
    url("/wp-content/themes/flatsome/assets/css/icons/fl-icons6107.woff")
      format("woff"),
    url("/wp-content/themes/flatsome/assets/css/icons/fl-icons6107.ttf")
      format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

[class^="icon-"],
[class*=" icon-"],
.links li:before {
  font-family: "fl-icons" !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block;
}

/* Icon Mappings from SVG Source */
.icon-envelop:before {
  content: "\e003";
}
.icon-twitter:before {
  content: "\e001";
}
.icon-facebook:before {
  content: "\e002";
}
.icon-whatsapp:before {
  content: "\e907";
}
.icon-pinterest:before {
  content: "\e010";
}
.icon-instagram:before {
  content: "\e00e";
}
.icon-linkedin:before {
  content: "\e016";
}
.icon-google-plus:before {
  content: "\e905";
}
.icon-heart:before {
  content: "\e000";
}
.icon-search:before {
  content: "\e012";
}
.icon-menu:before {
  content: "\e800";
}

/* Social Share Button Coloring & Layout (High Specificity Overrides) */
.social-icons.share-icons a.icon.button {
  width: 38px !important;
  height: 38px !important;
  line-height: 38px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  margin: 4px !important;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
  border: none !important;
  box-shadow: none !important;
}

.tqt-btn-submit {
  background: var(--tqt-red) !important;
  color: white !important;
  border: none !important;
  padding: 16px 50px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  border-radius: 50px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
  box-shadow: none !important;
}

.tqt-btn-submit:hover {
  background: var(--secondary-dark) !important;
  transform: translateY(-3px) !important;
  box-shadow: none !important;
}

.social-icons.share-icons a.icon.button:hover {
  transform: translateY(-3px);
  box-shadow: none !important;
}

.social-icons.share-icons a.icon.button i {
  font-size: 18px !important;
  color: #fff !important;
  margin: 0 !important;
}

/* --- INDIVIDUAL BRAND COLORS (Ultimate Specificity Overrides) --- */
html body .social-icons a.facebook,
html body .share-icons a.facebook,
html body .social-icons a[class*="facebook"] {
  background-color: #3b5998 !important;
  background: #3b5998 !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: none !important;
}
html body .social-icons a.twitter,
html body .share-icons a.twitter,
html body .social-icons a[class*="twitter"] {
  background-color: #1da1f2 !important;
  background: #1da1f2 !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: none !important;
}
html body .social-icons a.email,
html body .share-icons a.email,
html body .social-icons a.envelop,
html body .social-icons a[class*="email"] {
  background-color: #ea4335 !important;
  background: #ea4335 !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: none !important;
}
html body .social-icons a.whatsapp,
html body .share-icons a.whatsapp,
html body .social-icons a[class*="whatsapp"] {
  background-color: #25d366 !important;
  background: #25d366 !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: none !important;
}
html body .social-icons a.pinterest,
html body .share-icons a.pinterest,
html body .social-icons a[class*="pinterest"] {
  background-color: #bd081c !important;
  background: #bd081c !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: none !important;
}
html body .social-icons a.linkedin,
html body .share-icons a.linkedin,
html body .social-icons a[class*="linkedin"] {
  background-color: #0077b5 !important;
  background: #0077b5 !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: none !important;
}
html body .social-icons a.instagram,
html body .share-icons a.instagram,
html body .social-icons a[class*="instagram"] {
  background-color: #e4405f !important;
  background: #e4405f !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: none !important;
}
html body .social-icons a.messenger,
html body .share-icons a.messenger,
html body .social-icons a[class*="messenger"] {
  background-color: #0084ff !important;
  background: #0084ff !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: none !important;
}

/* Force icons to be white and centered */
html body .social-icons a i,
html body .share-icons a i {
  color: #fff !important;
  opacity: 1 !important;
  filter: none !important;
  transform: translateY(
    1.5px
  ) !important; /* Move down slightly to center vertically */
  display: inline-block !important;
}

/* Disable any competing theme backgrounds */
html body .social-icons a,
html body .share-icons a {
  background-image: none !important;
  transition: transform 0.2s ease !important;
}
html body .social-icons a:hover,
html body .share-icons a:hover {
  transform: translateY(-3px) !important;
}

/* --- UTILITY CLASSES FOR CLEAN ARTICLES --- */
.premium-article-header {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.premium-article-header .overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(58px);
}
.premium-article-header .content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.highlight-box {
  background: #ffffff;
  border: 1px solid #eeeeee;
  padding: 25px;
  border-radius: 20px;
  border-left: 5px solid var(--primary-color);
  margin: 30px 0;
}
.highlight-box h3 {
  margin-top: 0;
  color: var(--primary-color);
}

.article-thumb-container {
  text-align: center;
  margin-bottom: 30px;
}
.article-thumb {
  border-radius: 15px;
  box-shadow: none !important;
  max-width: 100%;
  height: auto;
  transition: transform 0.3s;
}
.article-thumb:hover {
  transform: scale(1.02);
}

.check-list,
.bullet-list {
  padding-left: 20px !important;
  list-style: none !important;
}
.check-list li,
.bullet-list li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
}
.bullet-list li::before {
  content: "•";
  color: var(--primary-color);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.recent-posts-list {
  list-style: none;
  padding: 0;
}
.recent-posts-list li {
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
}
.recent-posts-list li a {
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.recent-posts-list li a:hover {
  color: var(--primary-color);
}

/* --- REFINED EZ-TOC STYLING --- */
#ez-toc-container {
  background: #fdfdfd;
  border: 1px solid #aaa;
  border-radius: 4px;
  padding: 10px 15px;
  margin: 15px 0;
  display: inline-block;
  min-width: 260px;
  max-width: 100%;
  box-shadow: none;
}
.ez-toc-title {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #333 !important;
  margin: 0 0 5px 0 !important;
  display: block !important;
}
#ez-toc-container input[type="checkbox"] {
  display: none !important;
}
.ez-toc-cssicon-toggle-label {
  cursor: pointer;
  padding: 0;
  border-radius: 0;
  background: transparent;
  transition: opacity 0.2s;
  height: auto;
  display: block;
  margin: 5px 0 10px 0;
}
.ez-toc-cssicon-toggle-label:hover {
  opacity: 0.7;
}
.ez-toc-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}
#ez-toc-container input[type="checkbox"]:checked ~ nav {
  display: none;
}
.ez-toc-list li,
.ez-toc-list ul {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.ez-toc-list li {
  font-size: 13px;
  line-height: 1 !important;
}
.ez-toc-list li:before {
  content: none !important;
}
.ez-toc-list a {
  color: #444 !important;
  text-decoration: none;
  transition: all 0.2s;
  display: block;
  padding: 2px 0 !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}
.ez-toc-list a:hover {
  color: var(--primary-color) !important;
  text-decoration: underline;
}
.ez-toc-list ul {
  margin-left: 15px !important;
}

/* --- COMPACT ARTICLE CONTENT --- */
.entry-content {
  line-height: 1.5 !important;
}
.entry-content p {
  margin-bottom: 8px !important;
}
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 12px !important;
  margin-bottom: 5px !important;
}
.premium-article-header {
  min-height: 40px !important;
}
.page-title-inner {
  min-height: 40px !important;
}
.article-inner {
  padding-top: 30px !important;
}

@media (max-width: 767px) {
  #ez-toc-container {
    padding: 15px;
    width: 100%;
  }
}

/* --- FIX ANCHOR SCROLL OFFSET (Sticky Header Fix) --- */
:target::before {
  content: "";
  display: block;
  height: 110px; /* Fixed header height + buffer */
  margin: -110px 0 0;
}

/* Modern approach for elements with IDs */
[id] {
  scroll-margin-top: 110px;
}
.ez-toc-section {
  scroll-margin-top: 110px;
  display: block;
}
/* Hide Table of Contents - User requested to hide "Nội dung chính" section on course pages */
#ez-toc-container {
  display: none !important;
}
/* --- News & Related Content --- */
.related-title {
  font-weight: 700;
  font-size: 25px;
  line-height: 1.5;
  color: var(--tqt-red);
  margin-top: 40px;
  margin-bottom: 20px;
}

.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-list li {
  list-style: none;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.related-list li a {
  font-weight: 700;
  font-size: 16px;
  color: var(--tqt-red);
  text-decoration: none;
  transition: opacity 0.3s;
}

.related-list li a:hover {
  opacity: 0.8;
}

/* Sidebar Recent Posts Widget */
.widget.flatsome_recent_posts {
  background: #f8f9fa !important;
  padding: 25px 20px !important;
  border-radius: 8px;
  margin-bottom: 30px;
}

.widget.flatsome_recent_posts .widget-title {
  display: block;
  font-weight: 700;
  font-size: 20px !important;
  text-align: center;
  color: var(--tqt-red) !important;
  margin-bottom: 20px !important;
  border-bottom: none !important;
}

.widget.flatsome_recent_posts .widget-title span {
  border-bottom: 2px solid var(--tqt-red);
  padding-bottom: 5px;
}

.recent-blog-posts a {
  color: #333 !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  line-height: 1.4 !important;
  transition: color 0.3s !important;
}

.recent-blog-posts a:hover {
  color: var(--tqt-red) !important;
}

.recent-blog-posts .badge-inner {
  border-radius: 4px !important;
}

/* ============================================================
   TRAINING DIRECTORY SHARED UI COMPONENTS
   Standardizing Course & Category pages
   ============================================================ */

/* 1. Course Highlights (Pills) */
.course-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin: 25px 0;
}

.highlight-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease;
  border: 1px solid #eee;
}

.highlight-item:hover {
  transform: translateY(-5px);
  border-color: var(--tqt-red);
}

.highlight-item i {
  font-size: 24px;
  color: var(--tqt-red);
  margin-bottom: 10px;
}

.highlight-item strong {
  display: block;
  font-size: 14px;
  color: #777;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.highlight-item span {
  font-weight: 700;
  color: #333;
}

/* 2. TQT Accordion (Curriculum) */
.tqt-accordion {
  margin: 20px 0;
}

.accordion-item {
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eee;
}

.accordion-header {
  width: 100%;
  padding: 15px 20px;
  background: #fff;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  color: #333;
  transition: all 0.3s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.accordion-header:hover,
.accordion-header.active {
  background: #fdf2f2;
  color: var(--tqt-red);
}

.accordion-icon {
  transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: #fff;
  padding: 0 20px;
}

.accordion-content.active {
  max-height: 1000px;
  padding: 20px;
  border-top: 1px solid #eee;
}

/* 3. Gallery & Image Grids */
.article-image-grid,
.compact-gallery {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
  margin: 25px 0 !important;
}

@media (min-width: 768px) {
  .article-image-grid,
  .compact-gallery {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
  }
}

.article-image-grid img,
.compact-gallery img {
  width: 100% !important;
  height: auto !important;
  border-radius: 12px !important;
  cursor: zoom-in;
  transition: transform 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.article-image-grid img:hover,
.compact-gallery img:hover {
  transform: scale(1.03) !important;
}

/* 4. Category Course Sections (Sliders) */
.course-section {
  position: relative;
  margin: 40px auto;
  max-width: 1600px;
  padding: 0 15px;
}

.course-section-title {
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  position: relative;
  padding-left: 15px;
  margin-bottom: 25px;
}

.course-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 80%;
  background: var(--tqt-red);
  border-radius: 2px;
}

.course-section-viewport {
  overflow: hidden;
  border-radius: 12px;
}

.course-section-track {
  display: flex !important;
  gap: 20px;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.course-card .col-inner {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee !important;
  background: #fff !important;
  transition: all 0.3s ease;
  height: 100%;
}

.course-card .col-inner:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1) !important;
  border-color: var(--tqt-red) !important;
}

.course-card .post-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
}

/* 5. Course Search */
.course-search-container {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border-radius: 25px;
  padding: 8px 20px;
  margin-bottom: 30px;
  border: 1px solid #eee;
  max-width: 400px;
}

.course-search-input {
  border: none !important;
  background: transparent !important;
  outline: none !important;
  padding: 5px 10px !important;
  width: 100% !important;
  font-size: 15px !important;
  box-shadow: none !important;
}

/* 6. Global Image Modal */
.tqt-image-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tqt-image-modal.active {
  display: flex;
  opacity: 1;
}

.tqt-image-modal-content {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.tqt-image-modal.active .tqt-image-modal-content {
  transform: scale(1);
}

/* 7. Course Slider Navigation */
.course-section .btn-prev,
.course-section .btn-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border: 2px solid #ddd;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  color: #555;
  font-size: 16px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.course-section .btn-prev i,
.course-section .btn-next i {
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-section .btn-prev:hover,
.course-section .btn-next:hover:not(:disabled) {
  background: #e8491d;
  border-color: #e8491d;
  color: #fff;
  box-shadow: 0 4px 12px rgba(232, 73, 29, 0.3);
}

.course-section .btn-prev:disabled,
.course-section .btn-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.course-section .btn-prev {
  left: -20px;
}

.course-section .btn-next {
  right: -32px;
}

@media (max-width: 600px) {
  .course-section .btn-prev {
    left: 0px;
  }
  .course-section .btn-next {
    right: 0px;
  }
}

.tqt-close-modal {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
}
/* --- AUTO-SYNC LATEST NEWS SECTION --- */
.tqt-latest-news-auto-update {
  width: 100%;
  margin: 40px 0;
  clear: both;
}
.tqt-latest-news-section {
  padding: 35px;
  background: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 12px;
}
.tqt-latest-news-section h2 {
  font-size: 1.6rem;
  margin-bottom: 30px;
  text-align: center;
  color: var(--tqt-black);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}
.tqt-latest-news-section h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--tqt-red);
  margin: 12px auto 0;
}
.tqt-news-auto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}
.tqt-news-auto-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid #f0f0f0;
}
.tqt-news-auto-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
  border-color: #eee;
}
.tqt-news-auto-card .card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f5f5f5;
  display: block;
}
.tqt-news-auto-card .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.tqt-news-auto-card:hover .card-thumb img {
  transform: scale(1.08);
}
.tqt-news-auto-card .card-info {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.tqt-news-auto-card .card-info h4 {
  font-size: 1.05rem;
  margin: 0 0 12px 0;
  line-height: 1.45;
  color: var(--tqt-black);
}
.tqt-news-auto-card .card-info h4 a {
  color: inherit;
  text-decoration: none;
}
.tqt-news-auto-card .card-info h4 a:hover {
  color: var(--tqt-red);
}
.tqt-news-auto-card .card-info .card-date {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.tqt-news-auto-card .read-more {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--tqt-red);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tqt-news-auto-card .read-more:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .tqt-latest-news-section {
    padding: 20px 15px;
  }
  .tqt-news-auto-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .tqt-latest-news-section h2 {
    font-size: 1.6rem;
  }
}

/* Mobile Category Backgrounds */
@media (max-width: 767px) {
  body.mobile-bg-sang-tao #wrapper,
  body.mobile-bg-sang-tao #main,
  body.mobile-bg-sang-tao #content {
    background-color: var(--tqt-bg-sang-tao) !important;
  }
  body.mobile-bg-rap #wrapper,
  body.mobile-bg-rap #main,
  body.mobile-bg-rap #content {
    background-color: var(--tqt-bg-rap) !important;
  }
  body.mobile-bg-cat-may #wrapper,
  body.mobile-bg-cat-may #main,
  body.mobile-bg-cat-may #content {
    background-color: var(--tqt-bg-cat-may) !important;
  }
  body.mobile-bg-san-xuat #wrapper,
  body.mobile-bg-san-xuat #main,
  body.mobile-bg-san-xuat #content {
    background-color: var(--tqt-bg-san-xuat) !important;
  }
}
