/* 响应式设计CSS - 确保网站在各种设备上的良好显示效果 */

/* 桌面端大屏幕 (大于1200px) */
@media (min-width: 1201px) {
    .container {
        max-width: 1170px;
    }
}

/* 普通桌面端 (992px - 1200px) */
@media (min-width: 992px) and (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    /* 导航菜单间距调整 */
    .nav-menu li {
        margin-left: 20px;
    }
    
    /* 首页横幅文字尺寸调整 */
    .company-name {
        font-size: 50px;
    }
    
    .banner-tagline {
        font-size: 20px;
    }
}

/* 平板设备 (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    /* 导航菜单缩小间距 */
    .nav-menu li {
        margin-left: 15px;
    }
    
    /* 首页横幅文字尺寸调整 */
    .company-name {
        font-size: 40px;
    }
    
    .banner-tagline {
        font-size: 18px;
    }
    
    /* 双列布局改为单列 */
    .news-detail-wrapper,
    .activity-detail-wrapper {
        flex-direction: column;
    }
    
    .news-main, .news-sidebar,
    .activity-main, .activity-sidebar {
        width: 100%;
        padding-right: 0;
    }
    
    .news-sidebar,
    .activity-sidebar {
        margin-top: 50px;
    }
    
    /* 业务板块布局调整 */
    .business-content {
        flex-direction: column;
    }
    
    .business-description {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    /* 网格布局调整 */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .benefits-grid,
    .core-values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 页脚布局调整 */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* 手机设备 (小于767px) */
@media (max-width: 767px) {
    .container {
        width: 100%;
        padding: 0 15px;
    }
    
    /* 导航菜单调整 */
    .nav-menu li {
        margin-left: 10px;
    }
    
    .nav-menu a {
        font-size: 14px;
    }
    
    /* 在特小屏幕上隐藏文字，只显示图标 */
    @media (max-width: 480px) {
        .nav-menu .menu-text {
            display: none;
        }
    }
    
    /* 首页横幅文字尺寸调整 */
    .company-name {
        font-size: 30px;
        margin-bottom: 15px;
    }
    
    .banner-tagline {
        font-size: 16px;
    }
    
    /* 标题调整 */
    .page-title {
        font-size: 28px;
    }
    
    .section-title h2 {
        font-size: 24px;
    }
    
    /* 内容布局调整 */
    .news-detail-wrapper,
    .activity-detail-wrapper,
    .contact-wrapper,
    .business-content,
    .about-wrapper {
        flex-direction: column;
    }
    
    .news-main, .news-sidebar,
    .activity-main, .activity-sidebar,
    .contact-info, .contact-form,
    .business-description, .business-images,
    .about-content {
        width: 100%;
        padding-right: 0;
        margin-bottom: 30px;
    }
    
    /* 新闻/活动项布局调整 */
    .news-item {
        flex-direction: column;
    }
    
    .news-image {
        width: 100%;
        height: 200px;
    }
    
    /* 图片画廊调整 */
    .gallery-grid,
    .business-images {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    /* 表单元素调整 */
    .form-control {
        padding: 10px;
    }
    
    .submit-btn {
        width: 100%;
        padding: 12px;
    }
    
    /* 导航按钮调整 */
    .activity-navigation,
    .news-navigation {
        flex-direction: column;
    }
    
    .nav-prev, .nav-next {
        max-width: 100%;
        margin-bottom: 15px;
    }
    
    /* 页脚布局调整 */
    .footer-content {
        display: flex;
        flex-direction: column;
    }
    
    .footer-column {
        width: 100%;
        margin-bottom: 25px;
    }
}

/* 修复特定组件在移动设备上的问题 */

/* 使所有交互元素足够大以便触摸 */
@media (max-width: 767px) {
    /* 按钮、链接等交互元素最小尺寸调整 */
    .btn, .nav-menu a, .footer-links a, .tag, 
    .filter-btn, .share-links a, .read-more {
        min-height: 44px; /* 苹果设计指南推荐的最小触摸目标大小 */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 日历控件在移动设备上的调整 */
    .calendar-day {
        height: 40px;
    }
    
    /* 表单控件在移动设备上的调整 */
    input, select, textarea {
        font-size: 16px; /* 防止iOS自动缩放 */
    }
}

/* 平滑滚动效果，改善移动端浏览体验 */
html {
    scroll-behavior: smooth;
}

/* 优化移动设备上的图片加载 */
@media (max-width: 767px) {
    img {
        max-width: 100%;
        height: auto;
    }
}

/* 响应式视频容器 */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 比例 */
    height: 0;
    overflow: hidden;
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 移动友好的表格 */
@media (max-width: 767px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* 打印样式 */
@media print {
    .header, .footer, .share-links, .nav-menu {
        display: none;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
} 