/* 移动端功能增强样式 */

/* 移动端第二个界面布局调整 */
@media (max-width: 768px) {
    /* 减少features section的上下padding，消除空白区域 */
    #features {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    #features .mx-auto.max-w-2xl {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    #features h2[data-desktop-only="true"] {
        text-align: left !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    #features .text-right {
        text-align: right !important;
        position: relative;
        width: 100%;
        max-width: 100%;
    }
    
    /* 确保第二行文字右边缘与第一行文字右边缘对齐 */
    #features .mx-auto.max-w-2xl {
        position: relative;
    }
    
    #features .text-right {
        margin-right: 0 !important;
        padding-right: 0 !important;
    }
    
    /* 移动端第二个界面文案对齐 - 使用更具体的选择器覆盖text-right类 */
  #features p.text-right {
    text-align: left !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
  }
    
    /* 移动端首页标题字体调整 - 确保"市场动态题材投研信息订阅"比"致力于最新、最快、最全的动态分享"大5px */
    #hero-sec h2 {
        font-size: 23px !important; /* 约23px */
    }
    
    #hero-sec p.mt-6 {
        font-size: 12.6px !important; /* 18px的70% = 12.6px */
    }
    
    /* 移动端"关注我们"section间距优化 */
    #hero-sec .relative.mt-6 {
        margin-top: 0.5rem !important; /* 进一步减少顶部间距 */
        margin-bottom: 0 !important; /* 移除底部间距 */
    }
    
    #hero-sec .relative.mt-6 ul {
        margin-top: 0.25rem !important; /* 进一步减少图片列表的顶部间距 */
        margin-bottom: 0 !important; /* 移除底部间距 */
    }
    
    /* 进一步减少图片列表项之间的间距 */
    #hero-sec .relative.mt-6 ul li {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* 减少图片本身的下边距 */
    #hero-sec .relative.mt-6 ul li img {
        margin-bottom: 2px !important; /* 设置为2px */
        display: block;
    }
    
    /* 移动端第二个界面文字大小调整 - "成为您的投资情报中枢赶紧来试吧"缩小以便一行显示，"信息差即是财富壁垒"调整为80% */
    #features-content h2[data-desktop-only="true"] {
        font-size: 16px !important; /* 缩小以便一行显示 */
        line-height: 1.2 !important;
    }
    
    #features-content p.text-right.text-lg {
        font-size: 12.8px !important; /* 16px的80% = 12.8px */
        line-height: 1.3 !important;
    }
    
    /* 移动端添加图片位置调整 - 更接近顶部菜单栏 */
    #hero-sec {
        padding-top: 0.25rem !important; /* 1px间距 */
        padding-bottom: 0.125rem !important; /* 进一步减少底部空白区域到2px */
    }
    
    /* 合并后的section背景分割线样式 */
    #features-content {
        position: relative;
        margin-top: 0.5rem !important; /* 进一步缩小间距让内容更紧密 */
        padding-top: 1rem !important; /* 减少上边距 */
        padding-bottom: 1rem !important; /* 减少下边距 */
    }
    
    /* 进一步缩小"关注我们"区域与"成为您的投资情报中枢"文字之间的间距 */
    #hero-sec .relative.mt-6 {
        margin-bottom: 0.25rem !important; /* 减少"关注我们"区域的底部间距 */
    }
    
    /* 在浅色背景和深色背景之间添加直接分割线 */
    #features-content::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background-color: #e5e7eb; /* 浅灰色分割线 */
        z-index: 10;
    }
}

/* PC端 - 减少hero-sec顶部间距 */
@media (min-width: 769px) {
    #hero-sec {
        padding-top: 1rem !important; /* PC端减少顶部间距 */
    }
    
    /* 确保PC端#features-content保持原有样式，并增加与"关注我们"区域的间隔 */
    #features-content {
        margin-top: 20px !important; /* 增加与"关注我们"区域的间隔为20px */
        padding-top: 5rem !important; /* 恢复PC端原有的padding */
        padding-bottom: 8rem !important; /* 恢复PC端原有的padding */
    }
    
    /* PC端不显示分割线 */
    #features-content::before {
        display: none !important;
    }
    
    /* PC端保持原有的"关注我们"区域间距 */
    #hero-sec .relative.mt-6 {
        margin-top: 1.5rem !important;
        margin-bottom: 0 !important;
    }
}

/* 三个特定图片下移50px - 保持自适应 */
img[src="images/cfcf87a8df7916d3c6c03a7fb24f267.png"],
img[src="images/微信图片_20250825152221.jpg"],
img[src="images/微信图片_20250825152232.jpg"] {
    margin-top: 50px !important;
    transition: margin-top 0.3s ease !important;
}

/* 修复移动端图片容器高度限制问题 */
@media (max-width: 768px) {
    /* 增加图片容器高度以容纳下移的图片 */
    .h-\[450px\] {
        height: 520px !important;
    }
    
    /* 只对特定的图片容器取消overflow限制，避免影响页面整体布局 */
    .h-\[450px\].overflow-hidden {
        overflow: visible !important;
    }
    
    /* 调整手机框架容器 */
    .aspect-\[3\/6\] {
        min-height: 520px !important;
    }
    
    /* 确保页面整体不出现水平滚动 */
    body {
        overflow-x: hidden !important;
    }
    
    /* 确保主容器不超出屏幕宽度 */
    .container, .max-w-7xl {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
}

/* 确保在不同屏幕尺寸下保持一致 */
@media (min-width: 640px) {
    img[src="images/cfcf87a8df7916d3c6c03a7fb24f267.png"],
    img[src="images/微信图片_20250825152221.jpg"],
    img[src="images/微信图片_20250825152232.jpg"] {
        margin-top: 50px !important;
    }
}

@media (min-width: 768px) {
    img[src="images/cfcf87a8df7916d3c6c03a7fb24f267.png"],
    img[src="images/微信图片_20250825152221.jpg"],
    img[src="images/微信图片_20250825152232.jpg"] {
        margin-top: 50px !important;
    }
}

@media (min-width: 1024px) {
    img[src="images/cfcf87a8df7916d3c6c03a7fb24f267.png"],
    img[src="images/微信图片_20250825152221.jpg"],
    img[src="images/微信图片_20250825152232.jpg"] {
        margin-top: 50px !important;
    }
}

/* 滑动区域优化 */
@media (max-width: 768px) {
    /* 滑动容器父级 - 隐藏超出屏幕的内容 */
    .mt-16.md\:hidden {
        overflow-x: hidden;
        position: relative;
    }
    
    /* 滑动容器样式 - 恢复正常滚动 */
    .snap-x.snap-mandatory {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        overflow-x: auto;
        display: flex;
        gap: 1rem;
        padding: 0 1rem;
        /* 隐藏滚动条但保持滚动功能 */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .snap-x.snap-mandatory::-webkit-scrollbar {
        display: none;
    }
    
    /* 确保滑动项目正确显示 */
    .w-full.flex-none.snap-center {
        scroll-snap-align: center;
        flex-shrink: 0;
        width: calc(100vw - 3rem);
        min-width: calc(100vw - 3rem);
        margin-right: 0;
    }
    
    /* 滑动指示器样式 */
    .mt-6.flex.justify-center.gap-3 button {
        transition: all 0.3s ease;
        cursor: pointer;
    }
    
    .mt-6.flex.justify-center.gap-3 button:hover {
        transform: scale(1.2);
    }
    
    /* 价格卡片移动端优化 */
    #pricing .flex.flex-col.overflow-hidden {
        transition: all 0.3s ease;
    }
    
    /* 视频容器移动端优化 */
    #demo-videos .grid.max-w-4xl {
        gap: 1rem;
    }
    
    #demo-videos video {
        border-radius: 0.5rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        /* 禁用视频滑动弹窗效果 */
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* 禁用演示视频区域的滑动弹窗效果，但保持垂直滚动 */
    #demo-videos {
        touch-action: pan-y pinch-zoom;
        -webkit-touch-callout: none;
    }
    
    #demo-videos .rounded-2xl {
        touch-action: pan-y pinch-zoom;
        overflow: hidden;
    }
    
    /* 移动端滑动卡片阴影效果 */
    .w-full.flex-none.snap-center {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.15);
    }
    
    .w-full.flex-none.snap-center:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px -3px rgba(0, 0, 0, 0.2);
    }
    
    /* 卡片内文字行间距优化 */
    .w-full.flex-none.snap-center .leading-loose {
        line-height: 1.4 !important;
    }
    
    .w-full.flex-none.snap-center .leading-normal {
        line-height: 1.3 !important;
    }
}

/* 我们的优势界面两列布局优化 */
#secondary-features ul li {
    padding: 2rem !important;
}

#secondary-features ul li svg {
    width: 3rem !important;
    height: 3rem !important;
    margin-bottom: 1rem !important;
}

#secondary-features ul li h3 {
    font-size: 1.25rem !important;
    margin-top: 0.5rem !important;
}

#secondary-features ul li p {
    font-size: 1rem !important;
    margin-top: 0.75rem !important;
    line-height: 1.6 !important;
}

/* 通用移动端优化 */
@media (max-width: 640px) {
    /* 我们的优势移动端调整 */
    #secondary-features ul li {
        padding: 1.5rem !important;
    }
    
    #secondary-features ul li svg {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
    
    #secondary-features ul li h3 {
        font-size: 1.1rem !important;
    }
    
    #secondary-features ul li p {
        font-size: 0.9rem !important;
    }
    
    /* 价格部分文字大小调整 */
    #pricing h3 {
        font-size: 0.9rem !important;
    }
    
    #pricing p {
        font-size: 0.85rem !important;
    }
    
    #pricing ul li span {
        font-size: 0.8rem !important;
        line-height: 1.4;
    }
    
    /* 视频标题移动端优化 */
    #demo-videos h3 {
        font-size: 1rem;
    }
    
    #demo-videos p {
        font-size: 0.875rem;
    }
}

/* 底部布局移动端优化 */
/* Footer布局优化 - 确保在所有屏幕尺寸下都能正确显示 */

/* 全局footer布局强制修复 */
footer .flex.flex-col.md\:flex-row {
    flex-direction: row !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    width: 100% !important;
}

footer .flex.flex-col.items-start {
    align-items: flex-start !important;
    flex: 1 !important;
}

footer .flex.flex-col.items-end {
    align-items: flex-end !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
}

/* 桌面端footer布局 */
@media (min-width: 769px) {
    footer .flex.flex-col.md\:flex-row {
        flex-direction: row !important;
        align-items: flex-end !important;
        justify-content: space-between !important;
    }
    
    footer .flex.flex-col.items-start {
        align-items: flex-start !important;
    }
    
    footer .flex.flex-col.items-end {
        align-items: flex-end !important;
    }
}

@media (max-width: 768px) {
    /* 移动端footer保持左右布局而不是堆叠 */
    footer .flex.flex-col.md\:flex-row {
        flex-direction: row !important;
        align-items: flex-end !important;
        justify-content: space-between !important;
    }
    
    /* 左侧内容在移动端保持左对齐 */
    footer .flex.flex-col.items-start {
        align-items: flex-start !important;
        flex-shrink: 1 !important;
    }
    
    /* 右侧内容在移动端保持右对齐 */
    footer .flex.flex-col.items-end {
        align-items: flex-end !important;
        flex-shrink: 0 !important;
    }
}

/* 移动端微信客服样式控制 */
@media (max-width: 767px) {
    /* 强制隐藏移动端的PC footer服务区域 */
    footer .pc-footer-service {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* 隐藏移动端右侧原始service图片和快讯侠投研文字 */
    footer .flex.flex-col.items-end > img[alt="service"] {
        display: none !important;
    }
    
    footer .flex.flex-col.items-end > p {
        display: none !important;
    }
    
    /* 显示移动端微信客服区域 */
    .mobile-service-section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* 移动端功能按钮保持水平排列 */
    footer ul.flex.flex-row {
        flex-direction: row !important;
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
    }
    
    /* 移动端功能按钮字体调整 */
    footer ul.flex.flex-row a {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}

/* 电脑端微信客服样式控制 */
@media (min-width: 768px) {
    /* 强制显示电脑端footer服务区域，覆盖内联样式 */
    .pc-footer-service {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* 隐藏移动端微信客服区域 */
    .mobile-service-section {
        display: none !important;
    }
}
    
    .mobile-service-image {
        width: 3rem !important; /* 12 * 0.25rem = 3rem, 120% of original 2.5rem */
        height: 3rem !important;
        min-width: 3rem !important;
        min-height: 3rem !important;
        max-width: 3rem !important;
        max-height: 3rem !important;
        display: block !important;
        object-fit: cover !important;
        -webkit-object-fit: cover !important; /* Safari兼容性 */
        object-position: center !important;
        -webkit-object-position: center !important; /* Safari兼容性 */
        border-radius: 0.5rem !important;
        -webkit-border-radius: 0.5rem !important; /* Safari兼容性 */
        cursor: pointer !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        aspect-ratio: 1/1 !important; /* 强制1:1比例 */
        -webkit-transform: translateZ(0) !important; /* 启用硬件加速 */
        transform: translateZ(0) !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
    }
    
    .mobile-service-title {
        font-size: 1rem !important; /* 16px */
        font-weight: bold !important;
    }
    
    .mobile-service-subtitle {
        font-size: 0.875rem !important; /* 14px, 2px smaller than 16px */
    }
}

/* 滑动指示器激活状态 */
.slider-indicator-active {
    background-color: #ffffff !important;
    transform: scale(1.1);
}

.slider-indicator-inactive {
    background-color: #6b7280 !important;
}

/* Safari浏览器特殊优化 */
@supports (-webkit-appearance: none) {
    .mobile-service-image {
        -webkit-transform: translate3d(0, 0, 0) !important;
        transform: translate3d(0, 0, 0) !important;
        will-change: transform !important;
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
    }
}

/* iOS Safari特殊优化 */
@media screen and (-webkit-min-device-pixel-ratio: 1) {
    .mobile-service-image {
        -webkit-transform: translateZ(0) scale(1.0001) !important;
        transform: translateZ(0) scale(1.0001) !important;
    }
}

/* 视频播放状态指示 */
.video-playing {
    border: 2px solid #06b6d4;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

/* 触摸反馈 */
.touch-feedback {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* 加载动画 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* PC端视频对齐修复 */
@media (min-width: 640px) {
    /* 演示视频区域的网格容器 */
    .mx-auto.mt-16.grid.max-w-4xl.grid-cols-1.gap-8.sm\:mt-20.sm\:grid-cols-2.lg\:gap-12 {
        align-items: end; /* 让两个视频容器底部对齐 */
    }
    
    /* 确保视频容器具有相同的flex布局 */
    .mx-auto.mt-16.grid.max-w-4xl.grid-cols-1.gap-8.sm\:mt-20.sm\:grid-cols-2.lg\:gap-12 > div {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-height: 100%;
    }
}