@media screen and (max-width: 768px) {
    /* Reset defaults */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    header {
        margin: 0;
        padding: 0;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px; /* Fixed height for header */
        z-index: 1000;
        background-color: var(--dark-grey);
        margin: 0;
        padding: 0 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Hero Section Mobile Adjustments */
    .hero-section {
        margin-top: 60px; /* Match header height exactly */
        min-height: calc(100vh - 60px);
        padding: 0; /* Remove padding */
        width: 100%;
        background-attachment: scroll !important; /* Fix flickering on mobile */
        transform: translateZ(0) !important; /* Hardware acceleration */
        -webkit-transform: translateZ(0) !important;
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
    }

    .hero-content {
        text-align: center;
        padding: 20px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }

    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }

    /* CTA Buttons Mobile Layout */
    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .btn {
        width: 80%;
        margin: 0;
        padding: 12px 20px;
        font-size: 1rem;
    }

    /* Footer Mobile Adjustments */
    .footer-content {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        gap: 10px;
    }

    /* Existing Mobile Navigation Styles */
    .main-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
    }

    /* Burger Menu Styles */
    .burger-menu {
        display: block;
        cursor: pointer;
        position: absolute;
        right: 2rem;
        z-index: 100;
    }

    .burger-menu .bar {
        width: 25px;
        height: 3px;
        background-color: white;
        margin: 5px;
        transition: transform 0.25s ease-in-out;
    }

    /* Mobile Navigation */
    .nav-links {
        position: fixed;
        right: -100%;
        top: 60px;
        width: 100%;
        height: calc(100vh - 60px); /* Full viewport height minus header */
        background: var(--dark-grey);
        display: flex;
        flex-direction: column;
        align-items: center;
        transition: transform 0.3s ease-in-out;
        padding: 20px 0;
        transform: translateX(100%);
    }

    .nav-links.active {
        transform: translateX(0);
        right: 0;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .nav-links a {
        display: flex;
        justify-content: center;
        padding: 1rem;
        width: 100%; /* Full width for better touch area */
        box-sizing: border-box;
        font-size: 1.2rem;
        color: var(--light-color);
        transition: all 0.3s ease;
    }

    .nav-links a i {
        margin-right: 0.5rem;
    }

    /* Dropdown Menu Improvements */
    .dropdown-content {
        position: static;
        display: none;
        background-color: rgba(0, 0, 0, 0.2);
        box-shadow: none;
        padding: 0;
    }

    .dropdown-content a {
        padding: 15px 30px; /* Increased padding and indent for sub-items */
        font-size: 1.1rem;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    /* Remove hover effects that don't work well on mobile */
    .nav-links a:hover,
    .nav-links a:active {
        background-color: var(--secondary-color);
        color: var(--dark-grey);
        transform: none;
        box-shadow: none;
    }

    /* Mobile Hero Section */
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content .subtitle {
        font-size: 1.2rem;
    }

    /* Mobile Menu Page */
    .daily-menu {
        padding: 20px;
    }

    /* Mobile Contact Page */
    .contact-container {
        padding: 20px;
    }

    .social-links {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    /* Mobile Footer */
    .footer-content {
        padding: 15px;
        font-size: 0.9rem;
    }

    /* Mobile Dropdown */
    .dropdown-content {
        position: static;
        max-height: 0;
        overflow: hidden;
        background-color: rgba(0, 0, 0, 0.2);
        box-shadow: none;
        padding: 0;
        transition: max-height 0.3s ease-in-out;
    }

    .dropdown.active .dropdown-content {
        max-height: 300px; /* Adjust based on content */
    }

    .dropdown-content a {
        padding: 15px 30px;
        font-size: 1.1rem;
        opacity: 0.8;
        transform: translateX(-10px);
        transition: all 0.3s ease;
    }

    .dropdown.active .dropdown-content a {
        opacity: 1;
        transform: translateX(0);
    }

    /* Individual dropdown items delay */
    .dropdown.active .dropdown-content a:nth-child(1) { transition-delay: 0.1s; }
    .dropdown.active .dropdown-content a:nth-child(2) { transition-delay: 0.15s; }
    .dropdown.active .dropdown-content a:nth-child(3) { transition-delay: 0.2s; }
    .dropdown.active .dropdown-content a:nth-child(4) { transition-delay: 0.25s; }
    .dropdown.active .dropdown-content a:nth-child(5) { transition-delay: 0.3s; }

    /* Mobile Menu Layout */
    .menu-container {
        padding: 0 10px;
    }

    .menu-section {
        margin: 10px 0;
        padding: 15px;
    }

    .menu-item {
        flex-direction: column;
        text-align: center;
    }

    .menu-item-price {
        margin: 10px 0 0 0;
    }

    .menu-hero {
        margin-top: 60px;
        padding: 2rem 1rem;
    }

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

    .logo {
        order: 1; /* Logo stays on the left */
    }
}

/* Landscape Mode Adjustments */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
    }

    .hero-content {
        padding: 10px;
    }

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

    .cta-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .btn {
        width: auto;
    }
}

/* Mobile Navigation for Menu page */
@media (max-width: 768px) {
    .menu-nav {
        position: static;
        top: auto;
    }
    
    .menu-tabs {
        overflow-x: auto;
        padding: 0 1rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .menu-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab-btn {
        flex-shrink: 0;
        min-width: 120px;
    }
}

/* Ensure menu items stack properly on mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .menu-item {
        margin-bottom: 1rem;
    }
    
    .item-header {
        align-items: flex-start;
    }
    
    .price {
        margin-top: 0.5rem;
    }
}

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

.nav-links {
    transform: translateX(100%);
    transition: transform 0.2s ease;
    will-change: transform;
    contain: layout style paint;
}

.menu-category {
    contain: content;
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

/* Aktualizace mobilní navigace - přidejte na konec souboru */

@media screen and (max-width: 768px) {
    /* Úprava navigace pro stálé menu */
    .nav-links {
        height: auto !important;
        max-height: calc(100vh - 60px) !important;
        overflow-y: auto !important;
    }
    
    .nav-links.active {
        padding-bottom: 30px !important;
    }
    
    .nav-links li {
        width: 100% !important;
    }
    
    .nav-links a {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 15px 20px !important;
    }
    
    /* Zajištění dostatku místa pro všechny položky menu */
    .nav-links li:nth-child(5) {
        margin-bottom: 20px !important;
    }
}

/* Přidejte na konec souboru nebo nahraďte existující burger menu styly */

/* Mobilní menu */
@media screen and (max-width: 768px) {
    .burger-menu {
        display: block !important;
        cursor: pointer !important;
        z-index: 1000 !important;
    }
    
    .burger-menu .bar {
        width: 25px !important;
        height: 3px !important;
        background-color: white !important;
        margin: 5px 0 !important;
        transition: 0.4s !important;
    }
    
    .burger-menu.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px) !important;
    }
    
    .burger-menu.active .bar:nth-child(2) {
        opacity: 0 !important;
    }
    
    .burger-menu.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px) !important;
    }
    
    .nav-links {
        position: fixed !important;
        top: 60px !important;
        right: -100% !important;
        width: 100% !important;
        height: calc(100vh - 60px) !important;
        background-color: var(--dark-grey) !important; /* Změna na šedou barvu */
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        transition: 0.5s ease-in-out !important;
        padding-top: 20px !important;
        display: flex !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    .nav-links.active {
        right: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .nav-links li {
        margin: 15px 0 !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    .nav-links a {
        padding: 10px 20px !important;
        width: 100% !important;
        display: block !important;
    }
}

/* Přidejte na konec souboru - vylepšení viditelnosti aktivní položky v burger menu */
@media screen and (max-width: 768px) {
    /* Lepší viditelnost aktivních položek v mobilním menu */
    .nav-links a.active {
        background-color: rgba(255, 119, 0, 0.15) !important;
        color: #ff7700 !important;
        font-weight: bold !important;
        border-left: 4px solid #ff7700 !important;
        padding-left: 16px !important;
        position: relative !important;
        text-shadow: 0 0 8px rgba(255, 119, 0, 0.4) !important;
    }
    
    /* Odstranění spodního podtržení, které může zakrývat text */
    .nav-links a.active::after {
        display: none !important;
    }
    
    /* Přidání světlejšího pozadí pro lepší kontrast */
    .nav-links li:has(a.active) {
        background-color: rgba(255, 255, 255, 0.05) !important;
    }
    
    /* Zajištění viditelnosti ikon v aktivních položkách */
    .nav-links a.active i {
        color: #ff7700 !important;
        text-shadow: 0 0 5px rgba(255, 119, 0, 0.4) !important;
    }
}

/* Nahraďte předchozí sekci s opravou překrývání těmito styly */

/* Maximálně agresivní oprava překrývání nadpisů - přepíše všechny ostatní styly */
@media (max-width: 768px) {
    /* Fixní navigace */
    header, .main-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 60px !important;
        z-index: 10000 !important;
    }
    
    /* Absolutní pozicování header sekcí pod navigací */
    .menu-header,
    .gallery-header,
    .menu-section-header,
    section[class*="header"] {
        position: relative !important;
        margin-top: 60px !important; /* Přesně výška navigace */
        padding-top: 50px !important; /* Velký horní padding */
        padding-bottom: 70px !important; /* Velký spodní padding */
        z-index: 1 !important;
        background-attachment: fixed !important;
        background-position: center !important;
    }
    
    /* Speciální obal kolem textu v headeru pro lepší čitelnost */
    .menu-header .container,
    .gallery-header .container,
    section[class*="header"] .container {
        position: relative !important;
        z-index: 5 !important;
        background-color: rgba(0, 0, 0, 0.4) !important; /* Tmavý polotransparentní podklad */
        border-radius: 8px !important;
        padding: 15px !important;
        max-width: 90% !important;
        margin: 0 auto !important;
    }
    
    /* Texty v header sekcích */
    .menu-header h1,
    .gallery-header h1,
    section[class*="header"] h1 {
        color: white !important;
        font-size: 2rem !important;
        margin-bottom: 0.5rem !important;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 1) !important;
    }
    
    .menu-header p,
    .gallery-header p,
    section[class*="header"] p {
        color: white !important;
        font-size: 1rem !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 1) !important;
    }
    
    /* Obsahové sekce - vyšší z-index, odsazení od headeru */
    .menu-content,
    .gallery-content,
    section[class*="content"] {
        position: relative !important;
        z-index: 10 !important; /* Mnohem vyšší než header */
        margin-top: -50px !important; /* Větší záporný margin pro překrytí */
        background-color: #ffffff !important; /* Plně neprůhledné pozadí */
        border-top-left-radius: 20px !important;
        border-top-right-radius: 20px !important;
        padding-top: 30px !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.2) !important;
    }
    
    /* Zajistit, že obsah uvnitř content sekcí je viditelný */
    .menu-content > *,
    .gallery-content > *,
    section[class*="content"] > * {
        position: relative !important;
        z-index: 11 !important;
    }
    
    /* Absolutně zamezit překrývání přes absolutní pozicování */
    body {
        position: relative !important;
    }
}

/* Speciální řešení pro menší telefony */
@media (max-width: 480px) {
    .menu-header .container,
    .gallery-header .container,
    section[class*="header"] .container {
        padding: 10px !important;
    }
    
    .menu-header h1,
    .gallery-header h1,
    section[class*="header"] h1 {
        font-size: 1.6rem !important;
    }
}

/* Víkendové menu - mobilní styly - NOVÉ */
@media screen and (max-width: 768px) {
    .weekend-menu-info {
        margin: 1rem 0.5rem !important;
        padding: 1.5rem 1rem !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    }
    
    .weekend-icon {
        font-size: 2.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .weekend-menu-info h3 {
        font-size: 1.3rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.8rem !important;
        padding: 0 0.5rem !important;
    }
    
    .weekend-menu-info p {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem !important;
        padding: 0 0.5rem !important;
        line-height: 1.4 !important;
    }
    
    .weekend-menu-buttons {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.8rem !important;
        padding: 0 0.5rem !important;
    }
    
    .btn-permanent-menu,
    .btn-call {
        width: 100% !important;
        max-width: 280px !important;
        justify-content: center !important;
        padding: 12px 20px !important;
        font-size: 1rem !important;
        border-radius: 20px !important;
    }
    
    /* Menu odkazy pro všední dny - mobilní */
    .menu-links {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.8rem !important;
        margin-top: 1rem !important;
        padding: 0 0.5rem !important;
    }
    
    .view-permanent-menu {
        width: 100% !important;
        max-width: 220px !important;
        justify-content: center !important;
        padding: 10px 16px !important;
        font-size: 0.9rem !important;
    }
    
    .menu-links-error {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.8rem !important;
        margin-top: 1rem !important;
        padding: 0 0.5rem !important;
    }
}

/* Menší telefony */
@media screen and (max-width: 480px) {
    .weekend-menu-info {
        margin: 0.5rem 0.25rem !important;
        padding: 1.2rem 0.8rem !important;
        border-radius: 10px !important;
    }
    
    .weekend-icon {
        font-size: 2rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .weekend-menu-info h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.6rem !important;
        padding: 0 0.25rem !important;
    }
    
    .weekend-menu-info p {
        font-size: 0.85rem !important;
        margin-bottom: 1.2rem !important;
        padding: 0 0.25rem !important;
        line-height: 1.3 !important;
    }
    
    .btn-permanent-menu,
    .btn-call {
        font-size: 0.95rem !important;
        padding: 10px 16px !important;
        max-width: 260px !important;
    }
    
    .view-permanent-menu {
        max-width: 200px !important;
        font-size: 0.85rem !important;
        padding: 8px 14px !important;
    }
}

/* Landscape módy pro telefony */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .weekend-menu-info {
        margin: 1rem 2rem !important;
        padding: 1.5rem 2rem !important;
    }
    
    .weekend-menu-info h3 {
        font-size: 1.2rem !important;
    }
    
    .weekend-menu-buttons {
        flex-direction: row !important;
        justify-content: center !important;
        gap: 1rem !important;
    }
    
    .btn-permanent-menu,
    .btn-call {
        width: auto !important;
        min-width: 160px !important;
    }
    
    .menu-links {
        flex-direction: row !important;
        justify-content: center !important;
    }
}

/* Touch optimalizace */
@media (hover: none) and (pointer: coarse) {
    .btn-permanent-menu,
    .btn-call,
    .view-permanent-menu {
        min-height: 44px !important; /* Apple doporučení pro touch targets */
        transition: background-color 0.2s ease !important;
    }
    
    .btn-permanent-menu:active {
        background: linear-gradient(135deg, #d46e00, #c86600) !important;
        transform: scale(0.98) !important;
    }
    
    .btn-call:active {
        background: linear-gradient(135deg, #1e7e34, #1a6e2f) !important;
        transform: scale(0.98) !important;
    }
    
    .view-permanent-menu:active {
        background: #495057 !important;
        transform: scale(0.98) !important;
    }
}

/* Vysoké rozlišení mobilů */
@media screen and (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2) {
    .weekend-menu-info {
        border-width: 1px !important;
    }
    
    .weekend-icon {
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
    }
}

/* Redukce animací pro uživatele s preferencí */
@media (prefers-reduced-motion: reduce) {
    .weekend-menu-info {
        animation: none !important;
    }
    
    .weekend-icon i {
        animation: none !important;
    }
    
    .btn-permanent-menu,
    .btn-call,
    .view-permanent-menu {
        transition: none !important;
    }
}

/* Dark mode podpora (pokud máte) */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
    .weekend-menu-info {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
        border-color: #ff7700 !important;
        color: white !important;
    }
    
    .weekend-menu-info h3 {
        color: white !important;
    }
    
    .weekend-menu-info p {
        color: #ecf0f1 !important;
    }
}