/* 
 * 响应式设计 - 移动端适配
 * 兴义市峰辉商贸有限公司企业网站
 */

/* ========== 大屏幕 (1400px+) ========== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.75rem;
    }
}

/* ========== 平板横屏 (992px - 1199px) ========== */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .about-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
}

/* ========== 平板竖屏 (768px - 991px) ========== */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    /* 导航栏移动端适配 */
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        gap: 0;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-lg);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-menu.active {
        max-height: 500px;
    }
    
    .nav-link {
        padding: var(--spacing-sm) var(--spacing-md);
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-link::after {
        display: none;
    }
    
    /* Logo 调整 */
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .company-name {
        font-size: 1.3rem;
    }
    
    .company-slogan {
        font-size: 0.7rem;
    }
    
    /* 首页横幅 */
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    .btn {
        width: 100%;
    }
    
    /* 统计数据 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    /* 区块标题 */
    .section-title {
        font-size: 2rem;
    }
    
    /* 关于我们 */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .about-text {
        padding-right: 0;
    }
    
    .about-title {
        font-size: 1.75rem;
    }
    
    /* 业务范围 */
    .business-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    /* 企业设施 */
    .facility-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-item {
        height: 240px;
    }
    
    /* 企业优势 */
    .advantage-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    /* 联系我们 */
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* 页脚 */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== 手机横屏 (576px - 767px) ========== */
@media (max-width: 767px) {
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* 导航栏 */
    .nav-wrapper {
        padding: var(--spacing-xs) 0;
    }
    
    .company-name {
        font-size: 1.2rem;
    }
    
    .company-slogan {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }
    
    /* 首页横幅 */
    .hero {
        margin-top: 70px;
        height: calc(100vh - 70px);
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 1px;
        margin-bottom: var(--spacing-lg);
    }
    
    .scroll-indicator {
        width: 32px;
        height: 32px;
        bottom: var(--spacing-md);
    }
    
    /* 统计数据 */
    .stats-section {
        padding: var(--spacing-lg) 0;
    }
    
    .stats-grid {
        gap: var(--spacing-sm);
    }
    
    .stat-item {
        padding: var(--spacing-sm);
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        margin-bottom: var(--spacing-sm);
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 0.95rem;
    }
    
    /* 区块 */
    section {
        padding: var(--spacing-lg) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-lg);
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
    
    /* 关于我们 */
    .about-intro {
        font-size: 1rem;
    }
    
    .about-features {
        gap: var(--spacing-sm);
    }
    
    .feature-item {
        padding: var(--spacing-sm);
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
    }
    
    .feature-content h4 {
        font-size: 1rem;
    }
    
    .feature-content p {
        font-size: 0.85rem;
    }
    
    .image-badge {
        padding: var(--spacing-sm);
    }
    
    .badge-year {
        font-size: 1.5rem;
    }
    
    .badge-text {
        font-size: 0.8rem;
    }
    
    /* 业务范围 */
    .business-grid {
        gap: var(--spacing-md);
    }
    
    .business-card {
        padding: var(--spacing-md);
    }
    
    .business-icon {
        width: 64px;
        height: 64px;
    }
    
    .business-title {
        font-size: 1.2rem;
    }
    
    /* 企业设施 */
    .facility-gallery {
        gap: var(--spacing-sm);
    }
    
    .gallery-item {
        height: 200px;
    }
    
    .gallery-overlay h4 {
        font-size: 1.1rem;
    }
    
    /* 企业优势 */
    .advantage-grid {
        gap: var(--spacing-md);
    }
    
    .advantage-card {
        padding: var(--spacing-md);
    }
    
    .advantage-number {
        font-size: 2.5rem;
    }
    
    .advantage-icon {
        width: 56px;
        height: 56px;
    }
    
    .advantage-card h3 {
        font-size: 1.2rem;
    }
    
    /* 联系我们 */
    .contact-info h3 {
        font-size: 1.75rem;
    }
    
    .contact-intro {
        font-size: 1rem;
    }
    
    .contact-item {
        padding: var(--spacing-sm);
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
    
    .contact-details h4 {
        font-size: 1rem;
    }
    
    .contact-details p {
        font-size: 0.9rem;
    }
    
    .contact-form-wrapper {
        padding: var(--spacing-md);
    }
    
    .contact-form h3 {
        font-size: 1.3rem;
    }
    
    /* 页脚 */
    .footer {
        padding: var(--spacing-lg) 0 var(--spacing-sm);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-section h4 {
        font-size: 1.2rem;
    }
    
    /* 返回顶部 */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: var(--spacing-md);
        right: var(--spacing-md);
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
    
    /* 灯箱 */
    .lightbox img {
        max-width: 95%;
        max-height: 80%;
    }
    
    .lightbox-close {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        width: 40px;
        height: 40px;
    }
    
    .lightbox-close svg {
        width: 20px;
        height: 20px;
    }
}

/* ========== 小屏手机 (< 576px) ========== */
@media (max-width: 575px) {
    html {
        font-size: 14px;
    }
    
    /* Logo */
    .logo-icon {
        width: 36px;
        height: 36px;
    }
    
    .company-name {
        font-size: 1.1rem;
    }
    
    .company-slogan {
        display: none;
    }
    
    /* 首页横幅 */
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-content {
        padding: var(--spacing-sm);
    }
    
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.95rem;
    }
    
    /* 统计数据 */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    /* 区块标题 */
    .section-title {
        font-size: 1.5rem;
    }
    
    /* 关于我们 */
    .about-title {
        font-size: 1.5rem;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    /* 业务范围 */
    .business-grid {
        grid-template-columns: 1fr;
    }
    
    .business-icon {
        width: 56px;
        height: 56px;
    }
    
    /* 企业设施 */
    .facility-gallery {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        height: 220px;
    }
    
    /* 企业优势 */
    .advantage-grid {
        grid-template-columns: 1fr;
    }
    
    .advantage-number {
        font-size: 2rem;
        top: var(--spacing-sm);
        right: var(--spacing-sm);
    }
    
    /* 页脚 */
    .footer-logo-icon {
        width: 48px;
        height: 48px;
    }
}

/* ========== 超小屏 (< 400px) ========== */
@media (max-width: 399px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    .business-title,
    .advantage-card h3 {
        font-size: 1.1rem;
    }
    
    .gallery-item {
        height: 180px;
    }
}

/* ========== 横屏模式优化 ========== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-md);
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* ========== 打印样式 ========== */
@media print {
    .navbar,
    .hero-buttons,
    .scroll-indicator,
    .back-to-top,
    .lightbox,
    .contact-form-wrapper,
    .mobile-menu-btn {
        display: none !important;
    }
    
    .hero {
        margin-top: 0;
        height: auto;
        min-height: 0;
        page-break-after: always;
    }
    
    section {
        page-break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ========== 高对比度模式 ========== */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #c00;
        --secondary-color: #000;
        --text-dark: #000;
        --bg-white: #fff;
    }
    
    .btn-primary {
        border: 2px solid #000;
    }
    
    .nav-link::after {
        height: 3px;
    }
}

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

/* ========== 深色模式支持 ========== */
@media (prefers-color-scheme: dark) {
    /* 可选：如果需要深色模式支持，可以在这里添加 */
    /* 国企网站通常使用浅色主题，因此这里留空 */
}

