/* Mobile First Responsive Design */

/* Tablet Styles (768px and down) */
@media screen and (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

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

    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Products Grid */
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    /* Testimonials Grid */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Newsletter Form */
    .form-group {
        flex-direction: column;
        gap: 1rem;
    }

    .form-group input {
        width: 100%;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
        text-align: center;
    }

    /* Cookie Banner */
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .cookie-buttons {
        justify-content: center;
    }

    /* Section Padding */
    section {
        padding: 60px 0;
    }

    .hero {
        padding: 100px 0 60px 0;
    }

    .legal-page {
        padding: 100px 0 60px 0;
    }

    .thank-you-page {
        padding: 100px 0 60px 0;
    }

    /* Typography */
    .section-header h2 {
        font-size: 2rem;
    }

    .section-header p {
        font-size: 1.1rem;
    }
}

/* Mobile Styles (480px and down) */
@media screen and (max-width: 480px) {
    /* Container */
    .container {
        padding: 0 15px;
    }

    /* Navigation */
    .navbar {
        padding-left: 15px;
        padding-right: 15px;
    }

    .nav-brand h1 {
        font-size: 1.5rem;
    }

    /* Hero Section */
    .hero {
        padding: 90px 0 50px 0;
    }

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

    .hero p {
        font-size: 1.1rem;
    }

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

    .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Cards */
    .service-card,
    .product-card,
    .testimonial-card {
        margin: 0 10px;
    }

    /* Products Grid */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    /* Legal Pages */
    .legal-header h1 {
        font-size: 2rem;
    }

    .legal-content {
        padding: 0 10px;
    }

    .legal-section h2 {
        font-size: 1.5rem;
    }

    /* Thank You Page */
    .thank-you-icon {
        width: 80px;
        height: 80px;
        font-size: 3rem;
    }

    .thank-you-content h1 {
        font-size: 2rem;
    }

    .thank-you-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .social-follow .social-links {
        flex-direction: column;
        gap: 1rem;
    }

    /* Tables */
    .cookie-table {
        font-size: 0.85rem;
    }

    .cookie-table th,
    .cookie-table td {
        padding: 0.5rem;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }

    .cookie-toggle {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    /* Cookie Banner */
    .cookie-banner {
        padding: 0.75rem;
    }

    .cookie-content {
        flex-direction: column;
        gap: 1rem;
    }

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

    .cookie-banner .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
}

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

    .hero h1 {
        font-size: 3.5rem;
    }

    .section-header h2 {
        font-size: 3rem;
    }

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

    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .cookie-banner,
    .cookie-modal,
    .nav-toggle,
    .btn,
    .social-links {
        display: none !important;
    }

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

    .legal-page,
    .thank-you-page {
        padding: 20px 0;
    }

    .legal-section {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }

    .legal-section h2 {
        page-break-after: avoid;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .image-placeholder {
        border: 1px solid #ccc;
        background-color: #f9f9f9;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-outline {
        border-width: 3px;
    }

    .image-placeholder {
        border-width: 3px;
        border-style: solid;
    }

    .service-card,
    .product-card,
    .testimonial-card {
        border: 2px solid #333;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Note: This is a basic dark mode implementation */
    /* In a full implementation, you might want to add a toggle */
    
    .image-placeholder {
        background-color: #2c3e50;
        border-color: #34495e;
        color: #bdc3c7;
    }

    .contact-details,
    .cookie-controls {
        background-color: #34495e;
        color: #bdc3c7;
    }
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 3px solid #e74c3c;
    outline-offset: 2px;
}

/* Skip Link for Screen Readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background-color: #e74c3c;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}
