/**
 * Spenglerinfo - Mobile Optimierung
 */

/* ============================================
   MOBILE HAMBURGER MENÜ (max-width: 767px)
   ============================================ */
@media (max-width: 767px) {
    /* Hamburger Button */
    .nav-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        
        border: none;
        cursor: pointer;
        padding: 8px;
        z-index: 1001;
    }
    
    .nav-toggle .hamburger,
    .nav-toggle .hamburger::before,
    .nav-toggle .hamburger::after {
        display: block;
        width: 24px;
        height: 2px;
        background: #333 !important;
        border-radius: 2px;
        transition: all 0.25s ease;
    }
    
    .nav-toggle .hamburger { position: relative; }
    .nav-toggle .hamburger::before, .nav-toggle .hamburger::after {
        content: '';
        position: absolute;
        left: 0;
    }
    .nav-toggle .hamburger::before { top: -7px; }
    .nav-toggle .hamburger::after { top: 7px; }
    
    .nav-toggle[aria-expanded="true"] .hamburger {  }
    .nav-toggle[aria-expanded="true"] .hamburger::before { transform: rotate(45deg) translate(5px, 5px); }
    .nav-toggle[aria-expanded="true"] .hamburger::after { transform: rotate(-45deg) translate(5px, -5px); }
    
    /* Nav Links Overlay - only visible when opened */
    .nav-links {
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(245, 240, 230, 0.98); /* Cream color from site */
        padding: 20px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
        display: flex !important;
        flex-direction: column;
    }
    
    .nav-links.nav-open {
        transform: translateX(0);
    }
    
    .nav-links a {
        display: block;
        min-height: 44px;
        padding: 12px 16px;
        color: #333;
        font-size: 1.1rem;
        border-radius: 6px;
    }
    
    .nav-links a:hover, .nav-links a:focus {
        background: #333 !important;
        color: #c9a227;
    }
    
    /* Login/Logout buttons */
    
    .main-content, main { margin-top: 50px; }
    
    button, .btn, input[type="submit"], input[type="button"] {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ============================================
   TABLET & DESKTOP
   ============================================ */
@media (min-width: 768px) {
    .nav-toggle { display: none !important; }
    .nav-links {
        position: static;
        transform: none;
        
        display: flex !important;
        flex-direction: row;
    }
    .nav-links a { font-size: 0.9rem; padding: 8px 12px; }
    .main-content, main { margin-top: 70px; }
}

@media (min-width: 1024px) {
    .main-content, main { margin-top: 80px; }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 3px solid #c9a227;
    outline-offset: 2px;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
