* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

#header {
    position: sticky;
    top: 0;
    width: 100%;
    background: #1a1a1a;
    color: #fff;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#header .container {
    width: 100%;
    max-width: 1200px;
    min-height: 76px;
    margin: 0 auto;
    padding: 0.65rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.header-brand {
    flex: 0 0 auto;
}

.header-brand a {
    display: flex;
    align-items: center;

    min-width: 48px;
    min-height: 48px;
}

.header-brand img {
    width: 50px;
    height: 50px;
    display: block;
    object-fit: contain;
    border-radius: 4px;
}

.logo {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;

    line-height: 1.15;
}

.logo a {
    color: #f9d803;
    text-decoration: none;
    font-size: clamp(1.35rem, 4vw, 1.8rem);
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo a:nth-child(2) {
    color: #e8f903;
    font-size: clamp(1.25rem, 3.5vw, 1.4rem);
    font-weight: 600;
    line-height: 1.2;
    margin-left: 0.5rem;
}

.logo a:nth-child(3) {
    color: #ffffff;
    font-size: clamp(1.1rem, 3.3vw, 1.2rem);
    font-weight: 700;
    line-height: 1.2;
}

#nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #1a1a1a;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    z-index: 998;
}

#nav.open {
    max-height: 320px;
}

#nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.75rem;
}

#nav ul li {
    width: 100%;
}

#nav ul li a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 0.8rem 0.75rem;
    color: #fff;
    text-decoration: none;
    font-size: 1.12rem;
    font-weight: 600;
    border-radius: 5px;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

#nav ul li a:hover {
    background: #2b2b2b;
    color: #e8f903;
}

#nav ul li a:focus-visible {
    outline: 3px solid #e8f903;
    outline-offset: 2px;
}

.header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f30000;
    color: #ffffff;
    min-height: 44px;
    padding: 0.55rem 0.7rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: clamp(0.92rem, 3vw, 1.2rem);
    font-weight: 700;
    white-space: nowrap;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.call-btn:hover {
    background: #c90000;
}

.call-btn:focus-visible {
    outline: 3px solid #e8f903;
    outline-offset: 3px;
}

.call-btn:active {
    transform: scale(0.97);
}

#menu-toggle {
    width: 42px;
    height: 42px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 0;
    cursor: pointer;
    border-radius: 5px;
}

#menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

#menu-toggle:hover {
    background: #2b2b2b;
}

#menu-toggle:focus-visible {
    outline: 3px solid #e8f903;
    outline-offset: 2px;
}


@media (max-width: 380px) {
    #header .container {
        min-height: 72px;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        gap: 0.35rem;
    }
    .header-brand img {
        width: 64px;
        height: 64px;
    }
    .header-brand a {
        min-width: 54px;
        min-height: 54px;
    }
    .logo a {
        font-size: 1.4rem;
    }
    .logo a:nth-child(2) {
        font-size: 1.1rem;
    }
    .logo a:nth-child(3) {
        font-size: 1.2rem;
    }
    .call-btn {
        min-height: 42px;
        padding: 0.5rem 0.8rem;
        font-size: 1rem;
    }
    #menu-toggle {
        width: 48px;
        height: 48px;
    }
    #menu-toggle span {
        width: 22px;
        height: 2.5px;
    }
}

@media (min-width: 480px) {
    #header .container {
        min-height: 80px;
        padding: 1rem 1.5rem;
        gap: 0.7rem;
    }
    .header-brand img {
        width: 63px;
        height: 63px;
    }
    .header-brand a {
        min-width: 63px;
        min-height: 63px;
    }
    .call-btn {
        min-height: 45px;
        padding: 0.6rem 1rem;
    }
    #menu-toggle {
        width: 42px;
        height: 42px;
    }
}

@media (min-width: 600px) {
    #header .container {
        min-height: 84px;
        padding: 0.9rem 1.2rem;
        gap: 0.85rem;
    }
    .header-brand img {
        width: 68px;
        height: 68px;
    }
    .header-brand a {
        min-width: 68px;
        min-height: 68px;
    }
    .logo a {
        font-size: clamp(1.5rem, 3.5vw, 1.8rem);
    }
    .logo a:nth-child(2) {
        font-size: clamp(1.2rem, 2.5vw, 1.35rem);
    }
    .logo a:nth-child(3) {
        font-size: clamp(1.15rem, 2.3vw, 1.25rem);
    }
    .call-btn {
        min-height: 46px;
        padding: 0.6rem 1.2rem;
        font-size: 1.2rem;
    }
    #menu-toggle {
        width: 42px;
        height: 42px;
    }
    #menu-toggle span {
        width: 26px;
    }
}

@media (min-width: 900px) {
    #header .container {
        min-height: 92px;
        padding: 0.75rem 1.3rem;
        gap: 1rem;
    }
    .header-brand img {
        width: 74px;
        height: 74px;
    }
    .header-brand a {
        min-width: 74px;
        min-height: 74px;
    }
    .logo {
        flex: 0 1 300px;
    }
    .logo a {
        font-size: clamp(1.4rem, 1.8vw, 1.75rem);
    }
    .logo a:nth-child(2) {
        font-size: clamp(1.1rem, 1.3vw, 1.2rem);
    }
    .logo a:nth-child(3) {
        font-size: clamp(1.2rem, 1.4vw, 1.3rem);
    }
    #nav {
        position: static;
        width: auto;
        max-height: none;
        overflow: visible;
        margin-left: auto;
    }
    #nav ul {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding: 0;
    }
    #nav ul li {
        width: auto;
    }
    #nav ul li a {
        width: auto;
        min-height: 44px;
        padding: 0.5rem 0.55rem;
        font-size: clamp(1.15rem, 1.7vw, 1.3rem);
        white-space: nowrap;
    }
    .header-actions {
        gap: 0.6rem;
    }
    .call-btn {
        min-height: 46px;
        padding: 0.65rem 1rem;
        font-size: clamp(1.2rem, 1.5vw, 1.32rem);
    }
    #menu-toggle {
        display: none;
    }
}

@media (min-width: 1100px) {
    #header .container {
        gap: 1.25rem;
    }
    .header-brand img {
        width: 68px;
        height: 68px;
    }
    .header-brand a {
        min-width: 68px;
        min-height: 68px;
    }
    .logo {
        flex-basis: 310px;
    }
    .logo a {
        font-size: 1.65rem;
    }
    .logo a:nth-child(2),
    .logo a:nth-child(3) {
        font-size: 1.2rem;
    }
    #nav ul {
        gap: 1.5rem;
    }
    #nav ul li a {
        font-size: 1.22rem;
    }
    .call-btn {
        min-height: 48px;
        padding: 0.7rem 1.05rem;
        font-size: 1.22rem;
    }
}

@media (min-width: 1300px) {
    #header .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .logo {
        flex-basis: 320px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    #nav,
    #menu-toggle span,
    .call-btn {
        transition: none;
    }
}