/* 北岱科技官网 - 移动端响应式优化 */
/* 2026-03-17 完整优化版 v2 */

/* ========== 全局设置 ========== */
html {
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

/* ========== 桌面端隐藏移动端导航 ========== */
.mobile-nav {
    display: none;
}

/* 动画 */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ========== 移动端样式 (≤768px) ========== */
@media (max-width: 768px) {
    /* 移动端显示移动端导航 */
    .mobile-nav {
        display: none;
    }
    /* 全局 */
    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
    }
    
    body {
        font-size: 14px;
        line-height: 1.6;
    }
    
    /* --- 顶部栏 --- */
    .top-bar {
        padding: 0 15px !important;
        height: auto !important;
        min-height: 50px !important;
    }
    
    .top-content {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 8px 0 !important;
    }
    
    .logo img {
        height: 36px !important;
        width: auto !important;
    }
    
    .contact-phone {
        font-size: 14px !important;
        white-space: nowrap !important;
    }
    
    .contact-phone a {
        color: #764ba2 !important;
    }
    
    /* 汉堡菜单按钮 */
    .mobile-menu-btn {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 10001;
        flex-shrink: 0;
    }
    
    .mobile-menu-btn span {
        width: 28px;
        height: 2px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 1px;
        transition: all 0.3s;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* 移动端导航菜单 - 简洁版 */
    .mobile-nav {
        display: none;
        position: fixed;
        top: 58px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        z-index: 10000;
        overflow-y: auto;
        padding: 0;
        animation: slideIn 0.3s ease;
    }
    
    .mobile-nav.show {
        display: block;
    }
    
    @keyframes slideIn {
        from { transform: translateX(100%); }
        to { transform: translateX(0); }
    }
    
    .mobile-nav-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid #f0f0f0;
        text-decoration: none;
        color: #333;
        font-size: 16px;
        font-weight: 500;
        background: #fff;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }
    
    .mobile-nav-item:active {
        background: #f8f8ff;
    }
    
    .mobile-nav-item.has-sub::after {
        content: '›';
        font-size: 20px;
        color: #ccc;
        transition: transform 0.3s;
    }
    
    .mobile-nav-item.has-sub.open::after {
        transform: rotate(90deg);
    }
    
    /* 触摸展开子菜单 */
    .mobile-nav-item.has-sub:active + .mobile-submenu,
    .mobile-nav-item.has-sub:focus + .mobile-submenu {
        display: block;
    }
    
    .mobile-submenu {
        display: none;
        background: #f8f9fa;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .mobile-submenu.show {
        display: block;
        max-height: 500px;
    }
    
    .mobile-submenu a {
        display: block;
        padding: 14px 20px 14px 35px;
        font-size: 15px;
        color: #666;
        text-decoration: none;
        border-bottom: 1px solid #eee;
    }
    
    .mobile-submenu a:active {
        background: #f0f0ff;
        color: #764ba2;
    }
    
    /* 隐藏桌面导航 */
    .main-nav {
        display: none !important;
    }
    
    /* --- Banner --- */
    .banner {
        height: 45vh !important;
        min-height: 280px !important;
        margin-top: 58px !important;
    }
    
    .banner-content {
        padding: 0 20px !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    .banner-content h1 {
        font-size: 22px !important;
        margin-bottom: 12px !important;
        line-height: 1.3 !important;
        text-align: center !important;
    }
    
    .banner-content p {
        font-size: 14px !important;
        margin-bottom: 20px !important;
        line-height: 1.5 !important;
        text-align: center !important;
    }
    
    .btn {
        padding: 10px 28px !important;
        font-size: 14px !important;
    }
    
    /* --- 核心业务 - 移动端可展开选择 --- */
    .three-columns {
        display: flex !important;
        flex-direction: column !important;
        padding: 30px 15px !important;
        gap: 12px !important;
    }
    
    .column-card-mobile {
        background: #fff;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    }
    
    .column-card-header {
        display: flex !important;
        align-items: center !important;
        padding: 16px !important;
        gap: 15px !important;
        cursor: pointer;
    }
    
    .column-text {
        flex: 1;
        text-align: left !important;
    }
    
    .column-text .column-title {
        font-size: 16px !important;
        margin-bottom: 4px !important;
        text-align: left !important;
    }
    
    .column-text .column-desc {
        font-size: 13px !important;
        line-height: 1.5 !important;
        text-align: left !important;
        margin: 0 !important;
    }
    
    .column-arrow {
        font-size: 20px;
        color: #ccc;
        transition: transform 0.3s;
    }
    
    .column-card-mobile.open .column-arrow {
        transform: rotate(90deg);
    }
    
    .column-submenu {
        display: none;
        background: #f8f9fa;
        border-top: 1px solid #eee;
    }
    
    .column-submenu.show {
        display: block;
    }
    
    .column-submenu a {
        display: block;
        padding: 14px 20px 14px 75px;
        font-size: 14px;
        color: #666;
        text-decoration: none;
        border-bottom: 1px solid #eee;
    }
    
    .column-submenu a:last-child {
        border-bottom: none;
    }
    
    .column-submenu a:active {
        background: #f0f0ff;
        color: #764ba2;
    }
    
    .column-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 22px !important;
        margin: 0 !important;
        flex-shrink: 0;
    }
    
    /* --- 产品板块 - 添加滑动提示 --- */
    .products-section {
        padding: 30px 0 !important;
    }
    
    .section-title {
        font-size: 22px !important;
        margin-bottom: 8px !important;
    }
    
    .section-subtitle {
        font-size: 14px !important;
        margin-bottom: 20px !important;
        position: relative;
    }
    
    /* 滑动提示 */
    .products-section .section-subtitle::after {
        content: ' ← 滑动查看更多';
        display: block;
        font-size: 12px;
        color: #999;
        margin-top: 5px;
    }
    
    .product-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        gap: 12px !important;
        padding: 0 15px 15px !important;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }
    
    .product-grid::-webkit-scrollbar {
        display: none;
    }
    
    .product-card {
        min-width: 220px !important;
        max-width: 220px !important;
        flex: 0 0 220px !important;
        scroll-snap-align: start;
    }
    
    .product-image {
        height: 140px !important;
    }
    
    .product-info {
        padding: 12px !important;
    }
    
    .product-name {
        font-size: 14px !important;
    }
    
    .product-desc {
        font-size: 12px !important;
    }
    
    /* --- 关于我们 --- */
    .about-section {
        padding: 30px 15px !important;
    }
    
    .about-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    .about-text h2 {
        font-size: 22px !important;
        margin-bottom: 12px !important;
    }
    
    .about-text p {
        font-size: 14px !important;
        margin-bottom: 10px !important;
    }
    
    .about-image img {
        max-width: 180px !important;
    }
    
    /* --- 联系我们 --- */
    .contact-section {
        padding: 30px 15px !important;
    }
    
    .contact-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .contact-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        padding: 16px !important;
        text-align: left !important;
        gap: 15px !important;
    }
    
    .contact-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 22px !important;
        margin: 0 !important;
        flex-shrink: 0;
    }
    
    .contact-title {
        font-size: 15px !important;
        margin-bottom: 4px !important;
        text-align: left !important;
    }
    
    .contact-info {
        font-size: 13px !important;
        text-align: left !important;
    }
    
    /* --- 页脚 --- */
    .footer {
        padding: 30px 15px 20px !important;
    }
    
    .footer-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 25px !important;
    }
    
    .footer-section {
        width: 100% !important;
    }
    
    .footer-section h3 {
        font-size: 17px !important;
        margin-bottom: 12px !important;
        padding-bottom: 8px !important;
        border-bottom: 1px solid #333 !important;
    }
    
    .footer-section p {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }
    
    .footer-links {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        list-style: none !important;
        padding: 0 !important;
    }
    
    .footer-links li {
        margin: 0 !important;
    }
    
    .footer-links a {
        font-size: 13px !important;
        display: inline-block !important;
        padding: 4px 0 !important;
    }
    
    .copyright {
        font-size: 12px !important;
        padding-top: 20px !important;
        margin-top: 20px !important;
    }
    
    /* 社交媒体按钮 */
    .social-links {
        gap: 12px !important;
    }
    
    .social-links a {
        width: 36px !important;
        height: 36px !important;
        font-size: 18px !important;
    }
}

/* ========== 小屏手机 (≤480px) ========== */
@media (max-width: 480px) {
    .banner {
        height: 40vh !important;
        min-height: 250px !important;
    }
    
    .banner-content h1 {
        font-size: 18px !important;
    }
    
    .product-card {
        min-width: 200px !important;
        max-width: 200px !important;
        flex: 0 0 200px !important;
    }
    
    .footer-links {
        grid-template-columns: 1fr !important;
    }
}

/* ========== 桌面端核心业务样式 (≥769px) ========== */
@media (min-width: 769px) {
    .three-columns {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 30px !important;
    }
    
    .column-card-mobile {
        text-align: center;
        padding: 40px 30px;
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.08);
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        position: relative;
        overflow: hidden;
    }
    
    .column-card-mobile::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
        background-size: 200% 100%;
        animation: gradientMove 3s ease infinite;
    }
    
    .column-card-mobile:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 20px 50px rgba(102, 126, 234, 0.25);
    }
    
    .column-card-header {
        flex-direction: column !important;
        cursor: default;
        position: relative;
        z-index: 1;
    }
    
    .column-arrow {
        display: none;
    }
    
    .column-text {
        text-align: center !important;
    }
    
    .column-text .column-title {
        font-size: 22px !important;
        text-align: center !important;
        font-weight: 700 !important;
        margin-bottom: 12px !important;
        transition: color 0.3s;
    }
    
    .column-card-mobile:hover .column-title {
        color: #764ba2;
    }
    
    .column-text .column-desc {
        font-size: 14px !important;
        text-align: center !important;
        color: #888 !important;
    }
    
    .column-submenu {
        display: block !important;
        background: transparent;
        border: none;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #f0f0f0;
    }
    
    .column-submenu a {
        display: inline-block;
        padding: 8px 16px;
        margin: 4px;
        font-size: 13px;
        color: #666;
        background: #f8f9fa;
        border-radius: 20px;
        border: none;
        transition: all 0.3s;
    }
    
    .column-submenu a:hover {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    }
    
    .column-icon {
        width: 90px !important;
        height: 90px !important;
        font-size: 40px !important;
        margin: 0 auto 25px !important;
        background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%) !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.4s ease !important;
    }
    
    .column-card-mobile:hover .column-icon {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        transform: scale(1.1) rotate(5deg);
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    }
}

/* ========== 平板优化 (769px-1024px) ========== */
@media (min-width: 769px) and (max-width: 1024px) {
    .banner {
        height: 55vh !important;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ========== 桌面端隐藏汉堡菜单按钮 ========== */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }
}

/* ========== 内页通用样式 (≤768px) ========== */
@media (max-width: 768px) {
    /* --- Hero 横幅 --- */
    .hero {
        height: 280px !important;
        min-height: auto !important;
        padding: 0 20px !important;
        margin-top: 0 !important;
    }
    
    .hero h1 {
        font-size: 28px !important;
        margin-bottom: 10px !important;
    }
    
    .hero p {
        font-size: 14px !important;
    }
    
    /* --- 通用容器 --- */
    .container {
        padding: 0 15px !important;
    }
    
    /* --- 新闻列表页 --- */
    .news-section {
        padding: 30px 15px !important;
    }
    
    .news-tabs {
        flex-wrap: wrap;
        gap: 10px !important;
        margin-bottom: 25px !important;
    }
    
    .tab-btn {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
    
    .news-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .news-card .news-image {
        height: 180px !important;
    }
    
    .news-card .news-content {
        padding: 12px !important;
    }
    
    .news-card .news-title {
        font-size: 14px !important;
    }
    
    .news-card .news-desc {
        font-size: 12px !important;
        -webkit-line-clamp: 3 !important;
    }
    
    /* --- 产品页 - 主图和展示 --- */
    .product-intro,
    .features-section,
    .products-showcase {
        padding: 40px 0 !important;
    }
    
    .intro-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .intro-text h2 {
        font-size: 24px !important;
        margin-bottom: 15px !important;
    }
    
    .intro-text p {
        font-size: 14px !important;
        line-height: 1.8 !important;
    }
    
    .highlight-box {
        padding: 20px !important;
        margin-top: 20px !important;
    }
    
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .feature-card {
        padding: 25px 20px !important;
    }
    
    .feature-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
    }
    
    .feature-card h3 {
        font-size: 17px !important;
    }
    
    /* 产品展示 - 横向滑动 */
    .product-images {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        gap: 15px !important;
        margin: 0 -15px;
        padding: 0 15px 15px !important;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }
    
    .product-images::-webkit-scrollbar {
        display: none;
    }
    
    .product-img-card {
        min-width: 220px !important;
        max-width: 220px !important;
        flex: 0 0 220px !important;
        scroll-snap-align: start;
    }
    
    .product-img-card img {
        height: 180px !important;
    }
    
    .product-img-card .card-content {
        padding: 12px !important;
    }
    
    .product-img-card h4 {
        font-size: 14px !important;
    }
    
    /* --- 联系横幅 --- */
    .contact-bar {
        padding: 40px 20px !important;
    }
    
    .contact-bar h3 {
        font-size: 22px !important;
        margin-bottom: 10px !important;
    }
    
    .contact-bar p {
        font-size: 14px !important;
    }
    
    .contact-bar .phone {
        font-size: 24px !important;
    }
    
    .contact-bar a {
        padding: 12px 25px !important;
        font-size: 14px !important;
        margin: 5px !important;
    }
    
    /* --- 关于我们页 --- */
    .about-section {
        padding: 40px 15px !important;
    }
    
    .about-intro {
        font-size: 15px !important;
        line-height: 1.8 !important;
    }
    
    .about-intro p {
        margin-bottom: 15px !important;
    }
    
    .mission-vision {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        margin: 30px 0 !important;
    }
    
    .mv-card {
        padding: 25px !important;
    }
    
    .mv-card h3 {
        font-size: 22px !important;
        margin-bottom: 12px !important;
    }
    
    .mv-card p {
        font-size: 15px !important;
    }
    
    .timeline-section {
        padding: 40px 15px !important;
    }
    
    .timeline::before {
        left: 15px !important;
    }
    
    .timeline-item,
    .timeline-item:nth-child(odd) {
        flex-direction: column !important;
        padding-left: 45px !important;
        margin-bottom: 30px !important;
    }
    
    .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content {
        width: 100% !important;
        text-align: left !important;
        padding: 20px !important;
    }
    
    .timeline-year {
        left: 15px !important;
        transform: translateX(0) !important;
        padding: 6px 14px !important;
        font-size: 14px !important;
    }
    
    .timeline-content h4 {
        font-size: 17px !important;
        margin-bottom: 8px !important;
    }
    
    .timeline-content p {
        font-size: 14px !important;
    }
    
    /* --- 联系我们页 --- */
    .contact-page-section {
        padding: 40px 15px !important;
    }
    
    .contact-form-section {
        padding: 40px 15px !important;
    }
    
    .contact-info-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .contact-form-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* 联系信息卡片 */
    .contact-info-card {
        padding: 25px !important;
    }
    
    .contact-info-card h2 {
        font-size: 22px !important;
        margin-bottom: 20px !important;
        text-align: left !important;
    }
    
    .info-item {
        display: flex !important;
        align-items: flex-start !important;
        margin-bottom: 20px !important;
    }
    
    .info-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
        margin-right: 15px !important;
    }
    
    .info-content {
        text-align: left !important;
        flex: 1;
        min-width: 0;
        overflow-wrap: break-word;
    }
    
    .info-content h4 {
        font-size: 15px !important;
        margin-bottom: 5px !important;
        text-align: left !important;
        white-space: nowrap;
    }
    
    .info-content p {
        font-size: 14px !important;
        text-align: left !important;
        line-height: 1.6 !important;
        margin: 0 !important;
    }
    
    .info-content a {
        color: #764ba2;
        text-decoration: none;
    }
    
    .avatar-container {
        margin-top: 20px !important;
    }
    
    .avatar-wrapper {
        width: 120px !important;
        height: 120px !important;
    }
    
    /* --- 解决方案页 - 推荐产品滑动 --- */
    .content {
        padding: 40px 15px !important;
    }
    
    .content p {
        font-size: 15px !important;
        line-height: 1.8 !important;
    }
    
    .section-title {
        font-size: 24px !important;
        margin: 40px 0 25px !important;
    }
    
    /* 推荐产品 - 横向滑动 */
    .products-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        gap: 15px !important;
        padding: 0 0 15px !important;
        margin: 0 -15px;
        padding: 0 15px 15px !important;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }
    
    .products-grid::-webkit-scrollbar {
        display: none;
    }
    
    .products-grid .product-card {
        min-width: 240px !important;
        max-width: 240px !important;
        flex: 0 0 240px !important;
        scroll-snap-align: start;
        margin: 0 !important;
    }
    
    .products-grid .product-card img {
        height: 150px !important;
    }
    
    .products-grid .product-info {
        padding: 15px !important;
    }
    
    .products-grid .product-info h3 {
        font-size: 16px !important;
        margin-bottom: 8px !important;
    }
    
    .products-grid .product-info p {
        font-size: 13px !important;
        line-height: 1.5 !important;
        margin: 0 !important;
    }
    
    /* 滑动提示 */
    .products-grid::after {
        content: '';
        min-width: 15px;
    }
    
    /* --- 案例详情页 --- */
    .case-detail-section {
        padding: 40px 15px !important;
    }
    
    .case-detail-section h2 {
        font-size: 22px !important;
        margin-bottom: 20px !important;
    }
    
    .case-detail-section p {
        font-size: 14px !important;
        line-height: 1.8 !important;
    }
    
    .case-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    .stat-card {
        padding: 20px !important;
    }
    
    .stat-number {
        font-size: 28px !important;
    }
    
    .stat-label {
        font-size: 12px !important;
    }
    
    /* --- 技术文章页 --- */
    .article-content {
        padding: 30px 15px !important;
    }
    
    .article-content h2 {
        font-size: 22px !important;
    }
    
    .article-content h3 {
        font-size: 18px !important;
    }
    
    .article-content p {
        font-size: 14px !important;
        line-height: 1.8 !important;
    }
    
    /* --- 解决方案页 --- */
    .solution-hero {
        height: 280px !important;
    }
    
    .solution-intro {
        padding: 40px 15px !important;
    }
    
    .solution-features {
        padding: 40px 15px !important;
    }
    
    .solution-cases {
        padding: 40px 15px !important;
    }
    
    /* --- 行业方案页 --- */
    .industry-intro {
        padding: 40px 15px !important;
    }
    
    .industry-features {
        grid-template-columns: 1fr !important;
    }
    
    /* --- 软件页 --- */
    .software-section {
        padding: 40px 15px !important;
    }
    
    .software-features {
        grid-template-columns: 1fr !important;
    }
    
    /* --- 返回按钮 --- */
    .back-btn {
        left: 10px !important;
        padding: 10px 16px !important;
        font-size: 14px !important;
        bottom: 20px !important;
        top: auto !important;
        transform: none !important;
        border-radius: 20px !important;
    }
    
    .back-btn:hover {
        transform: none !important;
    }
    
    /* --- 隐藏返回按钮文字，只显示箭头 --- */
    .back-btn::before {
        content: '←';
        font-size: 18px;
    }
}

/* ========== 小屏手机额外优化 (≤480px) ========== */
@media (max-width: 480px) {
    .hero {
        height: 240px !important;
    }
    
    .hero h1 {
        font-size: 24px !important;
    }
    
    .product-images {
        grid-template-columns: 1fr !important;
    }
    
    .case-stats {
        grid-template-columns: 1fr !important;
    }
}