/* ============================================
   СТИЛИ ДЛЯ ХЕДЕРА И САЙДБАРА
   ============================================ */

/* ============================================
   ДЕСКТОПНЫЙ САЙДБАР (левое меню)
   ============================================ */

#leftmenu {
    width: 20%;
    background-color: var(--lilac-color);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#leftmenu::-webkit-scrollbar {
    display: none;
}

.sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.sidebar-logo {
    text-align: center;
    padding: 0 20px 20px 20px;
}

.sidebar-logo img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: block;
    margin: 0 auto;
    float: none;
}

.sidebar-logo img:hover {
    transform: scale(1.02);
}

.sidebar-title {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 15px;
}

.sidebar-name {
    font-size: 1.3rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    color: white;
    display: block;
}

.sidebar-name:hover {
    color: white;
    text-decoration: underline;
}

.sidebar-profession {
    color: rgba(255, 255, 255, 0.85);
    margin: 5px 0 0 0;
    font-size: 0.85rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 15px;
    flex: 1;
    margin-bottom: 15px;
}

.sidebar-link {
    display: block;
    padding: 10px 12px;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.9rem;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
    text-decoration: none;
}

.sidebar-link.active {
    background-color: rgba(255, 255, 255, 0.25);
}

.sidebar-social {
    text-align: center;
    padding: 10px 15px;
}

.sidebar-social img {
    display: inline-block;
    float: none;
    border: none;
    width: 28px;
    height: 28px;
    margin: 0 5px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.sidebar-social img:hover {
    opacity: 1;
}

.sidebar-footer {
    text-align: center;
    padding: 10px 15px 0 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 0 15px;
}

.sidebar-footer-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.7rem;
    margin: 0 8px 4px 8px;
}

.sidebar-footer-link:hover {
    color: white;
    text-decoration: underline;
}

.sidebar-copy {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.65rem;
    margin: 5px 0 0 0;
}

/* ============================================
   МОБИЛЬНЫЙ ХЕДЕР (только до 768px)
   ============================================ */

.mobile-header-container {
    display: none;
}

.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--lilac-color);
    padding: 10px 15px;
    position: relative;
    z-index: 1001;
}

.mobile-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.mobile-logo {
    width: 20%;
    flex-shrink: 0;
}

.mobile-logo img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    cursor: pointer;
    display: block;
}

.mobile-title {
    text-align: left;
    flex: 1;
}

.mobile-site-name {
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    color: white;
    display: block;
    line-height: 1.2;
}

.mobile-site-name:hover {
    text-decoration: underline;
    color: white;
}

.mobile-site-desc {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 2px 0 0 0;
}

.mobile-burger {
    width: 30px;
    height: 24px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    margin-left: auto;
}

.mobile-burger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-burger.open span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.mobile-burger.open span:nth-child(2) {
    opacity: 0;
}

.mobile-burger.open span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

.mobile-dropdown {
    display: none;
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--lilac-color);
    z-index: 1000;
    overflow-y: auto;
    flex-direction: column;
}

.mobile-dropdown.open {
    display: flex;
}

.mobile-dropdown-nav {
    flex: 1;
    padding: 15px 0;
}

.mobile-dropdown-link {
    display: block;
    padding: 14px 20px;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease;
}

.mobile-dropdown-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    text-decoration: none;
    color: white;
}

.mobile-dropdown-link:last-child {
    border-bottom: none;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (min-width: 769px) {
    .mobile-header-container {
        display: none;
    }

    #leftmenu {
        display: flex;
    }
}

@media (max-width: 768px) {
    .mobile-header-container {
        display: block;
    }

    #leftmenu {
        display: none;
    }

    .mobile-dropdown {
        top: 65px;
    }
}

/* Планшетная версия (769px - 992px) */
@media (min-width: 769px) and (max-width: 992px) {
    .sidebar-logo img {
        width: 120px;
        height: 120px;
    }

    .sidebar-name {
        font-size: 1rem;
    }

    .sidebar-profession {
        font-size: 0.7rem;
    }

    .sidebar-link {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .mobile-logo {
        width: 18%;
    }

    .mobile-site-name {
        font-size: 0.85rem;
    }

    .mobile-site-desc {
        font-size: 0.55rem;
    }

    .mobile-burger {
        width: 25px;
        height: 20px;
    }

    .sidebar-logo img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 380px) {
    .mobile-logo {
        width: 15%;
    }

    .mobile-site-name {
        font-size: 0.75rem;
    }

    .mobile-site-desc {
        font-size: 0.5rem;
    }
}
