/* Responsive Design */

/* Large Tablets and Small Laptops (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .services-grid,
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

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

    .hamburger {
        display: flex;
    }

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

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

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

    /* Hero Section */
    .hero {
        padding: 60px 0;
        min-height: 60vh;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }

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

    /* Services and Products */
    .services-grid,
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card,
    .product-category {
        padding: 1.5rem;
    }

    /* Reviews */
    .reviews-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    /* Cookie Banner */
    .cookie-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cookie-buttons .btn {
        width: 200px;
    }

    /* Legal pages */
    .legal-page .container {
        padding: 0 15px;
    }

    .legal-page h1 {
        font-size: 2rem;
    }

    /* Modal */
    .cookie-modal {
        padding: 0.5rem;
    }

    .modal-content {
        max-height: 95vh;
    }

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

    /* Cookies table */
    .cookies-table {
        font-size: 0.9rem;
    }

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

/* Mobile Phones (480px and below) */
@media screen and (max-width: 480px) {
    /* Base styles */
    .container {
        padding: 0 10px;
    }

    /* Typography */
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.3rem;
    }

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

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

    /* Navigation */
    .nav-container {
        padding: 0 10px;
    }

    .nav-logo .logo {
        height: 40px;
    }

    .nav-menu {
        top: 60px;
        padding: 1.5rem 0;
    }

    /* Hero Section */
    .hero {
        padding: 40px 0;
        min-height: 50vh;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

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

    .hero-buttons .btn {
        width: 200px;
    }

    /* Sections */
    .about,
    .services,
    .products,
    .reviews,
    .contact {
        padding: 60px 0;
    }

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

    .stat {
        padding: 1rem;
    }

    .stat h4 {
        font-size: 1.5rem;
    }

    /* Service and product cards */
    .service-card,
    .product-category {
        padding: 1.25rem;
    }

    .service-icon,
    .category-icon {
        margin-bottom: 1rem;
    }

    .service-icon svg,
    .category-icon svg {
        width: 50px;
        height: 50px;
    }

    /* Reviews */
    .review-card {
        padding: 1.5rem;
    }

    .review-card:before {
        font-size: 3rem;
        top: -5px;
        left: 15px;
    }

    .reviews-summary {
        grid-template-columns: 1fr;
    }

    .summary-stat {
        padding: 1.5rem;
    }

    .summary-stat h3 {
        font-size: 2rem;
    }

    /* Contact */
    .contact-info,
    .contact-form {
        padding: 1rem;
    }

    .contact-form {
        margin-top: 2rem;
    }

    .social-icons {
        justify-content: center;
    }

    .social-icons a {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    /* Form elements */
    .form-group {
        margin-bottom: 1.25rem;
    }

    .checkbox-group {
        align-items: flex-start;
    }

    .checkbox-label {
        font-size: 0.85rem;
    }

    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-social {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-social a {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

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

    .cookie-content h3 {
        font-size: 1.1rem;
    }

    .cookie-content p {
        font-size: 0.9rem;
    }

    .cookie-buttons .btn {
        font-size: 0.9rem;
        padding: 10px 16px;
        width: 180px;
    }

    /* Modal adjustments */
    .modal-header h3 {
        font-size: 1.2rem;
    }

    .cookie-category p {
        margin-left: 0;
        margin-top: 0.5rem;
        font-size: 0.85rem;
    }

    .toggle-slider {
        width: 45px;
        height: 22px;
    }

    .toggle-slider:before {
        width: 18px;
        height: 18px;
    }

    .cookie-toggle input[type="checkbox"]:checked + .toggle-slider:before {
        transform: translateX(23px);
    }

    /* Legal pages */
    .legal-page {
        padding: 1.5rem 0 3rem;
    }

    .legal-page h1 {
        font-size: 1.6rem;
    }

    .legal-page h2 {
        font-size: 1.3rem;
    }

    .legal-page h3 {
        font-size: 1.1rem;
    }

    .last-updated {
        margin-bottom: 2rem;
    }

    .legal-page section {
        margin-bottom: 2rem;
    }

    /* Thank you page */
    .thank-you-page {
        padding: 2rem 0 3rem;
    }

    .thank-you-content {
        padding: 2rem;
    }

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

    .response-info,
    .contact-details,
    .additional-info {
        padding: 1.5rem;
    }

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

    .thank-you-actions {
        flex-direction: column;
        align-items: center;
    }

    .thank-you-actions .btn {
        width: 200px;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }

    /* Cookies table mobile optimization */
    .cookies-table {
        font-size: 0.8rem;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }

    .cookies-table thead,
    .cookies-table tbody,
    .cookies-table th,
    .cookies-table td,
    .cookies-table tr {
        display: block;
    }

    .cookies-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .cookies-table tr {
        border: 1px solid var(--border-color);
        margin-bottom: 0.5rem;
        border-radius: 8px;
        overflow: hidden;
        background-color: var(--white);
    }

    .cookies-table td {
        border: none;
        border-bottom: 1px solid var(--border-color);
        position: relative;
        padding-left: 40%;
        white-space: normal;
    }

    .cookies-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 6px;
        width: 35%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        color: var(--primary-green);
    }

    /* Button adjustments */
    .btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}

/* Very Small Devices (320px and below) */
@media screen and (max-width: 320px) {
    .hero-text h1 {
        font-size: 1.6rem;
        line-height: 1.3;
    }

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

    .service-card,
    .product-category,
    .review-card {
        padding: 1rem;
    }

    .cookie-buttons .btn {
        width: 160px;
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .modal-content {
        margin: 0.25rem;
    }

    .social-icons {
        flex-direction: column;
        align-items: center;
    }

    .footer-social {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

/* Landscape mobile devices */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 30px 0;
    }

    .cookie-banner {
        position: relative;
        transform: none;
    }

    .cookie-modal {
        align-items: flex-start;
        padding-top: 1rem;
    }

    .modal-content {
        max-height: 85vh;
    }
}

/* High DPI displays */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
    .nav-logo .logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preference */
@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) {
    .legal-page {
        background-color: #1a1a1a;
    }
    
    .legal-page .container {
        color: #e0e0e0;
    }
    
    .cookies-table {
        background-color: #2a2a2a;
    }
    
    .cookies-table td {
        color: #b0b0b0;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .cookie-banner,
    .cookie-modal {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .legal-page {
        padding: 0;
    }
    
    h1, h2, h3 {
        color: #000;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}
