/* landing/sections/home/home.css */

.section-title {
  font-size: 36px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 50px;
  color: var(--c-text);
}
.section-title span { color: var(--c-blue); }

/* Hero Section */
.hero-section {
  padding: 160px 0 100px; /* Увеличили padding-top, чтобы шапка не перекрывала контент */
  background: radial-gradient(circle at top right, rgba(74,144,226,0.08), transparent 40%),
              radial-gradient(circle at bottom left, rgba(126,211,33,0.05), transparent 40%);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-content {
  flex: 1;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  background-color: rgba(74,144,226,0.1);
  color: var(--c-blue);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 24px;
  line-height: 1.1;
  color: var(--c-text);
}

.hero-subtitle {
  font-size: 18px;
  color: var(--c-text-muted);
  margin-bottom: 40px;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 50px;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

.hero-stats {
  display: flex;
  gap: 40px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-item strong {
  font-size: 28px;
  font-weight: 800;
  color: var(--c-text);
}

.stat-item span {
  font-size: 13px;
  color: var(--c-text-muted);
}

/* Demo Chat CSS */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.demo-chat {
  width: 380px;
  background: var(--c-surface);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(30,27,58,0.08);
  border: 1px solid rgba(0,0,0,0.05);
  overflow: hidden;
  position: relative;
}

.demo-chat-header {
  background: var(--c-blue);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}

.demo-chat-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.demo-chat-info h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}
.demo-chat-info span { font-size: 12px; opacity: 0.8; }

.demo-chat-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: #fafbfc;
  height: 280px;
}

.demo-msg {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 85%;
}

.demo-msg.bot {
  background: white;
  border: 1px solid rgba(0,0,0,0.05);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.demo-msg.user {
  background: var(--c-green);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.demo-chat-input {
  padding: 16px;
  background: white;
  border-top: 1px solid rgba(0,0,0,0.05);
  display: flex;
  gap: 10px;
}

.demo-chat-input input {
  flex: 1;
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  padding: 0 16px;
  font-family: inherit;
}

.demo-btn-send {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--c-blue);
  color: white; border: none;
}

/* Features */
.features-section {
  padding: 100px 0;
  background-color: white;
}

.features-slider-container {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  padding: 40px 0;
}

.features-track {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 480px;
  perspective: 1000px;
}

.feature-slide {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 320px;
  background: var(--c-bg);
  padding: 40px 30px;
  border-radius: 24px;
  border: 1px solid rgba(0,0,0,0.02);
  transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  z-index: 0;
  background: white;
  pointer-events: none;
}

.feature-slide.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 3;
  box-shadow: 0 30px 60px rgba(74,144,226,0.15);
  border-color: rgba(74,144,226,0.2);
  pointer-events: auto;
}

.feature-slide.prev {
  opacity: 0.6;
  transform: translate(calc(-50% - 360px), -50%) scale(0.85);
  z-index: 2;
  cursor: pointer;
  pointer-events: auto;
}

.feature-slide.next {
  opacity: 0.6;
  transform: translate(calc(-50% + 360px), -50%) scale(0.85);
  z-index: 2;
  cursor: pointer;
  pointer-events: auto;
}

.feat-icon-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 24px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    display: block;
}

.feature-slide h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--c-text);
}

.feature-slide p {
  font-size: 15px;
  color: var(--c-text-muted);
  line-height: 1.6;
}

/* Кнопки переключения для слайдера */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 24px;
  border: none;
  background: white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  color: var(--c-blue);
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn:hover {
  background: var(--c-blue);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev-btn { left: 0; }
.slider-btn.next-btn { right: 0; }

/* ---------------------------------
   Niches Section (Блоки контекста)
--------------------------------- */
.niches-section {
  padding: 100px 0;
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.niche-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.niche-row.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.niche-row:last-child {
  margin-bottom: 0;
}

.niche-row.reverse {
  flex-direction: row-reverse;
}

.niche-img-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

/* Декоративный круг под картинкой */
.niche-img-wrapper::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, rgba(74,144,226,0.1) 0%, rgba(126,211,33,0.1) 100%);
  border-radius: 50%;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(20px);
}

.niche-img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 50px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

.niche-row:hover .niche-img {
  transform: translateY(-10px);
}

.niche-content {
  flex: 1;
}

.niche-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(74, 144, 226, 0.1);
  color: var(--c-blue);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.niche-content h3 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--c-text);
  line-height: 1.2;
}

.niche-content p {
  font-size: 17px;
  color: var(--c-text-muted);
  line-height: 1.6;
  margin-bottom: 30px;
}

.niche-features {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.niche-features span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--c-text);
  background: white;
  padding: 10px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.03);
}

/* Адаптив слайдера и ниш */
@media (max-width: 900px) {
  .niche-row, .niche-row.reverse {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }
  
  .niche-features {
    justify-content: center;
  }
}

/* Stop Paying Section */
.stop-paying {
  padding: 100px 0;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.5), rgba(74, 144, 226, 0.05));
}

.stop-paying-inner {
  display: flex;
  align-items: center;
  gap: 60px;
}

.sp-content {
  flex: 1;
}

.sp-text {
  font-size: 18px;
  color: var(--c-text-muted);
  line-height: 1.6;
  margin-bottom: 30px;
}

.sp-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sp-list li {
  font-size: 16px;
  font-weight: 500;
  color: var(--c-text);
  background: white;
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  display: inline-block;
}

.sp-conclusion {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-blue-dark);
  margin-bottom: 30px;
  border-left: 4px solid var(--c-green);
  padding-left: 20px;
}

.sp-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.sp-image img {
  max-width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

/* How It Works */
.how-it-works { padding: 100px 0; }

.steps-wrapper {
  display: flex;
  gap: 30px;
  position: relative;
}

.steps-wrapper::before {
  content: '';
  position: absolute;
  top: 30px; left: 50px; right: 50px;
  height: 2px;
  background: rgba(74,144,226,0.15);
  z-index: 0;
}

.step {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.step-num {
  width: 60px; height: 60px;
  background: white;
  border: 2px solid var(--c-blue);
  color: var(--c-blue);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800;
  margin-bottom: 24px;
  box-shadow: 0 10px 20px rgba(74,144,226,0.1);
}

.step h4 { font-size: 18px; margin-bottom: 10px; }
.step p { font-size: 14px; color: var(--c-text-muted); flex-grow: 1; }

/* Security Preview */
.security-preview {
  padding: 80px 0;
  background: linear-gradient(135deg, #1E1B3A, #2c2759);
  color: white;
}

.security-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.security-text { max-width: 500px; }
.security-text h2 { font-size: 32px; margin-bottom: 16px; }
.security-text p { color: rgba(255,255,255,0.7); font-size: 16px; }

.security-stats { display: flex; flex-direction: column; gap: 16px; }
.s-stat {
  background: rgba(255,255,255,0.05);
  padding: 16px 24px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
  display: flex; align-items: center; gap: 16px;
}
.s-stat span { font-size: 24px; font-weight: 800; color: var(--c-green); }

/* ---------------------------
   Ваши выгоды
--------------------------- */
.benefits-section {
  padding: 100px 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.benefit-card {
  background: var(--c-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
  border: 1px solid rgba(0,0,0,0.05);
}

.benefit-card:hover {
  transform: translateY(-5px);
}

.benefit-img {
  height: 220px;
  background: var(--c-bg);
  overflow: hidden;
}

.benefit-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.benefit-text {
  padding: 30px;
}

.benefit-text h3 {
  font-size: 22px;
  color: var(--c-text);
  margin-bottom: 12px;
  font-weight: 700;
}

.benefit-text p {
  font-size: 15px;
  color: var(--c-text-muted);
  line-height: 1.6;
}

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

/* ---------------------------
   Lazy Loading заглушки
--------------------------- */
img[data-src] {
  background: linear-gradient(110deg, #f0f2f5 30%, #e8eaed 50%, #f0f2f5 70%);
  background-size: 200% 100%;
  animation: lazyShimmer 1.5s ease-in-out infinite;
  min-height: 100px;
}

img[data-src].lazy-loaded {
  animation: none;
  background: none;
}

@keyframes lazyShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* CTA Master Banner */
.cta-master-banner {
  position: relative;
  width: 100%;
  margin: 100px 0;
  background: var(--c-blue-dark, #1E1B3A); /* Темный фон из секции безопасности */
  color: white;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 40px 80px rgba(30,27,58, 0.2);
}

.cta-master-bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  background-image: url('/landing/images/cta_master_bg.png');
  background-size: cover;
  background-position: center left;
  /* Плавный переход-туман и обесцвечивание */
  filter: grayscale(80%) contrast(1.1);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 50%);
  mask-image: linear-gradient(to right, transparent 0%, black 50%);
  z-index: 1;
}

.cta-master-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, #1E1B3A 0%, rgba(30,27,58,0) 100%);
  z-index: 2;
}

.cta-master-inner {
  position: relative;
  z-index: 3;
  padding: 100px 60px;
  display: flex;
  align-items: center;
}

.cta-master-content {
  max-width: 55%;
}

.cta-master-content h2 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.1;
  color: white;
}

.cta-master-content p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
  line-height: 1.6;
}

.btn-cta-green {
  background: var(--c-green, #7ED321);
  color: white;
  padding: 20px 40px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-block;
  box-shadow: 0 10px 30px rgba(126, 211, 33, 0.4);
  text-decoration: none;
}

.btn-cta-green:hover {
  background: #6bb01a;
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(126, 211, 33, 0.6);
  color: white;
}

@media (max-width: 900px) {
  .cta-master-bg {
    width: 100%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 50%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 50%);
  }
  .cta-master-bg::before {
    background: linear-gradient(to bottom, #1E1B3A 0%, rgba(30,27,58,0) 100%);
  }
  .cta-master-inner {
    padding: 60px 30px;
    align-items: flex-start;
  }
  .cta-master-content {
    max-width: 100%;
    margin-top: 200px;
    text-align: center;
  }
  .cta-master-content h2 {
    font-size: 32px;
  }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE: ПЛАНШЕТ (≤ 1024px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero-inner { gap: 40px; }
  .hero-title { font-size: 42px; }
  .demo-chat { width: 320px; }

  .features-track { height: 440px; }
  .feature-slide { width: 280px; }
  .feature-slide.prev { transform: translate(calc(-50% - 300px), -50%) scale(0.85); }
  .feature-slide.next { transform: translate(calc(-50% + 300px), -50%) scale(0.85); }

  .stop-paying-inner { gap: 40px; }
  .security-inner { gap: 30px; }

  .cta-master-inner { padding: 80px 40px; }
  .cta-master-content h2 { font-size: 36px; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE: МОБИЛЬНЫЙ (≤ 768px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Section Title ── */
  .section-title {
    font-size: 26px;
    margin-bottom: 32px;
  }

  /* ── Hero ── */
  .hero-section {
    padding: 100px 0 60px;
  }

  .hero-inner {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .hero-title {
    font-size: 32px;
    letter-spacing: -0.5px;
  }

  .hero-subtitle {
    font-size: 16px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .hero-stats {
    justify-content: center;
    gap: 24px;
  }

  .hero-visual {
    justify-content: center;
  }

  .demo-chat {
    width: 100%;
    max-width: 360px;
  }

  /* ── Benefits ── */
  .benefits-section { padding: 60px 0; }
  .benefit-img { height: 180px; }
  .benefit-text { padding: 20px; }
  .benefit-text h3 { font-size: 20px; }

  /* ── Features Slider ── */
  .features-section { padding: 60px 0; }

  .features-track {
    height: 380px;
  }

  .feature-slide {
    width: 250px;
    padding: 30px 24px;
  }

  .feature-slide.prev {
    transform: translate(calc(-50% - 180px), -50%) scale(0.8);
    opacity: 0.4;
  }

  .feature-slide.next {
    transform: translate(calc(-50% + 180px), -50%) scale(0.8);
    opacity: 0.4;
  }

  .feature-slide.active {
    transform: translate(-50%, -50%) scale(1);
  }

  .slider-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .feat-icon-img {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
  }

  .feature-slide h3 { font-size: 18px; }
  .feature-slide p { font-size: 14px; }

  /* ── Niches ── */
  .niches-section { padding: 60px 0; }

  .niche-content h3 { font-size: 24px; }
  .niche-content p { font-size: 15px; }
  .niche-row { margin-bottom: 50px; }

  .niche-img {
    max-height: 250px;
    width: auto;
    object-fit: cover;
  }

  /* ── Stop Paying ── */
  .stop-paying { padding: 60px 0; }

  .stop-paying-inner {
    flex-direction: column;
    gap: 40px;
  }

  .stop-paying-inner .section-title {
    text-align: center !important;
  }

  .sp-text { font-size: 16px; }
  .sp-conclusion { font-size: 18px; }

  .sp-image {
    order: -1;
  }

  .sp-image img {
    max-width: 280px;
    margin: 0 auto;
    display: block;
  }

  /* ── How It Works ── */
  .how-it-works { padding: 60px 0; }

  .steps-wrapper {
    flex-direction: column;
    gap: 40px;
  }

  .steps-wrapper::before {
    display: none;
  }

  .step {
    text-align: center;
  }

  .step-num {
    margin: 0 auto 16px;
  }

  /* ── Security Preview ── */
  .security-preview { padding: 50px 0; }

  .security-inner {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .security-text { max-width: 100%; }
  .security-text h2 { font-size: 26px; }
  .security-text p { font-size: 15px; }

  .security-stats { align-items: stretch; }

  .security-image img { width: 150px; }

  /* ── CTA Master Banner ── */
  .cta-master-content h2 {
    font-size: 26px;
  }

  .cta-master-content p {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .btn-cta-green {
    width: 100%;
    text-align: center;
    padding: 16px 30px;
    font-size: 16px;
  }

  .cta-master-banner {
    margin: 60px 0;
    border-radius: 20px;
  }
}
