/* ========================================
   Beijing Wantai Commerce And Trade Co., Ltd.
   Responsive Stylesheet
   ======================================== */

/* Extra Large Devices (1400px and above) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .section-title {
        font-size: 3.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Devices (1200px - 1399px) */
@media (max-width: 1399px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
    }
    
    .footer-content > div:last-child {
        grid-column: 1 / -1;
        margin-top: var(--spacing-lg);
    }
}

/* Medium Devices (992px - 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .nav-menu {
        gap: var(--spacing-lg);
    }
    
    .mobile-apps-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .mobile-apps-visual {
        order: -1;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        padding-right: 0;
        padding-left: 80px;
        justify-content: flex-start;
    }
    
    .timeline-item:nth-child(even) {
        padding-left: 80px;
    }
    
    .timeline-content {
        max-width: 100%;
    }
    
    .timeline-item::after {
        left: 30px;
    }
}

/* Tablet Devices (768px - 991px) */
@media (max-width: 991px) {
    :root {
        --spacing-xxl: 4rem;
        --spacing-xl: 2.5rem;
    }
    
    .container {
        max-width: 720px;
    }
    
    .header {
        padding: var(--spacing-sm) 0;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero {
        min-height: 90vh;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .feature-card {
        padding: var(--spacing-lg);
    }
    
    .service-card {
        padding: var(--spacing-lg);
    }
    
    .mobile-apps-info h2 {
        font-size: 2.5rem;
    }
    
    .phone-mockup {
        width: 250px;
        height: 500px;
    }
    
    .stat-number {
        font-size: 2.8rem;
    }
    
    .about-text h2 {
        font-size: 2rem;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .cta h2 {
        font-size: 2.5rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .page-header {
        padding: 130px 0 60px;
    }
    
    .page-header h1 {
        font-size: 2.8rem;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .legal-content {
        padding: var(--spacing-xl);
    }
    
    .legal-content h2 {
        font-size: 1.8rem;
    }
    
    .legal-content h3 {
        font-size: 1.3rem;
    }
}

/* Mobile Devices (576px - 767px) */
@media (max-width: 767px) {
    :root {
        --spacing-xxl: 3rem;
        --spacing-xl: 2rem;
        --spacing-lg: 1.5rem;
    }
    
    .container {
        max-width: 540px;
        padding: 0 var(--spacing-md);
    }
    
    .hero {
        min-height: 80vh;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: var(--spacing-xs) var(--spacing-md);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .btn {
        width: 100%;
        padding: var(--spacing-md);
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .mobile-apps-info h2 {
        font-size: 2rem;
    }
    
    .mobile-apps-info p {
        font-size: 1rem;
    }
    
    .app-stores {
        flex-direction: column;
    }
    
    .app-store-btn {
        width: 100%;
        justify-content: center;
    }
    
    .phone-mockup {
        width: 220px;
        height: 440px;
        border-radius: 30px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .about-text h2 {
        font-size: 1.8rem;
    }
    
    .about-image::before {
        display: none;
    }
    
    .cta h2 {
        font-size: 2rem;
    }
    
    .cta p {
        font-size: 1rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-image {
        height: 200px;
    }
    
    .contact-form {
        padding: var(--spacing-lg);
    }
    
    .form-group {
        margin-bottom: var(--spacing-md);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .footer-legal {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .page-header {
        padding: 120px 0 50px;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .breadcrumb {
        font-size: 0.85rem;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .team-image {
        height: 250px;
    }
    
    .legal-content {
        padding: var(--spacing-lg);
    }
    
    .legal-content h2 {
        font-size: 1.5rem;
    }
    
    .legal-content h3 {
        font-size: 1.2rem;
    }
    
    .legal-content p {
        font-size: 0.95rem;
    }
    
    .legal-content li {
        font-size: 0.95rem;
    }
    
    .map-section {
        height: 300px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .cookie-banner {
        flex-direction: column;
        padding: var(--spacing-md);
    }
    
    .cookie-banner-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-banner button {
        width: 100%;
    }
}

/* Extra Small Devices (575px and below) */
@media (max-width: 575px) {
    :root {
        --spacing-xxl: 2.5rem;
        --spacing-xl: 1.5rem;
        --spacing-lg: 1rem;
    }
    
    .container {
        width: 100%;
        padding: 0 var(--spacing-sm);
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-title::after {
        width: 60px;
        height: 3px;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
    }
    
    .feature-icon svg {
        width: 35px;
        height: 35px;
    }
    
    .feature-title {
        font-size: 1.3rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-title {
        font-size: 1.3rem;
    }
    
    .mobile-apps-info h2 {
        font-size: 1.8rem;
    }
    
    .phone-mockup {
        width: 200px;
        height: 400px;
        border-radius: 25px;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
    
    .about-text h2 {
        font-size: 1.6rem;
    }
    
    .cta h2 {
        font-size: 1.8rem;
    }
    
    .news-title {
        font-size: 1.3rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
    }
    
    .contact-icon svg {
        width: 25px;
        height: 25px;
    }
    
    .contact-details h3 {
        font-size: 1.1rem;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
    }
    
    .footer-section p,
    .footer-section li {
        font-size: 0.9rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .team-name {
        font-size: 1.3rem;
    }
    
    .team-role {
        font-size: 0.95rem;
    }
    
    .legal-content h2 {
        font-size: 1.4rem;
    }
    
    .legal-content h3 {
        font-size: 1.1rem;
    }
    
    .timeline-content {
        padding: var(--spacing-lg);
    }
    
    .timeline-year {
        font-size: 1.2rem;
    }
    
    .timeline-title {
        font-size: 1.1rem;
    }
    
    .value-icon {
        width: 80px;
        height: 80px;
    }
    
    .value-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .value-title {
        font-size: 1.3rem;
    }
}

/* Landscape Mode on Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 50px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

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

/* Print Styles */
@media print {
    .header,
    .footer,
    .back-to-top,
    .cookie-banner,
    .hero-buttons,
    .contact-form,
    .mobile-menu-btn {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 50px 0;
    }
    
    .hero-title {
        font-size: 2rem;
        color: #000;
    }
    
    section {
        padding: 30px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
        color: #000;
    }
    
    .feature-card,
    .service-card,
    .news-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .legal-content {
        box-shadow: none;
    }
}

/* Accessibility - Focus States */
@media (focus-visible) {
    a:focus,
    button:focus,
    input:focus,
    textarea:focus,
    select:focus {
        outline: 3px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Currently using light mode, dark mode can be added here */
}

/* 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;
    }
    
    .parallax,
    .parallax-slow,
    .parallax-fast {
        transform: none !important;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .hover-lift:hover {
        transform: none;
    }
    
    .hover-scale:hover {
        transform: none;
    }
    
    .hover-glow:hover {
        box-shadow: var(--shadow-md);
    }
    
    .hover-rotate:hover {
        transform: none;
    }
    
    .btn-animated::before {
        display: none;
    }
    
    .feature-card:hover,
    .service-card:hover,
    .news-card:hover {
        transform: none;
    }
}

/* Large Screen TV/Projector */
@media (min-width: 1921px) {
    :root {
        font-size: 18px;
    }
    
    .container {
        max-width: 1600px;
    }
    
    .hero-title {
        font-size: 5rem;
    }
    
    .section-title {
        font-size: 4rem;
    }
}

/* Browser Specific Fixes */

/* Firefox */
@-moz-document url-prefix() {
    .hero-bg::before {
        background-size: 100px 100px;
    }
}

/* Safari */
_::-webkit-full-page-media, _:future:lang(:root) .hero {
    min-height: -webkit-fill-available;
}

/* IE11 (fallback) */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .hero-bg::before {
        background: none;
    }
    
    .gradient-text {
        background: none;
        color: var(--primary-color);
    }
}
