
.navbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-shell {
    max-width: 1000px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-brand-logo-link,
.nav-brand-name {
    display: none;
}

.nav-brand-logo-link img {
    height: 42px;
    width: auto;
    display: block;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #7b1e2b 0%, #5a1520 100%);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(123, 30, 43, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(123, 30, 43, 0.45);
}

.hamburger-box {
    display: block;
    width: 22px;
    height: 16px;
    position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    display: block;
    position: absolute;
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s ease, top 0.3s ease, opacity 0.2s ease;
}

.hamburger-inner {
    top: 7px;
}

.hamburger-inner::before {
    content: "";
    top: -7px;
}

.hamburger-inner::after {
    content: "";
    top: 7px;
}

.nav-toggle[aria-expanded="true"] .hamburger-inner {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger-inner::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger-inner::after {
    top: 0;
    transform: rotate(-45deg);
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-backdrop {
    display: none;
}

.nav-drawer {
    display: contents;
}

.nav-drawer-label {
    display: none;
}

.nav-close {
    display: none;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.nav-list a {
    text-decoration: none;
    color: #000;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-list a:hover {
    color: #7b1e2b;
}

.nav-list a.active {
    color: #7b1e2b;
    font-weight: 700;
}

.nav-num {
    display: none;
}

.nav-logo {
    display: none;
}

@media (min-width: 1047px) {
    .nav-num {
        display: none;
    }

    .nav-shell {
        padding: 14px 20px;
    }

    .nav-menu {
        gap: 32px;
    }

    .nav-logo {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        margin-left: -50px;
        text-decoration: none;
        line-height: 0;
    }

    .nav-logo img {
        height: 60px;
        width: auto;
        display: block;
    }

    .nav-list {
        gap: 8px;
        flex-wrap: wrap;
    }

    .nav-list a {
        display: inline-block;
        padding: 9px 18px;
        border: 2px solid #7b1e2b;
        border-radius: 4px;
        background: #ffffff;
        color: #7b1e2b;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.2;
        transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
    }

    .nav-list a:hover {
        background: #f6e9eb;
        color: #7b1e2b;
        box-shadow: 0 3px 10px rgba(123, 30, 43, 0.18);
        transform: translateY(-1px);
    }

    .nav-list a.active {
        background: linear-gradient(135deg, #7b1e2b 0%, #5a1520 100%);
        border-color: #5a1520;
        color: #ffffff;
        font-weight: 700;
        box-shadow: 0 4px 14px rgba(123, 30, 43, 0.35);
    }

    .nav-list a.active:hover {
        background: linear-gradient(135deg, #8b2433 0%, #6a1a28 100%);
        color: #ffffff;
        transform: translateY(-1px);
    }
}

body.nav-open {
    overflow: hidden;
}

@media (max-width: 1046px) {
    .nav-shell {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        column-gap: 10px;
    }

    .nav-brand-logo-link {
        display: flex;
        grid-column: 1;
        grid-row: 1;
        align-items: center;
        line-height: 0;
        text-decoration: none;
    }

    .nav-brand-name {
        display: block;
        grid-column: 2;
        grid-row: 1;
        text-align: center;
        justify-self: center;
        font-weight: 800;
        font-size: 17px;
        color: #7b1e2b;
        letter-spacing: 0.02em;
        text-decoration: none;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        min-width: 0;
    }

    .nav-toggle {
        display: inline-flex;
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
    }

    .nav-menu > .nav-logo {
        display: none !important;
    }

    .nav-menu {
        position: fixed;
        inset: 0;
        z-index: 1001;
        display: block;
        visibility: hidden;
        pointer-events: none;
    }

    .nav-menu.is-open {
        visibility: visible;
        pointer-events: auto;
    }

    .nav-backdrop {
        display: block;
        position: absolute;
        inset: 0;
        background: rgba(20, 10, 12, 0.55);
        backdrop-filter: blur(4px);
        opacity: 0;
        transition: opacity 0.35s ease;
    }

    .nav-menu.is-open .nav-backdrop {
        opacity: 1;
    }

    .nav-drawer {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 0;
        right: 0;
        width: min(320px, 88vw);
        height: 100%;
        background: #ffffff;
        box-shadow: -12px 0 40px rgba(0, 0, 0, 0.2);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
        overflow-y: auto;
    }

    .nav-menu.is-open .nav-drawer {
        transform: translateX(0);
    }

    .nav-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
        padding: 22px 22px 18px;
        background: linear-gradient(135deg, #7b1e2b 0%, #5a1520 100%);
        color: #ffffff;
    }

    .nav-drawer-label {
        display: block;
        margin: 0;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        opacity: 0.9;
    }

    .nav-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border: 2px solid rgba(255, 255, 255, 0.5);
        border-radius: 50%;
        background: transparent;
        color: #ffffff;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
        transition: background 0.2s ease, transform 0.2s ease;
    }

    .nav-close:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: rotate(90deg);
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 6px 16px 28px;
        background: #ffffff;
        flex: 1;
    }

    .nav-list li {
        opacity: 0;
        transform: translateX(24px);
        transition: opacity 0.35s ease, transform 0.35s ease;
    }

    .nav-menu.is-open .nav-list li {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-menu.is-open .nav-list li:nth-child(1) { transition-delay: 0.05s; }
    .nav-menu.is-open .nav-list li:nth-child(2) { transition-delay: 0.1s; }
    .nav-menu.is-open .nav-list li:nth-child(3) { transition-delay: 0.15s; }
    .nav-menu.is-open .nav-list li:nth-child(4) { transition-delay: 0.2s; }
    .nav-menu.is-open .nav-list li:nth-child(5) { transition-delay: 0.25s; }
    .nav-menu.is-open .nav-list li:nth-child(6) { transition-delay: 0.3s; }
    .nav-menu.is-open .nav-list li:nth-child(7) { transition-delay: 0.35s; }

    .nav-list a {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 16px 14px;
        font-size: 17px;
        font-weight: 600;
        border-radius: 12px;
        border-left: 4px solid transparent;
        transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
    }

    .nav-num {
        display: inline-block;
        min-width: 28px;
        font-size: 12px;
        font-weight: 800;
        color: #7b1e2b;
        opacity: 0.65;
    }

    .nav-list a:hover,
    .nav-list a.active {
        background: #f6e9eb;
        border-left-color: #7b1e2b;
        padding-left: 18px;
        color: #7b1e2b;
    }

    .nav-list a.active .nav-num {
        opacity: 1;
    }
}
