/* Responsive Design */

/* Large Desktop */
@media (max-width: 1400px) {
    .container {
        max-width: 1140px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .services h2,
    .about-text h2,
    .reviews h2,
    .contact h2 {
        font-size: 2rem;
    }
}

/* Laptop */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-xl);
    }
    
    .hero-svg {
        max-width: 250px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
    }
    
    .about-svg {
        max-width: 300px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .about-stats {
        justify-content: center;
        max-width: 500px;
        margin: 0 auto;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .container {
        max-width: 540px;
        padding: 0 var(--spacing-lg);
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: var(--spacing-xxl);
        transition: var(--transition);
        box-shadow: var(--shadow);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .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 var(--spacing-xl);
    }
    
    .hero-content h1 {
        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;
    }
    
    .hero-placeholder {
        width: 200px;
        height: 200px;
        font-size: 2.5rem;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* About */
    .about-svg {
        max-width: 250px;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        max-width: 300px;
    }
    
    /* Reviews */
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* Newsletter */
    .newsletter-form .form-group {
        flex-direction: column;
    }
    
    .newsletter-form .form-group .btn {
        width: 100%;
    }
    
    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .blog-hero h1 {
        font-size: 2.5rem;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .article-footer {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    /* Related Articles */
    .related-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    /* Legal Pages */
    .legal-page {
        padding: 100px 0 var(--spacing-xl);
    }
    
    .legal-content h1 {
        font-size: 2rem;
    }
    
    .cookie-table {
        font-size: 0.9rem;
    }
    
    /* Thank You Page */
    .thank-you {
        padding: 100px 0 var(--spacing-xl);
    }
    
    .thank-you-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .thank-you-actions .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Cookie Banner */
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .cookie-buttons {
        justify-content: center;
        width: 100%;
    }
}

/* Mobile Large */
@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding: 0 var(--spacing-md);
    }
    
    /* Typography */
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    
    /* Spacing adjustments */
    .hero,
    .services,
    .about,
    .reviews,
    .newsletter,
    .contact,
    .blog-articles,
    .blog-article,
    .legal-page,
    .thank-you {
        padding: var(--spacing-xl) 0;
    }
    
    .hero {
        padding-top: 100px;
    }
    
    .blog-hero {
        padding: 100px 0 var(--spacing-xl);
    }
    
    .legal-page,
    .blog-article,
    .thank-you {
        padding-top: 100px;
    }
    
    /* Hero */
    .hero-content h1 {
        font-size: 1.8rem;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-svg {
        max-width: 200px;
    }
    
    /* Buttons */
    .btn {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 0.9rem;
    }
    
    .btn-large {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 1rem;
    }
    
    /* Service Cards */
    .service-card {
        padding: var(--spacing-lg);
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: var(--spacing-md);
    }
    
    /* About */
    .about-placeholder {
        width: 200px;
        height: 150px;
        font-size: 2rem;
    }
    
    /* Reviews */
    .review-card {
        padding: var(--spacing-lg);
    }
    
    /* Newsletter */
    .newsletter {
        padding: var(--spacing-xl) 0;
    }
    
    .newsletter h2 {
        font-size: 1.5rem;
    }
    
    .newsletter p {
        font-size: 1rem;
    }
    
    /* Contact */
    .contact-item {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .contact-item i {
        margin: 0;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    /* Blog */
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .blog-hero p {
        font-size: 1rem;
    }
    
    .blog-card {
        margin-bottom: var(--spacing-lg);
    }
    
    .blog-footer {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: flex-start;
    }
    
    /* Article */
    .article-header h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .article-author {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .article-placeholder {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content .lead {
        font-size: 1.1rem;
        padding: var(--spacing-md);
    }
    
    .article-tags {
        margin-bottom: var(--spacing-md);
    }
    
    .article-share {
        flex-wrap: wrap;
    }
    
    /* Expression items */
    .expression-item {
        padding: var(--spacing-md);
    }
    
    /* Tables */
    .grammar-table,
    .cookie-table {
        font-size: 0.8rem;
    }
    
    .grammar-table th,
    .grammar-table td,
    .cookie-table th,
    .cookie-table td {
        padding: var(--spacing-sm);
    }
    
    /* Legal content */
    .legal-content {
        font-size: 0.9rem;
    }
    
    .legal-content h1 {
        font-size: 1.8rem;
    }
    
    .legal-content h2 {
        font-size: 1.3rem;
        margin-top: var(--spacing-xl);
    }
    
    /* Thank you page */
    .thank-you-icon i {
        font-size: 3rem;
    }
    
    .thank-you h1 {
        font-size: 1.8rem;
    }
    
    .thank-you-message {
        font-size: 1rem;
    }
    
    .thank-you-info {
        padding: var(--spacing-lg);
    }
    
    .thank-you-info li {
        font-size: 1rem;
        align-items: flex-start;
    }
    
    .thank-you-info li i {
        margin-top: var(--spacing-xs);
        flex-shrink: 0;
    }
    
    /* Cookie Banner */
    .cookie-banner {
        padding: var(--spacing-md);
    }
    
    .cookie-content h3 {
        font-size: 1rem;
    }
    
    .cookie-content p {
        font-size: 0.9rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-buttons .btn {
        width: 100%;
        font-size: 0.9rem;
    }
    
    /* Cookie Modal */
    .cookie-modal {
        padding: var(--spacing-sm);
    }
    
    .cookie-modal-content {
        max-height: 90vh;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: var(--spacing-md);
    }
    
    .cookie-category {
        padding: var(--spacing-sm);
    }
    
    .cookie-label {
        gap: var(--spacing-xs);
    }
    
    .cookie-label small {
        font-size: 0.8rem;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Further reduce spacing for very small screens */
    .hero,
    .services,
    .about,
    .reviews,
    .newsletter,
    .contact,
    .blog-articles,
    .blog-article,
    .legal-page,
    .thank-you {
        padding: var(--spacing-lg) 0;
    }
    
    .hero {
        padding-top: 90px;
    }
    
    .blog-hero {
        padding: 90px 0 var(--spacing-lg);
    }
    
    .legal-page,
    .blog-article,
    .thank-you {
        padding-top: 90px;
    }
    
    /* Typography */
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }
    
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .blog-hero h1,
    .article-header h1 {
        font-size: 1.6rem;
    }
    
    /* Cards */
    .service-card,
    .review-card,
    .blog-card .blog-content {
        padding: var(--spacing-md);
    }
    
    /* SVG Images */
    .hero-svg {
        max-width: 150px;
    }
    
    .about-svg {
        max-width: 180px;
    }
    
    .article-svg {
        max-width: 200px;
    }
    
    /* Forms */
    .contact-form input,
    .contact-form select,
    .contact-form textarea,
    .newsletter-form input {
        padding: var(--spacing-sm);
        font-size: 0.9rem;
    }
    
    /* Buttons */
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.85rem;
    }
    
    /* Cookie Banner */
    .cookie-banner {
        padding: var(--spacing-sm);
    }
    
    .cookie-content {
        gap: var(--spacing-sm);
    }
    
    .cookie-buttons {
        gap: var(--spacing-xs);
    }
}

/* Print Styles */
@media print {
    .header,
    .cookie-banner,
    .cookie-modal,
    .nav-toggle,
    .social-links,
    .share-link,
    .btn,
    .hero-buttons,
    .newsletter,
    .cookie-buttons {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: black;
    }
    
    p, li {
        orphans: 3;
        widows: 3;
    }
    
    .article-content,
    .legal-content {
        max-width: none;
    }
    
    .service-card,
    .review-card,
    .blog-card {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
    
    .legal-update,
    .article-meta {
        border: 1px solid #ccc;
        padding: 10pt;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --primary-light: #0000ff;
        --primary-dark: #000040;
        --secondary-color: #ff8c00;
        --white: #ffffff;
        --black: #000000;
        --gray: #666666;
        --light-gray: #f0f0f0;
        --dark-gray: #333333;
    }
    
    .btn-outline {
        border-width: 3px;
    }
    
    .nav-link::after {
        height: 3px;
    }
    
    .service-card,
    .review-card,
    .blog-card {
        border: 2px solid var(--dark-gray);
    }
}

/* Reduced Motion */
@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,
    .review-card:hover,
    .blog-card:hover,
    .related-card:hover {
        transform: none;
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.nav-link:focus,
input:focus,
select:focus,
textarea:focus,
.cookie-label:focus-within {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Skip Link for Screen Readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 10002;
}

.skip-link:focus {
    top: 0;
}
