/* ----------------------------- */
/* 🌐 Общие базовые стили сайта */
/* ----------------------------- */
body {
    padding-top: 60px; /* отступ под фиксированную шапку */
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(to right, #fef6ff, #f0f4ff); /* фон сайта */
    color: #222;
}

a {
    color: #5568fe;
    text-decoration: none;
    transition: 0.2s ease;
}

a:hover {
    text-decoration: underline;
    color: #3d4ed5;
}

/* Логотип */
.logo {
    font-size: 24px;
    font-weight: 600;
    color: #5568fe;
}

/* Навигационные ссылки в шапке */
nav a {
    margin-left: 24px;
    color: #333;
    font-weight: 500;
}


/* ----------------------------- */
/* 🦸 Hero-секция (вступительный экран) */
/* ----------------------------- */
.hero {
    /*background: #eef1ff;*/
    color: #222;
    padding: 100px 20px;
    text-align: center;
}
.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.hero p {
    font-size: 1.25rem;
    color: #555;
}

/* Смещение контента hero */
#hero > div {
    transform: translateY(-10%);
}

/* Убераю фон в hero-секции, чтобы фон body был виден */
#hero {
    background: transparent !important;
}

/* Убераю белый фон у секций, если он не нужен */
.section.light,
.section.dark,
.bg-light,
.bg-white {
    background: transparent !important;
}


header.header-gradient {
    background: linear-gradient(to right, #f0f4ff, #fef6ff);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    top: 16px;
    width: calc(100% - 2rem);
    max-width: 2000px;
    z-index: 1030;
}

/* ----------------------------- */
/* 🔘 Кнопки */
/* ----------------------------- */
.btn-primary {
    background-color: #5568fe;
    border: none;
    padding: 12px 32px;
    font-weight: 600;
    border-radius: 999px;
    transition: 0.3s;
}
.btn-primary:hover {
    background-color: #3d4ed5;
}

/* ----------------------------- */
/* 🦶 Футер */
/* ----------------------------- */
footer {
    text-align: center;
    font-size: 0.875rem;
    color: #888;
    padding: 30px 0;
}

/* ----------------------------- */
/* 📦 Контентные блоки .text */
/* ----------------------------- */
.text {
    padding: 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: all 0.2s ease;
}
.text:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.text p {
    margin-bottom: 20px;
    line-height: 1.6;
}
.text strong {
    display: block;
    margin-bottom: 6px;
    color: #333;
}

/* ----------------------------- */
/* 📑 Секции страницы */
/* ----------------------------- */
.section {
    padding: 55px 0;
    scroll-margin-top: 55px; /* чтобы якоря не скрывались под шапкой */
}
.section.light {
    background: transparent !important;
}
.section.dark {
    background-color: #f2f4f8;
}

/* ----------------------------- */
/* 🔠 Заголовки и базовая типографика */
/* ----------------------------- */
h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0.5rem;
}
h2 {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

p, li {
    font-size: 18px;
    line-height: 1.6;
}

/* ----------------------------- */
/* 📱 Мобильное меню */
/* ----------------------------- */
#mobile-menu {
    margin-top: 0.5rem;
}

/* ----------------------------- */
/* 🟢 Индикаторы (точки-метки) */
/* ----------------------------- */
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.dot-purple { background-color: #8a5cff; }
.dot-blue   { background-color: #007bff; }
.dot-green  { background-color: #63c132; }
.dot-cyan   { background-color: #17c3cf; }
.dot-orange { background-color: #ff9900; }

/* ----------------------------- */
/* 📂 Дропдауны */
/* ----------------------------- */
.dropdown-menu a.dropdown-item {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}
.dropdown-menu a.dropdown-item:hover {
    background-color: #f0f0f0;
}
.dropdown-agents {
    border-radius: 1rem;
    min-width: 280px;
}
.dropdown-agents li {
    cursor: pointer;
    transition: background-color 0.2s;
}
.dropdown-agents li:hover {
    background-color: #f8f9fa;
}

/* ----------------------------- */
/* 🤖 Секция чата с ИИ */
/* ----------------------------- */
#ai-chat {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

#ai-chat h2 {
    margin-top: 60;
    padding-top: 2rem;
}

/* Окно чата */
.chat-window {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

/* Область сообщений */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 1.5rem;
    background-color: #fff;
}

/* Ввод и кнопка отправки */
.chat-input {
    display: flex;
    gap: 12px;
}
.chat-input input {
    flex: 1;
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 12px;
    border: 1px solid #ccc;
}
.chat-input button {
    padding: 12px 24px;
    border-radius: 12px;
    background-color: #5568fe;
    color: white;
    font-weight: bold;
    border: none;
    cursor: pointer;
}
.chat-input button:hover {
    background-color: #3d4ed5;
}

/* ----------------------------- */
/* 💬 Пузырьки сообщений в чате */
/* ----------------------------- */
#chat-box {
    font-family: "Inter", sans-serif;
}
#chat-box span.badge {
    white-space: pre-wrap;       /* сохраняет переносы */
    word-break: break-word;      /* переносит длинные слова */
    overflow-wrap: break-word;   /* дополнительная подстраховка */
    display: inline-block;       /* чтобы span учитывал ширину */
    max-width: 90%;              /* не шире контейнера */
    padding: 10px 12px;
    line-height: 1.5;
    font-size: 1rem;
}
#chat-box .message {
    max-width: 80%;
    padding: 10px 14px;
    margin: 8px 0;
    border-radius: 14px;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.45;
    font-size: 16px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Сообщения пользователя — справа */
#chat-box .user {
    background-color: #007aff;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

/* Ответы ИИ — слева */
#chat-box .bot {
    background-color: #ffffff; /* белый фон */
    color: #1e1e1e;
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

#chat-box {
    display: flex;
    flex-direction: column;
}