/* Mobile-specific optimizations */
@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
    
    /* Improve touch targets */
    .btn, .nav__link, .category__link, .faq__question {
        padding: 10px 10px;
        border: 0;
        min-height: 34px;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Better spacing for mobile */
    .hero {
        padding-top: 80px;
    }
    
    .hero__content {
        padding: 0 1rem;
    }
    
    /* Improve form usability on mobile */
    .form__input, .form__textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 1rem;
    }
    
    /* Better card spacing */
    .category__card, .why-us__card {
        margin-bottom: 1rem;
    }
    
    /* Improve text readability */
    .hero__title, .section__title {
        text-align: center;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    /* Better button layout */
    .hero__cta {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .container {
        padding: 0 0.5rem;
    }
    
    .hero__title {
        font-size: 1.8rem !important;
        line-height: 1.1;
    }
    
    .hero__subtitle {
        font-size: 1rem !important;
        line-height: 1.3;
    }
    
    .section__title {
        font-size: 1.6rem !important;
    }
    
    .section__subtitle {
        font-size: 1rem !important;
    }
    
    /* Compact cards */
    .category__card, .why-us__card {
   
        margin: 0 0.25rem 1rem;
    }
    
    /* Better form layout */
    .contact-form, .contact-info {
        padding: 1.5rem 1rem;
        margin: 0 0.25rem;
    }
    
    /* Legal pages */
    .legal-content {
        padding: 1.5rem 1rem;
        margin: 0 0.25rem;
    }
    
    /* Navigation */
    .nav__logo img {
        height: 35px;
    }
    
    /* Icons */
    .category__icon {
        width: 50px;
        height: 50px;
    }
    
    .category__icon-img {
        width: 25px;
        height: 25px;
    }
    
    .why-us__icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
}

@media (max-width: 360px) {
    /* Very small screens */
    .hero__title {
        font-size: 1.6rem !important;
    }
    
    .hero__subtitle {
        font-size: 0.9rem !important;
    }
    
    .section__title {
        font-size: 1.4rem !important;
    }
    
    .category__card, .why-us__card {

    }
    
    .contact-form, .contact-info {
        padding: 1rem 0.8rem;
    }
    
    .legal-content {
        padding: 1rem 0.8rem;
    }
}

/* Landscape orientation fixes */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding-top: 60px;
    }
    
    .hero__content {
        padding: 2rem 0;
    }
    
    .hero__title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero__subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .header {
        background: rgba(30, 30, 30, 0.95);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .nav__link {
        color: #e0e0e0;
    }
    
    .nav__link:hover {
        color: #667eea;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .hero__background::after {
        animation: none;
    }
    
    .category__card::after {
        animation: none;
    }
    
    .animate-fade-up {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
