/* Header styles */
@import url('https://fonts.googleapis.com/css2?family=Gilroy:wght@400;500;600;700&display=swap');

.header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1280px;
    max-width: 90%;
    height: 76px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(255, 255, 255, 0.15) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 60px;
    margin: 12px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logo */
.header-logo {
    font-family: 'Unbounded', sans-serif;
    font-size: 24px;
    font-weight: 500;
    color: #191925;
    text-decoration: none;
}

.header-logo .ai-text {
    color: #145BDE;
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.header-nav a {
    font-family: 'Gilroy', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #191925;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 8px 16px;
    border-radius: 10px;
    overflow: hidden;
}

.header-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.1) 0%, 
        rgba(59, 130, 246, 0.05) 100%);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.header-nav a:hover {
    color: #145BDE;
    transform: translateY(-1px);
}

.header-nav a:hover::before {
    opacity: 1;
}

.header-nav a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 4px;
    left: 50%;
    background: linear-gradient(90deg, #2563EB, #3B82F6);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    opacity: 0;
}

.header-nav a:hover:after {
    width: calc(100% - 32px);
    opacity: 1;
}

/* Header hover effect */
.header:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.35) 0%, 
        rgba(255, 255, 255, 0.25) 50%, 
        rgba(255, 255, 255, 0.2) 100%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 6px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Contact button */
.header-contact-btn {
    background: linear-gradient(135deg, #2563EB 0%, #145BDE 100%);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Gilroy', sans-serif;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 16px rgba(37, 99, 235, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.header-contact-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.header-contact-btn:hover {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(37, 99, 235, 0.4),
        0 4px 12px rgba(37, 99, 235, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.header-contact-btn:hover::before {
    left: 100%;
}

.header-contact-btn:active {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 16px rgba(37, 99, 235, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Адаптивность для экранов от 1440px - выравнивание по направляющим */
@media (min-width: 1440px) {
    .header {
        width: calc(100vw - 240px); /* Ширина между направляющими (120px слева + 120px справа) */
        max-width: calc(100vw - 240px);
        padding: 0 60px; /* Внутренние отступы */
        left: 120px; /* Позиционирование от левой направляющей */
        transform: translateX(0); /* Убираем центрирование */
    }
}

/* Адаптивность для экранов до 1386px */
@media (max-width: 1386px) {
    .header {
        padding: 0 50px;
        width: 92%;
    }
    
    .header-nav {
        gap: 38px;
    }
    
    .header-nav a {
        font-size: 17px;
        padding: 8px 14px;
        white-space: nowrap;
    }
    
    .header-contact-btn {
        padding: 11px 22px;
        font-size: 17px;
    }
}

/* Адаптивность для экранов до 1320px */
@media (max-width: 1320px) {
    .header {
        padding: 0 45px;
        width: 94%;
    }
    
    .header-nav {
        gap: 35px;
    }
    
    .header-nav a {
        font-size: 17px;
        padding: 7px 12px;
        white-space: nowrap;
    }
    
    .header-contact-btn {
        padding: 11px 20px;
        font-size: 17px;
    }
}

/* Адаптивность для экранов до 1280px */
@media (max-width: 1280px) {
    .header {
        padding: 0 40px;
        width: 95%;
        height: 70px;
    }
    
    .header-logo {
        font-size: 22px;
    }
    
    .header-nav {
        gap: 28px;
    }
    
    .header-nav a {
        font-size: 16px;
        padding: 6px 10px;
        white-space: nowrap;
    }
    
    .header-contact-btn {
        padding: 10px 18px;
        font-size: 16px;
        white-space: nowrap;
    }
}

/* Промежуточный брейкпоинт для больших планшетов */
@media (max-width: 1200px) {
    .header {
        padding: 0 35px;
        width: 96%;
        height: 68px;
    }
    
    .header-logo {
        font-size: 21px;
    }
    
    .header-nav {
        gap: 24px;
    }
    
    .header-nav a {
        font-size: 15px;
        padding: 6px 8px;
    }
    
    .header-contact-btn {
        padding: 9px 16px;
        font-size: 15px;
    }
}

/* Промежуточный брейкпоинт для средних экранов */
@media (max-width: 1150px) {
    .header {
        padding: 0 30px;
        width: 97%;
        height: 66px;
    }
    
    .header-logo {
        font-size: 20px;
    }
    
    .header-nav {
        gap: 20px;
    }
    
    .header-nav a {
        font-size: 14px;
        padding: 5px 6px;
        white-space: nowrap;
    }
    
    .header-contact-btn {
        padding: 8px 14px;
        font-size: 14px;
    }
}

/* Адаптивность для планшетов 1024px - бургерное меню */
@media (max-width: 1024px) {
    .header {
        padding: 0 40px;
        width: 95%;
        height: 70px;
    }
    
    .header-logo {
        font-size: 22px;
        order: 1;
    }
    
    .header-nav {
        display: none !important;
    }
    
    .burger-menu {
        display: flex !important;
        order: 2;
        margin-left: auto;
        margin-right: 16px;
    }
    
    .mobile-menu {
        display: block !important;
    }
    
    .header-contact-btn {
        padding: 10px 20px;
        font-size: 16px;
        order: 3;
    }
}



/* Burger menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    position: relative;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.burger-menu:hover {
    background: rgba(20, 91, 222, 0.1);
}

.burger-line {
    width: 24px;
    height: 2px;
    background: linear-gradient(90deg, #2563EB, #3B82F6);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.burger-line:nth-child(1) {
    margin-bottom: 5px;
}

.burger-line:nth-child(2) {
    margin-bottom: 5px;
}

.burger-menu.menu-open .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-menu.menu-open .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.menu-open .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: none;
    z-index: 999;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.menu-open {
    pointer-events: auto;
}

.mobile-menu-content {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 280px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(255, 255, 255, 0.15) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 24px 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 32px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateX(100%) scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.menu-open .mobile-menu-content {
    transform: translateX(0) scale(1);
    opacity: 1;
}

.mobile-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: #191925;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-close-btn:hover {
    background: rgba(25, 25, 37, 0.1);
    color: #145BDE;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 40px 0 24px 0;
}

.mobile-nav-link {
    font-family: 'Gilroy', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #191925;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 10px;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.1) 0%, 
        rgba(59, 130, 246, 0.05) 100%);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.mobile-nav-link:hover::before {
    opacity: 1;
}

.mobile-nav-link:hover {
    color: #145BDE;
}

.mobile-contact-btn {
    background: linear-gradient(135deg, #2563EB 0%, #145BDE 100%);
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Gilroy', sans-serif;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: block;
    text-align: center;
    margin-top: 8px;
    box-shadow: 
        0 4px 12px rgba(37, 99, 235, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.mobile-contact-btn:hover {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 16px rgba(37, 99, 235, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Адаптивность мобильного меню для планшетов */
@media (max-width: 1024px) and (min-width: 769px) {
    .mobile-menu {
        width: 320px;
    }
    
    .mobile-menu-content {
        width: 320px;
        top: 15px;
        right: 15px;
        padding: 28px 24px;
    }
    
    .mobile-nav-link {
        font-size: 17px;
        padding: 14px 18px;
    }
    
    .mobile-contact-btn {
        padding: 14px 24px;
        font-size: 16px;
    }
}

@media (max-width: 768px) and (min-width: 641px) {
    .header {
        left: 50%;
        transform: translateX(-50%);
        width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
        margin: 12px 0;
        padding: 0 20px;
        height: 64px;
        box-sizing: border-box;
    }
    
    .header-logo {
        font-size: 19px;
    }
    
    .header-contact-btn {
        padding: 9px 18px;
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    .header {
        left: 50%;
        transform: translateX(-50%);
        padding: 0 20px;
        width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
        margin: 12px 0;
        height: 64px;
        box-sizing: border-box;
    }
    
    .header-logo {
        font-size: 19px;
    }
    
    .header-contact-btn {
        padding: 9px 18px;
        font-size: 14px;
    }
}

/* Диапазон 375-640px - выравнивание по красным направляющим */
@media (max-width: 640px) and (min-width: 375px) {
    .header {
        left: 16px;
        right: 16px;
        transform: none;
        width: calc(100vw - 32px);
        max-width: calc(100vw - 32px);
        margin: 12px 0;
        padding: 0 16px 0 24px;
        height: 64px;
        box-sizing: border-box;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .header-logo {
        font-size: 18px;
        margin: 0;
        padding: 0;
    }
    
    .header-contact-btn {
        display: none !important;
    }
    
    .burger-menu {
        width: 40px;
        height: 40px;
        margin: 0;
        padding: 0;
        margin-left: auto;
    }
    
    .burger-line {
        width: 20px;
        height: 2px;
    }
    
    .mobile-menu-content {
        width: calc(100vw - 48px);
        max-width: 300px;
        top: 16px;
        right: 16px;
        padding: 24px 20px;
    }
    
    .mobile-nav-link {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    .mobile-contact-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .header {
        left: 50%;
        transform: translateX(-50%);
        padding: 0 16px;
        width: calc(100vw - 32px);
        max-width: calc(100vw - 32px);
        margin: 12px 0;
        height: 60px;
        box-sizing: border-box;
    }
    
    .header-logo {
        font-size: 17px;
    }
    
    .header-contact-btn {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 10px;
    }
    
    .burger-menu {
        width: 36px;
        height: 36px;
    }
    
    .burger-line {
        width: 18px;
        height: 2px;
    }
    
    .mobile-menu-content {
        width: 260px;
        top: 12px;
        right: 12px;
        padding: 20px 16px;
    }
    
    .mobile-nav-link {
        font-size: 15px;
        padding: 12px 14px;
    }
    
    .mobile-contact-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
}

/* Дополнительные медиа-запросы для очень маленьких экранов */
@media (max-width: 360px) {
    .header {
        left: 50%;
        transform: translateX(-50%);
        padding: 0 12px;
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        margin: 12px 0;
        height: 56px;
        box-sizing: border-box;
    }
    
    .header-logo {
        font-size: 16px;
    }
    
    .header-contact-btn {
        padding: 7px 12px;
        font-size: 12px;
    }
    
    .mobile-menu-content {
        width: 240px;
        top: 10px;
        right: 10px;
        padding: 18px 14px;
    }
    
    .mobile-nav-link {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .mobile-contact-btn {
        padding: 9px 16px;
        font-size: 13px;
    }
} 
