@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'El Messiri', sans-serif;
    color: #0b2585;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    /* Убедитесь, что путь к картинке фона правильный */
    background-image: url('../assets/bd.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

input, button {
    font-family: inherit;
}

/* --- HEADER --- */
header {
    position: relative;
    display: flex;
    align-items: center;
    padding-top: 40px;
    width: 100%;
    height: 80px;
    z-index: 20;
    justify-content: flex-start;
}

.header-line-left {
    height: 1px;
    background: rgba(255, 255, 255, 0.6);
    width: 285px;
    flex-shrink: 0;
}

.logo-container {
    margin-left: -30px;
    margin-right: 0;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.logo-circle {
    width: 60px;
    height: 60px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 500;
    color: #0b2585;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.header-nav {
    display: flex;
    align-items: center;
    flex-grow: 0;
    padding-right: 0;
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: #0b2585;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.nav-link.brand {
    text-transform: uppercase;
    margin-left: 62px;
}

.nav-link.center {
    text-transform: uppercase;
    margin-left: 81px;
}

.nav-link.account {
    margin-left: 241px;
}

.burger-menu, .mobile-menu-popup {
    display: none;
}

/* --- MAIN CONTENT --- */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding-right: 0;
    margin-top: 0;
    min-height: calc(100vh - 300px);
    position: relative;
    z-index: 10;
}

.hero-text {
    margin-bottom: 40px;
}

.subtitle {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: 500;
}

.main-title {
    font-size: 50px;
    font-weight: 700;
    margin: 5px 0 15px 0;
    line-height: 1.1;
}

.description {
    font-size: 23px;
    font-weight: 400;
    color: #3b4d80;
    line-height: 1.4;
}

/* --- FORM --- */
.calculation-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.input-group input {
    width: 227px;
    padding: 15px 25px;
    border-radius: 50px;
    border: none;
    outline: none;
    font-size: 14px;
    color: #333;
    background: #ffffff;
    box-shadow: 0 5px 15px rgba(11, 37, 133, 0.05);
}

.gender-toggle {
    background: #ffffff;
    border-radius: 50px;
    padding: 3px;
    display: flex;
    gap: 5px;
    height: 46px;
    align-items: center;
    box-shadow: 0 5px 15px rgba(11, 37, 133, 0.05);
}

.gender-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ccc;
    font-size: 20px;
    transition: 0.3s;
}

/* --- НОВЫЕ СТИЛИ ВСТАВИТЬ СЮДА --- */

/* Активное состояние для ДЕВУШКИ (Слева - Розовый) */
/* Мы используем селектор атрибута [data-value="female"] */
.gender-btn.active[data-value="female"] {
    background: linear-gradient(135deg, #ff86c9, #ff33a6); /* Нежный розовый градиент */
    color: white;
    /* Добавим легкую розовую тень для красоты */
    box-shadow: 0 4px 10px rgba(255, 51, 166, 0.3);
}

/* Активное состояние для ПАРНЯ (Справа - Голубой) */
/* Мы используем селектор атрибута [data-value="male"] */
.gender-btn.active[data-value="male"] {
    background: linear-gradient(135deg, #4cd4ff, #2b80ff); /* Яркий голубой градиент */
    color: white;
    /* Добавим легкую голубую тень */
    box-shadow: 0 4px 10px rgba(43, 128, 255, 0.3);
}
/* -------------------------------- */

.submit-btn {
    background: #0b2585;
    width: 227px;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0 40px;
    height: 48px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(11, 37, 133, 0.2);
    transition: transform 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
}

/* --- BACKGROUND MATRIX DIAGRAM --- */
.matrix-diagram-container {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    height: 100vh;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    pointer-events: none;
    z-index: 1;
}

.matrix-img {
    height: 100%;
    width: auto;
    transform: translateX(30%);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
}

/* --- FOOTER --- */
footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    z-index: 10;
}

/* Декорации футера (Линия + Круги) */
.footer-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0; /* Высота 0, чтобы не мешать контенту */
    z-index: 1;
}

.footer-line {
    height: 1px;
    background: rgba(255, 255, 255, 0.6);
    
    position: absolute;
    top: 0;
    
    /* ИЗМЕНЕНИЯ ЗДЕСЬ: */
    left: 180px; /* Отступаем радиус кругов (360 / 2 = 180) */
    right: 0;    /* Линия тянется до правого края экрана */
    width: auto; /* Ширина высчитывается автоматически */
}

.circles-left-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 360px; /* Размер кругов */
    height: auto;
    /* Центрируем картинку по вертикали и горизонтали относительно точки 0,0 */
    transform: translate(-50%, -50%);
    opacity: 0.9;
    pointer-events: none;
    z-index: 2;
}

/* Контент футера */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15%;
    height: 100%;
    font-size: 14px;
    color: #0b2585;
    position: relative;
    z-index: 3; /* Контент выше декора */
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.footer-left a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
}

.footer-center {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.brand-name {
    font-weight: 600;
}

.copyright {
    opacity: 0.8;
    font-size: 13px;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-btn {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0b2585;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    
    text-decoration: none; 
}

.social-btn:hover {
    transform: translateY(-3px);
    text-decoration: none;
}

.support-link {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    font-size: 13px;
}
.mobile-btn {
    display: none;
}

@media screen and (max-width: 1200px) {
    .header-line-left {
        width: 50px;
    }
    .nav-link.brand {
        margin-left: 20px;
    }
    .nav-link.center {
        margin-left: 30px;
    }
    .nav-link.account {
        margin-left: 30px;
    }
    .matrix-diagram-container {
        opacity: 0.5;
        transform: translateX(10%);
    }
}

/* --- ВСТАВИТЬ В КОНЕЦ CSS ФАЙЛА --- */
@media screen and (max-width: 900px) {

    /* 1. БАЗА (ЖЕСТКАЯ ФИКСАЦИЯ ЭКРАНА ОТ СДВИГОВ) */
    html, body {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden !important; /* Обрезаем всё, что торчит сбоку */
        margin: 0;
        padding: 0;
        position: relative;
    }

    body {
        /* Основной градиентный фон */
        background-image: url('../assets/bd.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        min-height: 100vh;
    }

    /* --- ФОНОВАЯ КАРТИНКА (ГЕОМЕТРИЯ НА ВЕСЬ ЭКРАН) --- */
    body::before {
        content: "";
        position: absolute;
        top: 0px;
        
        /* Центруем объект, который шире экрана */
        left: 50%; 
        transform: translateX(-50%); 
        
        width: 150%; /* Картинка широкая */
        height: 100%;
        
        background-image: url('../assets/лого на главную(медиа).svg');
        background-repeat: no-repeat;
        /* Позиция: центр горизонтально, 40% от верха */
        background-position: center 40%; 
        background-size: 100% auto; 
        
        z-index: 1; /* Слой над фоном, но под контентом */
        pointer-events: none; 
    }

    /* 2. ШАПКА */
    header {
        padding: 20px 25px;
        justify-content: space-between; align-items: center;
        height: auto; position: relative;
        z-index: 30; 
    }
    .header-nav, .header-line-left, .matrix-diagram-container { display: none !important; }
    .logo-container { margin: 0; z-index: 20; }
    .logo-circle {
        width: 60px; height: 60px; font-size: 28px;
        background: white; color: #0b2585; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    .burger-menu {
        display: block !important; font-size: 32px; color: #ffffff;
        cursor: pointer; z-index: 30;
    }

    /* --- 3. ВСПЛЫВАЮЩЕЕ МЕНЮ (КАРТОЧКА С КРУГАМИ) --- */
    .mobile-menu-popup {
        display: none; 
        
        /* Фиксируем по центру экрана */
        position: fixed; 
        top: 120px; 
        left: 0; right: 0; 
        margin: 0 auto; 
        
        /* Вид карточки */
        width: 280px; 
        background: white; 
        padding: 30px 25px; 
        border-radius: 20px; 
        box-shadow: 0 20px 60px rgba(11, 37, 133, 0.3); 
        
        flex-direction: column; 
        gap: 20px; 
        z-index: 9999; /* Поверх всего */
        
        /* Для кругов на фоне */
        overflow: visible; 
    }

    /* Показываем меню, когда добавлен класс active */
    .mobile-menu-popup.active { display: flex !important; }

    /* ДЕКОР: Внутренний пунктирный круг */
    .mobile-menu-popup::before {
        content: "";
        position: absolute;
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        width: 380px; height: 380px;
        border-radius: 50%;
        border: 1px dashed rgba(255, 255, 255, 0.6);
        z-index: -1; pointer-events: none;
    }
    
    /* ДЕКОР: Внешний пунктирный круг */
    .mobile-menu-popup::after {
        content: "";
        position: absolute;
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        width: 500px; height: 500px;
        border-radius: 50%;
        border: 1px dashed rgba(255, 255, 255, 0.3);
        z-index: -2; pointer-events: none;
    }

    /* --- ССЫЛКИ МЕНЮ (ЗАМЕНА ТЕКСТА) --- */
    .mobile-menu-popup a {
        text-decoration: none; border: none; padding: 0;
        /* Скрываем старый текст из HTML */
        font-size: 0 !important; color: transparent;
        display: flex; align-items: center; gap: 12px;
    }

    /* Звездочка */
    .mobile-menu-popup a::before {
        content: "✦"; 
        font-size: 20px; line-height: 1; visibility: visible;
        background: linear-gradient(135deg, #ffcc80 0%, #ff9a9e 100%);
        -webkit-background-clip: text; -webkit-text-fill-color: transparent;
        color: #ffcc80; 
    }

    /* Новый текст */
    .mobile-menu-popup a::after {
        font-size: 16px; color: #0b2585; font-weight: 600;
        visibility: visible; white-space: nowrap;
    }

    /* Названия пунктов */
    .mobile-menu-popup a:nth-child(1)::after { content: "Матрица Судьбы"; }
    .mobile-menu-popup a:nth-child(2)::after { content: "Прогноз по годам"; }
    .mobile-menu-popup a:nth-child(3)::after { content: "Личный кабинет"; }
    .mobile-menu-popup a:nth-child(4)::after { content: "Публичная оферта"; }
    .mobile-menu-popup a:nth-child(5)::after { content: "Конфиденциальность"; }
    /* Скрываем лишние, если есть */
    .mobile-menu-popup a:nth-child(n+6) { display: none !important; }

    /* 4. КОНТЕНТ */
    .main-content {
        display: block; padding: 0 25px; margin-top: 10px;
        text-align: left; position: relative; z-index: 20; 
    }
    /* Убираем старый блок картинки */
    .main-content::after { display: none !important; }

    .hero-text { margin-bottom: 25px; position: relative; z-index: 5; }
    .subtitle { color: #0b2585; font-size: 16px; display: block; margin-bottom: 5px; }
    .main-title {
        font-size: 36px; line-height: 1.1; color: #0b2585;
        margin-bottom: 15px; text-align: left;
    }
    .main-title::after { content: "\A изучите себя на 100%"; white-space: pre; }
    .description { font-size: 16px; margin-bottom: 30px; max-width: 95%; position: relative; z-index: 5; }

    /* 5. ФОРМА */
    .calculation-form {
        display: flex; flex-wrap: wrap;
        justify-content: space-between; gap: 15px; width: 100%;
        position: relative; z-index: 20; 
    }
    .calculation-form input {
        width: 100%; height: 60px; border-radius: 30px;
        padding-left: 25px; font-size: 16px;
        box-shadow: 0 5px 15px rgba(11, 37, 133, 0.05);
    }
    .calculation-form .input-group:nth-of-type(1) { width: 100%; order: 1; }
    .calculation-form .input-group:nth-of-type(2) { width: 63%; order: 2; }

    .gender-toggle {
        width: 32%; order: 3; height: 60px;
        background: white; border-radius: 30px;
        display: flex; align-items: center; justify-content: center;
        gap: 5px; padding: 5px;
        box-shadow: 0 5px 15px rgba(11, 37, 133, 0.05);
    }
    .gender-btn {
        width: 50px; height: 50px; border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        font-size: 24px; transition: all 0.3s ease;
        color: #ccc; cursor: pointer;
        position: relative;
    }
    .gender-btn.active[data-value="female"] {
        background: #ff6b8b; color: white;
        box-shadow: 0 3px 10px rgba(255, 107, 139, 0.4);
    }
    .gender-btn.active[data-value="male"] {
        background: #4cd4ff; color: white;
        box-shadow: 0 3px 10px rgba(76, 212, 255, 0.4);
    }

    .submit-btn {
        order: 4; width: 100%; height: 65px;
        border-radius: 35px; margin-top: 10px; font-size: 15px;
        box-shadow: 0 10px 20px rgba(0, 35, 149, 0.3);
        background-image: none !important; background-color: #0b2585;
    }
.mobile-btn {
        display: flex; 
        order: 5; 
        width: 100%; 
        height: 65px;
        align-items: center; 
        justify-content: center;
        background-color: #b0b5bd; 
        color: white;
        border-radius: 35px; 
        font-weight: 700; 
        font-size: 14px; 
        text-transform: uppercase;
        box-shadow: 0 10px 20px rgba(176, 181, 189, 0.3);
        margin-top: 0; 
        border: none; /* Убираем стандартную рамку кнопки */
        cursor: pointer;
    }
    

    /* 6. ФУТЕР */
    footer {
        display: flex !important; flex-direction: column;
        align-items: center; justify-content: center;
        width: 100%; 
        padding: 60px 25px 40px 25px; 
        background: transparent; 
        position: relative; z-index: 20; 
        gap: 20px;
        /* Отступ сверху, чтобы отодвинуть от контента */
        margin-top: 550px; 
    }
    .footer-decoration { display: none; }
    .footer-content { display: contents; }
    
    .footer-center { order: 1; text-align: center; position: static; transform: none; }
    .brand-name { font-size: 20px; font-weight: 600; color: #0b2585; display: block; margin-bottom: 5px; }
    .copyright { font-size: 12px; opacity: 0.6; }

    .footer-right { order: 2; display: flex; flex-direction: column; align-items: center; gap: 15px; }
    .social-icons { display: flex; gap: 20px; }
    .social-btn {
        width: 50px; height: 50px; font-size: 24px;
        background: white; border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1); color: #0b2585;
    }
    .support-link { margin-top: 5px; font-size: 14px; text-decoration: underline; opacity: 0.8; }

    .footer-left { order: 3; display: flex; flex-direction: column; align-items: center; gap: 10px; }
    .footer-left a { font-size: 14px; color: #0b2585; opacity: 0.7; text-decoration: none; }
}