/* ============================================
   Beijing Longweitengda Property Management Co., Ltd.
   Responsive Stylesheet
   ============================================ */

/* Tablet and Below */
@media (max-width: 1024px) {
    .container {
        max-width: 960px;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .section {
        padding: 80px 0;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .app-features {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .culture-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav {
        gap: 30px;
    }
}

/* Mobile and Below */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .container {
        max-width: 720px;
        padding: 0 15px;
    }

    .header-inner {
        padding: 10px 0;
    }

    .logo svg {
        width: 40px;
        height: 40px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .nav.active {
        transform: translateX(0);
    }

    .nav-item {
        font-size: 1.5rem;
    }

    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }

    .hero {
        min-height: auto;
        padding: 120px 0 80px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        padding: 12px 30px;
        font-size: 0.95rem;
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-header {
        margin-bottom: 40px;
    }

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

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

    .service-icon {
        width: 70px;
        height: 70px;
    }

    .service-icon svg {
        width: 35px;
        height: 35px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .stat-card {
        padding: 30px 15px;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    .culture-grid {
        grid-template-columns: 1fr;
    }

    .culture-card {
        padding: 30px 20px;
    }

    .culture-icon {
        width: 80px;
        height: 80px;
    }

    .culture-icon svg {
        width: 40px;
        height: 40px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-image {
        height: 180px;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        flex-direction: column;
        gap: 10px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .scroll-indicator {
        display: none;
    }

    .bg-shape {
        display: none;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .about-content h2,
    .app-content h2 {
        font-size: 1.8rem;
    }

    .contact-info h2 {
        font-size: 1.6rem;
    }

    .footer-about h3 {
        font-size: 1.3rem;
    }
}

/* Landscape Mode on Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .scroll-indicator {
        display: none;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo svg,
    .service-icon svg,
    .contact-icon svg,
    .social-link svg {
        transform: translateZ(0);
    }
}

/* Print Styles */
@media print {
    .header,
    .back-to-top,
    .mobile-menu-btn,
    .hero-buttons,
    .scroll-indicator {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 40px 0;
    }

    .section {
        padding: 40px 0;
    }

    body {
        color: black;
        background: white;
    }

    a {
        text-decoration: underline;
    }

    .service-card,
    .culture-card,
    .news-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* 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 {
        --text-dark: #e0e0e0;
        --text-light: #b0b0b0;
        --bg-light: #1a1a1a;
        --bg-white: #2a2a2a;
    }
}

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

    .service-card:active,
    .news-card:active,
    .culture-card:active {
        transform: scale(0.98);
    }

    .nav-item:hover::after {
        width: 0;
    }

    .nav-item:active::after {
        width: 100%;
    }
}

/* Focus Visible for Accessibility */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 0 0 10px 10px;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}
