/* GLOBAL MENU STYLES 
   Thema: "Modern Premium Fast Food" - Responsive & Bulletproof
   Prefix: cz- (CurryZoom)
*/

:root {
    /* Palette */
    --cz-brand-primary: #D62300; 
    --cz-brand-accent:  #FFA500; 
    --cz-brand-dark:    #1C1C1C; 
    --cz-brand-light:   #F4F4F4; 
    
    --cz-text-main:     #ffffff;
    --cz-text-secondary:#cccccc;
    
    /* Design Tokens */
    --cz-border-radius: 6px;
    --cz-transition:    all 0.25s ease-out;
    --cz-shadow-soft:   0 4px 12px rgba(0,0,0,0.15);
    --cz-shadow-heavy:  0 15px 40px rgba(0,0,0,0.4);
    
    /* Fluid Typography für bessere Lesbarkeit auf Mobile & Desktop */
    --cz-font-size-lg: clamp(1.2rem, 4vw, 1.5rem);
    --cz-font-size-md: clamp(1rem, 3vw, 1.1rem);
    
    --cz-font-family: 'Helvetica Neue', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Container Isolation */
#cz-global-menu-container {
    font-family: var(--cz-font-family);
    line-height: 1.5;
    color: var(--cz-brand-dark);
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#cz-global-menu-container * {
    box-sizing: border-box;
}

/* --- Hamburger Button --- */
.cz-hamburger {
    z-index: 99999 !important;
    position: fixed !important;
    /* Responsive Positionierung */
    top: clamp(15px, 5vh, 40px) !important;
    right: clamp(15px, 5vw, 40px) !important;
    width: 56px;
    height: 56px;
    background: var(--cz-brand-primary);
    border-radius: 50%;
    box-shadow: var(--cz-shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: var(--cz-transition);
    border: 2px solid rgba(255,255,255,0.1);
    outline: none;
    padding: 0;
    margin: 0;
    /* Verhindert Flackern auf Mobile beim Tap */
    -webkit-tap-highlight-color: transparent;
}

.cz-hamburger:hover {
    transform: translateY(-2px);
    background: #b31d00;
    box-shadow: var(--cz-shadow-heavy);
}

.cz-hamburger div {
    background-color: #fff;
    height: 3px;
    width: 24px;
    border-radius: 2px;
    transition: var(--cz-transition);
}

.cz-hamburger.open {
    background: var(--cz-brand-dark);
    border-color: transparent;
}
.cz-hamburger.open div:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); width: 26px; }
.cz-hamburger.open div:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.cz-hamburger.open div:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); width: 26px; }

/* Mobile Optimierung für Hamburger */
@media (max-width: 480px) {
    .cz-hamburger {
        width: 48px !important;
        height: 48px !important;
    }
}

/* --- Full Screen Menu --- */
.cz-menu {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    /* Fallback für Mobile Browser mit Adressleiste */
    height: 100dvh; 
    background: var(--cz-brand-dark);
    z-index: 9999;
    transform: translateX(100%);
    opacity: 0; 
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    overflow-y: auto;
    /* Verhindert Scrollen des Body */
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 100px 20px 80px; 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    justify-content: flex-start;
}

.cz-menu.open {
    transform: translateX(0);
    opacity: 1; 
    visibility: visible;
}

/* Close Button */
.cz-menu-close-button {
    position: absolute;
    top: 30px;
    left: 20px;
    color: var(--cz-text-secondary);
    background: transparent;
    border: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--cz-transition);
    z-index: 10002;
    padding: 10px;
    /* Min-Touch Area für Mobile */
    min-width: 44px;
    min-height: 44px;
}

.cz-menu-close-button:hover {
    color: var(--cz-brand-accent);
}

.cz-menu-inner {
    width: 100%;
    max-width: 500px;
    display: flex; 
    flex-direction: column; 
    /* Gap entfernt, Padding regelt Abstand */
}

/* Links & Categories - Layout Fix für Zeilenumbrüche */
.cz-menu a, .cz-menu-category-title {
    color: var(--cz-text-main);
    text-decoration: none;
    font-size: var(--cz-font-size-lg);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 20px 10px;
    display: flex; 
    /* WICHTIG: Flex-Start statt Center, damit Icon bei mehrzeiligem Text oben bleibt */
    align-items: flex-start; 
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    transition: color 0.2s ease, padding-left 0.2s ease;
    margin: 0;
    cursor: pointer;
    /* Text-Wrapping erzwingen */
    white-space: normal;
    word-break: break-word;
    hyphens: auto;
}

/* Text Container innerhalb des Links (für sauberen Umbruch links vom Icon) */
.cz-link-text {
    flex: 1; /* Nimmt den meisten Platz ein */
    padding-right: 15px; /* Abstand zum Icon */
    line-height: 1.2; /* Tighter line height für Headlines */
}

.cz-menu a:hover, .cz-menu-category-title:hover {
    color: var(--cz-brand-accent);
    padding-left: 15px;
    border-bottom-color: var(--cz-brand-accent);
}

/* Icon Styling */
.cz-icon {
    fill: currentColor; 
    width: 24px;
    height: 24px;
    flex-shrink: 0; /* Verhindert das Quetschen des Icons */
    margin-top: 2px; /* Optischer Ausgleich zur Schrifthöhe */
    transition: transform 0.2s;
}

/* Rotation bei offenem Akkordeon */
.cz-menu-category-title.open .cz-icon {
    transform: rotate(180deg);
}

/* Accordion Content */
.cz-menu-category-content {
    max-height: 0; 
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: rgba(255,255,255,0.03);
}

.cz-menu-category-content.open {
    /* Großzügiges Max-Height für mobile Inhalte */
    max-height: 1200px; 
}

/* Sub-Links */
.cz-menu-category-content a {
    font-size: var(--cz-font-size-md);
    font-weight: 500;
    text-transform: none;
    color: var(--cz-text-secondary); 
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    line-height: 1.4;
}

.cz-menu-category-content a:hover {
    color: var(--cz-text-main);
    padding-left: 25px;
    background: rgba(255,255,255,0.05);
}

/* Info Box */
#cz-infoText {
    display: none; 
    margin: 15px 20px; 
    padding: 20px;
    font-size: 0.9rem; 
    font-weight: 600;
    color: var(--cz-brand-dark);
    background: var(--cz-brand-accent);
    border-radius: var(--cz-border-radius); 
    text-align: center;
    box-shadow: var(--cz-shadow-soft);
}
#cz-infoText.open { display: block; animation: czFadeIn 0.4s; }

/* --- Modals (Responsive & Robust) --- */
.cz-modal {
    display: none; 
    position: fixed; 
    z-index: 100000;
    left: 0; top: 0; 
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(5px);
    align-items: center; 
    justify-content: center; 
    padding: 20px; /* Safe Area padding */
    overscroll-behavior: contain;
}

.cz-modal.open { display: flex; animation: czFadeIn 0.3s ease; }

.cz-modal-content {
    background: #fff; 
    color: var(--cz-brand-dark); 
    padding: 0; 
    border-radius: var(--cz-border-radius); 
    width: 100%; 
    max-width: 450px;
    /* Responsive Height Logic */
    max-height: 85vh; 
    overflow-y: auto; 
    position: relative;
    box-shadow: var(--cz-shadow-heavy);
    display: flex;
    flex-direction: column;
}

/* Modal Bild */
.cz-modal img { 
    width: 100%; 
    height: 250px; 
    object-fit: cover; 
    display: block; 
    flex-shrink: 0; /* Bild soll nicht schrumpfen */
}

/* Text Container */
.cz-modal-inner-padding {
    padding: 25px;
}

.cz-modal .close {
    position: absolute; 
    right: 15px; top: 15px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 50%;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; cursor: pointer;
    line-height: 1;
    z-index: 2;
    transition: background 0.2s;
    /* Touch Target Optimization */
    min-width: 44px; min-height: 44px;
}
.cz-modal .close:hover { background: var(--cz-brand-primary); }

.cz-modal h3 { 
    color: var(--cz-brand-dark); 
    margin: 0 0 10px 0; 
    font-size: 1.6rem; 
    font-weight: 800; 
    text-transform: uppercase;
    line-height: 1.2;
}

@keyframes czFadeIn { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* --- Media Queries für sehr kleine Bildschirme (iPhone SE etc.) --- */
@media (max-height: 600px) {
    .cz-menu {
        padding-top: 80px; /* Weniger Abstand oben im Querformat */
    }
    .cz-menu a, .cz-menu-category-title {
        padding: 15px 10px; /* Kompakter */
    }
    .cz-modal img {
        height: 180px; /* Kleineres Bild im Querformat */
    }
}
