/* ==============================================
   AI Template — базовые стили
   Подключается только на страницах с шаблоном ai-template.php
   ============================================== */

/* -----------------------------------------------
   MAIN — обёртка всей страницы
   ----------------------------------------------- */
.main {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

/* -----------------------------------------------
   SECTION — каждый блок страницы
   ----------------------------------------------- */
.main section {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    box-sizing: border-box;
    
}

/* -----------------------------------------------
   CONTAINER — внутренний контейнер секции
   Менеджер добавляет .container внутри section.
   Стили container прописываются глобально в теме.
   ----------------------------------------------- */

/* -----------------------------------------------
   SECTION PADDING — вертикальные отступы секций
   ----------------------------------------------- */
.main section {
    padding: 40px 0;
}

@media (min-width: 1200px) {
    .main section {
        padding: 50px 0;
    }
}

/* -----------------------------------------------
   SECTION TITLE — заголовок секции (h2)
   ----------------------------------------------- */
.main section .section-title {
    font-size: 26px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.06em;
    text-align: center;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .main section .section-title {
        font-size: 32px;
        margin-bottom: 40px;
    }
}

@media (min-width: 1200px) {
    .main section .section-title {
        font-size: 48px;
        margin-bottom: 50px;
    }
}

/* -----------------------------------------------
   SECTION SUBTITLE — подзаголовок / описание
   ----------------------------------------------- */
.main section .section-subtitle {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(19, 19, 19, 0.7);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 30px;
}

@media (min-width: 768px) {
    .main section .section-subtitle {
        font-size: 18px;
    }
}

/* -----------------------------------------------
   BUTTONS
   ----------------------------------------------- */

/* Основная синяя кнопка */
.chatapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    background-color: rgb(3, 137, 203);
    border-radius: 5px;
    padding: 12px 20px;
    border: 1px solid rgb(3, 137, 203);
    text-decoration: none;
    transition: 0.35s ease;
    cursor: pointer;
}

.chatapp-btn:hover {
    opacity: 0.85;
}

/* Прозрачная кнопка */
.chatapp-btn.trans {
    background-color: transparent;
    color: rgb(3, 137, 203);
}

.chatapp-btn.trans:hover {
    background-color: rgb(3, 137, 203);
    color: #fff;
}

/* Крупная CTA-кнопка */
.blue-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #0389CB;
    color: #fff;
    padding: 17px 30px;
    border-radius: 18px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    transition: 0.35s ease;
    cursor: pointer;
}

.blue-btn:hover {
    opacity: 0.85;
}

/* Чип / тег (фильтры, лейблы) */
.chip {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 40px;
    background: #fff;
    color: rgb(90, 90, 90);
    font-size: 14px;
    text-decoration: none;
    transition: 0.35s ease;
}

.chip.active,
.chip:hover {
    background-color: #0389CB;
    color: #fff;
}

/* -----------------------------------------------
   CARDS
   ----------------------------------------------- */
.card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    transition: 0.35s ease;
}

.card--bordered {
    border: 1px solid #e8edf1;
}

.card--alt {
    background: #F7F8FA;
}

/* -----------------------------------------------
   SWIPER — слайдер (auto-init через ai-template.js)
   Менеджер вставляет стандартную разметку:
   .swiper > .swiper-wrapper > .swiper-slide,
   опционально .swiper-pagination, .swiper-button-next/prev
   ----------------------------------------------- */
.main .swiper {
    width: 100%;
    max-width: 100%;
    padding-bottom: 40px;
}

.main .swiper .swiper-slide {
    height: auto;
}

.main .swiper .swiper-button-next,
.main .swiper .swiper-button-prev {
    color: rgb(3, 137, 203);
}

.main .swiper .swiper-pagination-bullet-active {
    background: rgb(3, 137, 203);
}

/* -----------------------------------------------
   GRID HELPERS
   ----------------------------------------------- */

/* 3 колонки → 2 → 1 */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* 2 колонки → 1 */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}
