
/* ======================================================
   MỘC TRÀ SITE POLISH 1.0.4
   Target desktop width giống homepage: 1180px
   ====================================================== */

html.mtsp-lock-x,
body.mtsp-lock-x{
  overflow-x:clip !important;
}

/* Chính wrapper plugin được JS nhận diện */
.mtsp-huyenhoc-shell-force{
  width:min(1180px, calc(100vw - 40px)) !important;
  max-width:min(1180px, calc(100vw - 40px)) !important;
  min-width:0 !important;
  margin-left:auto !important;
  margin-right:auto !important;
  box-sizing:border-box !important;
}

/* Các lớp trung gian từ shortcode/plugin ra theme */
.mtsp-huyenhoc-ancestor-force{
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  margin-left:auto !important;
  margin-right:auto !important;
  float:none !important;
  box-sizing:border-box !important;
}

/* Các section lớn đang kế thừa max-width 680/720/760 */
.mtsp-huyenhoc-section-force{
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}

/* Giữ hình/sơ đồ/bảng nằm trong khung */
.mtsp-huyenhoc-shell-force img,
.mtsp-huyenhoc-shell-force svg,
.mtsp-huyenhoc-shell-force canvas,
.mtsp-huyenhoc-shell-force table{
  max-width:100% !important;
}

/* Bảng dữ liệu và khối lá số cần được phép mở rộng */
.mtsp-huyenhoc-shell-force table{
  width:100%;
}

.mtsp-huyenhoc-shell-force :is(
  [class*="chart"],
  [class*="matrix"],
  [class*="ziwei"],
  [class*="tuvi"],
  [class*="tu-vi"],
  [class*="bazi"],
  [class*="bat-tu"],
  [class*="astrolog"],
  [class*="numerolog"],
  [class*="result"],
  [class*="reading"],
  [class*="report"]
){
  max-width:100% !important;
  box-sizing:border-box !important;
}

/* Apps page */
.mtsp-apps-shell-force{
  width:min(1180px, calc(100vw - 40px)) !important;
  max-width:min(1180px, calc(100vw - 40px)) !important;
  margin-left:auto !important;
  margin-right:auto !important;
  box-sizing:border-box !important;
}

.mtsp-apps-ancestor-force{
  width:100% !important;
  max-width:none !important;
  float:none !important;
  box-sizing:border-box !important;
}

/* Travel empty state */
.mtsp-travel-empty{
  width:min(1180px, calc(100vw - 40px));
  margin:56px auto 80px;
  padding:44px 24px;
  border:1px solid rgba(200,154,60,.28);
  border-radius:24px;
  text-align:center;
  background:linear-gradient(180deg,#fff,#fbf8f2);
  color:#0D1B34;
  font-size:clamp(20px,2vw,28px);
  font-weight:700;
}

/* PDF toolbar */
.mtsp-pdf-toolbar{
  width:100%;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin:22px 0 10px;
  flex-wrap:wrap;
}

.mtsp-pdf-btn{
  border:0;
  border-radius:13px;
  padding:13px 18px;
  background:linear-gradient(135deg,#C89A3C,#E6C07A);
  color:#111827;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}

.mtsp-pdf-hint{
  font-size:12px;
  color:#98A2B3;
}

/* Desktop vừa */
@media (max-width:1240px){
  .mtsp-huyenhoc-shell-force,
  .mtsp-apps-shell-force{
    width:calc(100vw - 48px) !important;
    max-width:calc(100vw - 48px) !important;
  }
}

/* Tablet/mobile */
@media (max-width:767px){
  .mtsp-huyenhoc-shell-force,
  .mtsp-apps-shell-force{
    width:calc(100vw - 24px) !important;
    max-width:calc(100vw - 24px) !important;
  }

  .mtsp-pdf-toolbar{
    justify-content:stretch;
  }

  .mtsp-pdf-btn{
    width:100%;
  }

  .mtsp-pdf-hint{
    width:100%;
    text-align:center;
  }
}


/* ======================================================
   HERO CLEANUP 1.0.3
   Bỏ title của WordPress, chỉ giữ hero Huyền học.
   ====================================================== */

/* JS gắn class này cho heading ngoài hero */
.mtsp-hide-page-title{
  display:none !important;
  margin:0 !important;
  padding:0 !important;
  height:0 !important;
  min-height:0 !important;
  border:0 !important;
}

/* Nếu wrapper của page title chỉ chứa đúng heading đó thì thu gọn luôn. */
.mtsp-hide-page-title-wrap{
  display:none !important;
  margin:0 !important;
  padding:0 !important;
  min-height:0 !important;
}

/* Tiêu đề hero chính */
.mtsp-huyenhoc-hero-title{
  max-width:900px !important;
  margin-top:0 !important;
  margin-bottom:18px !important;
  font-size:clamp(52px,5.4vw,82px) !important;
  line-height:1.02 !important;
  letter-spacing:-0.02em !important;
}

/* Subtitle theo đúng thông điệp mới */
.mtsp-huyenhoc-hero-subtitle{
  max-width:760px !important;
  margin-top:0 !important;
  margin-bottom:22px !important;
  font-size:clamp(15px,1.25vw,19px) !important;
  line-height:1.65 !important;
  color:rgba(248,244,238,.82) !important;
}

@media(max-width:767px){
  .mtsp-huyenhoc-hero-title{
    font-size:clamp(40px,12vw,58px) !important;
    line-height:1.04 !important;
  }

  .mtsp-huyenhoc-hero-subtitle{
    font-size:15px !important;
    line-height:1.6 !important;
  }
}


/* ======================================================
   HERO FINAL 1.0.5
   Xóa nhãn "Mộc Trà" đứng lẻ phía trên hero.
   ====================================================== */

.mtsp-hide-orphan-eyebrow{
  display:none !important;
  margin:0 !important;
  padding:0 !important;
  height:0 !important;
  min-height:0 !important;
  border:0 !important;
  overflow:hidden !important;
}

.mtsp-hide-orphan-eyebrow-wrap{
  display:none !important;
  margin:0 !important;
  padding:0 !important;
  min-height:0 !important;
  border:0 !important;
}

/* Thu gọn khoảng hở phía trên hero sau khi bỏ title/eyebrow */
.mtsp-huyenhoc-shell-force{
  margin-top:0 !important;
}


/* 1.0.5 — xóa nguyên kicker block trước hero */
.mtsp-remove-prehero-kicker{
  display:none !important;
  visibility:hidden !important;
  width:0 !important;
  height:0 !important;
  min-height:0 !important;
  max-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  overflow:hidden !important;
}

/* Nếu theme để spacing riêng trên hero sau kicker */
.mtsp-huyenhoc-shell-force,
.mtsp-huyenhoc-shell-force:first-child{
  margin-top:0 !important;
}


/* ======================================================
   1.0.6 — DỨT ĐIỂM "MỘC TRÀ" ĐỨNG LẺ
   ====================================================== */
.mtsp-kill-orphan-moctrablock{
  display:none !important;
  visibility:hidden !important;
  opacity:0 !important;
  width:0 !important;
  min-width:0 !important;
  max-width:0 !important;
  height:0 !important;
  min-height:0 !important;
  max-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  outline:0 !important;
  overflow:hidden !important;
  position:absolute !important;
  pointer-events:none !important;
}
.mtsp-kill-orphan-moctrablock::before,
.mtsp-kill-orphan-moctrablock::after{
  display:none !important;
  content:none !important;
}


/* ======================================================
   v1.0.7 — NO HERO
   Giữ PAGE TITLE, bỏ toàn bộ hero Huyền học.
   ====================================================== */

.mtsp-hide-huyenhoc-hero{
  display:none !important;
  visibility:hidden !important;
  height:0 !important;
  min-height:0 !important;
  max-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  overflow:hidden !important;
}

/* Bản này KHÔNG ẩn page title nữa. */
.mtsp-show-page-title{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  overflow:visible !important;
}

/* Nếu JS cũ từng gắn class ẩn title, vô hiệu hóa nó trên bản NO HERO. */
body .mtsp-show-page-title.mtsp-hide-page-title{
  display:block !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  margin-top:0 !important;
  overflow:visible !important;
}

/* Xóa khoảng trống thừa giữa tiêu đề trang và form */
.mtsp-nohero-content-tight{
  margin-top:0 !important;
  padding-top:0 !important;
}

/* Section bắt đầu bằng "Hồ sơ cá nhân" sẽ là nội dung đầu tiên */
.mtsp-profile-start{
  margin-top:18px !important;
  padding-top:0 !important;
}

@media (min-width: 900px){
  .mtsp-profile-start{
    margin-top:22px !important;
  }
}


/* ======================================================
   v1.0.8 — CLEAN FINAL LAYOUT
   ====================================================== */

/* XÓA TOÀN BỘ WRAPPER HERO CŨ */
.mtsp-remove-entire-hero-wrapper{
  display:none !important;
  visibility:hidden !important;
  opacity:0 !important;
  width:0 !important;
  min-width:0 !important;
  max-width:0 !important;
  height:0 !important;
  min-height:0 !important;
  max-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:none !important;
  background-image:none !important;
  box-shadow:none !important;
  overflow:hidden !important;
}

/* TITLE TRANG: VỪA PHẢI + CHÍNH GIỮA */
.mtsp-page-title-final{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;

  width:100% !important;
  max-width:1180px !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;

  margin:34px auto 26px !important;
  padding:0 20px !important;

  text-align:center !important;
  font-size:clamp(34px,3.2vw,52px) !important;
  line-height:1.12 !important;
  letter-spacing:-0.02em !important;
  font-weight:400 !important;

  overflow:visible !important;
}

/* Wrapper title không được tạo chiều cao khổng lồ */
.mtsp-page-title-wrap-final{
  display:block !important;
  width:100% !important;
  max-width:none !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;

  margin:0 !important;
  padding:0 !important;

  background:none !important;
  background-image:none !important;
}

/* KHỐI HỒ SƠ BẮT ĐẦU NGAY SAU TITLE */
.mtsp-profile-final{
  margin-top:0 !important;
  padding-top:0 !important;
}

/* Wrapper chung không tạo gap lớn */
.mtsp-huyenhoc-shell-force{
  margin-top:0 !important;
  padding-top:0 !important;
}

.mtsp-nohero-content-tight{
  margin-top:0 !important;
  padding-top:0 !important;
}

/* Desktop: khoảng cách đẹp, gọn */
@media (min-width: 900px){
  .mtsp-page-title-final{
    margin-top:34px !important;
    margin-bottom:30px !important;
  }
}

/* Mobile */
@media (max-width: 767px){
  .mtsp-page-title-final{
    margin-top:22px !important;
    margin-bottom:20px !important;
    padding:0 14px !important;
    font-size:clamp(30px,9vw,40px) !important;
  }
}
