/* ============================================================================
   TORGSOFT — torgsoft-case.css
   Стилі кейс-лендінгів /business/*. Підключати ПІСЛЯ main.css.
   Версія 1.5

   ПІСЛЯ ОНОВЛЕННЯ ФАЙЛУ ОБОВ'ЯЗКОВО змінити версію в <link ... torgsoft-case.css?v=1.0>,
   інакше кеш віддасть стару версію.

   Специфічність: усі компоненти мають префікс «.ts-case .ts-case__…» (0,2,0),
   щоб перекривати правила main.css для .m_cause__columns--full div.
   Шрифт Rubik: підключені 300/400/500/700/900.
   ========================================================================== */

/* ---- Root + токени ------------------------------------------------------ */
.ts-case {
  --ts-red: #D30000;
  --ts-terracotta: #D43911;
  --ts-yellow: #FAC739;
  --ts-yellow-light: #FFED7A;
  --ts-yellow-pale: #FFF7D1;
  --ts-gray: #F0F0F0;
  --ts-gray-soft: #F8F8F8;
  --ts-border: #E7E7E7;
  --ts-graphite: #28282B;
  --ts-text: #111827;
  --ts-muted: #6B7280;
  --ts-white: #FFFFFF;
  --ts-link: #2196F3;
  --ts-shadow: 0 8px 28px rgba(40, 40, 43, 0.08);

  width: 100%;
  clear: both;
  margin: 0;
  font-family: "Rubik", "Segoe UI", sans-serif;
  color: var(--ts-text);
  font-size: 18px;
  line-height: 1.55;
}
.ts-case, .ts-case * { box-sizing: border-box; }

/* ---- RESET шкідливих властивостей main.css (padding не чіпаємо) --------- */
.ts-case div {
  width: auto;
  clear: none;
  float: none;
  margin: 0;
  font-family: "Rubik", "Segoe UI", sans-serif;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}
.ts-case p {
  width: auto;
  clear: none;
  float: none;
  margin: 0 0 16px;
  font-family: "Rubik", "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.58;
  color: var(--ts-text);
}
.ts-case p:last-child { margin-bottom: 0; }
.ts-case h2 {
  clear: none;
  margin: 0 0 18px;
  font-family: "Rubik", "Segoe UI", sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ts-graphite);
}
.ts-case h3 {
  clear: none;
  margin: 0 0 12px;
  font-family: "Rubik", "Segoe UI", sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ts-graphite);
}
.ts-case ul, .ts-case ol {
  margin: 0 0 16px;
  padding-left: 24px;
}
.ts-case li {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.55;
}
.ts-case a { color: var(--ts-link); text-decoration: none; }
.ts-case a:hover { text-decoration: underline; }
.ts-case strong { font-weight: 700; color: inherit; }
.ts-case img { max-width: 100%; height: auto; display: block; }

/* ---- Секції ------------------------------------------------------------- */
.ts-case .ts-case__section {
  margin: 0 0 56px;
}
.ts-case .ts-case__section:last-child { margin-bottom: 0; }

.ts-case .ts-case__eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 16px;
  background: var(--ts-red);
  color: var(--ts-white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 4px;
}

/* ---- Hero ---------------------------------------------------------------- */
.ts-case .ts-case__hero {
  padding: 44px 46px;
  background: var(--ts-graphite);
  border-radius: 18px;
  color: var(--ts-white);
  position: relative;
  overflow: hidden;
}
.ts-case .ts-case__hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -160px;
  top: -160px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFE200, #FF8300);
  opacity: 0.18;
  pointer-events: none;
}
.ts-case .ts-case__hero h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
  font-size: 36px;
  font-weight: 900;
  line-height: 1.15;
  color: var(--ts-white);
}
.ts-case .ts-case__hero p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.82);
}
.ts-case .ts-case__hero .ts-case__eyebrow {
  position: relative;
  z-index: 1;
  background: var(--ts-yellow);
  color: var(--ts-graphite);
}

/* ---- Pills (метрики) ----------------------------------------------------- */
.ts-case .ts-case__pills {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 0;
}
.ts-case .ts-case__pill {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  min-width: 150px;
}
.ts-case .ts-case__pill-num {
  display: block;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--ts-yellow);
}
.ts-case .ts-case__pill-label {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

/* ---- Кнопки: компонент розробника demo_but (локальна копія для консистентності) */
.ts-case .ts-case__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
  position: relative;
  z-index: 1;
}
.ts-case .demo_but {
  width: auto;
  float: none;
  color: #FFFFFF;
  font-family: "Rubik", "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 700;
  border-radius: 25px;
  background-color: #D43911;
  line-height: 50px;
  text-align: center;
  padding-left: 27px;
  padding-right: 27px;
  text-decoration: none;
  transition: .3s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.ts-case .demo_but:hover { background-color: #B9310F; text-decoration: none; }
.ts-case .demo_but.demo_but__yellow { background-color: #FAC739; color: #28282B; }
.ts-case .demo_but.demo_but__yellow:hover { background-color: #F9CD54; }
.ts-case .demo_but:focus-visible {
  outline: 3px solid #28282B;
  outline-offset: 3px;
}

/* ---- Таймлайн ------------------------------------------------------------ */
.ts-case .ts-case__timeline {
  position: relative;
  padding-left: 34px;
}
.ts-case .ts-case__timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 2px;
  background: var(--ts-gray);
}
.ts-case .ts-case__milestone {
  position: relative;
  margin: 0 0 26px;
  padding: 20px 24px;
  background: var(--ts-white);
  border: 1px solid var(--ts-border);
  border-radius: 14px;
  box-shadow: var(--ts-shadow);
}
.ts-case .ts-case__milestone:last-child { margin-bottom: 0; }
.ts-case .ts-case__milestone::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 26px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ts-yellow);
  border: 4px solid var(--ts-white);
  box-shadow: 0 0 0 2px var(--ts-yellow);
}
.ts-case .ts-case__milestone-year {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 12px;
  background: var(--ts-yellow-pale);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ts-graphite);
}
.ts-case .ts-case__milestone h3 { margin-bottom: 8px; }
.ts-case .ts-case__milestone p { font-size: 17px; }
.ts-case .ts-case__milestone-effect {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--ts-gray-soft);
  border-left: 4px solid var(--ts-yellow);
  border-radius: 0 8px 8px 0;
  font-size: 16px;
  color: var(--ts-text);
}

/* ---- Ґрід карток ---------------------------------------------------------- */
.ts-case .ts-case__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.ts-case .ts-case__grid--2 { grid-template-columns: repeat(2, 1fr); }
.ts-case .ts-case__card {
  padding: 22px 24px;
  background: var(--ts-white);
  border: 1px solid var(--ts-border);
  border-radius: 14px;
  box-shadow: var(--ts-shadow);
}
.ts-case .ts-case__card h3 { font-size: 19px; }
.ts-case .ts-case__card p { font-size: 16px; margin-bottom: 0; }
.ts-case .ts-case__card ul { margin-bottom: 0; padding-left: 20px; }
.ts-case .ts-case__card li { font-size: 16px; margin-bottom: 6px; }
.ts-case .ts-case__card li:last-child { margin-bottom: 0; }
.ts-case .ts-case__card-icon {
  width: 44px;
  height: 44px;
  margin: 0 0 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FFE200, #FF8300);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Іконки карток: фонові SVG (TinyMCE вирізає inline <svg>) ---------- */
.ts-case .ts-case__card-icon {
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
}
.ts-case .ts-case__card-icon--sales { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%2328282B'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='2'%20y='6'%20width='20'%20height='12'%20rx='2'/%3E%3Ccircle%20cx='12'%20cy='12'%20r='3'/%3E%3C/svg%3E"); }
.ts-case .ts-case__card-icon--stock { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%2328282B'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='3'%20width='8'%20height='8'%20rx='1.5'/%3E%3Crect%20x='13'%20y='3'%20width='8'%20height='8'%20rx='1.5'/%3E%3Crect%20x='3'%20y='13'%20width='8'%20height='8'%20rx='1.5'/%3E%3Crect%20x='13'%20y='13'%20width='8'%20height='8'%20rx='1.5'/%3E%3C/svg%3E"); }
.ts-case .ts-case__card-icon--staff { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%2328282B'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='8'%20cy='8'%20r='4.5'/%3E%3Cpath%20d='M11.5%2011.5%20L20%2020%20M17%2017%20l3%20-3%20M14.5%2019.5%20l2.5%20-2.5'/%3E%3C/svg%3E"); }
.ts-case .ts-case__card-icon--clients { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%2328282B'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%2020%20C6%2015%203%2011.5%203%208.5%20C3%206%205%204%207.5%204%20C9.5%204%2011%205%2012%206.8%20C13%205%2014.5%204%2016.5%204%20C19%204%2021%206%2021%208.5%20C21%2011.5%2018%2015%2012%2020%20Z'/%3E%3C/svg%3E"); }
.ts-case .ts-case__card-icon--fiscal { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%2328282B'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='9'/%3E%3Cpath%20d='M7.5%2012.5%20l3%203%20l6%20-7'/%3E%3C/svg%3E"); }
.ts-case .ts-case__card-icon--data { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%2328282B'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='9'/%3E%3Cpath%20d='M12%203%20v9%20h9'/%3E%3C/svg%3E"); }

/* ---- Питання і рішення ----------------------------------------------------- */
.ts-case .ts-case__qa {
  margin: 0 0 16px;
  border: 1px solid var(--ts-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--ts-shadow);
}
.ts-case .ts-case__qa:last-child { margin-bottom: 0; }
.ts-case .ts-case__qa-q {
  padding: 16px 22px;
  background: var(--ts-gray-soft);
  font-size: 18px;
  font-weight: 700;
  color: var(--ts-graphite);
  border-left: 5px solid var(--ts-yellow);
}
.ts-case .ts-case__qa-a {
  padding: 16px 22px;
  background: var(--ts-white);
}
.ts-case .ts-case__qa-a p { font-size: 17px; }

/* ---- Екосистема ------------------------------------------------------------ */
.ts-case .ts-case__eco {
  padding: 34px 36px;
  background: var(--ts-gray-soft);
  border-radius: 18px;
}
.ts-case .ts-case__eco-core {
  margin: 0 0 20px;
  padding: 20px 24px;
  background: var(--ts-graphite);
  border-radius: 14px;
  color: var(--ts-white);
}
.ts-case .ts-case__eco-core h3 { color: var(--ts-yellow); margin-bottom: 6px; }
.ts-case .ts-case__eco-core p { color: rgba(255, 255, 255, 0.82); font-size: 16px; margin-bottom: 0; }
.ts-case .ts-case__eco-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.ts-case .ts-case__eco-item {
  padding: 16px 18px;
  background: var(--ts-white);
  border: 1px solid var(--ts-border);
  border-radius: 12px;
}
.ts-case .ts-case__eco-item h4 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ts-graphite);
  line-height: 1.35;
}
.ts-case .ts-case__eco-item p { font-size: 15px; color: var(--ts-muted); margin-bottom: 8px; }
.ts-case .ts-case__eco-item a { font-size: 15px; font-weight: 500; }
.ts-case .ts-case__eco-note {
  margin: 20px 0 0;
  padding: 14px 18px;
  background: var(--ts-yellow-pale);
  border-radius: 10px;
  font-size: 16px;
}

/* ---- Медіа ------------------------------------------------------------------ */
.ts-case .ts-case__media {
  margin: 0;
  text-align: center;
}
.ts-case .ts-case__media img {
  margin: 0 auto;
  border: 1px solid var(--ts-border);
  border-radius: 14px;
  box-shadow: var(--ts-shadow);
}
.ts-case .ts-case__media figcaption {
  margin-top: 10px;
  font-size: 15px;
  color: var(--ts-muted);
}

/* ---- CTA ---------------------------------------------------------------------- */
.ts-case .ts-case__cta {
  padding: 38px 40px;
  background: var(--ts-yellow-pale);
  border: 1px solid var(--ts-yellow);
  border-radius: 18px;
  text-align: center;
}
.ts-case .ts-case__cta h2 { margin-bottom: 12px; }
.ts-case .ts-case__cta p { margin-left: auto; margin-right: auto; }
.ts-case .ts-case__cta .ts-case__actions { justify-content: center; }


/* ---- Кроки успіху ---------------------------------------------------------- */
.ts-case .ts-case__steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.ts-case .ts-case__step {
  position: relative;
  padding: 24px 26px 22px;
  background: var(--ts-white);
  border: 1px solid var(--ts-border);
  border-radius: 14px;
  box-shadow: var(--ts-shadow);
}
.ts-case .ts-case__step-num {
  position: absolute;
  top: -14px;
  left: 22px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFE200, #FF8300);
  color: var(--ts-graphite);
  font-size: 20px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(255, 131, 0, 0.3);
}
.ts-case .ts-case__step h3 {
  margin: 12px 0 10px;
  font-size: 20px;
}
.ts-case .ts-case__step p { font-size: 16px; }
.ts-case .ts-case__step .ts-case__step-tip {
  margin: 12px 0 0;
  padding: 12px 14px;
  background: var(--ts-yellow-pale);
  border-radius: 10px;
  font-size: 15.5px;
}

.ts-case .ts-case__steps-summary {
  margin: 26px 0 0;
  padding: 16px 20px;
  background: var(--ts-gray-soft);
  border-left: 5px solid var(--ts-yellow);
  border-radius: 0 10px 10px 0;
  font-size: 17px;
}
.ts-case .ts-case__media--spaced { margin-bottom: 26px; }

/* ---- Ширина колонки ------------------------------------------------------
   Єдина міра для всіх блоків: текст, картки, таймлайн, зображення та CTA
   вирівняні по тих самих лівому і правому краях. Внутрішніх обмежень ширини
   немає — інакше краї блоків «рвуться». */
.ts-case { max-width: 1000px; margin-left: auto; margin-right: auto; }

/* ---- Адаптив -------------------------------------------------------------------- */
@media (max-width: 900px) {
  .ts-case .ts-case__grid,
  .ts-case .ts-case__eco-grid { grid-template-columns: repeat(2, 1fr); }
  .ts-case .ts-case__hero { padding: 32px 26px; }
  .ts-case .ts-case__hero h2 { font-size: 29px; }
}
@media (max-width: 600px) {
  .ts-case { font-size: 17px; }
  .ts-case .ts-case__grid,
  .ts-case .ts-case__grid--2,
  .ts-case .ts-case__eco-grid,
  .ts-case .ts-case__steps { grid-template-columns: 1fr; }
  .ts-case h2 { font-size: 25px; }
  .ts-case .ts-case__hero h2 { font-size: 25px; }
  .ts-case .ts-case__pill { min-width: calc(50% - 6px); }
  .ts-case .ts-case__eco { padding: 24px 20px; }
  .ts-case .ts-case__cta { padding: 28px 22px; }
}
