/* language-switcher.css */
/* Стили для контейнера переключателя языков */

.language-switcher-container {
    position: relative;
    width: 100%;
}

.language-switcher {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 5px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: calc(100% - 24px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Базовые стили кнопок */
.lang-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 14px;
    background-color: rgba(255, 255, 255, 0.85);
    color: #3a5a80;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-width: 38px;
    text-align: center;
    font-family: 'Segoe UI', Roboto, sans-serif;
    line-height: 1.3;
    white-space: nowrap;
}

/* Состояния кнопок */
.lang-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    background-color: white;
}

.lang-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.lang-btn:focus {
    outline: 2px solid rgba(74, 111, 165, 0.5);
}

/* Цветовые акценты для разных языков */
.lang-btn[data-lang="ru"] {
    background-color: rgba(255, 255, 255, 0.9);
}

.lang-btn[data-lang="en"] {
    background-color: rgba(240, 248, 255, 0.9);
}

.lang-btn[data-lang="tr"] {
    background-color: rgba(255, 248, 240, 0.9);
}

/* Стиль активной кнопки */
.lang-btn.active {
    background-color: #4a6fa5;
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Гарантированные отступы для header */
.header-with-language-switcher {
    padding-top: 50px !important;
}

.header-with-language-switcher h1 {
    margin-top: 15px !important;
    padding: 0 20px !important;
}

/* Адаптация для планшетов */
@media (max-width: 768px) {
    .language-switcher {
        top: 8px;
        left: 8px;
        gap: 5px;
        padding: 4px;
        border-radius: 16px;
        max-width: calc(100% - 16px);
    }
    
    .lang-btn {
        padding: 4px 10px;
        font-size: 11px;
        min-width: 35px;
        border-radius: 12px;
    }
    
    .header-with-language-switcher {
        padding-top: 45px !important;
    }
}

/* Адаптация для мобильных */
@media (max-width: 480px) {
    .language-switcher {
        top: 6px;
        left: 6px;
        gap: 4px;
        padding: 3px;
        border-radius: 14px;
        background-color: rgba(255, 255, 255, 0.15);
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .lang-btn {
        padding: 3px 8px;
        font-size: 10px;
        min-width: 32px;
        border-radius: 10px;
        margin: 1px;
    }
    
    .header-with-language-switcher {
        padding-top: 40px !important;
    }
    
    .header-with-language-switcher h1 {
        margin-top: 10px !important;
        padding: 0 15px !important;
    }
}

/* Адаптация для маленьких высот */
@media (max-height: 600px) {
    .language-switcher {
        top: 5px;
        padding: 2px;
    }
    
    .lang-btn {
        padding: 2px 6px;
        font-size: 10px;
    }
    
    .header-with-language-switcher {
        padding-top: 35px !important;
    }
}

/* Специальные стили для iOS */
@supports (-webkit-touch-callout: none) {
    .language-switcher {
        backdrop-filter: none;
        background-color: rgba(255, 255, 255, 0.3);
    }
}