/* ==========================================================================
   TIMONA ACADEMY - MOBILE OPTIMIZATION
   Nạp SAU style.css / components.css / pages.css trên mọi trang.
   - ≤ 992px : tablet & mobile (menu drawer, sidebar xếp dọc, thanh mục lục)
   - ≤ 768px : mobile (header gọn, thanh hành động dưới, ẩn nút nổi)
   - ≤ 640px : điện thoại (rail cuộn ngang, danh sách gọn, bảng dạng thẻ)
   ========================================================================== */

/* Grid item chứa rail cuộn ngang không được nở theo nội dung */
.exact-dual-wrapper > *,
.students-video-grid > *,
.layout-with-sidebar > *,
.page-hero-grid > * {
  min-width: 0;
}

/* Banner riêng cho mobile (trang chủ) */
.slide-mobile-only {
  display: none;
}

/* Thanh mục lục cố định cho trang dài (JS tạo, chỉ hiện ≤ 992px) */
.mobile-section-nav {
  display: none;
}

/* Nhóm menu con trong drawer */
.drawer-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-family: inherit;
}

.drawer-group-toggle::after {
  content: '+';
  font-size: 18px;
  line-height: 1;
  color: #a4c2f4;
  transition: transform var(--transition);
}

.drawer-group.is-open .drawer-group-toggle::after {
  transform: rotate(45deg);
}

.drawer-sub {
  display: none;
  flex-direction: column;
  padding: 4px 0 8px 12px;
  border-left: 2px solid rgba(251, 176, 26, 0.5);
  margin: 2px 0 6px;
}

.drawer-group.is-open .drawer-sub {
  display: flex;
}

.drawer-sub a {
  color: #cfdcf7;
  font-size: 15px;
  font-weight: 600;
  padding: 8px 0;
}

.drawer-sub a:hover,
.drawer-sub a.active {
  color: var(--color-accent-gold);
}

.branch-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ==========================================================================
   ≤ 992px: TABLET & MOBILE
   ========================================================================== */
@media (max-width: 992px) {

  /* Sidebar khóa học: thẻ thông tin lên đầu, mục lục chuyển thành thanh cố định */
  .layout-with-sidebar > .sticky-sidebar {
    display: contents;
  }

  .layout-with-sidebar > .sticky-sidebar > .course-info-card:has(.course-info-list) {
    order: -1;
  }

  .layout-with-sidebar > .sticky-sidebar > .sidebar-card:has(.toc-list),
  .layout-with-sidebar > .sticky-sidebar > .sidebar-card:has(.disclosure-nav) {
    display: none;
  }

  .main-col [id],
  .main-col > section {
    scroll-margin-top: 132px;
  }

  .mobile-section-nav {
    display: flex;
    position: fixed;
    top: 78px;
    left: 0;
    right: 0;
    z-index: 990;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 9px 16px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 6px 16px rgba(0, 32, 88, 0.08);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .mobile-section-nav::-webkit-scrollbar {
    display: none;
  }

  .mobile-section-nav.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-section-nav a {
    flex-shrink: 0;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--color-primary);
    background: var(--color-accent-sky);
    border: 1px solid #d3e4f7;
    border-radius: 9999px;
    padding: 6px 13px;
    white-space: nowrap;
  }

  .mobile-section-nav a.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
  }

  /* Trang Liên hệ: bản đồ lên trước danh sách chi nhánh */
  #chi-nhanh .exact-dual-wrapper > .map-embed {
    order: -1;
    position: relative;
    top: 0;
  }
}

/* ==========================================================================
   ≤ 768px: MOBILE NỀN TẢNG
   ========================================================================== */
@media (max-width: 768px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    -webkit-tap-highlight-color: rgba(0, 32, 88, 0.12);
    /* chừa chỗ cho thanh hành động cố định phía dưới */
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  .container {
    padding: 0 16px;
  }

  /* Header gọn */
  .header-container {
    height: 60px;
  }

  .brand-logo-img {
    height: 36px;
  }

  .mobile-hamburger {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 0;
  }

  .mobile-section-nav {
    top: 60px;
  }

  .main-col [id],
  .main-col > section {
    scroll-margin-top: 116px;
  }

  /* Nút gọi/Zalo nổi trùng với thanh dưới -> ẩn trên mobile */
  .floating-actions-bar {
    display: none;
  }

  /* 4 nút (Gọi, Messenger, Zalo, Học bổng): icon trên, chữ dưới để vừa màn 360px */
  .mobile-bottom-bar {
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
    gap: 6px;
  }

  .mobile-bottom-btn {
    flex-direction: column;
    gap: 3px;
    min-height: 50px;
    padding: 6px 2px;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.2;
    border-radius: 10px;
  }

  /* Chống iOS tự phóng to khi nhập liệu (font < 16px) */
  input,
  select,
  textarea,
  .form-input,
  .form-select,
  .form-input-field,
  .form-select-field {
    font-size: 16px;
  }

  .form-input-field,
  .form-select-field,
  .form-input,
  .form-select {
    min-height: 46px;
    border-radius: 10px;
  }

  .form-submit-btn-orange,
  .form-submit-btn {
    min-height: 48px;
    border-radius: 10px;
    font-size: 16px;
  }

  /* Drawer cuộn được khi menu dài */
  .mobile-drawer-panel {
    width: 86vw;
    max-width: 340px;
    right: -360px;
    overflow-y: auto;
    padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
  }

  .drawer-nav-list {
    gap: 0;
  }

  .drawer-nav-link {
    padding: 12px 0;
  }

  .drawer-cta-wrap {
    padding-top: 18px;
  }

  /* Popup tư vấn dạng bottom-sheet */
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-window {
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    max-height: 92vh;
    overflow-y: auto;
    transform: translateY(100%);
  }

  .modal-backdrop.is-active .modal-window {
    transform: translateY(0);
  }

  .modal-header-banner {
    padding: 20px 20px 16px;
  }

  .modal-header-banner::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 40px;
    height: 4px;
    margin-left: -20px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.4);
  }

  .modal-form-body {
    padding: 18px 20px calc(22px + env(safe-area-inset-bottom));
    gap: 12px;
  }

  .toast-notice {
    top: 12px;
    left: 12px;
    right: 12px;
    transform: translateY(-140%);
  }

  .toast-notice.is-show {
    transform: translateY(0);
  }

  /* Tiêu đề section: tiêu đề và link xếp dọc */
  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 16px;
  }

  .section-title-h2 {
    font-size: 21px;
    line-height: 1.3;
  }

  .section-lead {
    font-size: 15.5px;
    margin: -4px 0 16px;
  }

  .news-tabs-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
    padding-bottom: 2px;
  }

  .news-tabs-bar::-webkit-scrollbar {
    display: none;
  }

  .news-tab-btn {
    flex-shrink: 0;
    font-size: 14.5px;
    padding: 8px 14px;
  }

  /* Khối đăng ký tư vấn */
  .leadgen-embedded-section {
    padding-bottom: 36px;
  }

  .leadgen-banner-card {
    padding: 24px 16px 16px;
    gap: 20px;
    border-radius: 16px;
  }

  .leadgen-info-col h2 {
    font-size: 23.5px;
  }

  .leadgen-info-col p {
    font-size: 15.5px;
    margin-bottom: 14px;
  }

  .perk-item {
    font-size: 15px;
    align-items: flex-start;
  }

  .leadgen-form-col {
    padding: 18px 14px;
  }

  /* Footer */
  .site-footer {
    padding: 32px 0 20px;
  }

  .footer-top-row {
    gap: 22px;
    padding-bottom: 22px;
  }

  .footer-contacts-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    font-size: 14.5px;
  }

  .footer-bottom-copy-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    line-height: 1.5;
  }

  .footer-legal-links {
    flex-wrap: wrap;
    gap: 6px 16px;
  }

  .footer-social-column {
    align-items: flex-start;
  }

  /* Hero trang con */
  .page-hero {
    padding: 16px 0 64px;
  }

  .page-hero::before {
    width: 320px;
    height: 320px;
    right: -160px;
    top: -140px;
  }

  .breadcrumb-trail {
    font-size: 14px;
    margin-bottom: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .breadcrumb-trail::-webkit-scrollbar {
    display: none;
  }

  .page-hero-grid {
    gap: 20px;
  }

  .page-hero-eyebrow {
    font-size: 13px;
  }

  .page-hero-title {
    font-size: 26px;
    margin-bottom: 10px;
  }

  .page-hero-lead {
    font-size: 16px;
    line-height: 1.65;
  }

  /* Chip thông tin: một hàng cuộn ngang thay vì nhiều dòng */
  .hero-chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 16px -16px 0;
    padding: 0 16px;
  }

  .hero-chip-row::-webkit-scrollbar {
    display: none;
  }

  .hero-chip {
    flex-shrink: 0;
    font-size: 14px;
    white-space: nowrap;
  }

  .hero-cta-row {
    margin-top: 18px;
    gap: 10px;
  }

  .hero-cta-row > * {
    flex: 1 1 140px;
    justify-content: center;
    text-align: center;
    padding: 11px 10px;
    font-size: 13px;
    letter-spacing: 0;
    line-height: 1.25;
    min-height: 46px;
  }

  .page-hero-media {
    aspect-ratio: 16 / 9;
    border-radius: 14px;
  }

  .page-body {
    margin-top: -44px;
  }

  .page-section {
    padding-bottom: 36px;
  }

  .content-card {
    padding: 20px 16px;
    border-radius: 14px;
  }

  .card-title-h2 {
    font-size: 18.5px;
    line-height: 1.35;
    align-items: flex-start;
  }

  .card-title-h2 .title-num {
    width: 26px;
    height: 26px;
    font-size: 13.5px;
    margin-top: 1px;
  }

  .prose {
    font-size: 16px;
  }

  .layout-with-sidebar {
    gap: 18px;
  }

  .main-col > .content-card + .content-card {
    margin-top: 18px;
  }

  /* Thẻ thông tin khóa học: gọn 2 cột */
  .course-info-head {
    padding: 14px 16px;
  }

  .course-info-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
    padding: 4px 16px;
  }

  .course-info-row {
    padding: 10px 0;
    font-size: 14.5px;
  }

  .course-info-cta {
    flex-direction: row;
    padding: 4px 16px 16px;
  }

  .course-info-cta > * {
    flex: 1;
    min-height: 44px;
    justify-content: center;
    font-size: 14px;
    padding: 10px 12px;
  }

  /* Trang chủ */
  .stats-bar-wrapper {
    margin-top: 14px;
    margin-bottom: 26px;
  }

  .page-hero + .stats-bar-wrapper {
    margin-top: -44px;
  }

  .exact-dual-section,
  .students-video-section,
  .news-events-section,
  .press-media-section,
  .branches-network-section {
    padding-bottom: 36px;
  }

  .exact-card-container {
    padding: 18px 16px;
    border-radius: 14px;
  }

  .exact-card-header {
    gap: 12px;
  }

  .exact-card-title {
    font-size: 18.5px;
  }

  .exact-link-action {
    white-space: nowrap;
    font-size: 14.5px;
  }

  .recap-showcase-card,
  .expert-video-box {
    padding: 14px;
  }

  .recap-hero-img,
  .video-facade-frame {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .press-logos-ribbon {
    grid-template-columns: repeat(3, 1fr);
    padding: 16px;
    gap: 12px;
  }

  .press-item-box {
    height: 44px;
  }

  .press-item-box img {
    max-height: 28px;
  }

  /* Lightbox */
  .lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .offer-banner {
    padding: 18px 16px;
    gap: 14px;
  }
}

/* ==========================================================================
   ≤ 640px: ĐIỆN THOẠI
   ========================================================================== */
@media (max-width: 640px) {

  /* ---------- Banner trang chủ: dùng bộ ảnh dọc riêng cho mobile ---------- */
  .slide-desktop-only {
    display: none;
  }

  .slide-mobile-only {
    display: block;
  }

  .banner-slide-item img {
    max-height: none;
    aspect-ratio: 6 / 5;
    object-fit: cover;
  }

  .slider-arrow-btn {
    display: none;
  }

  .slider-dots-box {
    bottom: 10px;
    gap: 6px;
  }

  .slider-dot {
    width: 8px;
    height: 8px;
  }

  .slider-dot.active {
    width: 22px;
  }

  /* Số liệu 2x2 */
  .stats-card {
    grid-template-columns: 1fr 1fr;
    padding: 14px;
    gap: 14px 10px;
    margin-top: 0;
    border-radius: 14px;
  }

  .stat-item {
    gap: 10px;
  }

  .stat-item::after {
    display: none;
  }

  .stat-icon-circle {
    width: 38px;
    height: 38px;
  }

  .stat-icon-circle svg {
    width: 18px;
    height: 18px;
  }

  .stat-number {
    font-size: 20px;
  }

  .stat-label {
    font-size: 11.5px;
    line-height: 1.3;
  }

  /* ---------- Rail cuộn ngang (thẻ ló sang phải để gợi ý vuốt) ---------- */
  .courses-2x2-subgrid,
  .course-grid:not(.course-list),
  .testimonial-grid,
  .mvv-grid,
  .corner-grid,
  .students-video-grid,
  .branches-grid-row:not(.branch-picker) {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 12px;
    margin-left: -16px;
    margin-right: -16px;
    padding: 4px 16px 12px;
    scroll-padding-left: 16px;
  }

  .courses-2x2-subgrid::-webkit-scrollbar,
  .course-grid:not(.course-list)::-webkit-scrollbar,
  .testimonial-grid::-webkit-scrollbar,
  .mvv-grid::-webkit-scrollbar,
  .corner-grid::-webkit-scrollbar,
  .students-video-grid::-webkit-scrollbar,
  .branches-grid-row:not(.branch-picker)::-webkit-scrollbar {
    display: none;
  }

  .courses-2x2-subgrid > *,
  .course-grid:not(.course-list) > *,
  .testimonial-grid > *,
  .mvv-grid > *,
  .students-video-grid > *,
  .branches-grid-row:not(.branch-picker) > * {
    flex: 0 0 82%;
    scroll-snap-align: start;
    min-width: 0;
  }

  .corner-grid > * {
    flex: 0 0 46%;
    scroll-snap-align: start;
  }

  /* Thẻ video dọc (Shorts) trong dải vuốt: hẹp hơn để khung 9:16 không quá cao. */
  .testimonial-grid > *:has(> .review-video--9-16) {
    flex-basis: 46%;
  }

  .courses-2x2-subgrid {
    margin-bottom: 14px;
  }

  .course-mini-thumb {
    height: 150px;
  }

  .course-mini-desc {
    font-size: 14.5px;
  }

  /* Lịch khai giảng trang chủ: xếp dọc cho giờ học không rớt dòng */
  .schedules-2col-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Thẻ thông tin khóa học: 1 cột cho giá trị dài (ca học) không bị bẻ nhiều dòng */
  .course-info-list {
    grid-template-columns: 1fr;
  }

  .schedule-mini-box {
    padding: 10px;
  }

  .schedule-mini-title {
    font-size: 13px;
    align-items: flex-start;
  }

  .commitments-2col-list {
    gap: 10px;
  }

  .faculty-photo-wide {
    height: 150px;
  }

  .faculty-dock-title {
    font-size: 17px;
  }

  .dock-label-txt {
    font-size: 12px;
  }

  /* ---------- Danh sách khóa học (trang Chuyên khoa): thẻ ngang gọn ---------- */
  .course-grid.course-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .course-list .course-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .course-list .course-card-thumb {
    aspect-ratio: auto;
    height: 100%;
    min-height: 132px;
  }

  .course-list .course-card-tag {
    display: none;
  }

  .course-list .course-card-body {
    padding: 12px 12px 12px 14px;
  }

  .course-list .course-card-body h3 {
    font-size: 15.5px;
    margin-bottom: 4px;
  }

  .course-list .course-card-body p {
    font-size: 14px;
    -webkit-line-clamp: 2;
    margin-bottom: 8px;
  }

  .course-list .course-meta-row {
    font-size: 13px;
    gap: 3px 10px;
    margin-bottom: 8px;
  }

  .course-list .course-mini-btn-row {
    padding-top: 6px;
  }

  .course-list .course-mini-btn-row .btn-pill-blue {
    padding: 5px 10px;
    font-size: 12.5px;
  }

  .faculty-tabs-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .faculty-tabs-bar::-webkit-scrollbar {
    display: none;
  }

  .faculty-tabs-bar a {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 14px;
    padding: 7px 14px;
  }

  /* ---------- Tin tức: thẻ ngang gọn (bài nổi bật giữ dạng lớn) ---------- */
  .news-cards-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .news-card-box:not(.is-featured) {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    align-items: center;
  }

  /* Ảnh nhỏ giữ đúng tỷ lệ ảnh đại diện, đặt cách mép thẻ để không hở nền khi chữ dài. */
  .news-card-box:not(.is-featured) .news-thumb-wrap {
    height: auto;
    min-height: 0;
    margin: 12px 0 12px 12px;
    width: auto;
    border-radius: 8px;
  }

  .news-card-box:not(.is-featured) .news-body-content {
    padding: 12px;
  }

  .news-card-box:not(.is-featured) .news-title-h4 {
    font-size: 15px;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .news-card-box:not(.is-featured) .news-snippet {
    display: none;
  }

  .news-card-box:not(.is-featured) .news-category-badge {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .news-card-box:not(.is-featured) .news-read-more {
    font-size: 13.5px;
  }

  .news-card-box.is-featured .news-thumb-wrap {
    height: auto;
  }

  .news-card-box.is-featured .news-body-content {
    padding: 16px;
  }

  .news-card-box.is-featured .news-title-h4 {
    font-size: 18px;
  }

  .news-card-box.is-featured .news-snippet {
    font-size: 15px;
    margin-bottom: 12px;
  }

  .pagination-row a {
    font-size: 14px;
  }

  /* ---------- Thẻ lợi ích: icon bên trái, gọn ---------- */
  .feature-grid,
  .feature-grid.cols-2,
  .feature-grid.cols-3 {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .feature-tile {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 3px;
    align-items: start;
    padding: 14px;
  }

  .feature-tile .feature-icon {
    grid-row: span 2;
    width: 40px;
    height: 40px;
  }

  .feature-tile .feature-icon svg {
    width: 19px;
    height: 19px;
  }

  .feature-tile h3 {
    font-size: 15.5px;
    align-self: center;
  }

  .feature-tile p {
    font-size: 14.5px;
    line-height: 1.55;
  }

  .feature-tile:hover {
    transform: none;
  }

  .reason-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .reason-item {
    padding: 10px;
    font-size: 14px;
    gap: 8px;
  }

  .reason-item .reason-num {
    width: 26px;
    height: 26px;
    font-size: 12.5px;
  }

  .mvv-card {
    padding: 18px 16px;
  }

  .check-list li {
    font-size: 15.5px;
  }

  .career-ladder {
    gap: 6px;
  }

  .career-ladder li {
    font-size: 14px;
    padding: 5px 12px 5px 5px;
  }

  /* ---------- Chương trình học: accordion (JS thêm .is-collapsible) ---------- */
  .curriculum-level.is-collapsible .curriculum-head {
    cursor: pointer;
    position: relative;
    padding-right: 44px;
  }

  .curriculum-level.is-collapsible .curriculum-head::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    transform: translateY(-30%) rotate(-135deg);
    transition: transform var(--transition);
  }

  .curriculum-level.is-collapsible.is-collapsed .curriculum-head {
    border-bottom: none;
  }

  .curriculum-level.is-collapsible.is-collapsed .curriculum-head::after {
    transform: translateY(-70%) rotate(45deg);
  }

  .curriculum-level.is-collapsed > :not(.curriculum-head) {
    display: none;
  }

  .curriculum-head {
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  .curriculum-head h3 {
    font-size: 16px;
  }

  .curriculum-col {
    padding: 14px;
  }

  /* ---------- Bảng ≥ 3 cột hiển thị dạng thẻ (JS thêm .is-stackable) ---------- */
  .data-table.is-stackable {
    min-width: 0;
  }

  .data-table.is-stackable thead {
    display: none;
  }

  .data-table.is-stackable,
  .data-table.is-stackable tbody,
  .data-table.is-stackable tr,
  .data-table.is-stackable td {
    display: block;
    width: 100%;
  }

  .data-table.is-stackable tr {
    padding: 10px 14px;
    border-bottom: 1px solid #edf2f9;
  }

  .data-table.is-stackable tbody tr:nth-child(even) td {
    background: transparent;
  }

  .data-table.is-stackable td {
    padding: 2px 0;
    border: none;
  }

  .data-table.is-stackable td:first-child {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 16px;
    margin-bottom: 4px;
  }

  .data-table.is-stackable td:not(:first-child) {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 15px;
  }

  .data-table.is-stackable td:not(:first-child)::before {
    content: attr(data-label);
    flex: 0 0 96px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--color-text-muted);
  }

  .data-table.is-stackable tr.group-row {
    background: var(--color-accent-sky);
    padding: 9px 14px;
  }

  .data-table.is-stackable tr.group-row td {
    margin: 0;
    font-size: 14px;
  }

  .table-scroll {
    border-radius: 12px;
  }

  /* ---------- Lộ trình 5 bậc: gọn ---------- */
  .roadmap-steps {
    row-gap: 26px;
    margin-top: 26px !important;
  }

  .roadmap-step {
    padding: 34px 14px 14px;
  }

  .roadmap-step::before {
    width: 34px;
    height: 34px;
    font-size: 15px;
    top: -15px;
  }

  /* ---------- Giảng viên / Ban giám hiệu ---------- */
  .faculty-grid,
  .faculty-grid.cols-3 {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .faculty-card-body {
    padding: 12px;
  }

  .faculty-card-body h3 {
    font-size: 15px;
  }

  .faculty-card-body .faculty-major {
    font-size: 12px;
  }

  .faculty-card-body li {
    font-size: 13.5px;
  }

  .hero-portrait-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .hero-portrait-grid span {
    left: 4px;
    right: 4px;
    bottom: 4px;
    font-size: 11.5px;
    padding: 3px 4px;
    text-align: center;
  }

  .leader-photo {
    max-width: 260px;
    margin: 0 auto;
  }

  .leader-name {
    font-size: 24px;
  }

  .leader-role {
    font-size: 12.5px;
  }

  .leader-highlights {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .leader-highlight {
    padding: 10px;
  }

  .leader-highlight strong {
    font-size: 18px;
  }

  .leader-highlight span {
    font-size: 12.5px;
    line-height: 1.35;
    display: block;
  }

  .leader-contact {
    flex-direction: column;
  }

  /* ---------- Gallery ---------- */
  .gallery-grid,
  .gallery-grid.cols-3 {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .gallery-grid.is-featured .gallery-item:first-child {
    grid-column: span 2;
    grid-row: auto;
  }

  .gallery-item .gallery-caption {
    font-size: 13px;
    padding: 14px 8px 6px;
  }

  /* ---------- Chi nhánh ---------- */
  .branch-card-box {
    padding: 16px;
    gap: 8px;
  }

  .branch-city-title {
    font-size: 16.5px;
  }

  .branch-picker {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .branch-picker .branch-card-box {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 2px;
    padding: 12px 14px;
  }

  .branch-picker .branch-city-title {
    grid-column: 1;
    font-size: 15.5px;
  }

  .branch-picker .branch-detail-txt {
    grid-column: 1;
    font-size: 14.5px;
  }

  .branch-picker .branch-map-link {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
    font-size: 13.5px;
    white-space: nowrap;
  }

  .map-embed,
  .map-embed iframe {
    min-height: 260px;
  }

  .contact-cards {
    gap: 10px;
  }

  .contact-card {
    padding: 14px;
    align-items: center;
  }

  .contact-card .feature-icon {
    width: 40px;
    height: 40px;
  }

  .contact-card .info-value {
    font-size: 16px;
  }

  /* ---------- Công khai ---------- */
  .doc-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 12px;
    gap: 12px;
  }

  .doc-item .doc-action {
    display: none;
  }

  .doc-item::after {
    content: '›';
    font-size: 24px;
    line-height: 1;
    color: var(--color-accent-blue);
  }

  .doc-title {
    font-size: 15px;
  }

  /* ---------- Ưu đãi ---------- */
  .offer-banner {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .offer-badge {
    width: 64px;
    height: 64px;
  }

  .offer-badge strong {
    font-size: 21px;
  }

  .offer-badge span {
    font-size: 10.5px;
  }

  .offer-banner h3 {
    font-size: 17px;
  }

  .offer-banner p {
    font-size: 15px;
  }

  .offer-banner > :last-child {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: center;
    min-height: 46px;
  }

  /* ---------- Góc học viên ---------- */
  .corner-tile-body {
    padding: 10px;
  }

  .corner-tile-body p {
    font-size: 13px;
  }

  .review-card-title {
    font-size: 15.5px;
  }

  /* ---------- FAQ ---------- */
  .faq-question-btn {
    padding: 14px;
    font-size: 16px;
  }

  .faq-answer {
    padding: 0 14px 14px;
    font-size: 15.5px;
  }

  /* ---------- Bài viết ---------- */
  .article-body h2 {
    font-size: 20px;
  }

  .article-body blockquote {
    padding: 12px 14px;
  }

  .mini-post {
    grid-template-columns: 72px 1fr;
  }
}

/* Vùng chạm tối thiểu 44px cho nút ở thẻ khoá (khổ điện thoại, máy tính bảng dọc): lớp vô hình nới vùng bấm,
   nút nhìn thấy giữ đúng cỡ designer (nút cao 27px). */
@media (max-width: 768px) {
  .btn-pill-blue,
  .course-mini-btn-row a.course-link-txt,
  .course-card-body a.course-link-txt {
    position: relative;
  }

  .btn-pill-blue::after,
  .course-mini-btn-row a.course-link-txt::after,
  .course-card-body a.course-link-txt::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 44px;
    transform: translateY(-50%);
  }
}

/* Thiết bị không hover: bỏ hiệu ứng nhấc thẻ gây nháy khi chạm */
@media (hover: none) {
  .course-card:hover,
  .news-card-box:hover,
  .faculty-card:hover,
  .course-mini-box:hover,
  .corner-tile:hover {
    transform: none;
  }
}

/* Thanh dưới 4 nút trên màn rất hẹp (≤360px, ví dụ iPhone SE 320px) */
@media (max-width: 360px) {
  .mobile-bottom-bar {
    padding-left: 8px;
    padding-right: 8px;
    gap: 4px;
  }

  .mobile-bottom-btn {
    font-size: 10px;
  }
}
