/* ============================================================================
   asorank.net — /assets/site-responsive.css
   Mobile patch layer. Purely additive: every rule lives inside
   `@media (max-width: 991px)` or `@media (max-width: 767px)`.
   Desktop (>= 992px) rendering is untouched.

   Covers two template systems:
     A) templets/bootstrap pages : /index.html, /cn/index.html  (cropium-*,
        col-lg-*; styles: templets/default/assets/css/style.css,
        bootstrap.min.css, /public/css/main.css)
     B) layui/website pages      : /keyword-installs/, /app-package-installs/,
        /ASO-optimized-how-to-promote-APP-in-Korea/, /contact-us/,
        /privacy-policy/ (layui grid + website/css/*.css)

   !important is used in exactly 3 places; each is commented with the reason.
   All three are needed only because the old templates set those sizes inline
   or because main.css may be injected after this file.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. GLOBAL SAFETY NET (both template systems)
   --------------------------------------------------------------------------- */
@media (max-width: 991px) {

  /* Fluid media: nothing may push the page wider than the viewport. */
  img {
    max-width: 100%;
    height: auto;
  }

  /* contact-us carries a legacy <iframe id="iframe1" width="1600">:
     presentational width/height attributes always lose to author CSS. */
  iframe {
    max-width: 100%;
  }

  /* Defensive: the audited pages contain no <table> today, but comparison /
     parameter tables must never blow up the page if one is added later.
     display:block + overflow-x:auto makes a table scroll inside itself
     without touching any HTML. */
  table {
    display: block;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 767px) {

  /* Text autosizing was globally disabled by main.css
     (`-webkit-text-size-adjust: none`); re-enable it for legibility. */
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  /* Final guard: absolutely-positioned decorations must never create
     horizontal scroll. */
  html,
  body {
    overflow-x: hidden;
  }
}

/* ---------------------------------------------------------------------------
   2A. BOOTSTRAP / templets pages (index.html, cn/index.html) — tablet
   --------------------------------------------------------------------------- */
@media (max-width: 991px) {

  /* ROOT CAUSE of the 1300px-wide mobile render: public/css/main.css sets
     `body { min-width: 1300px }`. !important is required because that
     stylesheet may be injected AFTER this file, and an equal-specificity
     tie would let 1300px win. */
  body {
    min-width: 0 !important;
    max-width: 100%;
  }
}

/* ---------------------------------------------------------------------------
   2B. BOOTSTRAP / templets pages — phone
   --------------------------------------------------------------------------- */
@media (max-width: 767px) {

  /* --- Hero ---------------------------------------------------------------- */
  /* Hero headline carries an inline `style="font-size:45px"` (and the
     stylesheet default is 58px): inline styles can only be beaten with
     !important. */
  .cropium-hero-section h1.title {
    font-size: 28px !important;
    line-height: 1.35;
  }
  .cropium-hero-section .single-slide-content .title-top font {
    font-size: 15px;
  }
  .cropium-hero-section .cropium-hero-slider {
    padding: 70px 0 40px;
  }
  .cropium-hero-section .hero-button {
    margin-top: 24px;
    gap: 10px;
  }
  /* 移动端按钮横排自适应宽度（图标+文字自然宽，放不下自动换行），不再拉满居中 */
  .cropium-hero-section .hero-button .template-button {
    display: inline-flex;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 11px 18px;
    text-align: left;
    box-sizing: border-box;
  }

  /* Purely decorative absolutely-positioned shapes — hidden on phones. */
  .cropium-hero-section .planet-image,
  .cropium-hero-section .hero-left-shape,
  .cropium-hero-section .cropium-hero-slider .single-slide-image .slide-shape-blue,
  .cropium-hero-section .cropium-hero-slider .single-slide-image .slide-shape-yellow,
  .cropium-hero-section .cropium-hero-slider .single-slide-image .tree-image,
  .footer-section .planet-shape {
    display: none;
  }
  /* Vertical slick dots sit 100px off the right edge — pull them in.
     Each dot draws an 80px decorative ::after line that sticks ~68px past
     the viewport; it is purely decorative, so drop it on phones. */
  .cropium-hero-section .cropium-hero-slider .slick-dots {
    right: 12px;
  }
  .cropium-hero-section .cropium-hero-slider .slick-dots button:after {
    display: none;
  }

  /* --- Section headings ---------------------------------------------------- */
  /* `body` prefix raises specificity above style.css `h1.title` etc.,
     so no !important is needed here. */
  body h1.title {
    font-size: 30px;
    line-height: 1.35;
  }
  body h2.title {
    font-size: 26px;
    line-height: 1.35;
  }
  body h3.title {
    font-size: 21px;
    line-height: 1.4;
  }
  .section-title {
    margin-bottom: 28px;
  }

  /* --- Pricing tabs / boxes ------------------------------------------------ */
  .cropium-pricing-section .tab-accordion .tab {
    margin-bottom: 30px;
  }
  .cropium-pricing-section .single-pricing-box {
    padding: 28px 22px;
  }
  .cropium-pricing-section .single-pricing-box .pricing-list {
    margin-top: 24px;
  }
  .cropium-pricing-section .single-pricing-box .pricing-button {
    margin-top: 24px;
  }

  /* --- Search popup (opens with min-width:600px in style.css) -------------- */
  .search-popup .search-form {
    min-width: 0;
    width: calc(100% - 32px);
    max-width: 420px;
  }

  /* --- Legacy main.css button reused inside feature cards
         (.footer_btn{width:215px}, sized via inline <font style>) ---------- */
  .footer_btn {
    width: 100%;
    max-width: 240px;
    margin: 24px auto 0;
    box-sizing: border-box;
  }
  /* Inline styles require !important. */
  .footer_btn font {
    font-size: 16px !important;
  }
}

/* ---------------------------------------------------------------------------
   3. LAYUI / website pages
   Root cause found in website/plugin/layui/css/layui.css: two corrupted
   grid rules (decimal point lost):
     .layui-col-xs5 { width: 33333333% }   -> meant 41.66666667%
     .layui-col-xs7 { width: 66666667% }   -> meant 58.33333333%
   Chrome clamps the value to 2^25 px, which is why those columns measured
   33,554,430px wide below 768px. Desktop is unaffected because the
   min-width:992px `.layui-col-md*` rules come later in that file and
   override; only < 768px exposes the bug. The two-row-descendant selectors
   below out-specify layui.css, so no !important is needed.
   No current page carries xs5/xs7 (the multi-column footer was replaced by
   the new .asofooter component), but the vendor file is still corrupted and
   layui grid markup is generated across the site — kept as insurance.
   --------------------------------------------------------------------------- */
@media (max-width: 767px) {

  /* Neutralise the corrupted grid columns. */
  .layui-row .layui-col-xs5,
  .layui-row .layui-col-xs7 {
    width: 100%;
  }

  /* Korea case-study page: breadcrumb gets width:100% + margin-left:1.3rem
     in reseller-e6c4c13fba.css, overflowing 13px. */
  .layout-content .blog-second-bread.breadcrumb-index-reseller {
    width: calc(100% - 1.3rem);
    box-sizing: border-box;
  }

  /* Korea page: hero band keeps desktop-scale negative offsets; tighten. */
  .primary-all-header.head-primary .header-content-keyword {
    padding-left: 0;
    padding-right: 0;
  }

  /* New unified footer (assets/site-footer.css): `.asofooter__btn{width:100%}`
     lacks box-sizing:border-box, so at 375px the button renders
     335 + 40px padding = 375px wide and sticks 20px out of the CTA card.
     (Root fix belongs in site-footer.css; neutralised here meanwhile.) */
  .asofooter .asofooter__btn {
    box-sizing: border-box;
  }

  /* contact-us legacy chat iframe (width=1600 attribute): pin to viewport. */
  iframe#iframe1 {
    width: 100%;
    height: 420px;
  }
}

/* ---------------------------------------------------------------------------
   4. privacy-policy (privacy-7b2fae37e2.css already collapses at <=768px;
   only small polish is needed)
   --------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .privacy-content {
    padding-left: 16px;
    padding-right: 16px;
  }
  body .privacy-title {
    font-size: 24px;
    height: auto;
    line-height: 1.4;
  }
  body .privacy-text {
    font-size: 15px;
    line-height: 1.7;
    word-break: break-word;
  }
}

/* ===== 子页顶部横幅柔化（2026-10-31）：圆角内缩，与 asopg 新页一致 ===== */
.primary-all-header {
  width: auto !important; /* 老模板 width:100% + 左右外边距会超出视口，右侧圆角被裁掉 */
  margin: 14px 16px 0 !important;
  border-radius: 22px !important;
  overflow: hidden;
}
@media (max-width: 767px) {
  .primary-all-header {
    margin: 10px 10px 0 !important;
    border-radius: 16px !important;
  }
}

/* ===== 定价区 Promote Now 按钮：橙黄渐变 → 品牌紫（2026-10-31） ===== */
.price-system-content .content-second .layui-btn {
  background: #6153ff !important;
  border-radius: 10px !important;
}
.price-system-content .content-second .layui-btn:hover {
  background: #4a3ce0 !important;
}
.price-system-content .content-second .layui-btn a,
.price-system-content .content-second .layui-btn .template-button,
.price-system-content .content-second .layui-btn span {
  color: #fff !important;
}
