/* Mobile First Responsive Design */

/* Extra Large Devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-header h2 {
        font-size: 2.75rem;
    }
}

/* Large Devices (1200px and up) */
@media (min-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .process-steps {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Medium Devices (992px and up) */
@media (min-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small Devices (768px and up) */
@media (min-width: 768px) {
    .hamburger {
        display: none;
    }
    
    .nav-menu {
        display: block;
    }
    
    .hero .container {
        grid-template-columns: 1fr 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra Small Devices (576px and up) */
@media (min-width: 576px) {
    .cookie-buttons {
        flex-direction: row;
    }
    
    .hero-buttons {
        flex-direction: row;
    }
    
    .cta-buttons {
        flex-direction: row;
    }
}

/* Mobile Devices (below 768px) */
@media (max-width: 767.98px) {
    /* Navigation */
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 1rem 0;
        gap: 0;
    }
    
    .nav-list li {
        border-bottom: 1px solid #e5e7eb;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 1.5rem;
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
        text-align: center;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Section Padding */
    section {
        padding: 60px 0;
    }
    
    /* Section Headers */
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    /* Reviews Grid */
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .review-card {
        padding: 1.5rem;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .reviewer-info {
        width: 100%;
    }
    
    /* Process Steps */
    .process-steps {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Newsletter */
    .newsletter-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .form {
        padding: 1.5rem;
    }
    
    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info {
        gap: 1.5rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Cookie Consent */
    .cookie-consent {
        padding: 1rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .cookie-buttons .btn {
        width: 100%;
    }
    
    /* Cookie Modal */
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    /* Thank You Page */
    .thank-you {
        padding: 100px 0 60px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .step-item {
        padding: 1.5rem;
    }
    
    .cta-section {
        padding: 2rem 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Legal Pages */
    .legal-content {
        padding: 100px 0 60px;
    }
    
    .legal-text {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    /* Tables */
    .cookies-table {
        font-size: 0.875rem;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
    
    .cookies-table thead,
    .cookies-table tbody,
    .cookies-table tr {
        display: block;
    }
    
    .cookies-table th,
    .cookies-table td {
        display: inline-block;
        width: 25%;
        white-space: normal;
        vertical-align: top;
    }
    
    /* Typography Adjustments */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    
    /* Button Adjustments */
    .btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    .btn-large {
        padding: 16px 24px;
        font-size: 1rem;
    }
    
    /* Image Placeholders */
    .image-placeholder {
        min-height: 150px;
        font-size: 0.9rem;
    }
    
    .image-placeholder.small {
        min-height: 80px;
        font-size: 0.8rem;
    }
    
    .image-placeholder.large {
        min-height: 200px;
    }
}

/* Extra Small Devices (below 576px) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 15px;
    }
    
    /* Hero adjustments */
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Section headers */
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    /* Cards */
    .service-card,
    .review-card,
    .step-item {
        padding: 1.25rem;
    }
    
    /* Form */
    .form {
        padding: 1.25rem;
    }
    
    .form-group input {
        padding: 10px 12px;
    }
    
    /* Contact items */
    .contact-item {
        align-items: center;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.1rem; }
    
    /* Buttons */
    .btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .btn-large {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    /* Success icon */
    .success-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* Step numbers */
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* Landscape Phone Orientation */
@media (max-width: 767.98px) and (orientation: landscape) {
    .hero {
        padding: 80px 0 40px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    section {
        padding: 40px 0;
    }
    
    .thank-you {
        padding: 80px 0 40px;
    }
    
    .legal-content {
        padding: 80px 0 40px;
    }
}

/* High Resolution Displays */
@media (min-width: 1200px) and (-webkit-min-device-pixel-ratio: 2) {
    .hero-title {
        font-size: 3.25rem;
    }
    
    .section-header h2 {
        font-size: 2.5rem;
    }
}

/* Focus and Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        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) {
    /* This can be expanded if dark mode is desired */
    .image-placeholder {
        background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
        border-color: #6b7280;
        color: #d1d5db;
    }
}

/* Print Optimizations */
@media print {
    /* Hide interactive elements */
    .hamburger,
    .cookie-consent,
    .cookie-modal,
    .btn,
    .social-links,
    .nav-menu {
        display: none !important;
    }
    
    /* Optimize spacing for print */
    section {
        padding: 30px 0 !important;
    }
    
    .hero {
        padding: 20px 0 !important;
    }
    
    /* Ensure good contrast */
    body {
        color: #000 !important;
        background: #fff !important;
    }
    
    /* Optimize font sizes */
    .hero-title {
        font-size: 2rem !important;
    }
    
    .section-header h2 {
        font-size: 1.5rem !important;
    }
    
    /* Single column layout */
    .hero .container,
    .about-content,
    .newsletter-content,
    .contact-content {
        grid-template-columns: 1fr !important;
    }
    
    /* Smaller grids for print */
    .services-grid,
    .reviews-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* Animation preferences */
@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .review-card,
    .btn {
        transition: all 0.3s ease;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-outline {
        border-width: 3px;
    }
    
    .service-card,
    .review-card {
        border: 2px solid #000;
    }
    
    .nav-link::after {
        height: 3px;
    }
}

/* Large text preferences */
@media (min-width: 768px) {
    .large-text {
        font-size: 1.25rem;
        line-height: 1.8;
    }
}

/* Hover states for touch devices */
@media (hover: none) {
    .btn:hover,
    .service-card:hover,
    .review-card:hover {
        transform: none;
    }
    
    .btn:active {
        transform: translateY(1px);
    }
}

/* Focus styles for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
    .btn:focus,
    .nav-link:focus,
    input:focus {
        outline: 3px solid #2563eb;
        outline-offset: 2px;
    }
}
