:root {
    --background: #2D3748;
    --foreground: #ffffff;
    --primary: #4299E1;
    --primary-foreground: #ffffff;
    --secondary: #63B3ED;
    --accent: #4299E1;
    --border: #4A5568;
    --muted: #374151;
    --radius: 0.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Глобальный стек шрифтов */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.header {
    background-color: var(--background, #2D3748);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--foreground, #ffffff);
    text-decoration: none;
    font-family: inherit;
    flex-shrink: 0;
}

.logo-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    min-height: 40px;
    background: linear-gradient(135deg, #D69E2E, #B7791F);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px !important;
    flex: 0 0 40px !important;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    min-width: 120px;
    flex-shrink: 0;
}

.logo-title {
    display: block;
    font-weight: 700;
    font-size: clamp(18px, 4vw, 24px);
    letter-spacing: 0.2px;
    color: var(--foreground, #ffffff);
    white-space: nowrap;
}

.logo-tagline {
    display: block;
    margin-top: 5px;
    font-size: clamp(10px, 3vw, 14px);
    font-style: italic;
    font-weight: 400;
    color: rgba(255, 255, 255, 1);
    opacity: 0.95;
    white-space: normal;
}

.nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
    padding-top: 20px;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-weight: 500;
    color: var(--foreground, #ffffff);
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary, #4299E1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent, #4299E1);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.cta-button {
    background-color: #4299E1;
    color: #ffffff;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius, 0.5rem);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Добавлен плавный ховер для кнопки "Связаться" везде */
.cta-button:hover {
    background-color: #49d79e;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(167, 195, 176, 0.3);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 4px;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--foreground, #ffffff);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Плавное открытие/закрытие мобильного меню */
.mobile-menu {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--muted, #374151);
    border-top: 1px solid var(--border, #4A5568);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 999;
}

.mobile-menu.active {
    max-height: 600px;
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-menu {
    list-style: none;
    padding: 20px;
}

.mobile-nav-item {
    margin-bottom: 16px;
}

.mobile-nav-link {
    color: var(--foreground, #ffffff);
    text-decoration: none;
    font-weight: 500;
    padding: 12px 0;
    display: block;
    border-bottom: 1px solid var(--border, #4A5568);
}

.mobile-cta {
    margin: 20px;
}

/* Мобильные стили */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-container {
        padding: 0 16px;
    }

    .logo {
        gap: 10px;
    }

    .logo-title {
        font-size: clamp(18px, 5vw, 20px);
        white-space: nowrap;
    }

    .logo-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 16px !important;
        flex: 0 0 28px !important;
        min-width: 28px;
        min-height: 28px;
        flex-shrink: 0;
    }
}

/* Очень узкие экраны — горизонтальный логотип с отступом */
@media (max-width: 480px) {
    .logo {
        flex-direction: row;
        /* горизонтально */
        align-items: center;
        gap: 16px;
        /* отступ между иконкой и текстом */
    }

    .logo-text {
        flex-direction: column;
        min-width: auto;
        margin-left: 12px;
        /* дополнительный отступ слева */
        flex-shrink: 0;
    }

    .logo-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
        flex: 0 0 36px !important;
    }

    .logo-title {
        font-size: 20px !important;
    }
}