/* Стили для хедера сайта Ощадбанка */

/* Основные переменные для цветовой схемы */
:root {
    --primary-blue: #0066cc;
    --secondary-blue: #004499;
    --light-blue: #e6f3ff;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-medium: #cccccc;
    --gray-dark: #333333;
    --text-primary: #333333;
    --text-secondary: #666666;
}

/* Основные стили для хедера */
.site-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 102, 204, 0.1);
    position: relative;
    z-index: 1000;
}

/* Верхняя информационная панель */
.header-top {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 0;
    font-size: 14px;
}

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

.header-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-contacts {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Основная часть хедера */
.header-main {
    padding: 15px 0;
}

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

/* Логотип */
.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--white);
}

.header-logo img {
    height: 50px;
    width: auto;
    margin-right: 15px;
}

.header-logo-text {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

/* Навигационное меню */
.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: block;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Выпадающие подменю */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 250px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    list-style: none;
}

.dropdown-link {
    display: block;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--gray-light);
}

.dropdown-link:hover {
    background-color: var(--light-blue);
    color: var(--primary-blue);
    padding-left: 25px;
}

.dropdown-item:last-child .dropdown-link {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.dropdown-item:first-child .dropdown-link {
    border-radius: 8px 8px 0 0;
}

/* Кнопки действий */
.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-btn {
    padding: 10px 20px;
    border: 2px solid var(--white);
    background: transparent;
    color: var(--white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header-btn:hover {
    background: var(--white);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.header-btn-primary {
    background: var(--white);
    color: var(--primary-blue);
    border-color: var(--white);
}

.header-btn-primary:hover {
    background: transparent;
    color: var(--white);
}

/* Иконки */
.header-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Мобильное меню */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

/* Поиск в хедере */
.header-search {
    position: relative;
    margin-right: 20px;
}

.search-input {
    padding: 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 14px;
    width: 200px;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--white);
    width: 250px;
}

/* Языковой переключатель */
.language-switcher {
    display: flex;
    gap: 5px;
}

.lang-btn {
    padding: 5px 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover,
.lang-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--white);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .header-content {
        padding: 0 15px;
    }
    
    .nav-menu {
        gap: 20px;
    }
    
    .search-input {
        width: 150px;
    }
    
    .search-input:focus {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .header-top {
        display: none;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .header-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .header-search {
        margin-right: 10px;
    }
    
    .search-input {
        width: 120px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .header-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .header-main {
        padding: 10px 0;
    }
    
    .header-logo-text {
        font-size: 18px;
    }
    
    .header-logo img {
        height: 35px;
        margin-right: 10px;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-blue);
        flex-direction: column;
        padding: 20px;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
        margin-top: 10px;
    }
    
    .dropdown-link {
        color: var(--white);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .dropdown-link:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--white);
    }
    
    .header-search {
        order: 2;
        margin-right: 0;
    }
    
    .search-input {
        width: 100px;
    }
}

/* Анимации */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-header {
    animation: fadeInDown 0.6s ease-out;
}

/* Дополнительные стили для интерактивности */
.nav-link,
.header-btn,
.search-input,
.lang-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Фокус для доступности */
.nav-link:focus,
.header-btn:focus,
.search-input:focus,
.lang-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Улучшенные эффекты наведения */
.nav-item::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--white);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-item:hover::before {
    width: 80%;
}

.nav-item.active::before {
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
}
