/* ========================================
   响应式设计样式
   ======================================== */

/* Tablet - 1024px */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero .subtitle {
        font-size: 22px;
    }

    .about-content {
        gap: 40px;
    }

    .contact-content {
        gap: 40px;
    }

    /* Footer */
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-2xl);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

/* Tablet Portrait - 768px */
@media screen and (max-width: 768px) {
    /* Navigation */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 15px 0;
        border-bottom: 1px solid var(--secondary-color);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Hero */
    .hero {
        padding: 120px 0 80px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero .subtitle {
        font-size: 20px;
    }

    .hero .description {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn {
        width: auto;
        max-width: none;
        padding: 12px 24px;
        font-size: 0.875rem;
    }

    /* Sections */
    section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 30px;
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-image {
        order: -1;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Advantages */
    .advantages-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .advantage-number {
        font-size: 40px;
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-form {
        padding: 30px;
    }

    /* Footer */
    .footer-main {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
    }

    .footer-brand {
        grid-column: auto;
        align-items: center;
    }

    .footer-description {
        max-width: 100%;
    }

    .footer-section {
        align-items: center;
    }

    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .quick-links {
        grid-template-columns: repeat(2, 1fr);
        max-width: 400px;
        margin: 0 auto;
    }

    .contact-list {
        max-width: 400px;
        margin: 0 auto;
    }

    .contact-item-footer {
        justify-content: flex-start;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
}

/* Mobile - 480px */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    /* Hero */
    .hero {
        padding: 100px 0 60px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero .subtitle {
        font-size: 18px;
    }

    .hero .description {
        font-size: 14px;
    }

    /* Sections */
    section {
        padding: 50px 0;
    }

    .section-title h2 {
        font-size: 26px;
    }

    .section-title p {
        font-size: 14px;
    }

    /* About */
    .about-text h3 {
        font-size: 24px;
    }

    .about-text p {
        font-size: 14px;
    }

    /* Services */
    .service-card {
        padding: 30px 20px;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .service-card h3 {
        font-size: 20px;
    }

    /* Advantages */
    .advantages-grid {
        grid-template-columns: 1fr;
    }

    .advantage-number {
        font-size: 36px;
    }

    .advantage-label {
        font-size: 16px;
    }

    /* Contact */
    .contact-info h3 {
        font-size: 24px;
    }

    .contact-form {
        padding: 25px 20px;
    }

    .contact-form h3 {
        font-size: 20px;
    }

    /* Footer */
    footer {
        padding: var(--spacing-2xl) 0 0;
    }

    .footer-main {
        gap: var(--spacing-lg);
    }

    .footer-logo-text {
        font-size: 1.25rem;
    }

    .footer-description {
        font-size: 0.9375rem;
    }

    .footer-title {
        font-size: 1rem;
    }

    .quick-links {
        grid-template-columns: 1fr;
        gap: var(--spacing-xs);
    }

    .quick-link-item {
        padding: 8px 12px;
        font-size: 0.875rem;
    }

    .contact-item-footer {
        padding: 8px;
    }

    .contact-label {
        font-size: 0.75rem;
    }

    .contact-value {
        font-size: 0.875rem;
    }

    .footer-copyright p,
    .footer-icp a {
        font-size: 0.8125rem;
    }
}

/* Small Mobile - 320px */
@media screen and (max-width: 320px) {
    .hero h1 {
        font-size: 24px;
    }

    .hero .subtitle {
        font-size: 16px;
    }

    .section-title h2 {
        font-size: 22px;
    }

    .btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero::before {
        background-size: 100px 100px;
    }
}

/* Print Styles */
@media print {
    header,
    .hero-buttons,
    .contact-form {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    .hero {
        background: #f5f5f5;
        color: #000;
        padding: 40px 0;
    }

    section {
        page-break-inside: avoid;
    }
}

/* Landscape Orientation on Mobile */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 80px 0 60px;
    }

    .hero h1 {
        font-size: 32px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    .nav-links a::after {
        display: none;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Dark Mode Support - 浅色主题 */
@media (prefers-color-scheme: dark) {
    :root {
        --secondary-color: #f8f9fa;
        --text-color: #1a1a1a;
        --text-light: #2d2d2d;
        --white: #ffffff;
    }

    header {
        background: rgba(255, 255, 255, 0.95);
    }

    .service-card,
    .contact-form {
        background: #ffffff;
        border-color: #e2e8f0;
    }

    .form-group input,
    .form-group textarea {
        background: #fafbfc;
        color: #2d3748;
        border-color: #e2e8f0;
    }

    .form-group input:focus,
    .form-group textarea:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.2);
    }

    .about-section,
    .contact-section {
        background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    }

    .contact-item:hover {
        background: #ffffff;
    }

    ::-webkit-scrollbar-track {
        background: #fafbfc;
    }

    ::-webkit-scrollbar-thumb {
        background: var(--primary-color);
    }
}
