/* Mobile First Responsive Design */

/* Large Tablets and Small Desktops (max-width: 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-image {
        order: -1;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .about .container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Tablets (max-width: 768px) */
@media (max-width: 768px) {
    /* Typography Adjustments */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    /* Header Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 2rem;
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    /* Sections */
    section {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    /* About Stats */
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    /* Reviews */
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Newsletter */
    .form-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-group input {
        margin-bottom: 0.5rem;
    }
    
    /* Contact Form */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* Cookie Banner */
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cookie-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Cookie Modal */
    .cookie-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .cookie-category {
        flex-direction: column;
        gap: 1rem;
    }
    
    .switch {
        align-self: flex-start;
    }
    
    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-card {
        margin-bottom: 1rem;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Article */
    .article-content {
        padding: 100px 0 60px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .article-footer {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    /* Thank You Page */
    .thank-you-page {
        padding: 100px 0 60px;
    }
    
    .next-steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .thank-you-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .social-link {
        justify-content: center;
    }
    
    /* Legal Pages */
    .legal-content {
        font-size: 0.95rem;
    }
    
    .cookie-table {
        font-size: 0.85rem;
    }
    
    .cookie-table th,
    .cookie-table td {
        padding: 0.75rem;
    }
}

/* Mobile Phones (max-width: 480px) */
@media (max-width: 480px) {
    /* Container */
    .container {
        padding: 0 10px;
    }
    
    /* Typography */
    h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* Header */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-brand .logo {
        height: 35px;
    }
    
    /* Hero */
    .hero {
        padding: 90px 0 50px;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* Sections */
    section {
        padding: 50px 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    /* Service Cards */
    .service-card {
        padding: 1.25rem;
    }
    
    .service-icon img {
        width: 56px;
        height: 56px;
    }
    
    /* About Stats */
    .stat h3 {
        font-size: 1.75rem;
    }
    
    /* Review Cards */
    .review-card {
        padding: 1.5rem;
    }
    
    /* Newsletter */
    .newsletter-content {
        padding: 0 1rem;
    }
    
    .newsletter h2 {
        font-size: 1.5rem;
    }
    
    /* Contact */
    .contact-item {
        margin-bottom: 1.5rem;
    }
    
    .contact-item i {
        font-size: 1.25rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Cookie Banner */
    .cookie-banner {
        padding: 0.75rem;
    }
    
    .cookie-content {
        text-align: left;
    }
    
    .cookie-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-buttons .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Cookie Modal */
    .cookie-modal-content {
        width: 98%;
        margin: 0.5rem;
        max-height: 90vh;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 1rem;
    }
    
    .cookie-modal-header h3 {
        font-size: 1.125rem;
    }
    
    .cookie-category h4 {
        font-size: 1rem;
    }
    
    .cookie-category p {
        font-size: 0.85rem;
    }
    
    /* Blog */
    .page-header {
        padding: 90px 0 60px;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .blog-content {
        padding: 60px 0;
    }
    
    .blog-card {
        border-radius: 5px;
    }
    
    .blog-content-text {
        padding: 1.5rem;
    }
    
    .blog-image {
        height: 160px;
    }
    
    .blog-image img {
        width: 60px;
        height: 60px;
    }
    
    /* Article */
    .article-content {
        padding: 90px 0 50px;
    }
    
    .article-header {
        margin-bottom: 2rem;
    }
    
    .article-header h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .article-body {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .article-body h2 {
        font-size: 1.25rem;
        margin-top: 2rem;
    }
    
    .article-body h3 {
        font-size: 1.125rem;
        margin-top: 1.5rem;
    }
    
    .article-image img {
        width: 80px;
        height: 80px;
    }
    
    .article-cta {
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .article-cta h3 {
        font-size: 1.125rem;
    }
    
    .share-buttons {
        gap: 0.75rem;
    }
    
    .share-btn {
        width: 36px;
        height: 36px;
    }
    
    /* Thank You Page */
    .thank-you-page {
        padding: 90px 0 50px;
    }
    
    .thank-you-icon i {
        font-size: 3rem;
    }
    
    .thank-you-content h1 {
        font-size: 1.75rem;
    }
    
    .step {
        padding: 1.5rem;
        text-align: center;
    }
    
    .step-icon i {
        font-size: 1.75rem;
    }
    
    .resource-card {
        padding: 1.5rem;
    }
    
    .resource-icon i {
        font-size: 2rem;
    }
    
    .social-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Legal Pages */
    .legal-page {
        padding: 90px 0 50px;
    }
    
    .legal-header h1 {
        font-size: 1.75rem;
    }
    
    .legal-content {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .legal-content h2 {
        font-size: 1.25rem;
        margin-top: 2rem;
    }
    
    .legal-content h3 {
        font-size: 1.125rem;
        margin-top: 1.5rem;
    }
    
    .cookie-table {
        font-size: 0.8rem;
    }
    
    .cookie-table th,
    .cookie-table td {
        padding: 0.5rem;
    }
    
    .cookie-settings-button {
        margin: 1.5rem 0;
    }
}

/* Very Small Screens (max-width: 320px) */
@media (max-width: 320px) {
    .container {
        padding: 0 5px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .hero {
        padding: 80px 0 40px;
    }
    
    section {
        padding: 40px 0;
    }
    
    .service-card,
    .review-card,
    .contact-form {
        padding: 1rem;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 0.75rem;
    }
    
    .step,
    .resource-card {
        padding: 1rem;
    }
    
    .article-cta {
        padding: 1rem;
    }
}

/* Landscape Orientation for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .nav-menu {
        height: auto;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .cookie-modal-content {
        max-height: 95vh;
    }
    
    .hero {
        padding: 80px 0 40px;
    }
    
    section {
        padding: 40px 0;
    }
}

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

/* Hover Effects Only for Non-Touch Devices */
@media (hover: hover) and (pointer: fine) {
    .service-card:hover,
    .blog-card:hover {
        transform: translateY(-5px);
    }
    
    .btn:hover {
        transform: translateY(-2px);
    }
}

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

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #e0e0e0;
        --text-light: #b0b0b0;
        --light-gray: #2a2a2a;
        --white: #1a1a1a;
        --border-color: #404040;
    }
    
    body {
        background-color: var(--white);
        color: var(--text-dark);
    }
    
    .header {
        background-color: var(--white);
        border-bottom: 1px solid var(--border-color);
    }
    
    .service-card,
    .review-card,
    .blog-card,
    .resource-card {
        background-color: var(--light-gray);
        border: 1px solid var(--border-color);
    }
    
    .contact-form {
        background-color: var(--light-gray);
        border: 1px solid var(--border-color);
    }
    
    .form-group input,
    .form-group textarea {
        background-color: var(--white);
        color: var(--text-dark);
        border: 1px solid var(--border-color);
    }
    
    .cookie-modal-content {
        background-color: var(--white);
        border: 1px solid var(--border-color);
    }
    
    .cookie-table table {
        background-color: var(--white);
        border: 1px solid var(--border-color);
    }
    
    .cookie-table th,
    .cookie-table td {
        border-bottom: 1px solid var(--border-color);
    }
}

/* Print Responsive Styles */
@media print {
    .container {
        max-width: none;
        padding: 0;
    }
    
    .hero .container,
    .about .container,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .services-grid,
    .reviews-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-card,
    .review-card,
    .blog-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .article-body {
        max-width: none;
    }
}
