/* web/static/css/mobile_menu.css */
/* Стили для мобильного меню (гамбургер) — вынесены из header.html */

/* =========================
   ГАМБУРГЕР — КНОПКА (ПЛАВАЮЩАЯ)
   ========================= */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    cursor: pointer;
    padding: 20px 24px;
    z-index: 1001;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    transition: background 0.3s, transform 0.2s;
}

/* === На мобильных — фиксированная позиция === */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        position: fixed !important;
        top: 35px !important;
        right: 35px !important;
        z-index: 2000 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    .hamburger:hover {
        background: rgba(102, 126, 234, 0.8);
        transform: scale(1.05);
    }
    .hamburger:active {
        transform: scale(0.95);
    }
}

.hamburger span {
    width: 50px;
    height: 6px;
    background: #fff;
    border-radius: 3px;
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger:hover span {
    background: #fff;
}
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* =========================
   МОБИЛЬНОЕ МЕНЮ — ПАНЕЛЬ
   ========================= */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    z-index: 1999;
    transition: right 0.3s ease-in-out;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.mobile-menu.active {
    right: 0;
}
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    padding-top: 80px;
}
.logo-small img {
    height: 32px;
}
.close-menu {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}
.close-menu:hover {
    color: #333;
}
.mobile-menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}
.mobile-menu-links li {
    border-bottom: 1px solid #f0f0f0;
}
.mobile-menu-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 10px;
    color: #333 !important;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s;
}
.mobile-menu-links a .link-text {
    display: inline-block;
    color: inherit;
}
.mobile-menu-links a:hover {
    background: #f8f9fa;
    color: #667eea !important;
}
.mobile-logout {
    color: #dc3545 !important;
    font-weight: 600;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border-top: 1px solid #eee;
    margin-top: 10px;
}
.mobile-logout:hover {
    background: #fff5f5;
}
.mobile-logout .logout-icon {
    stroke: #dc3545;
}

/* =========================
   ОВЕРЛЕЙ — ЗАТЕМНЕНИЕ ФОНА
   ========================= */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =========================
   УТИЛИТЫ
   ========================= */
body.menu-open {
    overflow: hidden;
}

/* =========================
   MEDIA QUERIES — МОБИЛЬНАЯ АДАПТАЦИЯ
   ========================= */
@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }
    .brand-slogan {
        display: none;
    }
    .brand-name {
        font-size: 16px;
    }
    header {
        padding: 12px 15px;
        padding-top: 90px;
    }
}