/* 
 * 重庆联锂新能源官网响应式样式表 v2.0
 * 针对不同设备尺寸优化显示效果
 * 修复移动端菜单问题
 */

/* 平板设备 (768px 及以下) */
@media screen and (max-width: 768px) {
    /* 布局调整 */
    .container {
        padding: 0 15px;
    }

    /* 导航栏 */
    .nav-container {
        padding: 1rem;
        position: relative;
    }

    .logo {
        font-size: 1.2rem;
        z-index: 1001;
    }

    .logo img {
        height: 35px;
    }

    /* 汉堡菜单 - 768px以下显示 */
    .hamburger {
        display: flex !important;
        z-index: 1001;
    }

    .hamburger span {
        width: 25px;
        height: 3px;
        background-color: var(--secondary-color);
        margin: 3px 0;
        transition: var(--transition);
        display: block;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    /* 移动端导航菜单 */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        margin: 0;
        padding: 0;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        margin: 0;
    }

    .nav-menu a {
        font-size: 1.3rem;
        color: var(--secondary-color);
        display: block;
        padding: 0.5rem 1rem;
    }

    .nav-menu a:hover {
        color: var(--primary-color);
    }

    /* 遮罩层 */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* 横幅 */
    .hero, .page-hero {
        padding: 7rem 0 3rem;
        min-height: auto;
    }

    .hero-content h1, .hero-content h2 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        display: inline-block;
        text-align: center;
    }

    .cta-button.btn-outline {
        background-color: transparent;
        border: 2px solid var(--white);
        color: var(--white);
    }

    /* 标题 */
    h2 {
        font-size: 1.6rem !important;
    }

    /* 核心优势 */
    .advantages-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .advantage-card {
        padding: 1.5rem;
    }

    /* 信任背书数字统计 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* 产品网格 */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-card {
        max-width: 100%;
    }

    /* 案例轮播 */
    .carousel-wrapper {
        height: 300px;
    }

    /* 客户评价 */
    .review-item {
        padding: 1.5rem;
    }

    /* 页脚 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* 表单 */
    .contact-content {
        flex-direction: column;
    }

    .contact-info, .contact-form {
        width: 100%;
    }

    .contact-form {
        margin-top: 2rem;
    }

    /* 案例筛选 */
    .filter-options {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
    }

    .filter-btn {
        flex-shrink: 0;
    }

    /* SEO模块 */
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

/* 小屏手机 (480px 及以下) */
@media screen and (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .nav-container {
        padding: 0.8rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo img {
        height: 30px;
    }

    .hero, .page-hero {
        padding: 6rem 0 2rem;
    }

    .hero-content h1, .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .cta-button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    h2 {
        font-size: 1.4rem !important;
    }

    .carousel-wrapper {
        height: 250px;
    }

    .carousel-caption h3 {
        font-size: 1.2rem;
    }

    .carousel-caption p {
        font-size: 0.9rem;
    }
}

/* 大屏优化 (1200px 及以上) */
@media screen and (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }

    .hero-content h1, .hero-content h2 {
        font-size: 3.5rem;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .advantages-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 高分辨率屏幕优化 */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero-content h1, .hero-content h2 {
        font-size: 4rem;
    }
}

/* 横屏手机 */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero, .page-hero {
        padding: 3rem 0 2rem;
    }

    .hero-content h1, .hero-content h2 {
        font-size: 1.6rem;
    }
}

/* 可访问性增强 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --light-gray: #2d2d2d;
        --secondary-color: #e0e0e0;
    }

    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    .product-card, .category-card, .advantage-item {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }

    .hero, .page-hero {
        background: linear-gradient(135deg, #0d47a1, #1565c0);
    }

    .navbar {
        background-color: #1a1a1a;
    }

    .footer {
        background-color: #0d0d0d;
    }

    .nav-menu a {
        color: #e0e0e0;
    }

    .hamburger span {
        background-color: #e0e0e0;
    }
}
