/* 响应式设计 */

/* 平板设备 (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-image img {
        max-width: 480px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* 手机设备 (768px及以下) */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(10px);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 1rem 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero {
        padding: 120px 0 50px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.0rem;
    }
    
    .hero-image img {
        max-width: 420px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 200px;
        text-align: center;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .about-text h3 {
        font-size: 1.5rem;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .company-gallery h3 {
        font-size: 1.5rem;
    }
    
    .service-card {
        padding: 2rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info,
    .contact-form {
        padding: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* 现在使用真实的公司照片，不需要emoji占位符 */
}

/* 小屏手机 (480px及以下) */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-logo .logo-image {
        height: 35px;
    }
    
    .nav-logo h3 {
        font-size: 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .hero-image img {
        max-width: 360px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
    
    .gallery-item img {
        height: 150px;
    }
    
    .company-gallery h3 {
        font-size: 1.3rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-card h3 {
        font-size: 1.1rem;
    }
    
    .news-card {
        padding: 1.5rem;
    }
    
    .contact-info,
    .contact-form {
        padding: 1.5rem;
    }
    
    .about-text h3 {
        font-size: 1.3rem;
    }
    
    .about-text p {
        font-size: 1rem;
    }
    
    .feature {
        padding: 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* 现在使用真实的公司照片 */
}

/* 超小屏幕 (360px及以下) */
@media screen and (max-width: 360px) {
    .nav-logo .logo-image {
        height: 30px;
    }
    
    .nav-logo h3 {
        font-size: 1.3rem;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-image img {
        max-width: 330px;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .service-card {
        padding: 1rem;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
    }
    
    .news-card,
    .contact-info,
    .contact-form {
        padding: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 180px;
    }
    
    /* 现在使用真实的公司照片 */
}

/* 横屏模式适配 */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 80px 0 30px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-buttons {
        margin-top: 1rem;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .about,
    .services,
    .news,
    .contact {
        padding: 40px 0;
    }
}

/* 高分辨率屏幕优化 */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .nav-container {
        max-width: 1400px;
    }
    
    .hero-container {
        max-width: 1400px;
    }
    
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .hero-content p {
        font-size: 1.4rem;
    }
    
    .section-header h2 {
        font-size: 3rem;
    }
    
    .section-header p {
        font-size: 1.3rem;
    }
}

/* 打印样式 */
@media print {
    * {
        color: #000 !important;
        background: #fff !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .navbar,
    .hero-buttons,
    .contact-form,
    .nav-toggle {
        display: none !important;
    }
    
    .hero {
        background: white !important;
        color: black !important;
    }
    
    .hero-content h1,
    .hero-content p {
        color: black !important;
    }
    
    .section-header h2 {
        color: black !important;
    }
    
    .about,
    .services,
    .news,
    .contact {
        background: white !important;
        page-break-inside: avoid;
    }
    
    .service-card,
    .news-card {
        border: 1px solid #ddd !important;
        page-break-inside: avoid;
    }
    
    .footer {
        background: white !important;
        color: black !important;
        border-top: 1px solid #ddd !important;
    }
}

/* 无障碍访问 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .navbar {
        background: rgba(30, 30, 30, 0.95);
    }
    
    .nav-link {
        color: #fff;
    }
    
    .nav-logo h3 {
        color: #4facfe;
    }
    
    .about {
        background: #1a1a1a;
        color: #fff;
    }
    
    .section-header h2 {
        color: #fff;
    }
    
    .section-header p {
        color: #ccc;
    }
    
    .about-text h3 {
        color: #fff;
    }
    
    .about-text p {
        color: #ccc;
    }
    
    .service-card {
        background: #2a2a2a;
        color: #fff;
    }
    
    .service-card h3 {
        color: #fff;
    }
    
    .service-card p {
        color: #ccc;
    }
    
    .news {
        background: #1a1a1a;
    }
    
    .news-card {
        background: #2a2a2a;
        color: #fff;
    }
    
    .news-card h3 {
        color: #fff;
    }
    
    .news-card p {
        color: #ccc;
    }
}

/* 灯箱响应式样式 */
@media screen and (max-width: 768px) {
    .lightbox-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 30px;
        top: 10px;
        right: 15px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .lightbox-nav {
        padding: 0 15px;
    }
    
    .lightbox-caption {
        padding: 15px;
    }
    
    .lightbox-caption h3 {
        font-size: 1.3rem;
    }
    
    #lightbox-image {
        max-height: 70vh;
    }
}

@media screen and (max-width: 480px) {
    .lightbox-content {
        width: 98%;
        margin: 3% auto;
    }
    
    .lightbox-close {
        width: 35px;
        height: 35px;
        font-size: 25px;
        top: 8px;
        right: 12px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .lightbox-nav {
        padding: 0 10px;
    }
    
    .lightbox-caption {
        padding: 12px;
    }
    
    .lightbox-caption h3 {
        font-size: 1.1rem;
    }
    
    #lightbox-image {
        max-height: 60vh;
    }
}

@media screen and (max-width: 360px) {
    .lightbox-content {
        width: 100%;
        margin: 2% auto;
        border-radius: 5px;
    }
    
    .lightbox-close {
        width: 30px;
        height: 30px;
        font-size: 20px;
        top: 5px;
        right: 10px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .lightbox-nav {
        padding: 0 8px;
    }
    
    .lightbox-caption {
        padding: 10px;
    }
    
    .lightbox-caption h3 {
        font-size: 1rem;
    }
    
    #lightbox-image {
        max-height: 50vh;
    }
} 