/* 响应式设计全局样式表 */

/* 基础设置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    color: #333;
    background-color: #f8f9fa;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 响应式网格系统 */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

/* 移动端菜单响应式 */
.navbar-nav {
    transition: all 0.3s ease;
}

.navbar-nav.active {
    display: block !important;
}

.navbar-toggle {
    border-color: #4CAF50;
}

.navbar-toggle .icon-bar {
    background-color: #4CAF50;
}

/* 回到顶部按钮 */
.back-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 50%;
    text-align: center;
    font-size: 18px;
    cursor: pointer;
    display: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 9999;
}

.back-to-top-btn:hover {
    background-color: #45a049;
    transform: translateY(-3px);
}

/* 页脚响应式设计 */
.responsive-footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-column {
    margin-bottom: 30px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-link-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-icon {
    min-width: 20px;
    color: #4CAF50;
}

.social-links {
    margin-top: 15px;
    display: flex;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: #4CAF50;
    transform: translateY(-3px);
}

.mobile-nav-link {
    margin-top: 15px;
    display: none;
}

.footer-bottom {
    /* padding-top: 20px; */
    /* border-top: 1px solid #444; */
}

/* 触摸设备优化 */
.touch-device a,
.touch-device button {
    touch-action: manipulation;
}

/* 媒体查询 - 平板设备 */
@media (max-width: 992px) {
    html {
        font-size: 15px;
    }
    
    /* 导航栏响应式 */
    .navbar {
        padding: 10px 0;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-nav {
        margin-top: 10px;
    }
    
    .navbar-nav > li {
        margin-left: 0;
        margin-right: 15px;
    }
    
    /* 产品展示卡片 */
    .product-card {
        width: calc(50% - 30px);
        margin: 15px;
    }
    
    /* 页脚布局 */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-col {
        margin-bottom: 20px;
    }
    
    /* 联系表单 */
    .contact-form {
        width: 100%;
    }
    
    /* 解决方案详情 */
    .solution-detail {
        flex-direction: column;
    }
    
    .solution-content, .solution-sidebar {
        width: 100%;
    }
    
    .solution-sidebar {
        margin-top: 30px;
    }
}

/* 媒体查询 - 移动设备 */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    /* 导航栏汉堡菜单 */
    .menu-toggle {
        display: block;
    }
    
    .navbar-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 15px;
        z-index: 1000;
    }
    
    .navbar-nav.active {
        display: block;
    }
    
    .navbar-nav > li {
        display: block;
        margin: 10px 0;
    }
    
    /* 产品展示卡片 */
    .product-card {
        width: 100%;
        margin: 15px 0;
    }
    
    /* 首页轮播图 */
    .carousel-caption {
        bottom: 20px;
    }
    
    .carousel-caption h2 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    /* 按钮大小 */
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    /* 表单元素 */
    .form-control {
        height: 40px;
        font-size: 1rem;
    }
    
    /* 页头标题 */
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    /* 页脚 */
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom .copyright,
    .footer-bottom .social-links {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* 解决方案详情页 */
    .solution-image {
        margin-bottom: 20px;
    }
    
    /* 公司简介时间线 */
    .timeline-item {
        padding-left: 40px;
    }
    
    .timeline-item:before {
        left: 15px;
    }
}

/* 媒体查询 - 小屏幕手机 */
@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    /* 导航栏 */
    .navbar {
        padding: 8px 0;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    /* 首页轮播图 */
    .carousel-caption {
        bottom: 10px;
    }
    
    .carousel-caption h2 {
        font-size: 1.3rem;
    }
    
    .carousel-caption p {
        display: none;
    }
    
    /* 页头标题 */
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    /* 列表页表格响应式 */
    .table-responsive {
        overflow-x: auto;
    }
    
    table {
        width: 100%;
        min-width: 480px;
    }
    
    /* 解决方案详情 */
    .solution-features, .solution-applications, .solution-advantages {
        padding-left: 0;
    }
    
    .solution-features li, .solution-applications li, .solution-advantages li {
        padding-left: 20px;
    }
    
    /* 联系表单 */
    .contact-form {
        padding: 20px;
    }
    
    /* 加载状态 */
    .loading-overlay {
        font-size: 1rem;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .footer,
    .sidebar,
    .btn,
    .carousel,
    .related-products {
        display: none !important;
    }
    
    .container {
        max-width: none;
        width: 100%;
        padding: 0;
    }
    
    body {
        font-size: 12pt;
        color: #000;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    body {
        background: #000;
        color: #fff;
    }
    
    .navbar,
    .footer {
        background: #111;
        border-color: #333;
    }
    
    .btn-primary {
        background: #0066cc;
        border-color: #fff;
        color: #fff;
    }
    
    .form-control {
        background: #222;
        border-color: #555;
        color: #fff;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}