/**
 * Solutions («Решения») — tildei.com editorial + word tabs.
 */

.page-shell--solutions .content {
  max-width: 1100px; /* Wide container for premium 2-col layout */
}

.page-shell--solutions .page-title {
  margin-bottom: 32px;
}

.solutions-intro {
  margin-bottom: 8px;
}

.solutions-editorial {
  margin-top: 8px;
}

.solutions-editorial__headline {
  margin: 0 0 28px;
}

.solutions-editorial__line {
  margin: 0;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--color-text, #f5f5f5);
}

.solutions-editorial__line--soft {
  color: #8a8a8a;
}

.solutions-editorial__lede {
  margin: 0 0 36px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--color-text-body, #aaaaaa);
  max-width: 36rem;
}

/* Module switcher — pill buttons (same language as notes-cat / solutions-btn) */
.solutions-tabs {
  margin-bottom: 48px;
}

.solutions-tabs__track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.solutions-tabs__pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  margin: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--color-text-body, #aaaaaa);
  cursor: pointer;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.solutions-tabs__pill:hover,
.solutions-tabs__pill:focus-visible {
  color: var(--color-text, #f5f5f5);
  border-color: rgba(102, 178, 255, 0.4);
  background: rgba(102, 178, 255, 0.08);
  outline: none;
}

.solutions-tabs__pill.is-active {
  color: var(--color-text, #f5f5f5);
  border-color: var(--color-link, #66b2ff);
  background: rgba(102, 178, 255, 0.12);
}

.solutions-tabs__pill:focus-visible {
  outline: 2px solid var(--color-link, #66b2ff);
  outline-offset: 2px;
}

.solutions-tabs__soon {
  font-size: 13px;
  color: #444444;
  padding: 6px 0;
  user-select: none;
  font-style: italic;
}

@media (min-width: 768px) {
  .solutions-tabs__track {
    gap: 18px;
  }

  .solutions-tabs__pill {
    padding: 12px 26px;
    font-size: 16px;
  }
}

/* Panel — blog article block + visual mockup */
.solutions-panels {
  position: relative;
  min-height: 450px;
}

.solutions-panel {
  display: none;
  margin: 0;
  padding: 0;
}

.solutions-panel.is-active {
  display: block;
  animation: solutions-panel-in 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

@media (min-width: 768px) {
  .solutions-panel.is-active {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
    align-items: center;
  }
}

@keyframes solutions-panel-in {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.solutions-panel__content {
  display: flex;
  flex-direction: column;
}

.solutions-panel__tag {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--color-link, #66b2ff);
  margin-bottom: 12px;
}

.solutions-panel__title {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text, #f5f5f5);
}

.solutions-panel__tagline {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.45;
  color: #888888;
  font-weight: 400;
}

.solutions-panel__lead {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #dddddd;
}

.solutions-panel__body {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-body, #aaaaaa);
}

.solutions-panel__features {
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid #222;
  padding-top: 20px;
}

.solutions-panel__features li {
  font-size: 15px;
  line-height: 1.45;
  color: #c5c5c5;
  padding-left: 0;
}

.solutions-panel__features li::before {
  content: "— ";
  color: #444444;
  margin-right: 4px;
}

.solutions-panel__cta {
  margin: 0;
}

/* Premium Solutions Button - EXACTLY like .blog-list__load-more */
.solutions-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 14px 32px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text, #f5f5f5);
  background: transparent;
  border: 1px solid #333;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.solutions-btn:hover,
.solutions-btn:focus-visible {
  border-color: var(--color-link, #66b2ff);
  color: var(--color-link, #66b2ff);
  background-color: rgba(102, 178, 255, 0.03);
  outline: none;
}

.solutions-btn:focus-visible {
  outline: 2px solid var(--color-link, #66b2ff);
  outline-offset: 2px;
}

/* --- PREMIUM INTERACTIVE MOCKUPS --- */
.solutions-panel__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}

/* Phone Frame */
.phone-frame {
  position: relative;
  width: 260px;
  height: 440px;
  border-radius: 36px;
  background: #09090b;
  border: 6px solid #1f1f23;
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.8),
    inset 0 0 12px rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 18px;
  background: #1f1f23;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  z-index: 20;
}

.phone-screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #0c0c0e;
  padding: 24px 14px 16px;
  box-sizing: border-box;
}

/* Intercept Chat Mockup */
.chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1a1a1e;
  margin-bottom: 12px;
}

.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(102, 178, 255, 0.1);
  border: 1px solid rgba(102, 178, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--color-link, #66b2ff);
}

.chat-title {
  display: flex;
  flex-direction: column;
}

.chat-name {
  font-size: 12px;
  font-weight: 600;
  color: #eee;
}

.chat-status {
  font-size: 9px;
  color: #10b981;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.chat-message {
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.4;
  max-width: 85%;
  opacity: 0;
}

.chat-message .msg-meta {
  font-size: 8px;
  color: #666;
  margin-bottom: 2px;
  font-weight: 500;
}

.chat-message--competitor {
  background: #18181c;
  color: #ccc;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.chat-message--system {
  background: rgba(102, 178, 255, 0.06);
  border: 1px dashed rgba(102, 178, 255, 0.2);
  color: var(--color-link, #66b2ff);
  align-self: center;
  text-align: center;
  max-width: 95%;
  font-size: 10px;
}

.chat-message--agent {
  background: #1e1b4b;
  border: 1px solid rgba(167, 139, 250, 0.15);
  color: #e9d5ff;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.chat-message--crm {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #34d399;
  align-self: center;
  text-align: center;
  max-width: 95%;
  font-weight: 500;
}

/* Staggered Chat Infinite Loop */
.animate-msg-1 { animation: msg-loop-1 12s cubic-bezier(0.25, 0.1, 0.25, 1) infinite; }
.animate-msg-2 { animation: msg-loop-2 12s cubic-bezier(0.25, 0.1, 0.25, 1) infinite; }
.animate-msg-3 { animation: msg-loop-3 12s cubic-bezier(0.25, 0.1, 0.25, 1) infinite; }
.animate-msg-4 { animation: msg-loop-4 12s cubic-bezier(0.25, 0.1, 0.25, 1) infinite; }

@keyframes msg-loop-1 {
  0%, 5% { opacity: 0; transform: translateY(8px); }
  10%, 90% { opacity: 1; transform: translateY(0); }
  95%, 100% { opacity: 0; transform: translateY(-8px); }
}

@keyframes msg-loop-2 {
  0%, 25% { opacity: 0; transform: translateY(8px); }
  30%, 90% { opacity: 1; transform: translateY(0); }
  95%, 100% { opacity: 0; transform: translateY(-8px); }
}

@keyframes msg-loop-3 {
  0%, 50% { opacity: 0; transform: translateY(8px); }
  55%, 90% { opacity: 1; transform: translateY(0); }
  95%, 100% { opacity: 0; transform: translateY(-8px); }
}

@keyframes msg-loop-4 {
  0%, 75% { opacity: 0; transform: translateY(8px); }
  80%, 90% { opacity: 1; transform: translateY(0); }
  95%, 100% { opacity: 0; transform: translateY(-8px); }
}

/* Telegram Leads Mockup */
.tg-header {
  padding-bottom: 10px;
  border-bottom: 1px solid #1a1a1e;
  margin-bottom: 12px;
}

.tg-title {
  font-size: 12px;
  font-weight: 600;
  color: #eee;
}

.tg-status {
  font-size: 9px;
  color: var(--color-link, #66b2ff);
  animation: pulse-opacity 1.5s ease-in-out infinite;
}

.tg-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  position: relative;
}

.tg-item {
  background: #121214;
  border: 1px solid #1f1f23;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
}

.tg-user {
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  color: #888;
}

.tg-text {
  font-size: 11px;
  line-height: 1.35;
  color: #ccc;
}

.tg-badge {
  align-self: flex-start;
  font-size: 8px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.tg-badge--hot {
  background: rgba(102, 178, 255, 0.1);
  color: var(--color-link, #66b2ff);
  border: 1px solid rgba(102, 178, 255, 0.2);
}

.tg-item--noise {
  opacity: 0.3;
}

.tg-badge--noise {
  background: rgba(255, 255, 255, 0.04);
  color: #555;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Feed Staggered Loop */
.animate-feed-1 { animation: feed-loop-1 9s ease-in-out infinite; }
.animate-feed-2 { animation: feed-loop-2 9s ease-in-out infinite; }
.animate-feed-3 { animation: feed-loop-3 9s ease-in-out infinite; }

@keyframes feed-loop-1 {
  0%, 5% { opacity: 0; transform: translateY(10px); }
  12%, 90% { opacity: 1; transform: translateY(0); }
  95%, 100% { opacity: 0; transform: translateY(-10px); }
}

@keyframes feed-loop-2 {
  0%, 30% { opacity: 0; transform: translateY(10px); }
  37%, 90% { opacity: 0.3; transform: translateY(0); }
  95%, 100% { opacity: 0; transform: translateY(-10px); }
}

@keyframes feed-loop-3 {
  0%, 55% { opacity: 0; transform: translateY(10px); }
  62%, 90% { opacity: 1; transform: translateY(0); }
  95%, 100% { opacity: 0; transform: translateY(-10px); }
}

/* Scanning Laser Line */
.tg-scanning-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-link, #66b2ff), transparent);
  box-shadow: 0 0 8px var(--color-link, #66b2ff);
  animation: laser-sweep 4s ease-in-out infinite;
  z-index: 10;
  pointer-events: none;
}

@keyframes laser-sweep {
  0%, 100% { top: 10%; }
  50% { top: 90%; }
}

/* SMS + Promo Dual Phone Mockup */
.solution-mockup--sms-promo {
  position: relative;
  width: 280px;
  height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sms-phone, .promo-phone {
  position: absolute;
  border-radius: 24px;
  background: #09090b;
  border: 4px solid #1f1f23;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  box-sizing: border-box;
}

.sms-phone {
  width: 160px;
  height: 280px;
  left: 0;
  top: 40px;
  z-index: 5;
  opacity: 0.7;
  transform: scale(0.9) rotate(-4deg);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sms-screen {
  width: 100%;
  height: 100%;
  background: #0c0c0e;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.sms-header {
  font-size: 9px;
  font-weight: 600;
  color: #666;
  text-align: center;
  margin-bottom: 12px;
  border-bottom: 1px solid #1a1a1e;
  padding-bottom: 4px;
}

.sms-bubble {
  background: #1c1c21;
  border-radius: 12px;
  padding: 8px;
  color: #ccc;
  font-size: 9px;
  line-height: 1.3;
  border-bottom-left-radius: 2px;
  position: relative;
}

.sms-bubble p {
  margin: 0 0 4px;
}

.sms-time {
  display: block;
  text-align: right;
  font-size: 7px;
  color: #555;
}

.flow-arrow {
  position: absolute;
  left: 145px;
  top: 170px;
  font-size: 20px;
  color: var(--color-link, #66b2ff);
  z-index: 15;
  text-shadow: 0 0 10px rgba(102, 178, 255, 0.4);
  animation: arrow-bounce 1.5s ease-in-out infinite;
}

@keyframes arrow-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}

.promo-phone {
  width: 180px;
  height: 320px;
  right: 0;
  bottom: 40px;
  z-index: 10;
  border-color: #2a2a2f;
}

.promo-screen {
  width: 100%;
  height: 100%;
  background: #08080a;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.promo-header {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}

.promo-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.promo-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.promo-stat-label {
  font-size: 8px;
  color: #777;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.promo-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.promo-stat-sub {
  font-size: 8px;
  color: #555;
  margin-top: 2px;
}

.promo-stat-sub--link {
  color: var(--color-link, #66b2ff);
  font-weight: 600;
}

.promo-stat-sub--hot {
  color: #fb7185;
  font-weight: 600;
}

.animate-sms-bubble {
  animation: sms-bubble-loop 12s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
}

.animate-stat-1 { animation: stat-loop-1 12s cubic-bezier(0.25, 0.1, 0.25, 1) infinite; }
.animate-stat-2 { animation: stat-loop-2 12s cubic-bezier(0.25, 0.1, 0.25, 1) infinite; }
.animate-stat-3 { animation: stat-loop-3 12s cubic-bezier(0.25, 0.1, 0.25, 1) infinite; }

@keyframes sms-bubble-loop {
  0%, 5% { opacity: 0; transform: translateY(6px); }
  10%, 90% { opacity: 1; transform: translateY(0); }
  95%, 100% { opacity: 0; transform: translateY(-6px); }
}

@keyframes stat-loop-1 {
  0%, 25% { opacity: 0; transform: translateY(6px); }
  30%, 90% { opacity: 1; transform: translateY(0); }
  95%, 100% { opacity: 0; transform: translateY(-6px); }
}

@keyframes stat-loop-2 {
  0%, 50% { opacity: 0; transform: translateY(6px); }
  55%, 90% { opacity: 1; transform: translateY(0); }
  95%, 100% { opacity: 0; transform: translateY(-6px); }
}

@keyframes stat-loop-3 {
  0%, 75% { opacity: 0; transform: translateY(6px); }
  80%, 90% { opacity: 1; transform: translateY(0); }
  95%, 100% { opacity: 0; transform: translateY(-6px); }
}

/* Hover effects on the SMS+Promo phones */
.solutions-panel.is-active:hover .sms-phone {
  opacity: 0.9;
  transform: scale(0.95) rotate(-2deg);
}

/* General Animations */
@keyframes pulse-opacity {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.solutions-more {
  margin: 48px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #555;
  font-style: italic;
}

.solutions-footer {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid #222;
}

/* Responsive Overrides */
@media (max-width: 767px) {
  .solutions-panel {
    display: none;
  }

  .solutions-panel.is-active {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .solutions-panel__visual {
    order: -1; /* Show mockup first on mobile */
    min-height: 360px;
  }

  .solutions-panel__title {
    font-size: 24px;
  }
}

@media (max-width: 639px) {
  .page-shell--solutions .content {
    padding-left: 24px;
    padding-right: 24px;
  }

  .solutions-tabs__track {
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin: 0 -4px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .solutions-tabs__track::-webkit-scrollbar {
    display: none;
  }

  .solutions-tabs__pill {
    flex-shrink: 0;
    padding: 11px 18px;
    font-size: 14px;
  }

  .solutions-panel__lead {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .solutions-panel {
    transition: none;
    transform: none;
  }
  .animate-msg-1, .animate-msg-2, .animate-msg-3, .animate-msg-4,
  .animate-feed-1, .animate-feed-2, .animate-feed-3,
  .tg-scanning-line, .flow-arrow, .promo-btn-pulsing {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
