/* ============================================================
   即客AI 首页移动端适配 (≤768px)
   - 覆盖 style.css 中桌面优先的字号/内边距/栅格
   - 整体字号下调，适配手机阅读密度
   - 必须在 style.css 之后加载
   ============================================================ */

/* ---------- 全局字号基线 ---------- */
@media (max-width: 768px) {
  html {
    font-size: 14px; /* 默认 16px 偏大，整体下调 */
  }

  body {
    font-size: 14px;
    line-height: 1.55;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  .content-wrapper {
    padding-left: 14px;
    padding-right: 14px;
  }

  .product-cards-section,
  .industry-tabs-section {
    padding: 40px 0;
  }

  .news-section {
    padding: 28px 0;
  }

  .product-cards-heading,
  .industry-tabs-heading {
    margin: 12px 0 22px;
  }

  /* 区块大标题：桌面 48px → 手机 22px */
  .product-cards-heading__title,
  .industry-tabs-heading__title {
    font-size: 22px !important;
    line-height: 30px !important;
  }

  .news-section__title {
    margin-bottom: 22px;
    font-size: 22px !important;
    line-height: 30px !important;
  }

  .section-title {
    font-size: 20px !important;
    line-height: 28px !important;
  }

  /* 通用按钮 */
  .btn-primary,
  .btn-outline {
    font-size: 13px;
    padding: 0.6rem 1.2rem;
  }

  .btn-lg {
    min-height: 38px;
    padding: 0 16px;
    font-size: 13px;
  }

  .link-primary {
    font-size: 13px;
  }
}

/* ---------- Header ---------- */
@media (max-width: 768px) {
  .site-header-logo {
    height: 36px;
  }

  .site-header-logo-text {
    font-size: 15px;
  }

  header .content-wrapper {
    gap: 6px;
  }

  header .content-wrapper > .flex.items-center.gap-8 {
    min-width: 0;
    flex-shrink: 1;
  }

  .mobile-call-btn {
    max-width: none;
    overflow: visible;
    flex-shrink: 1;
    min-width: 0;
    gap: 8px;
  }

  .mobile-call-pill {
    flex-shrink: 1;
    min-width: 0;
    padding: 8px 14px 8px 8px !important;
    gap: 8px !important;
    min-height: 40px;
    box-sizing: border-box;
  }

  .mobile-call-icon {
    width: 32px !important;
    height: 32px !important;
  }

  .mobile-call-icon svg {
    width: 16px !important;
    height: 16px !important;
  }

  .mobile-call-number {
    font-size: 13px !important;
    letter-spacing: 0.02em !important;
    white-space: nowrap;
    line-height: 1.2;
  }

  /* 「AI体验专线」在圆框外 */
  .mobile-call-label {
    display: inline !important;
    flex-shrink: 0;
    font-size: 12px !important;
    line-height: 1.2;
  }

  .site-header-mobile-link {
    font-size: 14px;
  }
}

@media (min-width: 400px) and (max-width: 767px) {
  .mobile-call-label {
    display: inline !important;
    font-size: 12px !important;
  }

  .mobile-call-btn {
    max-width: none;
  }

  .mobile-call-number {
    font-size: 14px !important;
  }
}

/* ---------- Hero Banner ---------- */
@media (max-width: 768px) {
  .hero-banner-section {
    padding-top: 64px;
  }

  .hero-banner-section.pt-20 {
    padding-top: 4.5rem;
  }

  .hero-swiper {
    min-height: 260px;
  }

  .hero-banner-slide-inner {
    padding-top: 20px;
    padding-bottom: 28px;
  }

  /* Hero 标题：桌面 56px → 手机 22px */
  .hero-banner-slide-inner h1 {
    font-size: 22px !important;
    line-height: 1.35 !important;
    letter-spacing: -0.01em;
  }

  .hero-banner-slide-inner p {
    font-size: 13px !important;
    line-height: 1.55 !important;
  }

  .hero-banner-image {
    width: 100%;
    max-width: 280px;
  }

  .hero-swiper-pagination {
    bottom: 4px !important;
  }

  .hero-blob--1,
  .hero-blob--2 {
    width: 260px;
    height: 260px;
    filter: blur(40px);
  }

  .hero-blob--3,
  .hero-blob--4 {
    width: 180px;
    height: 180px;
    filter: blur(36px);
  }

  /* Hide dot grid on mobile for performance */
  .hero-bg-grid {
    display: none;
  }

  /* Ensure footer stays above fixed bg */
  .site-footer {
    position: relative;
    z-index: 1;
  }

  /* 悬浮球必须保持 fixed，否则会随页面滚走/消失 */
  .customer-service-root {
    position: fixed !important;
    z-index: 100 !important;
    right: 10px !important;
    bottom: 90px;
  
    left: auto !important;}
}

@media (max-width: 480px) {
  .hero-banner-slide-inner h1 {
    font-size: 20px !important;
    line-height: 1.3 !important;
  }

  .hero-banner-slide-inner p {
    font-size: 12.5px !important;
  }

  .hero-banner-slide-inner .btn-primary {
    padding: 0.55rem 1.1rem;
    font-size: 13px;
  }
}

/* ---------- Demo Cards ---------- */
@media (max-width: 768px) {
  .demo-cards-section {
    padding: 32px 0 24px;
  }

  .demo-cards-inner {
    padding: 4px 0 12px;
  }

  .demo-cards-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    text-align: center;
    position: relative;
  }

  .demo-cards-header__title {
    font-size: 20px !important;
    line-height: 28px !important;
    letter-spacing: -0.01em;
    padding: 0 6px;
  }

  .demo-cards-header__more {
    position: static;
    top: auto;
    right: auto;
    transform: none;
    padding: 5px 12px;
    font-size: 12px;
    align-self: center;
  }

  .demo-card {
    padding: 16px;
  }

  .demo-card__avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .demo-card__title {
    font-size: 14px !important;
    line-height: 20px;
  }

  .demo-card__employee {
    font-size: 11px;
  }

  .demo-card__tag {
    font-size: 11px;
    padding: 2px 8px;
    line-height: 16px;
  }

  .demo-card__desc {
    font-size: 12px !important;
    line-height: 18px !important;
  }

  .demo-card__play-icon {
    width: 24px;
    height: 24px;
  }

  .demo-card__duration {
    font-size: 10px;
  }

  .demo-card__btn--primary {
    height: 38px;
    font-size: 13px;
  }

  .demo-cards-slogan {
    margin-top: 20px;
    font-size: 11px;
    line-height: 16px;
    padding: 0 6px;
  }
}

@media (min-width: 480px) and (max-width: 768px) {
  .demo-cards-header {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .demo-cards-header__title {
    font-size: 22px !important;
    line-height: 30px !important;
  }
}

/* ---------- Product Cards ---------- */
@media (max-width: 768px) {
  .card-light {
    padding: 18px 16px;
  }

  .card-light__illustration {
    max-height: 120px;
    margin-bottom: 14px;
  }

  .card-light__type {
    font-size: 11px;
    line-height: 16px;
  }

  .card-light__title {
    font-size: 16px !important;
    line-height: 24px !important;
  }

  .card-light__subtitle {
    font-size: 13px;
    line-height: 20px;
  }

  .card-light__link {
    font-size: 13px;
  }
}

/* ---------- Product / Industry wrapper sections ---------- */
@media (max-width: 768px) {
  .background-about-main,
  .background-about-main2 {
    padding: 48px 0;
    min-height: auto;
    background-image: none;
  }
}

/* ---------- Industry Tabs ---------- */
@media (max-width: 768px) {
  .industry-tabs-nav-shell {
    gap: 6px;
  }

  .industry-tabs-nav-shell::before,
  .industry-tabs-nav-shell::after {
    width: 22px;
  }

  .industry-tabs-nav-shell::before {
    left: 26px;
  }

  .industry-tabs-nav-shell::after {
    right: 26px;
  }

  .industry-tabs-nav-arrow {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border-color: rgba(43, 88, 249, 0.1);
  }

  .industry-tabs-nav-arrow svg {
    width: 12px;
    height: 12px;
  }

  .industry-tabs-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    gap: 4px;
    padding: 0 2px 2px;
    margin-bottom: 4px;
    scrollbar-width: none;
    touch-action: pan-x;
  }

  .industry-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .industry-tab-btn {
    position: relative;
    min-width: auto;
    flex: 0 0 auto;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 20px;
    white-space: nowrap;
    /* 扩大可点区域，避免看起来点不动 */
    min-height: 40px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .industry-tab-btn.is-active {
    color: #1a1a1a;
    font-weight: 600;
  }

  .industry-tab-btn.is-active:after {
    content: " ";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 2px;
    background-color: #2b58f9;
    border-radius: 1px;
  }

  .industry-detail-card {
    padding: 16px 14px;
    border-radius: 14px;
    /* 避免 overflow 裁剪 tab 下划线观感问题；内容仍可控 */
    overflow: visible;
  }

  .industry-detail-inner {
    gap: 16px;
  }

  .industry-detail-body {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: stretch;
  }

  .industry-detail-image {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 12px;
  }

  .industry-detail-content {
    flex: 1 1 auto;
    gap: 14px;
  }

  .industry-detail-title {
    font-size: 18px !important;
    line-height: 26px !important;
  }

  .industry-detail-sub {
    font-size: 12.5px !important;
    line-height: 19px !important;
    min-height: auto;
  }

  .industry-scenes {
    gap: 10px 14px;
    font-size: 12px;
  }

  .industry-scenes-item img {
    width: 24px;
    height: 24px;
  }

  .industry-bottom-logo {
    margin-top: 10px;
    padding: 5px 6px;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .industry-bottom-logo::-webkit-scrollbar {
    display: none;
  }

  .industry-bottom-logo-item {
    width: 88px;
    height: 32px;
    flex-shrink: 0;
  }

  .industry-bottom-logo-item img {
    width: 92px;
    max-width: 92px;
    height: 36px;
  }

  .industry-detail-actions {
    justify-content: stretch;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
  }

  .industry-detail-actions .btn-lg,
  .industry-detail-actions a {
    flex: 1 1 calc(50% - 4px);
    min-width: 110px;
    min-height: 40px;
    padding: 0 10px;
    font-size: 13px;
    text-align: center;
  }
}

/* ---------- Statistics Scale ---------- */
@media (max-width: 768px) {
  .statistics-scale-section {
    padding: 20px 0;
  }

  .statistics-scale-inner {
    padding: 6px 0 !important;
  }

  .statistics-scale-grid {
    gap: 6px 0;
  }

  .statistics-scale-item {
    width: 50% !important;
    min-width: 0 !important;
    padding: 8px 4px;
    gap: 3px;
    transform: none !important;
    transition: none !important;
  }

  .statistics-scale-item:hover {
    transform: none !important;
  }

  .statistics-scale-item .stat-number__value,
  .statistics-scale-item .stat-number--single {
    font-size: 26px !important;
    line-height: 32px !important;
  }

  .statistics-scale-item .stat-number__unit {
    font-size: 13px !important;
    line-height: 18px !important;
  }

  .statistics-scale-label {
    font-size: 11px !important;
    line-height: 15px !important;
    letter-spacing: 0;
  }

  .statistics-scale-image {
    display: none;
  }
}

/* ---------- Partner Carousel ---------- */
@media (max-width: 768px) {
  .partner-carousel-section {
    padding: 28px 0;
  }

  .partner-carousel-heading {
    margin-bottom: 18px;
  }

  .partner-carousel-item {
    padding: 6px;
  }

  .partner-carousel-item img {
    height: 32px;
  }

  .partner-carousel-item__name {
    height: 32px;
    min-width: 72px;
    font-size: 11px;
    padding: 0 6px;
  }

  .partner-carousel:before,
  .partner-carousel:after {
    width: 8%;
  }
}

/* ---------- News Section ---------- */
@media (max-width: 768px) {
  .news-card {
    max-width: 100%;
  }

  .news-card:hover {
    transform: none;
  }

  .news-card__content {
    padding: 12px;
  }

  .news-card__title {
    font-size: 14px !important;
    line-height: 20px !important;
  }

  .news-card__desc {
    font-size: 12px;
    line-height: 1.5;
  }
}

/* ---------- Voice CTA ---------- */
@media (max-width: 768px) {
  .voice-footer-section {
    padding-top: 24px;
  }

  .voice-footer-section {
    padding-bottom: 0 !important;
  }

  .voice-footer-container {
    position: relative !important;
    width: 100% !important;
    /* 不再把大图顶在上方，避免手机端头重脚轻 */
    padding: 28px 16px 40px !important;
    height: auto !important;
    min-height: 280px !important;
    margin: 0 auto -28px !important; /* 轻微嵌入 footer */
    background-color: #2b58f9 !important;
    background-image: none !important;
    overflow: hidden; /* 裁掉过大装饰 */
    border-radius: 20px 20px 0 0;
    z-index: 1;
  }

  /* 手机人物图：右下角小装饰，增强可见性但仍不抢主文案 */
  .voice-footer-characters {
    display: block !important;
    position: absolute !important;
    left: auto !important;
    right: -12px !important;
    bottom: -8px !important;
    top: auto !important;
    transform: none !important;
    width: 42% !important;
    max-width: 168px !important;
    height: auto !important;
    opacity: 0.65 !important;
    pointer-events: none !important;
    z-index: 0 !important;
    margin: 0 !important;
  }

  .voice-footer-title,
  .voice-footer-subtitle,
  .voice-footer-desc,
  .voice-footer-phone,
  .voice-footer-contact-tip {
    position: relative;
    z-index: 2;
  }

  .voice-footer-title {
    font-size: 20px !important;
    line-height: 28px !important;
  }

  .voice-footer-subtitle {
    font-size: 15px !important;
    line-height: 22px !important;
  }

  .voice-footer-desc {
    font-size: 12.5px !important;
    line-height: 19px !important;
    margin: 8px 0 20px;
  }

  .voice-footer-phone {
    width: 100%;
    height: 42px;
    border-radius: 21px;
  }

  .voice-footer-phone .dropdown-toggle {
    padding: 0 6px 0 10px;
    font-size: 12px;
  }

  .voice-footer-phone input {
    font-size: 13px;
    padding-left: 8px;
  }

  .voice-footer-phone > button:last-child {
    width: 68px;
    height: 38px;
    border-radius: 19px;
    font-size: 16px;
  }

  .voice-footer-contact-tip {
    font-size: 11px !important;
    line-height: 16px !important;
  }
}

/* ---------- Footer ---------- */
@media (max-width: 768px) {
  .site-footer {
    padding: 28px 0 36px !important;
    margin-top: 16px !important;
  }

  .site-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 12px;
  }

  /* Hide brand logo on mobile — header already has it */
  .site-footer-brand {
    display: none;
  }

  .site-footer-products,
  .site-footer-solutions,
  .site-footer-about,
  .site-footer-contact {
    width: 100%;
    min-width: 0;
  }

  .site-footer h6 {
    height: auto;
    line-height: 1.3;
    margin-bottom: 4px;
    font-size: 13px;
    height: 28px;
  }

  .site-footer-logo {
    height: 28px;
  }

  .site-footer .nav-row-mian {
    gap: 1px;
    font-size: 11px;
  }

  .site-footer .col-item {
    margin-bottom: 1px;
    line-height: 1.6;
  }

  .site-footer-beian-row {
    margin-top: 28px;
  }

  .site-footer .footer-icon-wrapper {
    width: 100%;
    padding: 8px 10px;
    height: auto;
    min-height: 32px;
    border-radius: 10px;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 10px;
    line-height: 1.4;
  }

  .site-footer .footer-icon-right {
    margin-left: 0;
    width: 100%;
  }
}

/* ---------- Customer Service ---------- */
@media (max-width: 768px) {
  .customer-service-root {
    right: 10px !important;
    bottom: 90px;
  
    left: auto !important;
    position: fixed !important;
    z-index: 100 !important;}

  .customer-service-container {
    width: 48px;
    padding: 4px 4px 10px;
    font-size: 14px;
    touch-action: none;
    cursor: grab;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .customer-service-avatar {
    width: 40px;
    height: 40px;
    margin: -10px auto 6px;
    padding: 2px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .customer-service-avatar img {
    width: 100%;
    height: 100%;
    margin-bottom: 0;
    border-radius: 50%;
    object-fit: cover;
  }

  .customer-service-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 4px 4px;
    width: 100%;
  }

  .customer-service-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 36px;
  }

  .customer-service-action .text {
    font-size: 10px;
    line-height: 14px;
  }

  .customer-service-action svg {
    width: 18px;
    height: 18px;
  }

  .back-to-top {
    width: 42px;
    height: 34px;
    margin-top: 8px;
  }

  /* 手机端咨询二维码：贴在悬浮球左侧，完整显示且不过大 */
  .customer-service-qr-mask {
    display: none !important;
  }

  /* do not force-show tooltip; Alpine x-show controls visibility */

  .customer-service-tooltip--qr {
    position: absolute !important;
    /* 贴球左侧 */
    right: calc(100% + 10px) !important;
    left: auto !important;
    top: 0 !important;
    bottom: auto !important;
    transform: none !important;
    width: 156px !important;
    max-width: min(156px, calc(100vw - 72px)) !important;
    padding: 8px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18) !important;
    z-index: 130 !important;
    background: #fff !important;
    white-space: normal !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  .customer-service-qr-title {
    display: none !important; /* 图本身通常已含标题，避免重复占高 */
  }

  .customer-service-qr-placeholder {
    width: 140px !important;
    max-width: 140px !important;
    height: auto !important;
    margin: 0 auto !important;
    overflow: visible !important;
    background: #fff !important;
    border-radius: 8px;
  }

  .customer-service-qr-placeholder img {
    display: block !important;
    width: 140px !important;
    max-width: 140px !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
  }

  .customer-service-qr-tip {
    display: none !important; /* 精简，避免卡片过高 */
  }

  .customer-service-tooltip__close {
    position: absolute !important;
    top: -8px !important;
    left: -8px !important;
    right: auto !important;
    width: 22px !important;
    height: 22px !important;
    border: none !important;
    border-radius: 999px !important;
    background: #111827 !important;
    color: #fff !important;
    font-size: 14px !important;
    line-height: 22px !important;
    text-align: center !important;
    cursor: pointer !important;
    z-index: 2 !important;
    padding: 0 !important;
  }

  .customer-service-tooltip--phone {
    display: none !important;
  }

  /* 防止 root transform 导致弹层被裁；并给左侧留出空间感知 */
  .customer-service-root {
    overflow: visible !important;
  }
  .customer-service-container {
    overflow: visible !important;
  }

  /* 拖动手势：只作用在球上，避免整页 touch-action none */
  .customer-service-root {
    touch-action: manipulation;
  }
  .customer-service-container {
    touch-action: none;
    cursor: grab;
  }
  .customer-service-root.is-dragging .customer-service-container {
    cursor: grabbing;
    transition: none;
    transform: scale(1.03);
  }
}

/* ---------- Demo Detail Modal ---------- */
@media (max-width: 576px) {
  .demo-detail-backdrop {
    padding: 0;
    align-items: stretch;
  }

  .demo-detail-card {
    max-width: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .demo-detail-agent__name {
    font-size: 15px;
  }

  .demo-detail-agent__tag {
    font-size: 12px;
  }

  .demo-detail-info__tag {
    font-size: 11px;
  }

  .demo-detail-info__desc p {
    font-size: 13px;
    line-height: 1.55;
  }

  .demo-detail-dialogue__title {
    font-size: 14px;
  }

  .demo-detail-dialogue__msg-text {
    font-size: 13px;
    line-height: 20px;
  }

  .demo-detail-footer__btn {
    min-width: auto;
    width: 100%;
    height: 42px;
    font-size: 14px;
  }
}

/* ---------- 超窄屏 (≤360px) 再压一档 ---------- */
@media (max-width: 360px) {
  html {
    font-size: 13px;
  }

  .mobile-call-number {
    font-size: 12px !important;
  }

  .mobile-call-label {
    font-size: 11px !important;
  }

  .mobile-call-pill {
    padding: 7px 12px 7px 7px !important;
    min-height: 36px;
  }

  .mobile-call-icon {
    width: 28px !important;
    height: 28px !important;
  }

  .hero-banner-slide-inner h1 {
    font-size: 18px !important;
  }

  .demo-cards-header__title {
    font-size: 18px !important;
    line-height: 26px !important;
  }

  .product-cards-heading__title,
  .industry-tabs-heading__title,
  .news-section__title {
    font-size: 18px !important;
    line-height: 26px !important;
  }

  .section-title {
    font-size: 17px !important;
    line-height: 24px !important;
  }

  .statistics-scale-item .stat-number__value,
  .statistics-scale-item .stat-number--single {
    font-size: 22px !important;
    line-height: 28px !important;
  }

  .voice-footer-title {
    font-size: 18px !important;
  }
}


/* ---------- P0: iOS safe area ---------- */
@supports (padding: env(safe-area-inset-bottom)) {
  @media (max-width: 768px) {
    body {
      padding-left: env(safe-area-inset-left);
      padding-right: env(safe-area-inset-right);
    }

    .site-footer {
      padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important;
    }

    .customer-service-root {
      right: 10px !important;
      bottom: calc(90px + env(safe-area-inset-bottom));
    
    left: auto !important;
    position: fixed !important;
    z-index: 100 !important;}

    .voice-footer-container {
      padding-bottom: calc(32px + env(safe-area-inset-bottom)) !important;
    }

    .demo-detail-footer {
      padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    header.fixed {
      padding-top: env(safe-area-inset-top);
    }
  }
}

/* ---------- P1: eyebrow + dual CTA + contrast on mobile ---------- */
@media (max-width: 768px) {
  .section-eyebrow {
    font-size: 11px !important;
    line-height: 16px !important;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
  }

  .demo-cards-header__text {
    width: 100%;
    gap: 6px;
  }

  .demo-card__desc {
    color: #5c5c62 !important;
    font-size: 12.5px !important;
    line-height: 18px !important;
  }

  .demo-card__btn--ghost {
    height: 38px;
    font-size: 12px;
  }

  /* 试听模块强化：轻微边框与背景层次 */
  .demo-cards-section {
    position: relative;
  }

  .demo-cards-inner {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.55);
    padding: 16px 12px 12px;
    border: 1px solid rgba(43, 88, 249, 0.08);
  }

  .product-cards-heading,
  .industry-tabs-heading,
  .partner-carousel-heading,
  .news-section .content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}


/* ---------- 手机端文案精简：长短文案切换 ---------- */
/* 默认桌面：显示完整文案 */
.hero-copy-short,
.copy-short {
  display: none;
}
.hero-copy-full,
.copy-full {
  display: inline;
}

@media (max-width: 768px) {
  .hero-copy-full,
  .copy-full {
    display: none !important;
  }
  .hero-copy-short,
  .copy-short {
    display: inline !important;
  }

  /* 产品卡片文案更紧凑 */
  .card-light__type {
    margin-bottom: 4px;
  }
  .card-light__subtitle {
    margin-bottom: 12px;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}




/* customer-service visibility guards */
.customer-service-tooltip[x-cloak],
.customer-service-tooltip--qr[x-cloak],
.customer-service-tooltip--phone[x-cloak],
.customer-service-qr-mask[x-cloak],
.back-to-top[x-cloak] {
  display: none !important;
}

@media (max-width: 768px) {
  .customer-service-root {
    position: fixed !important;
    right: 10px !important;
    left: auto !important;
    bottom: 90px !important;
    z-index: 100 !important;
    overflow: visible !important;
    /* 整球一起拖：手势作用在 root */
    touch-action: none;
  }

  .customer-service-container {
    width: 46px !important;
    touch-action: none;
    cursor: grab;
  }

  .customer-service-root.is-dragging .customer-service-container {
    cursor: grabbing;
    transition: none !important;
    transform: scale(1.04);
  }

  /* 悬浮球收合态：隐藏操作按钮，只保留头像 */
  .customer-service-container.is-collapsed .customer-service-actions {
    height: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    pointer-events: none !important;
  }

  /* 展开态：确保操作按钮可见（开局默认展开） */
  .customer-service-container:not(.is-collapsed) .customer-service-actions {
    height: auto !important;
    opacity: 1 !important;
    overflow: visible !important;
  }

  /* QR visibility controlled by Alpine x-show/x-cloak only */
  .customer-service-root [x-show] {
    /* no force */
  }

  .customer-service-tooltip--qr:not([style*="display: none"]) {
    /* when alpine shows it, ensure left placement */
  }

  .customer-service-tooltip.customer-service-tooltip--qr {
    position: absolute !important;
    right: calc(100% + 10px) !important;
    left: auto !important;
    top: 0 !important;
    transform: none !important;
    width: 156px !important;
    max-width: min(156px, calc(100vw - 72px)) !important;
    padding: 8px !important;
    border-radius: 12px !important;
    background: #fff !important;
    border: 1px solid rgba(0,0,0,.06) !important;
    box-shadow: 0 8px 28px rgba(15,23,42,.18) !important;
    z-index: 130 !important;
    white-space: normal !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  .customer-service-qr-title,
  .customer-service-qr-tip {
    display: none !important;
  }

  .customer-service-qr-placeholder {
    width: 140px !important;
    max-width: 140px !important;
    height: auto !important;
    margin: 0 auto !important;
    overflow: visible !important;
  }

  .customer-service-qr-placeholder img {
    display: block !important;
    width: 140px !important;
    height: auto !important;
    object-fit: contain !important;
  }

  .customer-service-tooltip__close {
    position: absolute !important;
    top: -8px !important;
    left: -8px !important;
    width: 22px !important;
    height: 22px !important;
    border: none !important;
    border-radius: 999px !important;
    background: #111827 !important;
    color: #fff !important;
    font-size: 14px !important;
    line-height: 22px !important;
    text-align: center !important;
    padding: 0 !important;
  }

  .customer-service-tooltip--phone {
    display: none !important;
  }
}

/* ---------- 移动端试用弹窗修复 ---------- */
@media (max-width: 768px) {
  .trial-modal-backdrop {
    padding: 12px !important;
    align-items: flex-end !important;
  }

  .trial-modal-card {
    max-width: 100% !important;
    width: 100% !important;
    padding: 24px 20px !important;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15) !important;
    max-height: 85vh !important;
  }

  .trial-modal-close {
    top: 12px !important;
    right: 12px !important;
    width: 28px !important;
    height: 28px !important;
  }

  .trial-modal-title {
    font-size: 18px !important;
    margin-bottom: 8px !important;
    padding-right: 32px;
  }

  .trial-modal-desc {
    font-size: 13px !important;
    margin-bottom: 16px !important;
  }

  .trial-modal-form {
    gap: 14px !important;
  }

  .trial-modal-field {
    margin-bottom: 12px !important;
  }

  .trial-modal-label {
    font-size: 13px !important;
    margin-bottom: 4px !important;
  }

  .trial-modal-input {
    padding: 10px 12px !important;
    font-size: 14px !important;
  }

  .trial-modal-textarea {
    min-height: 70px !important;
  }

  .trial-modal-submit {
    margin-top: 4px !important;
    height: 44px !important;
    font-size: 15px !important;
  }

  .trial-modal-actions {
    flex-direction: row-reverse !important;
  }

  .trial-modal-btn-back {
    padding: 10px 16px !important;
    font-size: 13px !important;
  }

  .trial-steps {
    margin-bottom: 16px !important;
  }

  .trial-loading {
    padding: 32px 0 !important;
  }

  .trial-loading-spinner {
    width: 36px !important;
    height: 36px !important;
  }

  .trial-loading-text {
    font-size: 14px !important;
  }

  .trial-captcha-svg {
    width: 90px !important;
    height: 38px !important;
  }

  .trial-consent-label {
    font-size: 12px !important;
  }
}


/* QR show helper: after Alpine removes x-cloak, ensure visible left card */
.customer-service-tooltip--qr:not([x-cloak]) {
  /* Alpine will set display via x-show; don't force hide */
}
