/* Top-Aid Responsive Stylesheet */

/* Tablet Styles - 768px and below */
@media screen and (max-width: 768px) {
    /* Container adjustments */
    .container {
        padding: 0 15px;
    }

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

    /* Navigation */
    .navbar .container {
        position: relative;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        flex-direction: column;
        gap: 0;
        padding: 1rem;
        box-shadow: var(--shadow-medium);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu a {
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu a:last-child {
        border-bottom: none;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

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

    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

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

    .hero-content h1 {
        font-size: 2.2rem;
    }

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

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

    .service-card {
        padding: 1.5rem;
    }

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

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

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

    /* Categories Grid */
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

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

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

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

    /* Cookie Buttons */
    .cookie-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cookie-buttons .btn {
        width: 100%;
        text-align: center;
    }

    /* Modal adjustments */
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 1rem;
    }

    /* Article content */
    .article-text {
        font-size: 1rem;
    }

    .article-text .lead {
        font-size: 1.2rem;
    }

    /* Related articles */
    .related-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .related-card {
        flex-direction: column;
        text-align: center;
    }

    .related-image {
        width: 100%;
        height: 120px;
        align-self: center;
    }

    /* Steps grid */
    .steps {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* CTA Buttons */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

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

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

    /* Cookie Table */
    .cookie-table {
        font-size: 0.9rem;
    }

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

    /* Social Links */
    .social-links a {
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
    }

    /* Placeholder Images */
    .placeholder-image {
        min-height: 150px;
        padding: 1.5rem;
    }

    .placeholder-image.large {
        min-height: 200px;
    }

    .placeholder-image i {
        font-size: 2rem;
    }
}

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

    /* Typography for small screens */
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }

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

    /* Hero content */
    .hero {
        padding: 40px 0;
    }

    .hero-content h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

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

    /* Section padding */
    .services,
    .about,
    .newsletter,
    .blog-preview,
    .reviews,
    .contact,
    .blog-articles,
    .article-content {
        padding: 40px 0;
    }

    .blog-header,
    .blog-categories,
    .article-header {
        padding: 30px 0;
    }

    /* Service cards */
    .service-card {
        padding: 1rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }

    .service-icon i {
        font-size: 1.5rem;
    }

    /* Category cards */
    .category-card {
        padding: 1rem;
    }

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

    .category-icon i {
        font-size: 1.2rem;
    }

    /* Blog cards */
    .blog-card,
    .article-card {
        margin-bottom: 1rem;
    }

    .blog-content,
    .article-content {
        padding: 1rem;
    }

    .article-image {
        height: 150px;
    }

    /* Article meta */
    .article-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .article-meta span {
        font-size: 0.8rem;
    }

    /* Article header */
    .article-hero {
        text-align: center;
    }

    .article-subtitle {
        font-size: 1.1rem;
    }

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

    .cookie-content h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

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

    /* Modal for small screens */
    .modal-content {
        width: 98%;
        padding: 1rem;
        max-height: 90vh;
    }

    .close {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1.5rem;
    }

    /* Cookie categories */
    .cookie-category {
        margin-bottom: 1.5rem;
    }

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

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

    /* Switch adjustments */
    .switch {
        width: 50px;
        height: 28px;
    }

    .slider:before {
        height: 22px;
        width: 22px;
        left: 3px;
        bottom: 3px;
    }

    input:checked + .slider:before {
        transform: translateX(22px);
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

    .footer-section h3,
    .footer-section h4 {
        font-size: 1.1rem;
    }

    /* Legal content */
    .legal-content {
        padding: 30px 0;
    }

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

    .legal-content h2 {
        font-size: 1.4rem;
        margin-top: 2rem;
    }

    .legal-content h3 {
        font-size: 1.2rem;
    }

    /* Cookie table mobile */
    .cookie-table table {
        font-size: 0.8rem;
    }

    .cookie-table th,
    .cookie-table td {
        padding: 0.5rem 0.3rem;
        min-width: 80px;
    }

    /* Contact items */
    .contact-item {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .contact-item i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    /* Review cards */
    .review-card {
        padding: 1rem;
    }

    /* Newsletter section */
    .newsletter-content h2 {
        font-size: 1.5rem;
    }

    .newsletter-content p {
        font-size: 1rem;
    }

    /* Thank you page */
    .thank-you {
        padding: 40px 0;
    }

    .thank-you-icon i {
        font-size: 3rem;
    }

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

    /* Newsletter benefits */
    .newsletter-benefits {
        padding: 1rem;
        margin-top: 2rem;
    }

    .newsletter-benefits ul {
        font-size: 0.9rem;
    }

    /* Article newsletter CTA */
    .article-newsletter {
        padding: 1.5rem;
        margin-top: 2rem;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    /* Article tags */
    .tag {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }

    /* Info and warning boxes */
    .info-box,
    .warning-box {
        padding: 1rem;
        margin: 1rem 0;
    }

    .warning-box h4 {
        font-size: 1rem;
    }

    /* Placeholder image adjustments */
    .placeholder-image {
        min-height: 120px;
        padding: 1rem;
    }

    .placeholder-image.large {
        min-height: 150px;
    }

    .placeholder-image i {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .placeholder-image span {
        font-size: 0.9rem;
    }
}

/* Landscape mobile adjustments */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 30px 0;
    }

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

    .services,
    .about,
    .newsletter,
    .blog-preview,
    .reviews,
    .contact {
        padding: 50px 0;
    }
}

/* Print styles */
@media print {
    .header,
    .cookie-banner,
    .modal,
    .footer,
    .newsletter,
    .newsletter-cta,
    .article-newsletter,
    .social-links,
    .hamburger {
        display: none !important;
    }

    .article-content,
    .legal-content {
        padding: 20px 0;
    }

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

    .container {
        max-width: none;
        padding: 0;
    }

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

    .btn {
        display: none;
    }

    .placeholder-image {
        border: 2px solid #000;
        background: #fff;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --secondary-color: #0000ff;
        --text-dark: #000000;
        --text-light: #333333;
        --bg-light: #f0f0f0;
        --border-color: #000000;
        --shadow-light: 0 2px 4px rgba(0,0,0,0.3);
        --shadow-medium: 0 4px 12px rgba(0,0,0,0.4);
    }

    .btn {
        border: 2px solid currentColor;
    }

    .placeholder-image {
        border: 3px solid #000;
    }
}

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

    .hero-content h1,
    .service-card,
    .blog-card,
    .article-card {
        transform: none !important;
    }
}

/* Focus styles for keyboard navigation */
@media (any-hover: hover) {
    .btn:focus,
    .nav-menu a:focus,
    input:focus,
    .close:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #4a90e2;
        --secondary-color: #6bb6ff;
        --text-dark: #e9ecef;
        --text-light: #adb5bd;
        --text-white: #ffffff;
        --bg-light: #343a40;
        --bg-white: #495057;
        --border-color: #6c757d;
        --shadow-light: 0 2px 4px rgba(0,0,0,0.3);
        --shadow-medium: 0 4px 12px rgba(0,0,0,0.4);
        --shadow-strong: 0 8px 25px rgba(0,0,0,0.5);
    }

    body {
        background-color: #212529;
        color: #45a649;
    }

    .header {
        background-color: var(--bg-white);
    }

    .service-card,
    .blog-card,
    .article-card,
    .review-card,
    .category-card {
        background-color: var(--bg-white);
    }

    .cookie-banner {
        background-color: #1a1d20;
    }

    .modal-content {
        background-color: var(--bg-white);
        color: var(--text-dark);
    }
}
