/*
 * GreenScape Australia - Responsive Styles
 * Mobile-first responsive design
 */

/* ============================================
   Tablet Styles (max-width: 1024px)
   ============================================ */

@media (max-width: 1024px) {
    /* Typography adjustments */
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    /* Container */
    .container {
        padding: 0 var(--spacing-md);
    }

    /* Hero Section */
    .hero-title {
        font-size: 3rem;
    }

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

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

    /* Products Grid */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    /* About Page */
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    /* Services Page */
    .services-master-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .plan-card.featured {
        transform: scale(1);
    }

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

    .process-step:not(:last-child)::after {
        display: none;
    }

    /* Projects Page */
    .projects-masonry {
        grid-template-columns: 1fr;
    }

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

    /* Contact Page */
    .sales-team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Mobile Styles (max-width: 768px)
   ============================================ */

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

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Container */
    .container {
        padding: 0 1rem;
    }

    /* Spacing adjustments */
    :root {
        --spacing-xl: 3rem;
        --spacing-xxl: 4rem;
    }

    .section {
        padding: var(--spacing-xl) 0;
    }

    /* Navigation */
    .navbar {
        padding: 1rem 0;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: var(--spacing-lg);
        gap: 0;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
        z-index: 999;
        overflow-y: auto;
    }

    body.mobile-menu-active .nav-menu {
        left: 0;
    }

    .nav-link {
        padding: 1rem 0;
        font-size: 1.125rem;
        border-bottom: 1px solid var(--light-gray);
        width: 100%;
    }

    .nav-link::after {
        display: none;
    }

    .nav-cta {
        display: none;
    }

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

    .logo-image {
        max-height: 40px;
    }

    /* Hero Section */
    .hero {
        min-height: 600px;
        height: auto;
        padding: var(--spacing-xl) 0;
        margin-top: 70px;
    }

    .hero-title {
        font-size: 2.25rem;
        line-height: 1.2;
    }

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

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    /* Stats Section */
    .stats-section {
        padding: var(--spacing-lg) 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .stat-item {
        padding: var(--spacing-md);
    }

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

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

    /* Section Headers */
    .section-header {
        margin-bottom: var(--spacing-lg);
    }

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

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

    /* Products Grid */
    .products-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .product-card {
        margin-bottom: var(--spacing-md);
    }

    .product-image {
        height: 200px;
    }

    .product-content {
        padding: var(--spacing-md);
    }

    .product-title {
        font-size: 1.25rem;
    }

    .product-description {
        min-height: auto;
    }

    /* Products Page */
    .products-grid-large {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .product-item {
        flex-direction: column;
    }

    .product-item-image {
        flex: 0 0 220px;
        width: 100%;
        height: 220px;
    }

    .product-item-content {
        padding: var(--spacing-md);
    }

    .product-item-title {
        font-size: 1.25rem;
        min-height: auto;
        line-height: 1.3;
    }

    .product-item-description {
        font-size: 0.95rem;
        margin-bottom: var(--spacing-md);
    }

    .product-item-specs {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    .spec-item {
        font-size: 0.875rem;
    }

    .product-item-price {
        margin-bottom: var(--spacing-md);
    }

    .product-item-price .price {
        font-size: 1.5rem;
    }

    .product-item-price .price-note {
        font-size: 0.85rem;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .service-card {
        padding: var(--spacing-lg);
    }

    .service-icon {
        font-size: 2.5rem;
    }

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

    .process-steps {
        grid-template-columns: 1fr;
    }

    .process-step:not(:last-child)::after {
        display: none;
    }

    /* CTA Section */
    .cta-section {
        padding: var(--spacing-xl) 0;
    }

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

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

    /* Footer */
    .footer-wave {
        height: 40px;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* 隐藏 Quick Links 和 Our Services */
    .footer-col:nth-child(2),
    .footer-col:nth-child(3) {
        display: none;
    }

    .footer-col-brand {
        padding-right: 0;
        margin-bottom: 0;
    }

    .footer-logo {
        margin-bottom: var(--spacing-sm);
    }

    .footer-description {
        text-align: center;
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: var(--spacing-md);
    }

    .footer-title {
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
        padding-bottom: 0.25rem;
        text-align: center;
        width: 100%;
    }

    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
        width: 30px;
        height: 2px;
    }

    .footer-contact {
        display: block;
        text-align: left;
        width: auto;
    }

    .footer-contact li {
        display: flex;
        align-items: flex-start;
        margin-bottom: 0.6rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    .footer-contact i {
        font-size: 0.9rem;
        min-width: 16px;
        margin-top: 2px;
    }

    .footer-bottom {
        padding: var(--spacing-sm) 0;
        margin-top: var(--spacing-md);
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .footer-copyright {
        font-size: 0.8rem;
    }

    .footer-bottom-links {
        justify-content: center;
        font-size: 0.8rem;
        gap: 0.5rem;
    }

    .footer-bottom-links .separator {
        font-size: 0.7rem;
    }

    /* Page Header */
    .page-header {
        padding: var(--spacing-xl) 0 var(--spacing-lg);
        margin-top: 70px;
    }

    .page-title {
        font-size: 2.5rem;
    }

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

    /* About Page */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

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

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

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

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 80px !important;
        padding-right: 0 !important;
        text-align: left !important;
    }

    .timeline-year {
        left: 0 !important;
        right: auto !important;
    }

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

    /* Contact Page */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-card {
        padding: var(--spacing-md);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-container {
        padding: var(--spacing-lg);
    }

    .form-title {
        font-size: 1.5rem;
    }

    .sales-team-grid {
        grid-template-columns: 1fr;
    }

    .sales-person-image {
        height: 300px;
    }

    /* Projects Page */
    .project-image {
        height: 200px;
    }

    .project-content {
        padding: var(--spacing-md);
    }

    .project-stats {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }

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

    /* Filter Section */
    .filter-section {
        padding: var(--spacing-md) 0;
    }

    .filter-title {
        font-size: 1.25rem;
        margin-bottom: var(--spacing-md);
    }

    .filter-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .filter-btn {
        width: 100%;
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .feature-item {
        padding: var(--spacing-md);
    }

    .feature-icon {
        font-size: 2.5rem;
    }

    .feature-title {
        font-size: 1.125rem;
    }

    /* Buttons */
    .btn-large {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    /* Carousel */
    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Map */
    .map-placeholder {
        height: 250px;
    }
}

/* ============================================
   Small Mobile Styles (max-width: 480px)
   ============================================ */

@media (max-width: 480px) {
    /* Typography */
    html {
        font-size: 13px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.125rem;
    }

    /* Container */
    .container {
        padding: 0 0.75rem;
    }

    /* Spacing */
    :root {
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
        --spacing-xxl: 3rem;
    }

    /* Hero */
    .hero {
        min-height: 500px;
    }

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

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

    /* Stats */
    .stat-number {
        font-size: 2rem;
    }

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

    /* Section */
    .section-title {
        font-size: 1.75rem;
    }

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

    /* Products */
    .product-image {
        height: 180px;
    }

    .product-item-image {
        height: 180px;
    }

    .product-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
        top: var(--spacing-sm);
        right: var(--spacing-sm);
    }

    /* Features Grid */
    .features-grid {
        gap: var(--spacing-sm);
    }

    .feature-item {
        padding: var(--spacing-sm);
    }

    .feature-icon {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }

    .feature-title {
        font-size: 1rem;
        margin-bottom: var(--spacing-xs);
    }

    .feature-description {
        font-size: 0.85rem;
    }

    /* Services */
    .service-card {
        padding: var(--spacing-md);
    }

    .service-icon {
        font-size: 2rem;
    }

    /* CTA */
    .cta-title {
        font-size: 1.75rem;
    }

    .cta-text {
        font-size: 0.95rem;
    }

    /* Footer */
    .footer-description {
        font-size: 0.9rem;
    }

    .footer-bottom {
        font-size: 0.8rem;
    }

    /* Page Header */
    .page-title {
        font-size: 2rem;
    }

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

    /* About */
    .about-title {
        font-size: 1.75rem;
    }

    /* Contact */
    .contact-form-container {
        padding: var(--spacing-md);
    }

    .form-title {
        font-size: 1.25rem;
    }

    /* Projects */
    .project-image {
        height: 180px;
    }

    .project-title {
        font-size: 1.25rem;
    }

    /* Sales Team */
    .sales-person-image {
        height: 250px;
    }

    .sales-person-name {
        font-size: 1.25rem;
    }

    /* Buttons */
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    .btn-large {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* ============================================
   Landscape Mobile Styles
   ============================================ */

@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 400px;
    }

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

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

    .page-header {
        padding: var(--spacing-lg) 0;
    }
}

/* ============================================
   Touch Device Optimizations
   ============================================ */

@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn {
        min-height: 44px;
        padding: 0.875rem 1.5rem;
    }

    .nav-link {
        min-height: 44px;
        padding: 1rem 0;
    }

    .mobile-menu-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
    }

    /* Remove hover effects on touch devices */
    .product-card:hover,
    .service-card:hover,
    .project-card:hover {
        transform: none;
    }

    /* Simplify animations for better performance */
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.3s !important;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .navbar,
    .mobile-menu-btn,
    .hero-buttons,
    .btn,
    .cta-section,
    .footer {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }

    .hero {
        margin-top: 0;
        page-break-after: always;
    }

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

/* ============================================
   Accessibility Improvements for Mobile
   ============================================ */

@media (max-width: 768px) {
    /* Focus styles for keyboard navigation */
    .nav-link:focus,
    .btn:focus,
    a:focus {
        outline: 3px solid var(--primary-color);
        outline-offset: 2px;
    }

    /* Skip to content link */
    .skip-to-content {
        position: absolute;
        top: -40px;
        left: 0;
        background: var(--primary-color);
        color: var(--white);
        padding: 0.5rem 1rem;
        text-decoration: none;
        z-index: 100;
    }

    .skip-to-content:focus {
        top: 0;
    }
}
