/* ============================================================
   Torgsoft — відраслеві лендинги «Рішення для бізнесу» (scoped .ts-solution)
   5-й CSS-компонент. Підключати у head ПІСЛЯ main.css / options.css:
   <link rel="stylesheet" href="[(site_url)]assets/css/solution.css?v=11">

   Золоте правило вкладеності (як у options/case):
   класи .ts-solution__* стилізуються ЛИШЕ всередині предка .ts-solution.
   .lead-summary / .lead-definition — standalone з options.css, лишаємо як є.

   Палітра шаблону (світла, ecwid-стиль):
   акцент-жовтий #FCE153 · поверхня-сіра #F0F2F4 · CTA-теракота #D43911 (з main.css)
   ============================================================ */

.ts-solution{
    --ts-red:#D30000;
    --ts-terracotta:#D43911;
    --ts-red-dark:#B9310F;
    --ts-graphite:#28282B;
    --ts-yellow:#FCE153;          /* ecwid-жовтий, основний акцент шаблону */
    --ts-yellow-soft:#FFF3BE;
    --ts-gray:#F0F2F4;            /* ecwid-сірий, поверхні секцій */
    --ts-ink:#1F2430;
    --ts-muted:#6B7280;
    --ts-line:#E7E9EF;
    --ts-white:#FFFFFF;

    font-family:'Rubik','Segoe UI',sans-serif;
    color:var(--ts-ink);
    max-width:1080px;
    margin:0 auto;
    padding:4px 0 24px;
    font-size:17px;
    line-height:1.62;
    -webkit-font-smoothing:antialiased;
}
.ts-solution *{box-sizing:border-box;}
.ts-solution p,.ts-solution ul,.ts-solution ol,.ts-solution li,
.ts-solution h2,.ts-solution h3,.ts-solution h4,.ts-solution section,.ts-solution div{
    float:none;width:auto;
}
.ts-solution img{max-width:100%;height:auto;display:block;}
.ts-solution a{color:var(--ts-terracotta);}

/* ---------- Заголовки секцій ---------- */
.ts-solution__section{margin:0 0 60px;}
.ts-solution__h{
    font-size:30px;line-height:1.2;font-weight:700;
    color:var(--ts-graphite);margin:0 0 10px;letter-spacing:-.015em;
}
.ts-solution__sub{color:var(--ts-muted);margin:0 0 26px;max-width:720px;font-size:17px;}

/* ---------- Кнопки: гасимо float з main.css, вирівнюємо у ряд ---------- */
.ts-solution .demo_but,
.ts-solution .demo_but__yellow,
.ts-solution .demo_but--border{
    float:none !important;display:inline-flex;align-items:center;justify-content:center;
    min-width:210px;min-height:52px;line-height:1.2;
}
.ts-solution__actions{display:flex;flex-wrap:wrap;gap:12px;margin:22px 0 0;}

/* ---------- 1. HERO ---------- */
.ts-solution__hero{
    display:grid;grid-template-columns:minmax(0,1.05fr) minmax(300px,.95fr);
    gap:40px;align-items:center;margin:0 0 24px;
}
.ts-solution__hero-media{
    border-radius:20px;overflow:hidden;background:var(--ts-gray);
    box-shadow:0 24px 50px -30px rgba(40,40,43,.55);
}
.ts-solution__hero-media img{width:100%;height:100%;object-fit:cover;display:block;}

/* ---------- 2. Смуга довіри ---------- */
.ts-solution__trust{
    display:flex;flex-wrap:wrap;gap:14px 40px;align-items:center;justify-content:center;
    margin:0 0 60px;padding:22px 26px;border-radius:18px;background:var(--ts-gray);
}
.ts-solution__trust-item{display:flex;align-items:baseline;gap:10px;}
.ts-solution__trust-num{font-size:26px;font-weight:700;color:var(--ts-graphite);white-space:nowrap;}
.ts-solution__trust-txt{font-size:14.5px;color:var(--ts-muted);max-width:200px;line-height:1.35;}

/* ---------- 3. Головні задачі: 4 модулі «Факт + Сценарій» ---------- */
.ts-solution__mods{
    display:grid;grid-template-columns:repeat(2,1fr);gap:20px;
}
.ts-solution__mod{
    padding:26px 26px 24px;border-radius:18px;background:var(--ts-white);
    border:1px solid var(--ts-line);position:relative;
}
.ts-solution__mod::before{
    content:"";display:block;width:44px;height:6px;border-radius:6px;
    background:var(--ts-yellow);margin:0 0 16px;
}
.ts-solution__mod h3{font-size:19px;font-weight:700;color:var(--ts-graphite);margin:0 0 8px;}
.ts-solution__mod p{margin:0;color:#3A414D;font-size:16px;line-height:1.55;}

/* ---------- 4. Для кого (чіпи) ---------- */
.ts-solution__chips{display:flex;flex-wrap:wrap;gap:12px;}
.ts-solution__chip{
    padding:11px 18px;border-radius:14px;background:var(--ts-gray);
    color:var(--ts-graphite);font-size:15px;font-weight:500;
}

/* ---------- 5. Можливості: інфографіка + перелік функцій ---------- */
.ts-solution__caps{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:36px;align-items:center;}
.ts-solution__caps-media{border-radius:18px;overflow:hidden;background:var(--ts-gray);}
.ts-solution__caps-media img{width:100%;display:block;}
.ts-solution__funcs{list-style:none;margin:0;padding:0;column-gap:28px;}
.ts-solution__funcs li{position:relative;padding:0 0 13px 30px;color:#3A414D;line-height:1.5;break-inside:avoid;}
.ts-solution__funcs li::before{
    content:"";position:absolute;left:0;top:3px;width:20px;height:20px;border-radius:6px;background:var(--ts-yellow);
}
.ts-solution__funcs li::after{
    content:"";position:absolute;left:7px;top:8px;width:6px;height:10px;
    border:solid var(--ts-graphite);border-width:0 2px 2px 0;transform:rotate(45deg);
}

/* ---------- 6. Повний комплект: паралельне викладення image | text ---------- */
.ts-solution__kit{
    display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);gap:36px;align-items:stretch;
}
.ts-solution__kit-media{border-radius:20px;overflow:hidden;background:var(--ts-gray);min-height:100%;}
.ts-solution__kit-media img{width:100%;height:100%;object-fit:cover;display:block;}
.ts-solution__kit-groups{display:flex;flex-direction:column;gap:16px;}
.ts-solution__kit-card{padding:22px 24px;border-radius:16px;background:var(--ts-gray);}
.ts-solution__kit-card h3{font-size:18px;font-weight:700;color:var(--ts-graphite);margin:0 0 10px;}
.ts-solution__kit-card ul{list-style:none;margin:0;padding:0;}
.ts-solution__kit-card li{position:relative;padding:0 0 8px 22px;font-size:15.5px;color:#3A414D;line-height:1.5;}
.ts-solution__kit-card li:last-child{padding-bottom:0;}
.ts-solution__kit-card li::before{
    content:"";position:absolute;left:0;top:9px;width:7px;height:7px;border-radius:50%;background:var(--ts-terracotta);
}

/* ---------- 7. Як почати (компактно) + дзвінок ---------- */
.ts-solution__start{
    display:grid;grid-template-columns:1.1fr .9fr;gap:30px;align-items:center;
    padding:30px 32px;border-radius:20px;background:var(--ts-gray);
}
.ts-solution__start-steps{display:flex;flex-wrap:wrap;gap:20px 26px;counter-reset:st;margin:6px 0 0;}
.ts-solution__start-step{display:flex;align-items:flex-start;gap:12px;flex:1 1 190px;}
.ts-solution__start-step::before{
    counter-increment:st;content:counter(st);flex:0 0 auto;
    width:30px;height:30px;border-radius:50%;background:var(--ts-graphite);color:#fff;
    display:flex;align-items:center;justify-content:center;font-weight:700;font-size:15px;
}
.ts-solution__start-step b{display:block;color:var(--ts-graphite);font-size:15.5px;margin:2px 0 2px;}
.ts-solution__start-step span{display:block;color:var(--ts-muted);font-size:14px;line-height:1.4;}
.ts-solution__start-cta{text-align:left;}
.ts-solution__start-cta .ts-solution__actions{margin:0;}

/* ---------- 8. FAQ (native details, без JS) ---------- */
.ts-solution__faq{border-top:1px solid var(--ts-line);}
.ts-solution__faq details{border-bottom:1px solid var(--ts-line);}
.ts-solution__faq summary{
    list-style:none;cursor:pointer;padding:19px 44px 19px 4px;position:relative;
    font-size:17.5px;font-weight:600;color:var(--ts-graphite);
}
.ts-solution__faq summary::-webkit-details-marker{display:none;}
.ts-solution__faq summary::after{
    content:"";position:absolute;right:12px;top:24px;width:10px;height:10px;
    border:solid var(--ts-muted);border-width:0 2px 2px 0;transform:rotate(45deg);transition:transform .2s ease;
}
.ts-solution__faq details[open] summary::after{transform:rotate(-135deg);top:28px;}
.ts-solution__faq details p{margin:0 4px 19px;color:#3A414D;}

/* ---------- 9. Фінальний заклик ---------- */
.ts-solution__cta{
    margin:0 0 52px;padding:46px 32px;border-radius:22px;background:var(--ts-graphite);text-align:center;
}
.ts-solution__cta h2{color:#fff;margin:0 0 12px;font-size:28px;font-weight:700;letter-spacing:-.01em;}
.ts-solution__cta p{color:rgba(255,255,255,.82);max-width:640px;margin:0 auto 24px;}
.ts-solution__cta .ts-solution__actions{justify-content:center;margin:0;}

/* ---------- 10. Схожі рішення ---------- */
.ts-solution__related-list{display:flex;flex-wrap:wrap;gap:12px;}
.ts-solution__related-list a{
    padding:11px 18px;border-radius:14px;background:var(--ts-gray);
    color:var(--ts-graphite);font-size:15px;text-decoration:none;
}
.ts-solution__related-list a:hover{background:#E6E9ED;}

/* ---------- Адаптив ---------- */
@media (max-width:820px){
    .ts-solution__hero,.ts-solution__caps,.ts-solution__kit,.ts-solution__start{grid-template-columns:1fr;gap:24px;}
    .ts-solution__hero-media,.ts-solution__caps-media{order:-1;}
    .ts-solution__mods{grid-template-columns:1fr;}
    .ts-solution__funcs{column-count:1 !important;}
    .ts-solution__h{font-size:24px;}
    .ts-solution__cta h2{font-size:23px;}
    .ts-solution__start{padding:24px;}
}
@media (min-width:821px){
    .ts-solution__funcs{column-count:2;}
}

/* ============================================================
   v5 patch (шаблон .ts-solution)
   Кнопки · смуга довіри · медіа зверху · рівні сітки карток ·
   ритм секцій · афоданс посилань · довжина рядка · SVG-маркер функцій
   ============================================================ */

/* --- Кнопки: власні кольори тексту (перебиває .ts-solution a) --- */
.ts-solution a.demo_but{color:#FFFFFF;}
.ts-solution a.demo_but:hover{color:#FFFFFF;}
.ts-solution a.demo_but__yellow{color:var(--ts-graphite);}
.ts-solution a.demo_but__yellow:hover{color:var(--ts-graphite);}
.ts-solution a.demo_but--border{color:var(--ts-graphite);border-color:var(--ts-graphite);background:transparent;}
.ts-solution a.demo_but--border:hover{background:var(--ts-graphite);color:#FFFFFF;}

/* Кнопки завжди в один ряд поруч; одна під одною — лише на мобільному */
/* Кнопки поруч в один ряд. Inline-block замість flex: не залежить від
   реалізації flexbox у старих движках, кнопка має ширину за вмістом,
   перенос — природний, коли місця справді немає (мобільний). */
.ts-solution .ts-solution__actions{display:block;margin:22px 0 0;font-size:0;}
.ts-solution .ts-solution__actions .demo_but{
    display:inline-flex;vertical-align:top;float:none;width:auto;min-width:0;
    margin:0 12px 12px 0;padding-left:24px;padding-right:24px;
    white-space:nowrap;font-size:16px;
}
.ts-solution .ts-solution__actions .demo_but:last-child{margin-right:0;}
.ts-solution .ts-solution__cta .ts-solution__actions{text-align:center;}

/* --- Ритм секцій: більше повітря + жовтий акцент над заголовком --- */
.ts-solution .ts-solution__section{margin:0 0 72px;}
.ts-solution .ts-solution__h{position:relative;padding-top:18px;margin-bottom:12px;}
.ts-solution .ts-solution__h::before{
    content:"";position:absolute;left:0;top:0;width:44px;height:6px;
    border-radius:6px;background:var(--ts-yellow);
}
/* Довжина рядка: текст не тягнеться на всі 1080px */
.ts-solution .ts-solution__sub,
.ts-solution .ts-solution__faq details p{max-width:74ch;}

/* Секція на сірій поверхні (опорна точка сторінки) */
.ts-solution .ts-solution__section--surface{
    background:var(--ts-gray);border-radius:22px;padding:32px 32px 36px;
}

/* --- Смуга довіри --- */
.ts-solution .ts-solution__trust{
    display:flex;flex-wrap:wrap;gap:18px 24px;align-items:flex-start;justify-content:space-around;
}
.ts-solution .ts-solution__trust-item{
    display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;flex:1 1 200px;
}
.ts-solution .ts-solution__trust-num{font-size:28px;line-height:1.1;}
.ts-solution .ts-solution__trust-txt{max-width:230px;}

/* --- HERO: кадр без сірої підкладки та важкої тіні --- */
.ts-solution .ts-solution__hero-media{
    align-self:center;background:transparent;box-shadow:0 18px 40px -32px rgba(40,40,43,.5);
}
.ts-solution .ts-solution__hero-media img{height:auto;object-fit:contain;border-radius:20px;}

/* --- 4. Можливості: інфографіка зверху 16:9, функції рівною сіткою --- */
.ts-solution .ts-solution__caps{display:block;}
.ts-solution .ts-solution__caps-media{
    position:relative;width:100%;margin:0 0 26px;border-radius:18px;overflow:hidden;
    background:var(--ts-white);padding-top:56.25%;   /* 16:9 без залежності від aspect-ratio */
}
.ts-solution .ts-solution__caps-media img{
    position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;object-fit:cover;display:block;
}
.ts-solution .ts-solution__funcs{
    display:flex;flex-wrap:wrap;gap:14px;
    list-style:none;margin:0;padding:0;column-count:initial;
}
/* flex-grow:0 — остання картка в ряду не розтягується на всю ширину */
.ts-solution .ts-solution__funcs li{flex:0 0 auto;width:calc(33.333% - 10px);}
.ts-solution .ts-solution__funcs li{
    margin:0;padding:16px 18px 16px 46px;
    background:var(--ts-white);border:1px solid var(--ts-line);border-radius:14px;
    font-size:16px;line-height:1.45;color:#3A414D;
}
.ts-solution .ts-solution__funcs li::before{left:16px;top:18px;}
.ts-solution .ts-solution__funcs li::after{left:23px;top:23px;}

/* --- 5. Повний комплект: фото зверху 16:9, три рівні картки під ним --- */
.ts-solution .ts-solution__kit{display:block;}
.ts-solution .ts-solution__kit-media{
    position:relative;width:100%;margin:0 0 20px;min-height:0;border-radius:20px;overflow:hidden;
    background:var(--ts-gray);padding-top:56.25%;
}
.ts-solution .ts-solution__kit-media img{
    position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;object-fit:cover;display:block;
}
.ts-solution .ts-solution__kit-groups{
    /* flex-direction обов'язково: у базовому правилі стоїть column */
    display:flex;flex-direction:row;flex-wrap:wrap;gap:20px;align-items:stretch;
}
.ts-solution .ts-solution__kit-card{flex:0 0 auto;width:calc(33.333% - 14px);padding:24px 26px;}
.ts-solution .ts-solution__kit-card a{text-decoration:none;border-bottom:1px solid rgba(212,57,17,.35);}
.ts-solution .ts-solution__kit-card a:hover{border-bottom-color:var(--ts-terracotta);}

/* --- 7. Як почати: кроки, під ними кнопки одним рядом --- */
.ts-solution .ts-solution__start{display:block;}
.ts-solution .ts-solution__start-cta{margin:26px 0 0;}
.ts-solution .ts-solution__start-cta .ts-solution__actions{margin:0;}

/* --- 10. Схожі рішення: це посилання, а не теги --- */
.ts-solution .ts-solution__related-list a{
    background:var(--ts-white);border:1px solid var(--ts-line);
    color:var(--ts-terracotta);font-weight:500;transition:.2s;
}
.ts-solution .ts-solution__related-list a::after{content:" ›";}
.ts-solution .ts-solution__related-list a:hover{
    background:var(--ts-white);border-color:var(--ts-terracotta);
}


/* --- Маркер функцій: цільний SVG (жовтий квадрат + галочка).
   Замінює крихку CSS-галочку з бордерів, яка обрізалася при рендерингу.
   Прибираємо старі ::before/::after і ставимо фон-іконку. --- */
.ts-solution .ts-solution__funcs li::before,
.ts-solution .ts-solution__funcs li::after{content:none;display:none;}
.ts-solution .ts-solution__funcs li{
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Crect width='20' height='20' rx='6' fill='%23FAC739'/%3E%3Cpath d='M5.5 10.5 L8.5 13.5 L14.5 6.5' fill='none' stroke='%2328282B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:16px 17px;
    background-size:20px 20px;
}

/* --- Адаптив: єдина точка зламу 820px, як у базовому файлі --- */
@media (max-width:1000px){
    .ts-solution .ts-solution__funcs li{width:calc(50% - 7px);}
    .ts-solution .ts-solution__kit-card{width:calc(50% - 10px);}
}
@media (max-width:820px){
    .ts-solution .ts-solution__actions .demo_but{display:flex;width:100%;margin-right:0;}
    .ts-solution .ts-solution__funcs li,
    .ts-solution .ts-solution__kit-card{width:100%;}
    .ts-solution .ts-solution__caps-media,
    .ts-solution .ts-solution__kit-media{padding-top:62%;}
    .ts-solution .ts-solution__section{margin:0 0 52px;}
    .ts-solution .ts-solution__section--surface{padding:24px 20px 28px;}
}

/* ============================================================
   v6 patch: нові компоненти зі структури ChatGPT
   (outcome-плашка модуля · config-note · ритм-контролю),
   приведені до конвенцій шаблону
   ============================================================ */

/* Модуль «Факт+Сценарій» тепер із плашкою управлінського рішення */
.ts-solution .ts-solution__mod{display:flex;flex-direction:column;}
.ts-solution .ts-solution__mod p{margin:0 0 0;}
/* Модуль — колонка, плашка притискається до низу картки,
   тому плашки сусідніх модулів стоять на одному рівні */
.ts-solution .ts-solution__mod{display:flex;flex-direction:column;height:100%;}
.ts-solution .ts-solution__mod > p:not(.ts-solution__outcome){margin:0 0 auto;}
.ts-solution .ts-solution__mod > h3{margin:0 0 8px;}
.ts-solution .ts-solution__outcome{
    position:relative;margin:20px 0 0;               /* лише верхній відступ */
    padding:14px 16px 14px 18px;
    border-radius:12px;background:var(--ts-gray);    /* сірий фон, як було краще */
    color:#3A414D;font-size:14.5px;line-height:1.5;overflow:hidden;
}
/* червона акцент-смуга ліворуч */
.ts-solution .ts-solution__outcome::before{
    content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--ts-terracotta);
}
.ts-solution .ts-solution__outcome b{color:var(--ts-terracotta);}
/* модулі в сітці мають бути однакової висоти, щоб низ плашок збігався */
.ts-solution .ts-solution__mods{align-items:stretch;}

/* Примітка про правило комплектації/ліцензування */
.ts-solution .ts-solution__config-note{
    margin:22px 0 0;padding:18px 20px;border-radius:14px;
    background:var(--ts-yellow-soft);color:var(--ts-graphite);
    font-size:15.5px;line-height:1.55;
}
.ts-solution .ts-solution__config-note b{color:var(--ts-graphite);}

/* Блок «Ритм контролю»: три рівні картки, як funcs/kit */
.ts-solution .ts-solution__rhythm{
    display:flex;flex-wrap:wrap;gap:18px;margin:24px 0 0;align-items:stretch;
}
.ts-solution .ts-solution__rhythm-card{
    flex:0 0 auto;width:calc(33.333% - 12px);
    padding:22px 22px 20px;border-radius:16px;
    background:var(--ts-white);border:1px solid var(--ts-line);
}
.ts-solution .ts-solution__rhythm-card h3{
    margin:0 0 12px;color:var(--ts-graphite);font-size:18px;font-weight:700;
}
.ts-solution .ts-solution__rhythm-card ul{
    margin:0;padding:0;list-style:none;color:#3A414D;font-size:14.5px;line-height:1.5;
}
.ts-solution .ts-solution__rhythm-card li{position:relative;padding:0 0 8px 18px;}
.ts-solution .ts-solution__rhythm-card li:last-child{padding-bottom:0;}
.ts-solution .ts-solution__rhythm-card li::before,
.ts-solution .ts-option .ts-solution__rhythm-card li::before{
    content:"";position:absolute;left:0;top:9px;width:7px;height:7px;
    border-radius:50%;background:var(--ts-terracotta) !important;
    /* !important + повний скид маркера: перебиваємо жовту крапку з options.css */
}
/* Гарантовано прибираємо будь-який нативний або чужий маркер у наших списках */
.ts-solution .ts-solution__rhythm-card ul,
.ts-solution .ts-solution__kit-card ul,
.ts-solution .ts-solution__funcs{list-style:none !important;}
/* КРИТИЧНО: main.css малює жовту крапку через .content ul li:after (#fac739).
   Наші списки лежать усередині <article class="content">, тому цей :after
   з'являється поряд із нашою червоною крапкою. Гасимо його на всіх наших списках. */
.ts-solution .ts-solution__rhythm-card li:after,
.ts-solution .ts-solution__kit-card li:after,
.ts-solution .ts-solution__funcs li:after,
.ts-solution .ts-solution__mod li:after,
.ts-solution__rhythm-card li::after,
.ts-solution__kit-card li::after,
.ts-solution__funcs li::after{
    content:none !important;display:none !important;background:none !important;
}
.ts-solution .ts-solution__rhythm-card li,
.ts-solution .ts-solution__kit-card li{list-style:none !important;}
/* Якщо на сторінці активний скоуп .ts-option — його жовта li::before не має чіпати наші картки */
.ts-solution .ts-solution__kit-card li::before{
    background:var(--ts-terracotta) !important;
}

@media (max-width:1000px){
    .ts-solution .ts-solution__rhythm-card{width:calc(50% - 9px);}
}
@media (max-width:820px){
    .ts-solution .ts-solution__rhythm-card{width:100%;}
}
