﻿/* ============================================
   RESPONSIVE STYLES
   Beijing Meipin Website
   ============================================ */

/* Extra Large Screens */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    h1 { font-size: 4rem; }
    h2 { font-size: 3rem; }
    
    .hero h1 {
        font-size: 5rem;
    }
    
    .section {
        padding: 120px 0;
    }
}

/* Large Laptops */
@media (max-width: 1440px) {
    .container {
        max-width: 1200px;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .footer-grid {
        gap: 40px;
    }
}

/* Tablets Landscape */
@media (max-width: 1200px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.25rem; }
    h3 { font-size: 1.75rem; }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .app-grid {
        gap: 60px;
    }
    
    .about-grid {
        gap: 60px;
    }
}

/* Tablets Portrait */
@media (max-width: 1024px) {
    .section {
        padding: 80px 0;
    }
    
    .hero {
        min-height: auto;
        padding: 160px 0 100px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-banner {
        padding: 160px 0 80px;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        transition: left var(--transition-normal);
        z-index: 1001;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        font-size: 1.5rem;
    }
    
    .mobile-toggle {
        display: flex;
        z-index: 1002;
    }
    
    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .app-grid,
    .about-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .app-image {
        order: -1;
    }
    
    .phone-mockup {
        width: 280px;
        height: 560px;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item,
    .timeline-item:nth-child(odd) {
        flex-direction: row;
        padding-left: 60px;
    }
    
    .timeline-content {
        width: 100%;
    }
    
    .timeline-dot {
        left: 20px;
    }
    
    .contact-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ad-platform {
        grid-template-columns: 1fr;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .section {
        padding: 60px 0;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .hero {
        padding: 140px 0 80px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 6px 15px;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 0.95rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 0.95rem;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .team-image {
        width: 120px;
        height: 120px;
    }
    
    .card {
        padding: 30px;
    }
    
    .card-icon {
        width: 70px;
        height: 70px;
    }
    
    .card-icon svg {
        width: 35px;
        height: 35px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 15px;
    }
    
    .page-banner {
        padding: 140px 0 60px;
    }
    
    .page-banner h1 {
        font-size: 2.5rem;
    }
    
    .page-banner p {
        font-size: 1rem;
    }
    
    .contact-info-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info-item {
        padding: 30px;
    }
    
    .map-section {
        height: 300px;
        margin-top: 40px;
    }
    
    .app-features {
        text-align: left;
    }
    
    .app-buttons {
        flex-direction: column;
    }
    
    .app-button {
        width: 100%;
        justify-content: center;
    }
    
    .phone-mockup {
        width: 250px;
        height: 500px;
        border-radius: 35px;
    }
    
    .phone-screen {
        border-radius: 25px;
    }
    
    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    .about-badge {
        position: static;
        margin-top: 20px;
        display: inline-block;
    }
    
    .policy-section h2 {
        font-size: 1.5rem;
    }
    
    .policy-section h3 {
        font-size: 1.2rem;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.35rem; }
    h4 { font-size: 1.2rem; }
    
    .section {
        padding: 50px 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
    
    .btn {
        width: 100%;
        padding: 14px 20px;
    }
    
    .card {
        padding: 25px;
    }
    
    .card h3 {
        font-size: 1.2rem;
    }
    
    .card p {
        font-size: 0.95rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .feature-item {
        padding: 20px;
    }
    
    .feature-icon {
        width: 80px;
        height: 80px;
    }
    
    .feature-icon svg {
        width: 35px;
        height: 35px;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .team-image {
        width: 100px;
        height: 100px;
    }
    
    .page-banner {
        padding: 120px 0 50px;
    }
    
    .page-banner h1 {
        font-size: 2rem;
    }
    
    .page-banner p {
        font-size: 0.9rem;
    }
    
    .news-card {
        margin-bottom: 30px;
    }
    
    .news-content {
        padding: 20px;
    }
    
    .news-content h3 {
        font-size: 1.1rem;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-input,
    .form-textarea,
    .form-select {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .contact-info-item {
        padding: 25px 20px;
    }
    
    .contact-info-icon {
        width: 60px;
        height: 60px;
    }
    
    .contact-info-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .app-button {
        padding: 10px 20px;
    }
    
    .app-button svg {
        width: 25px;
        height: 25px;
    }
    
    .app-button-text strong {
        font-size: 1rem;
    }
    
    .phone-mockup {
        width: 220px;
        height: 440px;
        border-radius: 30px;
    }
    
    .phone-screen {
        border-radius: 20px;
        font-size: 0.9rem;
    }
    
    .timeline {
        padding-left: 0;
    }
    
    .timeline-item,
    .timeline-item:nth-child(odd) {
        padding-left: 50px;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    .timeline-year {
        font-size: 0.9rem;
        padding: 4px 12px;
    }
    
    .policy-content {
        padding: 40px 15px;
    }
    
    .policy-section {
        margin-bottom: 35px;
    }
    
    .policy-section h2 {
        font-size: 1.35rem;
    }
    
    .policy-section h3 {
        font-size: 1.1rem;
    }
    
    .policy-section p,
    .policy-section li {
        font-size: 0.95rem;
    }
    
    .ad-platform-item {
        padding: 15px;
    }
    
    .ad-platform-item h4 {
        font-size: 1rem;
    }
    
    .ad-platform-item p {
        font-size: 0.9rem;
    }
    
    .scroll-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }
    
    .scroll-top svg {
        width: 20px;
        height: 20px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .hover-lift:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    .card:hover {
        transform: none;
    }
    
    .news-card:hover {
        transform: none;
    }
    
    .nav-link::after {
        display: none;
    }
    
    .animated-underline::after {
        display: none;
    }
    
    a:hover,
    button:hover {
        opacity: 0.9;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
    
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .scroll-top,
    .mobile-toggle,
    .hero-buttons,
    .app-buttons {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .section {
        padding: 20pt 0;
        page-break-inside: avoid;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-white: #1a1a1a;
        --bg-light: #2d2d2d;
        --text-dark: #f5f5f5;
        --text-light: #cccccc;
        --text-muted: #888888;
    }
    
    .card,
    .news-card,
    .contact-info-item,
    .timeline-content {
        background: var(--bg-light);
    }
    
    .form-input,
    .form-textarea,
    .form-select {
        background: var(--bg-dark);
        border-color: #444;
        color: var(--text-dark);
    }
    
    .header {
        background: rgba(26, 26, 26, 0.98);
    }
    
    .logo-text {
        color: var(--secondary-color);
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img,
    .card-icon svg,
    .feature-icon svg {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Orientation Changes */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        min-height: auto;
        padding: 100px 0 50px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* Large Content Width */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        max-width: 90%;
    }
}

/* Extra Small Devices */
@media (max-width: 320px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .phone-mockup {
        width: 200px;
        height: 400px;
    }
}
