/**
 * Шапка блога Larson.
 * Самодостаточный CSS — не зависит от стилей основного сайта.
 *
 * Структура:
 *   Desktop: [меню]    [логотип]    [контакты]
 *   Mobile:  [бургер]  [логотип]    [телефон]    +  всплывающая панель (меню + контакты)
 */

/* === Шапка контейнер === */
.lb-header {
    position: relative;
    background: #1e1e1e;
    color: #fff;
    z-index: 5;
}
/* Используется вместе с .lb-wrap (макс. ширина и боковой padding оттуда). */
.lb-header__inner {
    padding-top: 1rem;
    padding-bottom: 1rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
}

/* === Меню (desktop) === */
.lb-header__nav.menu {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    align-items: center;
    justify-content: flex-start;
}
.lb-header .menu__link {
    text-decoration: none;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.2;
    transition: opacity .15s ease;
}
.lb-header .menu__link:hover { opacity: .65; }

/* === Логотип === */
.lb-header__logo.logo {
    display: flex;
    justify-content: center;
}
.lb-header__logo a {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}
.logo__image {
    width: auto;
    height: 56px;
    max-width: 220px;
    display: block;
}

/* === Контакты (desktop) === */
.lb-header__contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .25rem;
    font-size: 0.875rem;
    line-height: 1.3;
    text-align: right;
}
.lb-header .lb-header__address {
    color: rgba(255, 255, 255, .7);
}
.lb-header .lb-header__phone {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
}
.lb-header .lb-header__phone:hover { opacity: .8; }

/* === Бургер (только мобила) === */
.menu-switcher {
    display: none;
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 12;
    line-height: 0;
}
.menu-switcher svg { display: block; }
.menu-switcher__checkbox { display: none; }

/* === Мобильная всплывающая панель === */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 88vw);
    height: 100vh;
    background: #fff;
    box-shadow: 4px 0 24px rgba(0, 0, 0, .08);
    z-index: 20;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .3s ease-in-out;
}
.menu-switcher__checkbox:checked ~ .mobile-menu {
    transform: translateX(0);
}
.mobile-menu__close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    cursor: pointer;
    line-height: 0;
}
.mobile-menu__close svg { display: block; }

.mobile-menu__list {
    list-style: none;
    margin: 0;
    padding: 6rem 0 0;
}
.mobile-menu__list-item {
    border-top: 1px solid #e5e7eb;
}
.mobile-menu__list-item:first-child {
    border-top: 0;
}
.mobile-menu .mobile-menu__link {
    display: block;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: #161616;
    font-size: 1.25rem;
    font-weight: 500;
}
.mobile-menu .mobile-menu__link:hover { background: #f5f5f5; }

/* Контакты в мобильной панели */
.mobile-menu__contacts {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.mobile-menu .mobile-menu__address {
    color: #4b5563;
    line-height: 1.4;
}
.mobile-menu .mobile-menu__phone {
    color: #161616;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
}

/* === Кнопка телефона (только мобила) === */
.phone-link {
    display: none;
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    z-index: 12;
    line-height: 0;
}
.phone-link svg { display: block; }

/* === Адаптив < 768px === */
@media (max-width: 767px) {
    .lb-header .lb-header__inner {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 1rem 4rem;
        min-height: 64px;
    }
    .lb-header .lb-header__nav,
    .lb-header .lb-header__nav.menu,
    .lb-header .lb-header__contacts {
        display: none;
    }
    .lb-header .menu-switcher {
        display: inline-block;
    }
    .phone-link {
        display: inline-block;
    }
    .mobile-menu {
        display: block;
    }
    .logo__image {
        height: 44px;
    }
}
