/* 通用容器响应式 */
@media (min-width: var(--breakpoint-xl)) {
    .container {
        max-width: var(--container-xl);
    }
}

@media (max-width: var(--breakpoint-lg)) {
    .container {
        max-width: var(--container-lg);
    }
    
    html {
        font-size: 15px;
    }
}

@media (max-width: var(--breakpoint-md)) {
    .container {
        max-width: var(--container-md);
    }
    
    html {
        font-size: 14px;
    }
}

/* 平板设备适配 */
@media (max-width: var(--breakpoint-sm)) {
    .container {
        max-width: 100%;
        padding: 0 var(--spacing-mobile);
    }
    
    html {
        font-size: 14px;
    }
    
    /* 导航栏适配 */
    .navbar {
        padding: var(--spacing-sm);
    }
    
    .navbar-center {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    /* 内容区域适配 */
    .section {
        padding: var(--spacing-lg) 0;
    }
    
    /* 网格布局适配 */
    .advantages-grid,
    .solutions-grid,
    .team-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* 卡片组件适配 */
    .advantage-card,
    .solution-card,
    .team-card {
        padding: var(--spacing-md);
    }
    
    /* 水平滚动区域适配 */
    .panel-content {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-md);
    }
    
    .content-wrapper {
        padding-right: 0;
        margin-bottom: var(--spacing-lg);
    }
    
    /* 公司愿景区域适配 */
    .company-vision {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .vision-features {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* 手机设备适配 */
@media (max-width: var(--breakpoint-xs)) {
    html {
        font-size: 12px;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* 标题大小调整 */
    .section h2,
    .panel-title,
    .vision-title {
        font-size: var(--font-size-xl);
    }
    
    /* 按钮样式调整 */
    .try-button {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
}

/* 移动端适配样式 */
@media screen and (max-width: 768px) {
    /* 导航栏适配 */
    .navbar {
        padding: 1rem;
        justify-content: space-between;
    }

    .navbar-right {
        display: none !important; /* 确保联系我们按钮在移动端隐藏 */
    }

    .navbar-center {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        padding: 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .navbar-center.active {
        display: flex !important;
    }

    .nav-item {
        padding: 1rem;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #eee;
        position: relative;
    }

    .dropdown-menu {
        display: none;
        position: static;
        width: 100%;
        box-shadow: none;
        padding: 0.5rem 0;
        background-color: #f5f5f5;
    }

    .nav-item.active .dropdown-menu {
        display: block !important;
    }

    .dropdown-item {
        padding: 0.8rem 1rem;
        color: inherit;
        text-decoration: none;
    }

    /* 汉堡菜单按钮样式 */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        cursor: pointer;
        margin-left: 1rem;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #333;
        transition: all 0.3s ease;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* 英雄区域适配 */
    .hero-text1 {
        font-size: 2.5rem;
        text-align: center;
        width: 100%;
        padding: 0 1rem;
    }

    .glacier-title,
    .legend-title {
        font-size: 2.5rem;
        display: inline-block;
    }

    .hero-text2 {
        font-size: 1.2rem;
        padding: 0 1rem;
    }

    .hero-text3 {
        font-size: 1.5rem;
    }

    .hero-text4 {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* 核心优势区域适配 */
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .advantage-card {
        width: 100%;
    }

    /* 应用场景区域适配 */
    .solutions-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .solution-card {
        width: 100%;
    }

    /* 页脚适配 */
    .footer-content {
        display: none;
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-links {
        text-align: center;
    }

    .footer-bottom {
        padding: 1rem;
        text-align: center;
    }

    /* 合作伙伴滚动区域适配 */
    .partnership-scroll-container {
        height: 60px;
    }

    .partnership-scroll-content img {
        height: 40px;
        margin: 0 1rem;
    }

    /* 合作伙伴弹窗适配 */
    .partner-modal {
        width: 90%; /* 调整宽度为屏幕的90% */
        max-width: 320px; /* 设置最大宽度 */
        left: 50% !important; /* 强制居中 */
        transform: translateX(-50%); /* 水平居中 */
        top: 50% !important; /* 垂直居中 */
        margin-top: -150px; /* 向上偏移以获得更好的视觉效果 */
        position: fixed; /* 固定定位 */
    }

    .modal-header {
        padding: 0.8rem;
        font-size: 1rem;
    }

    .modal-content {
        padding: 1rem;
    }

    .stat-item {
        margin-bottom: 0.8rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .stat-label {
        font-size: 0.9rem;
        margin-right: 0.5rem;
    }

    .stat-value {
        font-size: 0.9rem;
    }

    .partner-modal-overlay {
        background-color: rgba(0, 0, 0, 0.7);
    }

    .close-modal {
        width: 44px; /* 增大点击区域 */
        height: 44px;
        line-height: 44px;
        text-align: center;
        font-size: 24px;
        position: absolute;
        right: 0;
        top: 0;
        cursor: pointer;
        padding: 0;
        background: transparent;
        border: none;
        color: #333;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
    }

    /* 添加触摸反馈效果 */
    .close-modal:active {
        background-color: rgba(0, 0, 0, 0.1);
    }
}

/* 超小屏幕适配 */
@media screen and (max-width: 480px) {
    .hero-text1 {
        font-size: 2rem;
    }

    .glacier-title,
    .legend-title {
        font-size: 2rem;
        display: inline-block;
    }

    .hero-text2 {
        font-size: 1rem;
    }

    .hero-text3 {
        font-size: 1.2rem;
    }

    .hero-text4 {
        font-size: 0.9rem;
    }

    .partner-modal {
        width: 95%;
        max-width: 280px;
        margin-top: -120px;
    }

    .modal-header {
        padding: 0.6rem;
        font-size: 0.9rem;
    }

    .modal-content {
        padding: 0.8rem;
    }

    .stat-item {
        margin-bottom: 0.6rem;
    }

    .stat-label,
    .stat-value {
        font-size: 0.8rem;
    }
}

/* 更小屏幕的适配 */
@media screen and (max-width: 360px) {
    .hero-text1 {
        font-size: 1.5rem;
    }

    .glacier-title,
    .legend-title {
        font-size: 1.5rem;
        display: inline-block;
    }
}
