/* Gia Sư SV · Mobile Suite 1.6.4 · Các trang còn lại.
 * Chỉ bố cục điện thoại. Không chỉnh desktop, không can thiệp chức năng.
 * Tách biệt CV, Lớp Mới, Góc Học Sinh và Học & Thi đã có giao diện riêng.
 * Không tải ảnh, font, script hoặc thư viện ngoài.
 */
@media screen and (max-width: 767px) {
  /* 1. NỀN TẢNG: chống tràn khung trên các trang marketing/nội dung. */
  body :where(.sv-home, .sv-find, .svp-experience, .sv-blog, .svt-hub,
              .sing-post-box, .gsp-directory-body, .gsp-page,
              .gssv-login-box, .gssv-cv-manage, .form-dang-ky-nhan-lop) {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  body :where(.sv-home, .sv-find, .svp-experience, .sv-blog, .svt-hub,
              .sing-post-box, .gsp-directory-body, .gsp-page) :where(h1,h2,h3,p,li,a) {
    overflow-wrap: break-word;
  }
  body :where(.sv-home, .sv-find, .svp-experience, .sv-blog, .svt-hub,
              .sing-post-box, .gsp-directory-body, .gsp-page)
       :where(img, video, figure) {
    max-width: 100%;
  }
  /* Header nguyên chức năng cũ; nút mở menu đạt vùng chạm tối thiểu. */
  .gsp-site-header :where(.gsp-brand,.gsp-brand-text,.gsp-mainbar,.gsp-mobile-actions) {
    min-width: 0;
  }
  .gsp-site-header :where(.gsp-menu-button,.gsp-mobile-call) {
    min-height: 44px;
    min-width: 44px;
  }

  /* 2. TRANG CHỦ: giữ slider/danh sách có sẵn, chỉ căn nội dung và CTA. */
  .sv-home :where(.sv-hero-copy,.sv-hero-visual,.sv-need-card,.sv-need-card__body,
                  .sv-section-head,.sv-hero-assurances) {min-width: 0;}
  .sv-home .sv-hero-copy h1 {font-size: clamp(28px, 7.2vw, 36px);line-height: 1.2;}
  .sv-home .sv-hero-copy .sv-lead {font-size: 15px;line-height: 1.6;}
  .sv-home .sv-actions {display: grid;grid-template-columns: minmax(0,1fr);gap: 9px;}
  .sv-home .sv-actions > .sv-btn {width: 100%;min-height: 44px;max-width: 100%;
                                  justify-content: center;text-align: center;}
  .sv-home :where(.sv-home-cover,.sv-need-media) img {max-width: 100%;height: auto;}
  .sv-home .sv-need-card :where(h3,p,a) {overflow-wrap: break-word;}
  .sv-home .sv-need-cta {min-height: 44px;align-content: center;}
  .sv-home :where(.sv-hero-assurances,.sv-need-tags) {max-width: 100%;}

  /* 3. TÌM GIA SƯ / TRANG PHỤ HUYNH: form đủ rộng, không vỡ lưới. */
  .sv-find .svp-hero-grid {grid-template-columns: minmax(0,1fr);gap: 16px;}
  .sv-find .svp-hero-copy h1 {font-size: clamp(28px,7.4vw,38px);line-height: 1.2;}
  .sv-find .svp-form-card {min-width: 0;max-width: 100%;}
  .sv-find .svp-actions {display: grid;grid-template-columns: minmax(0,1fr);gap: 9px;}
  .sv-find .svp-actions > a {width: 100%;min-height: 44px;justify-content: center;}
  .sv-find .sv-parent-form__grid {display: grid;grid-template-columns: minmax(0,1fr);gap: 12px;}
  .sv-find .sv-parent-form__grid > * {min-width: 0;}
  .sv-find .sv-parent-form :where(input:not([type=radio]):not([type=checkbox]):not([type=hidden]),select,textarea) {
    box-sizing: border-box;width: 100%;min-width: 0;max-width: 100%;font-size: 16px;
  }
  .sv-find .sv-parent-form :where(button[type=submit],input[type=submit]) {
    max-width: 100%;min-height: 44px;white-space: normal;
  }
  .sv-find :where(.svp-goals,.svp-trust) {max-width: 100%;flex-wrap: wrap;}
  .sv-find .svp-goals button {min-height: 40px;white-space: normal;text-align: center;}
  .sv-find :where(.svp-suvi,.svp-suvi-caption) {min-width: 0;}

  /* 4. GIA SƯ / TÌM LỚP: hero, thẻ lớp và các bước gọn trên điện thoại. */
  .svt-hub .svp-hero-grid {grid-template-columns: minmax(0,1fr);gap: 14px;}
  .svt-hub .svp-hero-grid > * {min-width: 0;}
  .svt-hub .svp-actions {display: grid;grid-template-columns: minmax(0,1fr);gap: 9px;}
  .svt-hub .svp-actions .svp-btn {display: flex;width: 100%;max-width: 100%;
                                  min-height: 44px;justify-content: center;text-align: center;}
  .svt-hub :where(.svt-classes,.svt-steps,.svp-three) {
    grid-template-columns: minmax(0,1fr);gap: 13px;
  }
  .svt-hub :where(.svt-class,.svt-class-heading,.svt-assistant-hero,.svp-article-body) {min-width: 0;}
  .svt-hub .svt-class-heading > .svp-btn {width: 100%;min-height: 44px;}
  .svt-hub .svt-class dl > div {grid-template-columns: minmax(76px,26%) minmax(0,1fr);gap: 8px;}
  .svt-hub :where(.svt-class,.svp-article-body) :where(h3,p,a,dd) {overflow-wrap: break-word;}
  .svt-hub .svp-article-image img {width: 100%;max-width: 100%;height: auto;}

  /* 4b. GÓC PHỤ HUYNH: trang danh mục dùng mẫu editorial riêng. */
  body.category-phu-huynh .svp-parent-hub :where(.svp-parent-editorial,.svp-parent-topics,
                  .svp-parent-reading,.svp-parent-guide,.svp-article-body) {min-width: 0;}
  body.category-phu-huynh .svp-parent-hub :where(.svp-actions,.svp-three) {
    display: grid;grid-template-columns: minmax(0,1fr);gap: 12px;
  }
  body.category-phu-huynh .svp-parent-hub .svp-actions .svp-btn {
    display: flex;width: 100%;min-height: 44px;justify-content: center;
  }
  body.category-phu-huynh .svp-parent-hub :where(.svp-parent-editorial,.svp-parent-guide) {
    grid-template-columns: minmax(0,1fr);
  }
  body.category-phu-huynh .svp-parent-hub .svp-article-image img {
    display: block;width: 100%;max-width: 100%;height: auto;
  }
  body.category-phu-huynh .svp-parent-hub :where(h1,h2,h3,p,a) {overflow-wrap: break-word;}

  /* 5. CẨM NANG: tìm kiếm một cột, thẻ bài và ảnh cân đối. */
  .sv-blog :where(.svb-wrap,.svb-feature-body,.svb-card-body,.svb-topic) {min-width: 0;}
  .sv-blog .svb-hero h1 {font-size: clamp(28px,7.4vw,36px);line-height: 1.22;}
  .sv-blog :where(.svb-feature,.svb-topics,.svb-grid) {
    display: grid;grid-template-columns: minmax(0,1fr);gap: 13px;
  }
  .sv-blog .svb-search-row {display: grid;grid-template-columns: minmax(0,1fr);gap: 9px;}
  .sv-blog .svb-search-row input[type=search] {font-size: 16px;}
  .sv-blog .svb-search-row input[type=search],
  .sv-blog .svb-search-row button {box-sizing: border-box;width: 100%;max-width: 100%;min-height: 44px;}
  .sv-blog .svb-card {min-width: 0;overflow: hidden;}
  .sv-blog :where(.svb-thumb,.svb-feature-image) img {
    display: block;width: 100%;max-width: 100%;height: auto;object-fit: cover;
  }
  .sv-blog :where(.svb-card-body,.svb-feature-body) :where(h2,h3,p,a) {overflow-wrap: break-word;}
  .sv-blog .svb-section-head {display: flex;flex-wrap: wrap;align-items: start;gap: 7px;}
  .sv-blog .svb-count {white-space: normal;}

  /* 6. HỒ SƠ / ĐỘI NGŨ GIA SƯ: không phá carousel có sẵn. */
  .gsp-directory-body .gsp-directory-grid {grid-template-columns: minmax(0,1fr);gap: 15px;}
  .gsp-directory-body .gsp-filters {grid-template-columns: minmax(0,1fr);gap: 12px;}
  .gsp-directory-body .gsp-filters > * {grid-column: auto;min-width: 0;}
  .gsp-directory-body .gsp-filters :where(input:not([type=checkbox]):not([type=radio]), select, button) {
    box-sizing: border-box;max-width: 100%;width: 100%;min-height: 44px;font-size: 16px;
  }
  .gsp-page :where(.gsp-card,.gsp-card-body,.gsp-card-actions,.gsp-profile-intro,
                   .gsp-detail-grid,.gsp-detail-section) {min-width: 0;}
  .gsp-page .gsp-card-actions {display: grid;grid-template-columns: minmax(0,1fr);gap: 9px;}
  .gsp-page .gsp-card-actions .gsp-btn {width: 100%;max-width: 100%;min-height: 44px;}
  .gsp-page .gsp-card :where(h3,p,li,a) {overflow-wrap: break-word;}
  .gsp-page .gsp-profile-hero {grid-template-columns: minmax(0,1fr);}
  .gsp-page .gsp-profile-hero :where(img,figure) {max-width: 100%;height: auto;}
  .gsp-page .gsp-detail-grid {grid-template-columns: minmax(0,1fr);}

  /* 7. FORM ĐĂNG KÝ NHẬN LỚP: form cũ nhiều ô chia cột trên desktop. */
  body.page-id-41 .form-dang-ky-nhan-lop {width: 100%;max-width: 100%;}
  body.page-id-41 .form-dang-ky-nhan-lop :where(.row,.form-group) {min-width: 0;}
  body.page-id-41 .form-dang-ky-nhan-lop .row {flex-wrap: wrap;}
  body.page-id-41 .form-dang-ky-nhan-lop .row > [class*="col-"] {
    flex: 0 0 100%;width: 100%;max-width: 100%;min-width: 0;
  }
  body.page-id-41 .form-dang-ky-nhan-lop :where(input:not([type=radio]):not([type=checkbox]):not([type=hidden]),select,textarea) {
    box-sizing: border-box;width: 100%;max-width: 100%;min-width: 0;font-size: 16px;
  }
  body.page-id-41 .form-dang-ky-nhan-lop :where(.form-label,label,small) {
    max-width: 100%;overflow-wrap: break-word;
  }
  body.page-id-41 .form-dang-ky-nhan-lop .form-check-inline {
    display: inline-flex;align-items: center;gap: 6px;margin: 3px 12px 3px 0;
  }
  body.page-id-41 .form-dang-ky-nhan-lop :where(button[type=submit],input[type=submit]) {
    box-sizing: border-box;max-width: 100%;min-height: 44px;white-space: normal;
  }

  /* 8. GÓC GIA SƯ: chỉ form truy cập, không chạm dashboard sau đăng nhập. */
  body.gssv-tp-page .gssv-tp-login {min-width: 0;max-width: 100%;}
  body.gssv-tp-page .gssv-tp-login-hero {min-width: 0;max-width: 100%;}
  body.gssv-tp-page .gssv-tp-login-form :where(input:not([type=radio]):not([type=checkbox]),button) {
    box-sizing: border-box;width: 100%;max-width: 100%;min-width: 0;min-height: 44px;font-size: 16px;
  }
  body.gssv-tp-page .gssv-tp-login-form :where(label,p) {overflow-wrap: break-word;}
  body.gssv-tp-page .gssv-tp-about-links {display: flex;flex-wrap: wrap;gap: 8px;}
  body.gssv-tp-page .gssv-tp-login-logo {max-width: min(100%,140px);height: auto;}

  /* 9. LỊCH DẠY / YÊU CẦU CẬP NHẬT CV: thao tác một tay. */
  body.page-id-3919 .gssv-login-box,
  body.page-id-4049 .gssv-cv-manage {box-sizing: border-box;width: 100%;max-width: 100%;padding: 18px;}
  body.page-id-3919 .gssv-login-box form,
  body.page-id-4049 .gssv-cv-manage form {display: grid;grid-template-columns: minmax(0,1fr);gap: 12px;}
  body.page-id-3919 .gssv-login-box :where(input:not([type=hidden]),button),
  body.page-id-4049 .gssv-cv-manage :where(input:not([type=hidden]),button) {
    box-sizing: border-box;width: 100%;max-width: 100%;min-width: 0;
    min-height: 44px;font-size: 16px;
  }
  body.page-id-3919 .gssv-login-box :where(h1,h2,p,label),
  body.page-id-4049 .gssv-cv-manage :where(h1,h2,p,label) {overflow-wrap: break-word;}

  /* 10. BÀI VIẾT / BÀI SEO / TRANG THÔNG TIN: chữ, ảnh và bảng dễ đọc. */
  body.single-post .sing-post-box {min-width: 0;max-width: 100%;}
  body.single-post .sing-post-box h1.big-title {
    font-size: clamp(26px,7vw,34px);line-height: 1.25;text-align: left;
    overflow-wrap: break-word;
  }
  body.single-post :where(.post_content,.editor,.gssv-seo-article) {
    min-width: 0;max-width: 100%;font-size: 16px;line-height: 1.66;
  }
  body.single-post .post_content :where(h2,h3) {line-height: 1.34;margin-top: 1.15em;}
  body.single-post .post_content :where(img,video,iframe,figure) {
    box-sizing: border-box;max-width: 100%;
  }
  body.single-post .post_content :where(img,video) {height: auto;}
  body.single-post .post_content :where(figure.gssv-seo-figure) {margin-inline: 0;}
  body.single-post .post_content :where(figcaption) {font-size: 13px;line-height: 1.55;}
  body.single-post .post_content :where(table,pre) {
    display: block;max-width: 100%;overflow-x: auto;-webkit-overflow-scrolling: touch;
  }
  body.single-post .post_content :where(a,p,li) {overflow-wrap: break-word;}
  body.single-post .sing-post-box .tags {max-width: 100%;overflow-wrap: break-word;}

  /* Chuyên mục ít bài và kết quả tìm kiếm dùng template WordPress cũ. */
  body:is(.search,.category-chung-chi-tieng-anh) :where(.page-search,.page-archive) {
    box-sizing: border-box;min-width: 0;max-width: 100%;
  }
  body:is(.search,.category-chung-chi-tieng-anh) :where(.page-search,.page-archive) .article {
    min-width: 0;max-width: 100%;
  }
  body:is(.search,.category-chung-chi-tieng-anh) :where(.page-search,.page-archive) .article .row {
    flex-wrap: wrap;
  }
  body:is(.search,.category-chung-chi-tieng-anh) :where(.page-search,.page-archive) .article .row > [class*="col-"] {
    flex: 0 0 100%;width: 100%;max-width: 100%;min-width: 0;
  }
  body:is(.search,.category-chung-chi-tieng-anh) :where(.page-search,.page-archive) .article :where(img,figure,.reponsive-image) {
    box-sizing: border-box;max-width: 100%;height: auto;
  }
  body:is(.search,.category-chung-chi-tieng-anh) :where(.page-search,.page-archive) .article :where(.title,.des) {
    min-width: 0;overflow-wrap: break-word;
  }
  body:is(.search,.category-chung-chi-tieng-anh) .dll-pagination {
    display: flex;flex-wrap: wrap;align-items: center;justify-content: center;gap: 7px;
  }
  body:is(.search,.category-chung-chi-tieng-anh) .dll-pagination a,
  body:is(.search,.category-chung-chi-tieng-anh) .dll-pagination .current {
    display: inline-flex;align-items: center;justify-content: center;
    min-height: 44px;min-width: 38px;
  }
  body.error404 .list-product {min-width: 0;max-width: 100%;}
  body.error404 .list-product :where(h1,h2,p,a) {overflow-wrap: break-word;}

  /* Các trang văn bản còn lại (chính sách, xóa dữ liệu, nguồn đối chiếu). */
  body:is(.page-id-3,.page-id-4575,.page-id-4261)
    :where(.post_content,.editor) {min-width: 0;max-width: 100%;font-size: 16px;line-height: 1.66;}
  body:is(.page-id-3,.page-id-4575,.page-id-4261)
    :where(.post_content,.editor) :where(img,video,iframe,figure) {max-width: 100%;height: auto;}
  body:is(.page-id-3,.page-id-4575,.page-id-4261)
    :where(.post_content,.editor) :where(pre,table) {
      display: block;max-width: 100%;overflow-x: auto;-webkit-overflow-scrolling: touch;
    }
  body:is(.page-id-3,.page-id-4575,.page-id-4261)
    :where(.post_content,.editor) :where(h1,h2,h3,a,p,li) {overflow-wrap: break-word;}
}
@media screen and (max-width: 359px) {
  /* Điện thoại rất hẹp: thêm khoảng thở nhưng không ẩn nội dung. */
  .sv-home .sv-hero-copy h1,
  .sv-find .svp-hero-copy h1,
  .sv-blog .svb-hero h1 {font-size: 27px;}
  .sv-blog .svb-search-row,
  .sv-find .sv-parent-form__grid {gap: 8px;}
}
