/**
 * Mobile Header - Separate Struktur für Smartphones
 * Desktop Header bleibt unverändert
 */

/* ===============================================
   MOBILE HEADER CONTAINER
   =============================================== */

/* Desktop: Mobile Header ausblenden */
.mobile-header-content {
    display: none;
}

/* Mobile: Zeige Mobile Header, verstecke Desktop Header */
@media (max-width: 768px) {
    /* Desktop Header verstecken */
    .header-content {
        display: none !important;
    }
    
    /* Mobile Header anzeigen */
    .mobile-header-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 60px;
        padding: 0 16px;
        gap: 12px;
    }
}

/* ===============================================
   MOBILE HEADER BUTTONS
   =============================================== */

.mobile-search-btn,
.mobile-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(107, 76, 154, 0.08);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--rs-purple);
}

.mobile-search-btn:active,
.mobile-login-btn:active {
    transform: scale(0.95);
    background: rgba(107, 76, 154, 0.15);
}

/* ===============================================
   MOBILE HAMBURGER (Zentral)
   =============================================== */

.mobile-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: var(--rs-purple);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.mobile-hamburger span {
    width: 20px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-hamburger.active {
    background: var(--rs-gray-800);
}

.mobile-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.mobile-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===============================================
   MOBILE PROFILE BUTTON
   =============================================== */

.mobile-profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.mobile-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--rs-purple);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    overflow: hidden;
    border: 2px solid rgba(107, 76, 154, 0.2);
    transition: all 0.2s ease;
}

.mobile-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-profile-btn:active .mobile-user-avatar {
    transform: scale(0.95);
    border-color: var(--rs-purple);
}

/* ===============================================
   MOBILE NAVIGATION OVERLAY
   =============================================== */

.mobile-nav-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--rs-white);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ===============================================
   MOBILE NAV CONTENT
   =============================================== */

.mobile-nav-content {
    padding: 24px 20px 40px;
    min-height: calc(100vh - 60px);
    min-height: calc(100dvh - 60px);
}

/* User Info Header (wenn eingeloggt) */
.mobile-nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, var(--rs-purple) 0%, #9333ea 100%);
    border-radius: 12px;
    margin-bottom: 24px;
    color: white;
}

.mobile-nav-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.mobile-nav-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-nav-user-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: white;
}

.mobile-nav-user-info p {
    font-size: 13px;
    margin: 0;
    opacity: 0.9;
}

/* ===============================================
   MOBILE NAV SECTIONS
   =============================================== */

.mobile-nav-section {
    margin-bottom: 32px;
}

.mobile-nav-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--rs-gray-500);
    margin: 0 0 12px 4px;
}

/* Main Navigation Links */
.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    margin-bottom: 4px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    color: var(--rs-gray-900);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
}

.mobile-nav-link:active {
    transform: scale(0.98);
    background: var(--rs-purple-light);
    color: var(--rs-purple);
}

.mobile-nav-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.mobile-nav-link.has-submenu::after {
    content: '';
    width: 20px;
    height: 20px;
    margin-left: auto;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b4c9a' stroke-width='2'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E") center/contain no-repeat;
    opacity: 0.5;
    transition: transform 0.2s ease;
}

.mobile-nav-item.expanded .mobile-nav-link.has-submenu::after {
    transform: rotate(90deg);
}

/* Submenu */
.mobile-nav-submenu {
    list-style: none;
    margin: 0;
    padding: 8px 0 0 32px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-nav-item.expanded .mobile-nav-submenu {
    max-height: 1000px;
}

.mobile-nav-submenu li {
    margin-bottom: 2px;
}

.mobile-nav-submenu a {
    display: block;
    padding: 10px 16px;
    color: var(--rs-gray-700);
    text-decoration: none;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-nav-submenu a:active {
    background: var(--rs-gray-100);
    color: var(--rs-purple);
    padding-left: 20px;
}

/* ===============================================
   MOBILE NAV FOOTER
   =============================================== */

.mobile-nav-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--rs-gray-200);
}

.mobile-nav-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--rs-gray-100);
    border: none;
    border-radius: 10px;
    color: var(--rs-gray-700);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    width: 100%;
    text-align: left;
    transition: all 0.2s ease;
}

.mobile-nav-logout:active {
    transform: scale(0.98);
    background: #fee;
    color: #dc2626;
}

.mobile-nav-logout svg {
    width: 20px;
    height: 20px;
}

/* Login Button (wenn nicht eingeloggt) */
.mobile-nav-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: var(--rs-purple);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    width: 100%;
    transition: all 0.2s ease;
}

.mobile-nav-login:active {
    transform: scale(0.98);
    background: var(--rs-purple-dark);
}

/* ===============================================
   BODY LOCK (wenn Menu offen)
   =============================================== */

body.mobile-nav-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    body.mobile-nav-open {
        position: fixed;
        width: 100%;
    }
}
