/* 
 * 响应式样式文件
 * 江苏活鲜供应链管理有限公司官网
 * 重构移动端，确保PC端不受影响
 */

/* 大屏幕设备 (1200px以上) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* 中等屏幕设备 (992px - 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .slide-content h1 {
        font-size: 42px;
    }
}

/* 平板设备 (768px - 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    #header .container {
        height: 70px;
    }
    
    .logo {
        height: 40px;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .nav-links a {
        font-size: 14px;
    }
    
    .slide-content h1 {
        font-size: 36px;
    }
    
    .slide-content p {
        font-size: 16px;
    }
    
    .section-header h2 {
        font-size: 32px;
    }
    
    .company-values {
        flex-direction: column;
    }
    
    .about-gallery {
        flex-wrap: wrap;
    }
    
    .gallery-item {
        flex: 0 0 100%;
        margin-top: 16px;
        padding-bottom: 37.5%; /* 8:3比例 */
    }

    .gallery-item:first-child {
        margin-top: 0;
    }

    .business-image {
        flex: 0 0 100%;
        padding-bottom: 36.5%; /* 保持10.4:3.8比例 */
    }
    
    .business-content,
    .business-image {
        flex: 0 0 100%;
    }
    
    .contact-container {
        flex-direction: column;
    }
    
    .qrcode-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* 手机设备 (576px - 767px) - 完全重构 */
@media (max-width: 767px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    /* === 头部导航重构 === */
    #header {
        background-color: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    /* 移动端头部始终不透明，确保语言按钮可见 */
    #header.transparent {
        background-color: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    #header .container {
        height: 60px;
        justify-content: space-between;
        position: relative;
    }
    
    /* 隐藏导航和菜单按钮 */
    nav,
    .mobile-toggle {
        display: none !important;
    }
    
    /* Logo左对齐 */
    .logo {
        height: 36px;
        margin: 0;
        flex-shrink: 0;
    }
    
    .logo img {
        max-width: 160px;
    }
    
    /* 确保使用深色Logo，移动端始终显示深色 */
    .logo-light {
        display: none !important;
    }
    
    .logo-dark {
        display: block !important;
    }
    
    /* 移动端透明状态下也强制显示深色Logo */
    #header.transparent .logo-dark {
        display: block !important;
    }
    
    #header.transparent .logo-light {
        display: none !important;
    }
    
    /* 移动端语言选择器 - 始终可见 */
    .language-selector {
        display: flex !important;
        position: relative;
        flex-shrink: 0;
    }
    
    .selected-lang {
        padding: 8px 12px;
        font-size: 14px;
        background-color: rgba(0, 102, 204, 0.15) !important;
        border-radius: 20px;
        color: var(--primary-color) !important;
        font-weight: 500;
        border: 1px solid rgba(0, 102, 204, 0.3);
    }
    
    /* 透明状态下语言按钮样式保持不变 */
    #header.transparent .selected-lang {
        background-color: rgba(0, 102, 204, 0.15) !important;
        color: var(--primary-color) !important;
        border: 1px solid rgba(0, 102, 204, 0.3);
    }
    
    .selected-lang i {
        margin-left: 6px;
        font-size: 12px;
        color: var(--primary-color) !important;
    }
    
    #header.transparent .selected-lang i {
        color: var(--primary-color) !important;
    }
    
    .lang-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        background-color: white;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        padding: 8px 0;
        min-width: 100px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
        z-index: 1000;
    }
    
    .language-selector:hover .lang-dropdown,
    .language-selector:active .lang-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(8px);
    }
    
    .lang-dropdown li {
        padding: 10px 16px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 14px;
        color: #333;
    }
    
    .lang-dropdown li:hover {
        background-color: var(--light-color);
        color: var(--primary-color);
    }
    
    .lang-dropdown li.active {
        color: var(--primary-color);
        font-weight: 600;
        background-color: rgba(0, 102, 204, 0.1);
    }
    
    /* === 轮播区域优化 === */
    .hero-section {
        height: 70vh;
        min-height: 500px;
    }
    
    .slide-content {
        text-align: center;
        padding: 0 20px;
    }
    
    .slide-content h1 {
        font-size: 28px;
        line-height: 1.3;
        margin-bottom: 16px;
    }
    
    .slide-content p {
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 24px;
    }
    
    .cta-button {
        padding: 12px 28px;
        font-size: 14px;
    }
    
    /* 轮播控制优化 */
    .slider-controls {
        bottom: 20px;
        gap: 20px;
    }
    
    .arrow {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
    
    /* === 内容区域优化 === */
    .section-header h2 {
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .section-divider {
        width: 60px;
        height: 3px;
    }
    
    .about-section,
    .business-section,
    .news-section,
    .contact-section {
        padding: 50px 0;
    }
    
    /* === 关于我们区域优化 === */
    .about-content {
        gap: 32px;
    }
    
    .company-intro h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .company-intro p {
        font-size: 15px;
        line-height: 1.7;
        margin-bottom: 16px;
    }
    
    .company-values {
        flex-direction: column;
        gap: 16px;
    }
    
    .value-item {
        padding: 20px;
    }
    
    .value-item h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .value-item p {
        font-size: 15px;
    }
    
    /* 关于我们图片优化 - 8:3比例 */
    .about-gallery {
        flex-direction: column;
        gap: 16px;
    }
    
    .gallery-item {
        flex: none;
        width: 100%;
        padding-bottom: 37.5% !important; /* 8:3比例 */
        margin-top: 0;
    }
    
    .gallery-item + .gallery-item {
        margin-top: 16px;
    }
    
    /* === 业务领域优化 === */
    .business-areas {
        gap: 40px;
    }
    
    .business-item {
        gap: 20px;
    }
    
    .business-content h3 {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .business-content p {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .business-image {
        padding-bottom: 115.8% !important;
    }
    
    /* === 新闻资讯优化 === */
    .news-item {
        flex-direction: column;
    }
    
    .news-image {
        height: 200px;
        padding-bottom: 0;
    }
    
    .news-content {
        padding: 24px 20px;
    }
    
    .news-content h3 {
        font-size: 20px;
        line-height: 1.4;
        margin-bottom: 12px;
    }
    
    .news-meta {
        margin-bottom: 12px;
        font-size: 13px;
    }
    
    .news-text p {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 12px;
    }
    
    /* === 联系方式完全重构为单列 === */
    .contact-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .contact-col {
        width: 100%;
        flex: none;
    }
    
    .contact-left,
    .contact-middle,
    .contact-right {
        flex: none;
    }
    
    /* 联系项目优化 - 统一字体大小 */
    .contact-item {
        padding: 16px;
        gap: 12px;
    }
    
    .contact-item i {
        font-size: 20px;
        margin-top: 2px;
        flex-shrink: 0;
    }
    
    .contact-text h4 {
        font-size: 16px;
        margin-bottom: 6px;
        font-weight: 600;
    }
    
    .contact-text p {
        font-size: 15px;
        line-height: 1.5;
    }
    
    /* 大联系项目优化 - 统一字体大小 */
    .contact-item-large {
        padding: 20px;
        flex-direction: row;
        align-items: center;
    }
    
    .contact-item-large i {
        font-size: 20px;
        margin-right: 16px;
        margin-top: 0;
    }
    
    .contact-item-large .contact-text h4 {
        font-size: 16px;
        margin-bottom: 6px;
        font-weight: 600;
    }
    
    .contact-item-large .contact-text p {
        font-size: 15px;
        line-height: 1.5;
    }
    
    /* 二维码区域优化 */
    .qrcode-container {
        padding: 24px 20px;
        text-align: center;
    }
    
    .qrcode-container h4 {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    .qrcode {
        width: 140px;
        height: 140px;
        margin: 0 auto 12px;
    }
    
    .qrcode-container p {
        font-size: 13px;
    }
    
    /* === 页脚优化 === */
    .footer {
        padding: 32px 0 20px;
    }
    
    .footer-content {
        gap: 16px;
    }
    
    .footer-logo {
        height: 32px;
    }
    
    .footer-info p {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    /* === 返回顶部按钮优化 === */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* 小型手机设备 (575px以下) */
@media (max-width: 575px) {
    .container {
        padding: 0 16px;
    }
    
    .slide-content h1 {
        font-size: 24px;
    }
    
    .section-header h2 {
        font-size: 22px;
    }
    
    .company-intro h3,
    .business-content h3,
    .news-content h3 {
        font-size: 18px;
    }
    
    .company-intro p,
    .business-content p,
    .news-text p {
        font-size: 14px;
    }
    
    .contact-item {
        padding: 14px;
    }
    
    .contact-item i {
        font-size: 18px;
    }
    
    .contact-text h4 {
        font-size: 15px;
        font-weight: 600;
    }
    
    .contact-text p {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* 确保大联系项目在小屏幕上也统一 */
    .contact-item-large .contact-text h4 {
        font-size: 15px;
        font-weight: 600;
    }
    
    .contact-item-large .contact-text p {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .qrcode {
        width: 120px;
        height: 120px;
    }
}

/* 修复图片比例问题 - 确保覆盖全局样式 */
@media (max-width: 767px) {
    .gallery-item {
        padding-bottom: 37.5% !important; /* 手机端8:3比例 */
    }
    
    .gallery-item img {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        object-fit: cover !important;
    }
}

.business-image {
    padding-bottom: 115.8% !important; /* 1900*2200像素的比例 */
    height: 0 !important; /* 确保使用padding-bottom控制高度 */
}

.business-image img,
.business-image .lang-img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
}