/* ===========================================================
   Appify KZ — общий слой стилей поверх инлайна страниц.
   Новые компоненты (отзывы, логотипы клиентов) + аккуратная
   полировка. Опирается на CSS-переменные из :root страниц.
   =========================================================== */

/* ---------- Полировка: фирменный градиент-текст с лёгким шиммером ---------- */
@keyframes appify-shimmer { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
.title .grad,
.section h2 .grad,
.direction-body h3 .grad {
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: appify-shimmer 6s linear infinite;
}

/* ---------- Полировка: «блик» по основной кнопке ---------- */
.btn:not(.secondary):not(.ghost) { position: relative; overflow: hidden; }
.btn:not(.secondary):not(.ghost)::after {
  content: ''; position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%; pointer-events: none;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-18deg); transition: left .6s ease;
}
.btn:not(.secondary):not(.ghost):hover::after { left: 140%; }

/* ---------- Полировка: мягкое верхнее свечение карточек ---------- */
.card, .case-card, .pricing, .step, .direction {
  --glow: 0 0 0 rgba(20,184,166,0);
}
.case-card:hover, .pricing:hover { box-shadow: 0 18px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(20,184,166,.18); }

/* ---------- Хлебные крошки на лендингах ---------- */
.breadcrumbs { font-size: 13px; color: var(--muted); padding-top: 18px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand-2); }
.breadcrumbs span { color: #cbd5e1; }
.breadcrumbs .sep { margin: 0 8px; opacity: .6; }

/* ---------- Блок «Другие услуги» (перелинковка направлений) ---------- */
.lp-other { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 32px; }
@media (max-width: 900px) { .lp-other { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .lp-other { grid-template-columns: 1fr; } }
.lp-other-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px; border-radius: 16px; text-decoration: none;
  background: linear-gradient(180deg, var(--card, #0f1620), #0b111a);
  border: 1px solid var(--stroke);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.lp-other-card:hover { transform: translateY(-3px); border-color: rgba(20,184,166,0.4); box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.lp-other-ic {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(20,184,166,0.18), rgba(34,211,238,0.08));
  border: 1px solid rgba(20,184,166,0.25); color: var(--brand-2);
}
.lp-other-ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lp-other-txt b { display: block; color: var(--text-bright); font-size: 15px; font-weight: 700; line-height: 1.25; }
.lp-other-txt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ---------- Выпадающее меню «Услуги» в навигации ---------- */
.nav-dd { position: relative; display: inline-flex; align-items: center; }
.nav-dd > .nav-dd-toggle { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.nav-dd > .nav-dd-toggle svg { width: 12px; height: 12px; transition: transform .2s ease; }
.nav-dd:hover > .nav-dd-toggle svg, .nav-dd:focus-within > .nav-dd-toggle svg { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute; top: calc(100% + 12px); left: 0; min-width: 246px;
  background: rgba(8, 12, 18, 0.98); backdrop-filter: blur(14px);
  border: 1px solid var(--stroke); border-radius: 14px; padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 22px 48px rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 70;
}
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dd-menu a {
  display: flex !important; align-items: center; gap: 10px;
  padding: 10px 12px !important; border-radius: 9px;
  font-size: 14px !important; font-weight: 500; color: #cbd5e1 !important;
  white-space: nowrap; width: auto !important; border: none !important;
}
.nav-dd-menu a:hover { background: rgba(20,184,166,0.12); color: var(--brand-2) !important; }
.nav-dd-menu a b { font-weight: 600; }
@media (max-width: 768px) {
  .nav-dd { display: block; width: 100%; }
  .nav-dd-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    background: transparent; border: none; box-shadow: none; backdrop-filter: none;
    padding: 0 0 0 14px; min-width: 0;
  }
  .nav-dd > .nav-dd-toggle svg { display: none; }
}

/* ---------- Посадочные страницы направлений ---------- */
.lp-hero { text-align: center; max-width: 860px; margin: 0 auto; }
.lp-hero .cta, .lp-hero .hero-meta { justify-content: center; }
.lp-hero .subtitle { margin-left: auto; margin-right: auto; }
.lp-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--muted); font-size: 13px; text-decoration: none; }
.lp-back:hover { color: var(--brand-2); }
.lp-section-head { max-width: 760px; }

/* ---------- Полировка: иконки в hero-тегах ---------- */
.hero-meta .tag { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta .tag svg {
  width: 14px; height: 14px; flex-shrink: 0;
  fill: none; stroke: var(--brand-2); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ===========================================================
   HERO — реалистичный превью Telegram Mini App
   =========================================================== */
.tg-app { padding: 0 !important; overflow: hidden; }
.tg-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--stroke-bright);
  background: rgba(34,211,238,0.06);
}
.tg-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; color: #00100e; font-size: 15px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.tg-head-meta { display: flex; flex-direction: column; line-height: 1.25; flex: 1; min-width: 0; }
.tg-head-meta b { color: var(--text-bright); font-size: 14px; }
.tg-head-meta small { color: var(--muted); font-size: 11px; }
.tg-dots { color: var(--muted); font-size: 18px; }

.tg-products { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.tg-product {
  background: rgba(11,18,27,0.7); border: 1px solid var(--stroke-bright);
  border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 4px;
}
.tg-thumb { aspect-ratio: 16/11; border-radius: 8px; background-size: cover; background-position: center; }
/* реальные фото товаров; градиент остаётся фолбэком, пока фото не загрузилось */
.tg-thumb-1 { background-image: url('/assets/imgs/hero/latte.jpg'), linear-gradient(135deg, #6d4aff, #22d3ee); }
.tg-thumb-2 { background-image: url('/assets/imgs/hero/croissant.jpg'), linear-gradient(135deg, #f59e0b, #ef4444); }
.tg-name { color: #cbd5e1; font-size: 12.5px; font-weight: 600; }
.tg-price { color: var(--brand-2); font-size: 12px; font-weight: 700; }

.tg-mainbtn {
  margin: 0 14px 14px; padding: 12px; border-radius: 12px; text-align: center;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #00100e; font-weight: 700; font-size: 13.5px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 20px var(--brand-glow);
}
.tg-mainbtn span { font-size: 12px; }

.tg-toast { display: flex; align-items: center; gap: 12px; }
.tg-toast-ic {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3); color: var(--success);
}
.tg-toast-ic svg { width: 18px; height: 18px; }
.tg-toast-body { display: flex; flex-direction: column; line-height: 1.25; flex: 1; }
.tg-toast-body b { color: var(--text-bright); font-size: 13.5px; }
.tg-toast-body small { color: var(--muted); font-size: 11.5px; }
.tg-toast-time { color: var(--muted); font-size: 11px; }

/* ---------- Полировка: кнопки и примечание в тарифах ---------- */
.pricing { display: flex; flex-direction: column; }
.pricing .list { flex: 1; }
.pricing .plan-btn { width: 100%; justify-content: center; margin-top: 22px; }
.pricing-note {
  margin-top: 22px; text-align: center;
  color: var(--muted); font-size: 13.5px;
}
.pricing-note strong { color: #cbd5e1; font-weight: 600; }

/* ===========================================================
   ЛОГОТИПЫ КЛИЕНТОВ
   =========================================================== */
.clients-strip {
  padding: 36px 0;
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  background: rgba(255,255,255,0.01);
}
.clients-title {
  text-align: center; margin: 0 0 22px;
  color: var(--muted); font-size: 12px; font-weight: 700;
  letter-spacing: 1.6px; text-transform: uppercase;
}
.clients-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 18px 40px;
}
.client-logo {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; opacity: .65;
  filter: grayscale(1) brightness(1.6);
  transition: opacity .25s ease, filter .25s ease, transform .25s ease;
}
.client-logo:hover { opacity: 1; filter: grayscale(0) brightness(1); transform: translateY(-2px); }
.client-logo img { max-height: 46px; max-width: 150px; object-fit: contain; display: block; }

/* ===========================================================
   ОТЗЫВЫ
   =========================================================== */
.testi-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px;
}
@media (max-width: 980px) { .testi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .testi-grid { grid-template-columns: 1fr; } }

.testi {
  display: flex; flex-direction: column; gap: 14px; margin: 0;
  background: linear-gradient(180deg, var(--card, #0f1620), #0b111a);
  border: 1px solid var(--stroke); border-radius: 18px; padding: 26px;
  position: relative; overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.testi::before {
  content: '\201C'; position: absolute; top: -10px; right: 18px;
  font-family: Georgia, serif; font-size: 90px; line-height: 1;
  color: var(--brand); opacity: .12; pointer-events: none;
}
.testi:hover { transform: translateY(-4px); border-color: rgba(20,184,166,0.35); box-shadow: 0 16px 34px rgba(0,0,0,.35); }
.testi-stars { color: #f5c451; font-size: 15px; letter-spacing: 2px; }
.testi-stars span { color: #3a4452; }
.testi blockquote {
  margin: 0; color: #d4dbe4; font-size: 15.5px; line-height: 1.65; flex: 1;
}
.testi figcaption { display: flex; align-items: center; gap: 12px; }
.testi-ava {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; border: 1px solid var(--stroke-bright);
}
.testi-ava--ph {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(20,184,166,0.25), rgba(34,211,238,0.15));
  color: var(--brand-2); font-weight: 700; font-size: 15px;
}
.testi-who { display: flex; flex-direction: column; line-height: 1.3; }
.testi-who b { color: var(--text-bright); font-size: 14.5px; font-weight: 700; }
.testi-who small { color: var(--muted); font-size: 12.5px; }

/* Лёгкое появление динамически отрисованных карточек */
.testi, #homeCasesGrid .case-card, #casesGrid .case {
  animation: appify-rise .5s ease both;
}
@keyframes appify-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
