/* Party Wall Agreement London - Responsive Styles */

/* Large Desktop (1440px and up) */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }
    
    .hero h1 {
        font-size: 4rem;
    }
    
    .section-padding {
        padding: 6rem 0;
    }
}

/* Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Tablet Landscape (992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

/* Tablet Portrait (768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

/* Mobile Large (576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

/* Tablet and Below (1024px and down) */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .service-card,
    .testimonial,
    .team-card {
        margin-bottom: 2rem;
    }
    
    .section-padding {
        padding: 4rem 0;
    }
}

/* Mobile and Small Tablets (768px and down) */
@media (max-width: 768px) {
    /* Navigation */
    .navbar .container {
        padding: 1rem 1.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* Hero Section */
    .hero {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero .grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero .bg-white {
        margin-top: 2rem;
        padding: 1.5rem;
    }
    
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    /* Buttons */
    .btn-primary,
    .btn-secondary {
        display: block;
        text-align: center;
        margin-bottom: 1rem;
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    /* Grids */
    .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Services Section */
    .service-card {
        padding: 1.5rem;
        text-align: center;
    }
    
    .service-card i {
        margin-bottom: 1rem;
    }
    
    /* Testimonials */
    .testimonial {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    /* Team Cards */
    .team-card {
        margin-bottom: 2rem;
    }
    
    .team-photo {
        height: 250px;
    }
    
    .team-info {
        padding: 1.5rem;
    }
    
    /* Footer */
    footer .grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    footer h3,
    footer h4 {
        margin-bottom: 1rem;
    }
    
    /* Section Padding */
    .section-padding {
        padding: 3rem 0;
    }
    
    /* Container Padding */
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Small Mobile (480px and down) */
@media (max-width: 480px) {
    /* Navigation */
    .navbar .logo h1 {
        font-size: 1.5rem;
    }
    
    .navbar .logo p {
        font-size: 0.75rem;
    }
    
    /* Hero Section */
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
    
    .hero .bg-white {
        padding: 1rem;
    }
    
    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    
    /* Cards */
    .service-card,
    .testimonial,
    .team-card,
    .blog-card {
        padding: 1rem;
    }
    
    .service-card i {
        font-size: 2.5rem;
    }
    
    /* Stats */
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.95rem;
    }
    
    /* Container Padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Section Padding */
    .section-padding {
        padding: 2.5rem 0;
    }
    
    /* Forms */
    .form-input,
    .form-textarea,
    .form-select {
        font-size: 0.95rem;
        padding: 0.75rem;
    }
    
    /* Buttons */
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Extra Small Mobile (360px and down) */
@media (max-width: 360px) {
    .navbar .logo h1 {
        font-size: 1.25rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    
    .service-card,
    .testimonial {
        padding: 0.875rem;
    }
    
    .team-info {
        padding: 1rem;
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Landscape Mobile (orientation) */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 1rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
    
    .hero p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    .hero .grid {
        gap: 2rem;
    }
    
    .section-padding {
        padding: 2rem 0;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .team-photo,
    .blog-card img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Print Styles for Mobile */
@media print {
    .mobile-menu-btn,
    .mobile-menu {
        display: none !important;
    }
    
    .container {
        padding-left: 0;
        padding-right: 0;
        max-width: none;
    }
}

/* Touch Device Optimizations */
@media (pointer: coarse) {
    /* Larger touch targets */
    .btn-primary,
    .btn-secondary,
    .nav-link,
    .mobile-menu-btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .faq-question {
        min-height: 60px;
    }
    
    /* Remove hover effects on touch devices */
    .service-card:hover,
    .testimonial:hover,
    .team-card:hover,
    .blog-card:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
}

/* Reduced Motion Preferences */
@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;
    }
    
    .hero video {
        display: none;
    }
    
    .hero {
        background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Override for users who prefer light mode on our professional site */
    :root {
        color-scheme: light;
    }
}

/* Container Queries (Future-proofing) */
@container (max-width: 600px) {
    .service-card {
        padding: 1rem;
    }
    
    .testimonial {
        padding: 1rem;
    }
}

/* Focus Visible for Better Accessibility */
@supports selector(:focus-visible) {
    *:focus {
        outline: none;
    }
    
    *:focus-visible {
        outline: 2px solid var(--primary-blue);
        outline-offset: 2px;
    }
}