/* Mobile-specific enhancements */
@media (max-width: 768px) {

    /* Better text readability on mobile */
    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        transition: all 0.3s ease;
    }

    .mobile-menu-button:hover {
        background-color: #f3f4f6;
        border-radius: 6px;
    }

    .mobile-nav-link {
        display: block;
        padding: 1rem 1.5rem;
        color: #1e293b;
        transition: all 0.3s ease;
        border-radius: 0.5rem;
        margin: 0.5rem 0;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .mobile-nav-link:hover {
        background-color: #f1f5f9;
        color: #0ea5e9;
        transform: translateX(4px);
    }

    .mobile-menu-button {
        padding: 0.75rem;
        border-radius: 0.5rem;
        transition: all 0.3s ease;
    }

    .mobile-menu-button:hover {
        background-color: #f1f5f9;
    }

    .mobile-menu-button.active {
        background-color: #f1f5f9;
        color: #0ea5e9;
    }

    /* Add backdrop when menu is open */
    .mobile-menu-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.3);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 40;
    }

    .mobile-menu-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

    /* Improved button touch targets */
    button,
    .btn-primary,
    .btn-secondary,
    a.nav-link,
    input[type="submit"] {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }

    /* Better form elements on mobile */
    input,
    select,
    textarea {
        font-size: 16px !important;
        /* Prevents iOS zoom on focus */
        padding: 0.75rem !important;
        margin-bottom: 1rem !important;
    }

    /* Improved spacing for mobile */
    .container,
    .max-w-7xl,
    .max-w-6xl,
    .max-w-5xl,
    .max-w-4xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Better card layouts on mobile */
    .card,
    .service-card,
    .blog-card {
        margin-bottom: 1rem;
        border-radius: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    /* Improved mobile typography */
    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }

    h3 {
        font-size: 1.5rem !important;
        line-height: 1.4 !important;
    }

    /* Better table handling on mobile */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Improved form groups on mobile */
    .form-group {
        margin-bottom: 1.5rem;
    }

    /* Better mobile grid gaps */
    .grid {
        gap: 1rem !important;
    }

    /* Improved footer spacing on mobile */
    footer {
        padding-bottom: calc(4rem + env(safe-area-inset-bottom)) !important;
    }

    /* Mobile-friendly section padding */
    section {
        padding: 2rem 0 !important;
    }

    /* Better mobile form validation messages */
    .error-message {
        font-size: 0.875rem;
        padding: 0.5rem;
        margin-top: 0.25rem;
        border-radius: 0.375rem;
    }

    /* Improved mobile scroll behavior */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    /* Better mobile shadows */
    .shadow-mobile {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
}