/* Responsive Design - Mobile First Approach */

/* Extra Small Devices (Phones) - 320px to 575px */
@media (max-width: 575px) {
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .hero-title {
        font-size: 2.25rem;
        line-height: 1.2;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Container */
    .container {
        padding: 0 15px;
    }
    
    /* Header */
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: var(--shadow-medium);
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-menu.active {
        top: 70px;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Reviews */
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    
    /* Newsletter */
    .newsletter-form .form-group {
        flex-direction: column;
    }
    
    .newsletter-form input[type="email"] {
        margin-bottom: 0.5rem;
    }
    
    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-card,
    .blog-article-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .blog-icon,
    .article-icon {
        margin: 0 auto 1rem;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .contact-icon {
        margin: 0 auto;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Cookie Banner */
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-buttons .btn {
        width: 100%;
    }
    
    /* Article Pages */
    .article-page h1 {
        font-size: 2rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .article-page h1 .article-icon {
        width: 50px;
        height: 50px;
    }
    
    .article-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .article-navigation .btn {
        width: 100%;
    }
    
    /* Thank You Page */
    .thank-you-page h1 {
        font-size: 2.25rem;
    }
    
    .steps {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .social-links-large {
        flex-direction: column;
    }
    
    /* Legal Pages */
    .rights-grid {
        grid-template-columns: 1fr;
    }
    
    .browser-instructions {
        grid-template-columns: 1fr;
    }
    
    .useful-links ul {
        grid-template-columns: 1fr;
    }
    
    /* Tables */
    .cookie-table {
        font-size: 0.85rem;
    }
    
    .cookie-table th,
    .cookie-table td {
        padding: 0.5rem;
    }
}

/* Small Devices (Portrait Tablets) - 576px to 767px */
@media (min-width: 576px) and (max-width: 767px) {
    /* Hero */
    .hero .container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Reviews */
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Thank You Page */
    .steps {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Legal Pages */
    .rights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .browser-instructions {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium Devices (Landscape Tablets) - 768px to 991px */
@media (min-width: 768px) and (max-width: 991px) {
    /* Navigation */
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: var(--shadow-medium);
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-menu.active {
        top: 70px;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
    }
    
    /* Hero */
    .hero .container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    /* Reviews */
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Blog */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Thank You Page */
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Legal Pages */
    .rights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .browser-instructions {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large Devices (Desktops) - 992px to 1199px */
@media (min-width: 992px) and (max-width: 1199px) {
    /* Services */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Reviews */
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra Large Devices (Large Desktops) - 1200px and up */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    /* Hero */
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for high DPI displays */
    .logo,
    .footer-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        min-height: auto;
        padding: 120px 0 60px;
    }
    
    .hero .container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .thank-you-page {
        min-height: auto;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero,
    .service-card,
    .review-card,
    .blog-card {
        transform: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #0000ff;
        --dark-color: #000000;
        --gray-color: #000000;
        --border-color: #000000;
        --light-color: #ffffff;
    }
    
    .btn-outline {
        border-width: 3px;
    }
    
    .nav-link::after {
        height: 3px;
    }
}

/* Print Responsive */
@media print {
    .container {
        max-width: none;
        padding: 0;
    }
    
    .hero .container,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .services-grid,
    .reviews-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-page {
        padding: 20px 0;
    }
    
    .legal-page {
        padding: 20px 0;
    }
}

/* Utility Classes for Responsive Design */
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }

/* Responsive Display Utilities */
@media (max-width: 575px) {
    .d-sm-none { display: none; }
    .d-sm-block { display: block; }
    .d-sm-inline { display: inline; }
    .d-sm-inline-block { display: inline-block; }
    .d-sm-flex { display: flex; }
    .d-sm-grid { display: grid; }
}

@media (min-width: 576px) and (max-width: 767px) {
    .d-md-none { display: none; }
    .d-md-block { display: block; }
    .d-md-inline { display: inline; }
    .d-md-inline-block { display: inline-block; }
    .d-md-flex { display: flex; }
    .d-md-grid { display: grid; }
}

@media (min-width: 768px) and (max-width: 991px) {
    .d-lg-none { display: none; }
    .d-lg-block { display: block; }
    .d-lg-inline { display: inline; }
    .d-lg-inline-block { display: inline-block; }
    .d-lg-flex { display: flex; }
    .d-lg-grid { display: grid; }
}

@media (min-width: 992px) {
    .d-xl-none { display: none; }
    .d-xl-block { display: block; }
    .d-xl-inline { display: inline; }
    .d-xl-inline-block { display: inline-block; }
    .d-xl-flex { display: flex; }
    .d-xl-grid { display: grid; }
}

/* Responsive Text Alignment */
@media (max-width: 767px) {
    .text-sm-center { text-align: center; }
    .text-sm-left { text-align: left; }
    .text-sm-right { text-align: right; }
}

@media (min-width: 768px) {
    .text-md-center { text-align: center; }
    .text-md-left { text-align: left; }
    .text-md-right { text-align: right; }
}

/* Responsive Spacing */
@media (max-width: 575px) {
    .p-sm-1 { padding: 0.5rem; }
    .p-sm-2 { padding: 1rem; }
    .p-sm-3 { padding: 1.5rem; }
    .m-sm-1 { margin: 0.5rem; }
    .m-sm-2 { margin: 1rem; }
    .m-sm-3 { margin: 1.5rem; }
}
