/* Mobile-specific styles */
@media screen and (max-width: 768px) {
    /* General Mobile Adjustments */
    * {
        -webkit-tap-highlight-color: transparent;
    }

    body {
        overflow-x: hidden;
    }

    /* Sidebar Navigation */
    .sidebar {
        left: -100%;
        width: 100%;
        z-index: 1000;
        transition: 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    /* Main Content Area */
    .content-area {
        margin-left: 0 !important;
        padding: 1rem !important;
        width: 100% !important;
    }

    /* Welcome Section */
    .welcome {
        padding: 2rem 1rem !important;
    }

    .welcome h1 {
        font-size: 1.8rem !important;
    }

    /* Categories Grid */
    .categories {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .category-card {
        margin: 0 0 1rem 0 !important;
    }

    .category-image {
        height: 200px !important;
    }

    .category-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Quick Links */
    .quick-links {
        padding: 1.5rem !important;
    }

    .links-grid {
        grid-template-columns: 1fr !important;
    }

    /* Images Optimization */
    img {
        max-width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
    }

    /* Text Adjustments */
    h1 { font-size: 1.8rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.2rem !important; }
    p { font-size: 0.95rem !important; }

    /* Buttons and Interactive Elements */
    button, 
    .btn,
    .quick-link {
        min-height: 44px !important; /* Better touch targets */
        padding: 0.8rem 1rem !important;
    }

    /* Fix for Fixed Elements */
    .fixed-element {
        position: relative !important;
    }

    /* Improve Touch Targets */
    a, button {
        padding: 0.8rem !important;
        margin: 0.2rem 0 !important;
    }

    /* Fix for Overflow Issues */
    .overflow-container {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    /* Improve Form Elements */
    input, 
    select, 
    textarea {
        font-size: 16px !important; /* Prevents iOS zoom */
        max-width: 100% !important;
        padding: 0.8rem !important;
    }

    /* Menu Toggle Button */
    .menu-toggle {
        display: block !important;
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 1001;
        background: #fff;
        padding: 0.5rem;
        border-radius: 5px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    /* Performance Optimizations */
    * {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    /* Smooth Scrolling */
    html {
        scroll-behavior: smooth !important;
    }

    /* Food page mobile styles */
    .foods-container {
        margin-left: 0;
        padding: 10px;
    }

    .food-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .food-card {
        max-width: 100%;
    }

    .food-image {
        height: 200px;
    }

    .food-info {
        padding: 1rem;
    }

    .food-name {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
    }

    .youtube-link {
        font-size: 1rem;
        margin-left: 5px;
    }

    .bx-link-external {
        font-size: 0.9rem;
    }

    .food-description {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* Modal adjustments for mobile */
    .modal-content {
        width: 90%;
        margin: 20px auto;
        padding: 15px;
    }

    .modal h2 {
        font-size: 1.3rem;
    }

    .ingredients-list, .preparation {
        font-size: 0.9rem;
        padding: 10px;
    }
}
