
/* ==========================================================
   L0. 通用防溢出（最低优先级，只兜底不改版式）
   ========================================================== */
.visual_plugins_container {
  overflow-x: clip;
  min-width: 0;
}
.compute_item_img,
.compute_process_img,
.poster_box,
.stats_grid,
.poster_list {
  max-width: 100%;
  box-sizing: border-box;
}
.compute_process_img img {
  max-width: 100% !important;
  max-height: 100% !important;
}

/* 按钮与文字防御：防溢出 + 允许换行 */
.themes_box_button,
.themes_box_inquiry_button_alert,
.themes_box_inquiry_button_link,
.carousel_btn,
.i_button {
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  text-align: center;
  display: inline-block;
}
.themes_box_title h2,
.themes_box_title h3,
.themes_box_subtitle,
.themes_text_content,
.stat_label,
.i_content,
.t_content,
.carousel_subtitle {
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

/* ==========================================================
   L1. mode_3 — 横幅轮播
   模板用 padding-top:41.67% 内联 + 绝对定位 .carousel_info
   策略：
     1. 字号设下限，桌面缩屏不会无限缩小
     2. 视口接近 1:1（max-aspect-ratio: 4/3）时图片切到方形（75%）
   ========================================================== */
.ly_carousel_3 .carousel_title h2 {
  font-size: clamp(20px, 2.4vw, 36px) !important;
  line-height: 1.3;
  max-width: 100%;
}
.ly_carousel_3 .carousel_subtitle {
  font-size: clamp(13px, 1.2vw, 18px) !important;
  line-height: 1.5;
  max-width: 100%;
}
.ly_carousel_3 .carousel_btn {
  font-size: clamp(12px, 1.1vw, 16px) !important;
  padding: clamp(8px, 0.9vw, 14px) clamp(16px, 1.8vw, 30px) !important;
}

/* 桌面端接近 1:1 → 图片切方形，标题更醒目
   注意：只改内层 .compute_process_img，外层 .carousel_wrapper 必须置 0，
   否则内外两层 padding-top 会叠加导致 wrapper 高度翻倍 */
@media (max-aspect-ratio: 4/3) and (min-width: 769px) {
  .ly_carousel_3 .carousel_wrapper {
    padding-top: 0 !important;
  }
  .ly_carousel_3 .carousel_wrapper .compute_process_img {
    padding-top: 60% !important;
  }
}
/* 1:1 或更扁 → 切方形（仅桌面端；手机端维持模板原生行为） */
@media (max-aspect-ratio: 1/1) and (min-width: 769px) {
  .ly_carousel_3 .carousel_wrapper {
    padding-top: 0 !important;
  }
  .ly_carousel_3 .carousel_wrapper .compute_process_img {
    padding-top: 75% !important;
  }
}

/* 窄屏：让 .carousel_info 不超出图片区 */
@media (max-width: 768px) {
  .ly_carousel_3 .carousel_info {
    padding-left: 5%;
    padding-right: 5%;
    box-sizing: border-box;
  }
  .ly_carousel_3 .carousel_title h2 {
    font-size: clamp(14px, 4.5vw, 22px) !important;
  }
  .ly_carousel_3 .carousel_subtitle {
    font-size: clamp(11px, 3vw, 14px) !important;
  }
}

/* ==========================================================
   L2. mode_16 — trust bar（视觉配角，保持低调紧凑）
   策略：
     1. 只有两种形态：5列单行（宽屏） / 3列两行（窄屏）
     2. 图标 + 字号都随屏缩放（vw 流式）
     3. ≤640px 隐藏 stat_sub 第二行描述，只留核心词
   ========================================================== */
.ly_special_16 .stats_grid {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px clamp(10px, 1.2vw, 20px);
}
/* 模块整体 padding 大幅收窄：外层容器 + 内层 section 双管齐下 */
.ly_special_16 {
  padding-top: clamp(12px, 1.2vw, 20px) !important;
  padding-bottom: clamp(12px, 1.2vw, 20px) !important;
}
.ly_special_16 .section {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.ly_special_16 .stat_item {
  padding: 4px 2px;
}
/* 图标容器：压掉模板固定高度和 margin */
.ly_special_16 .stat_icon_container {
  height: auto !important;
  min-height: 0 !important;
  margin-bottom: 8px !important;
}
.ly_special_16 .stat_value,
.ly_special_16 .stat_value .timer {
  font-size: clamp(14px, 1.3vw, 22px) !important;
  line-height: 1.2;
}
.ly_special_16 .stat_label {
  font-size: clamp(10px, 0.8vw, 13px) !important;
  line-height: 1.3;
}
.ly_special_16 .stat_sub {
  font-size: clamp(9px, 0.7vw, 11px) !important;
  line-height: 1.3;
}
/* 图标随屏缩：提高权重压过模板 80px 硬编码 */
.ly_special_16 .stat_icon_container .compute_item_img,
.ly_special_16 .stat_icon_container .compute_item_img[style] {
  width: clamp(36px, 2.6vw, 48px) !important;
  max-width: 100% !important;
  margin: 0 auto 6px;
}
.ly_special_16 .stat_icon_container .compute_item_img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

/* 宽度断点：5 → 3 */
@media (max-width: 1100px) {
  .ly_special_16 .stats_grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px clamp(10px, 1.4vw, 18px);
  }
}

/* 手机端：保持 3 列，隐藏第二行描述，只留核心词 */
@media (max-width: 640px) {
  .ly_special_16 .stat_sub {
    display: none !important;
  }
  .ly_special_16 .stat_icon_container .compute_item_img,
  .ly_special_16 .stat_icon_container .compute_item_img[style] {
    width: clamp(28px, 6vw, 36px) !important;
  }
}

/* 极窄屏：2 列 3 行 */
@media (max-width: 500px) {
  .ly_special_16 .stats_grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px 12px;
  }
}

/* ==========================================================
   L3. mode_94 — 8 张产品卡（默认 4 列 × 2 行）
   ========================================================== */
.ly_poster_94 .poster_list {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
/* 4 列（默认）：卡 248–302px；hover 文字跨度目标≈卡高50% */
.ly_poster_94 .i_title h3 {
  font-size: clamp(19px, 1.5vw, 24px) !important;
  line-height: 1.25;
}
.ly_poster_94 .i_content {
  font-size: clamp(12.5px, 1vw, 15px) !important;
  line-height: 1.4;
}
.ly_poster_94 .i_button {
  font-size: clamp(12.5px, 1vw, 16px) !important;
  padding: clamp(6px, 0.7vw, 10px) clamp(14px, 1.4vw, 24px) !important;
}

/* 宽度断点：4 → 3 → 2 → 1（按 1440/4=360 列宽等比）
   字体按各布局卡宽分段：切列时字号略升而非骤降，避免瞬间变小 */
@media (max-width: 1200px) {
  .ly_poster_94 .poster_list {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px;
  }
  /* 3 列：卡 310–346px */
  .ly_poster_94 .i_title h3 { font-size: clamp(18px, 1.8vw, 22px) !important; }
  .ly_poster_94 .i_content  { font-size: clamp(12.5px, 1.2vw, 14px) !important; }
  .ly_poster_94 .i_button   { font-size: clamp(12.5px, 1.2vw, 14px) !important; }
}
@media (max-width: 800px) {
  .ly_poster_94 .poster_list {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px;
  }
  /* 2 列：卡 213–346px；下限保护最小卡 */
  .ly_poster_94 .i_title h3 { font-size: clamp(17px, 2.6vw, 20px) !important; }
  .ly_poster_94 .i_content  { font-size: clamp(12px, 1.8vw, 14px) !important; }
  .ly_poster_94 .i_button   { font-size: clamp(12px, 1.8vw, 14px) !important; }
}
@media (max-width: 500px) {
  .ly_poster_94 .poster_list {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }
  /* 1 列：卡 365–441px */
  .ly_poster_94 .i_title h3 { font-size: clamp(19px, 5vw, 22px) !important; }
  .ly_poster_94 .i_content  { font-size: clamp(13px, 3.4vw, 15px) !important; }
  .ly_poster_94 .i_button   { font-size: clamp(13px, 3.4vw, 15px) !important; }
}

/* 纵横比断点：近正方形（≤6/5）且宽度足够 → 提前 2 列
   卡 331–434px 偏宽，字号同步提一档 */
@media (max-aspect-ratio: 6/5) and (min-width: 769px) {
  .ly_poster_94 .poster_list {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
  }
  .ly_poster_94 .i_title h3 { font-size: clamp(18px, 1.9vw, 22px) !important; }
  .ly_poster_94 .i_content  { font-size: clamp(12.5px, 1.3vw, 14px) !important; }
  .ly_poster_94 .i_button   { font-size: clamp(12.5px, 1.3vw, 14px) !important; }
}
@media (max-aspect-ratio: 3/4) and (min-width: 501px) {
  .ly_poster_94 .poster_list {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .ly_poster_94 .i_title h3 { font-size: clamp(18px, 1.9vw, 22px) !important; }
  .ly_poster_94 .i_content  { font-size: clamp(12.5px, 1.3vw, 14px) !important; }
  .ly_poster_94 .i_button   { font-size: clamp(12.5px, 1.3vw, 14px) !important; }
}

/* ==========================================================
   L4. mode_54 — CTA 海报
   实际结构：.img_box 全宽 + CSS 背景图，.text_info 绝对定位叠加
   策略：保持模板原布局，只让字号流式、按钮防溢出
   ========================================================== */
.ly_poster_54 .t_title h2 {
  font-size: clamp(16px, 2.2vw, 32px) !important;
  line-height: 1.3;
}
.ly_poster_54 .t_content {
  font-size: clamp(11px, 1.1vw, 16px) !important;
  line-height: 1.6;
}
.ly_poster_54 .button a {
  font-size: clamp(12px, 1.1vw, 16px) !important;
  padding: clamp(8px, 0.9vw, 14px) clamp(18px, 2vw, 32px) !important;
}

/* 窄屏：模板把 .text_info 绝对定位在 .img_box 上居中，
   但 .img_box 高度（按 24.38% padding-top 算）小于文字实际高度，
   导致标题上半 + 按钮下半被 overflow 裁掉。
   修复：让 .text_info 脱离绝对定位，容器自动撑开高度。 */
@media (max-width: 768px) {
  .ly_poster_54 .poster_box {
    display: block;
  }
  .ly_poster_54 .img_box {
    display: none; /* 背景图隐藏，避免遮挡文字 */
  }
  .ly_poster_54 .text_info {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    left: auto !important;
    top: auto !important;
    padding: 32px 5% !important;
    box-sizing: border-box;
    background: linear-gradient(135deg, #003d99 0%, #00265c 100%);
  }
  .ly_poster_54 .t_title h2 {
    font-size: clamp(16px, 4.5vw, 22px) !important;
  }
  .ly_poster_54 .t_content {
    font-size: clamp(11px, 3vw, 13px) !important;
  }
}

/* ==========================================================
   L5. mode_60 导航 — 桌面菜单流式 + 防溢出
   ========================================================== */
.ly_header_60 .header_normal,
.ly_header_60 .headerFixed {
  overflow-x: clip;
}

@media (max-width: 1280px) and (min-width: 769px) {
  .ly_header_60 .default_nav > li > a {
    font-size: clamp(12px, 1.05vw, 14px) !important;
    padding-left: clamp(6px, 0.7vw, 12px) !important;
    padding-right: clamp(6px, 0.7vw, 12px) !important;
    white-space: nowrap;
  }
  .ly_header_60 .logo {
    max-width: clamp(120px, 14vw, 200px);
  }
}

/* 移动断点沿用模板自带 data-mobile-nav 切换，不干预 */

/* ==========================================================
   L6. mode_60 页脚 — 4 列 → 2 列 → 1 列
   ========================================================== */
@media (max-width: 1024px) {
  .ly_footer_60 .footer_box,
  .visual_plugins_container[data-type="footer"] .footer_box {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px;
  }
}
@media (max-width: 480px) {
  .ly_footer_60 .footer_box,
  .visual_plugins_container[data-type="footer"] .footer_box {
    grid-template-columns: 1fr !important;
  }
}
.visual_plugins_container[data-type="footer"] .foot_nav a,
.visual_plugins_container[data-type="footer"] .foot_contact {
  font-size: clamp(11px, 1vw, 14px) !important;
  overflow-wrap: break-word;
}

/* ==========================================================
   L7. 全局流式标题（窄屏补偿，不影响模块专项规则）
   ========================================================== */
@media (max-width: 1024px) {
  .themes_box_title h2 { font-size: clamp(18px, 3.5vw, 28px) !important; }
  .themes_box_title h3 { font-size: clamp(14px, 3vw, 22px) !important; }
  .themes_box_subtitle { font-size: clamp(12px, 2vw, 16px) !important; }
  .section {
    padding-left: clamp(12px, 3vw, 40px);
    padding-right: clamp(12px, 3vw, 40px);
    box-sizing: border-box;
  }
}
@media (max-width: 480px) {
  .themes_box_title h2 { font-size: clamp(16px, 5vw, 22px) !important; }
}
