/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: #d4d4d4;
    color: #000000;
    min-height: 100vh;
    min-width: 1200px;
}

/* Header - верхняя панель */
.header {
    background-color: #2d2d2d;
    min-height: 80px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    padding: 10px 0;
}

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

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex: 1;
}

.logo-link {
    display: block;
    line-height: 0;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.9;
}

.logo-img {
    display: block;
    height: auto;
    width: auto;
    max-width: 300px;
    max-height: 60px;
    object-fit: contain;
}

.slogan {
    font-size: 0.85rem;
    color: #ffffff;
    font-style: italic;
    font-weight: 400;
}

/* Обновление цветов для светлого фона */
.main-content {
    background-color: #d4d4d4;
}

/* Кнопки входа в header */
.header-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-greeting {
    color: #ffffff;
    font-size: 0.9rem;
    margin-right: 8px;
}

.btn-header-link {
    background-color: #d4d4d4;
    border: 1px solid #b0b0b0;
    color: #000000;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-header-link:hover {
    background-color: #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-header-link:active {
    background-color: #c8c8c8;
}

/* Навигационное меню */
.main-nav {
    background-color: #d4d4d4;
    padding: 12px 0;
    border-bottom: 1px solid #b0b0b0;
}

.nav-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: #000000;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-link:hover {
    color: #2d2d2d;
    text-decoration: underline;
}

/* Flash сообщения */
.flash-messages {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    position: fixed;
    top: 140px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    width: 100%;
    max-width: 600px;
}

.flash-message {
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.flash-success {
    background-color: #00a550;
    color: #ffffff;
}

.flash-error {
    background-color: #d32f2f;
    color: #ffffff;
}

.flash-info {
    background-color: #2196f3;
    color: #ffffff;
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
    line-height: 1;
}

/* Ошибка внутри нового окна входа (оверлей) */
.login-overlay-error {
    margin: 0;
    padding: 12px 36px 12px 14px;
    background-color: #d32f2f;
    color: #fff;
    font-size: 14px;
    border-radius: 4px;
    margin-bottom: 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.login-overlay-error-close {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.9);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.login-overlay-error-close:hover {
    color: #fff;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Основной контент */
.main-content {
    background-color: #d4d4d4;
    min-height: calc(100vh - 140px);
    padding: 20px 0;
    color: #000;
}

.content-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Баннеры с услугами */
.banners-row {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
}

.banner-black {
    flex: 1;
    background-color: #000000;
    border: 3px solid #f4c430;
    border-right: none;
    position: relative;
    padding: 20px;
}

.banner-black::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #f4c430;
}

.banner-black-content {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.banner-blue {
    flex: 1;
    background-color: #87ceeb;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f4c430;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

/* Секция с флагами и кнопкой */
.flags-section {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.flags-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.flag-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    transition: all 0.3s ease;
}

.flag-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.flag-icon {
    width: 60px;
    height: 40px;
    border-radius: 3px;
    border: 1px solid #999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Цвета флагов */
.flag-ru {
    background: linear-gradient(to bottom, #ffffff 33%, #0039a6 33%, #0039a6 66%, #d52b1e 66%);
}

.flag-kz {
    background: linear-gradient(to bottom, #00afca 50%, #fec50c 50%);
}

.flag-tj {
    background: linear-gradient(to bottom, #c8102e 33%, #ffffff 33%, #ffffff 66%, #006600 66%);
}

.flag-kg {
    background: linear-gradient(to bottom, #ff0000 50%, #ffed00 50%);
}

.flag-az {
    background: linear-gradient(to right, #0098c3 33%, #ef0107 33%, #ef0107 66%, #00a651 66%);
}

.flag-label {
    font-size: 0.8rem;
    color: #000000;
    font-weight: 500;
    background-color: #2d2d2d;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 2px;
}

/* Кнопка CTA - УЗНАТЬ ПОДРОБНЕЕ */
.btn-learn-more {
    background-color: #00a550;
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 30px;
    box-shadow: 0 4px 8px rgba(0, 165, 80, 0.3);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-learn-more:hover {
    background-color: #00b85c;
    box-shadow: 0 6px 12px rgba(0, 165, 80, 0.4);
    transform: translateY(-2px);
}

.btn-learn-more:active {
    background-color: #009044;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 165, 80, 0.3);
}

/* Контейнер для GIF изображений */
.gifs-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
}

/* Блок для изображения/GIF в центре */
.image-block {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-wrapper {
    width: 100%;
    max-width: 936px;
    border: 3px solid #00a550;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background-color: #d4d4d4;
}

.center-gif {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-dialog {
    background-color: #e6e6e6;
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #ccc;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    padding: 24px;
}

/* Формы авторизации */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
}

.auth-box {
    background-color: #e6e6e6;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 450px;
}

.auth-title {
    color: #000;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0;
    text-align: left;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    color: #000;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.required-label {
    color: #666;
    font-size: 0.85rem;
    font-weight: 400;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    padding: 12px 16px;
    padding-right: 50px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    color: #000;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.input-icon {
    position: absolute;
    right: 16px;
    color: #666;
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #d32f2f;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    padding: 4px 8px;
}

.password-toggle:hover {
    opacity: 0.8;
}

.eye-icon {
    font-size: 1rem;
}

.forgot-password {
    color: #666;
    font-size: 0.9rem;
    text-decoration: none;
    margin-top: 4px;
}

.forgot-password:hover {
    text-decoration: underline;
}

.checkbox-group {
    margin: 10px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #000;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-text {
    font-size: 0.95rem;
}

.heart-icon {
    color: #d32f2f;
    font-size: 1rem;
}

.form-hint {
    color: #666;
    font-size: 0.85rem;
    margin-top: 4px;
}

.btn-auth {
    background-color: #d32f2f;
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn-auth:hover {
    background-color: #b71c1c;
    box-shadow: 0 4px 8px rgba(211, 47, 47, 0.3);
}

.btn-auth:active {
    background-color: #c62828;
}

.btn-auth:disabled {
    background-color: #999;
    cursor: not-allowed;
}

.lock-icon, .person-icon {
    font-size: 1.1rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    text-align: center;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ccc;
}

.auth-divider span {
    padding: 0 16px;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-alternative {
    margin: 20px 0;
}

.alternative-text {
    color: #000;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.btn-passkey {
    background-color: #8b0000;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-passkey:hover {
    background-color: #6b0000;
}

.auth-register-prompt {
    margin-top: 24px;
    text-align: center;
}

.auth-register-prompt p {
    color: #000;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.btn-register-link {
    background-color: #8b0000;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-register-link:hover {
    background-color: #6b0000;
}

.captcha-wrapper {
    margin-top: 8px;
}

.captcha-placeholder {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.captcha-placeholder input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

.captcha-placeholder label {
    color: #000;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.captcha-brand {
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 8px;
}

.captcha-links {
    margin-top: 8px;
}

.captcha-links a {
    color: #666;
    font-size: 0.85rem;
    text-decoration: none;
}

.captcha-links a:hover {
    text-decoration: underline;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
}

.auth-links p {
    color: #000;
    font-size: 0.9rem;
}

.auth-link {
    color: #d32f2f;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #b71c1c;
    text-decoration: underline;
}

/* Адаптивность для очень больших экранов */
@media (min-width: 1600px) {
    .header-container,
    .nav-container,
    .content-container {
        max-width: 1600px;
    }
}

/* Доп. стили футера (видео и кнопка Наверх) — дополнение к second/footer.css */
.footer-video-wrap {
    margin: 0 auto 2px;
    text-align: center;
}
.footer-video {
    max-width: 100%;
    width: 936px;
    border: none;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    height: auto;
}
.footer-video-main { width: 936px; max-width: 100%; }
.p-footer-row-opposite {
    display: flex;
    align-items: center;
    gap: 10px;
}
.p-footer-scrollTop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(48, 48, 48, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.8);
    color: #303030;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.p-footer-scrollTop:hover {
    background: #fff;
    border-color: #303030;
}
