* {
  box-sizing: border-box;
}

.installment-page {
  padding: 0;
  margin: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Шапка - теперь уже, как карточки */
.page-header {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  border: 1px solid rgba(55, 65, 81, 0.3);
  border-radius: 20px;
  margin: 20px auto 40px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.header-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 50px 0 40px;
}

.header-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #a78bfa 50%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.2s forwards;
  letter-spacing: -0.02em;
}

.header-subtitle {
  font-size: 1.1rem;
  color: #94a3b8;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.4s forwards;
  line-height: 1.6;
}

.header-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  color: white;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.4s ease;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.6s forwards;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
  margin-bottom: 20px;
}

.header-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
  background: linear-gradient(135deg, #9333ea 0%, #2563eb 100%);
  color: white;
  text-decoration: none;
}

/* Красивый текст о партнерах */
.partners-info {
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.7s forwards;
}

.partners-info-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: #cbd5e1;
  backdrop-filter: blur(10px);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.partners-info-text::before {
  content: "🤝";
  margin-right: 4px;
}

.partners-info-text::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Красивые кнопки партнеров */
.partner-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.8s forwards;
}

.partner-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  backdrop-filter: blur(10px);
  min-width: 160px;
  position: relative;
  overflow: hidden;
}

.partner-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.partner-btn:hover::before {
  left: 100%;
}

.partner-btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.vd-btn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.vd-btn:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.2) 100%);
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
  color: #059669;
}

.tbank-btn {
  background: linear-gradient(135deg, rgba(255, 221, 51, 0.15) 0%, rgba(251, 191, 36, 0.1) 100%);
  border-color: rgba(255, 221, 51, 0.4);
  color: #fbbf24;
  box-shadow: 0 4px 15px rgba(255, 221, 51, 0.2);
}

.tbank-btn:hover {
  background: linear-gradient(135deg, rgba(255, 221, 51, 0.25) 0%, rgba(251, 191, 36, 0.2) 100%);
  border-color: rgba(255, 221, 51, 0.6);
  box-shadow: 0 8px 25px rgba(255, 221, 51, 0.3);
  color: #f59e0b;
}

.partner-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.vd-btn .partner-logo {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.tbank-btn .partner-logo {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1f2937;
}

.partner-name {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

/* Основной контент */
.main-content {
  padding: 0;
}

/* Анимации */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Карточки */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: rgba(42, 42, 42, 0.8);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 24px;
  transition: all 0.4s ease;
  backdrop-filter: blur(10px);
  opacity: 0;
  animation: slideInLeft 0.8s ease-out 1s forwards;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card:nth-child(2) {
  animation: slideInRight 0.8s ease-out 1.2s forwards;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: rgba(42, 42, 42, 0.9);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
}

.card-icon.conditions {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.card-icon.documents {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.card-icon.process {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin: 0;
}

/* Компактные списки */
.card-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  color: #cbd5e1;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border-radius: 6px;
  position: relative;
}

.card-list li:hover {
  background: rgba(55, 65, 81, 0.2);
  padding-left: 8px;
  transform: translateX(3px);
}

/* Компактные иконки для условий */
.conditions-list li::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.conditions-list li:nth-child(1)::before {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  content: "👤";
}

.conditions-list li:nth-child(2)::before {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  content: "📋";
}

.conditions-list li:nth-child(3)::before {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  content: "🏠";
}

.conditions-list li:nth-child(4)::before {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  content: "✓";
  font-weight: bold;
  color: white;
  font-size: 12px;
}

.conditions-list li:nth-child(5)::before {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  content: "💳";
}

.conditions-list li:nth-child(6)::before {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  content: "💰";
}

.conditions-list li:nth-child(7)::before {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  content: "⚠️";
}

/* Компактные иконки для документов */
.documents-list li::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: white;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.documents-list li:nth-child(1)::before {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  content: "🆔";
}

.documents-list li:nth-child(2)::before {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  content: "📄";
}

.documents-list li:nth-child(3)::before {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  content: "🏠";
}

.documents-list li:nth-child(4)::before {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  content: "📊";
}

/* Варианты оформления */
.process-card {
  background: rgba(42, 42, 42, 0.8);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 30px;
  backdrop-filter: blur(10px);
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1.4s forwards;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.steps-list {
  display: grid;
  gap: 12px;
}

.step {
  border: 1px solid #374151;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s ease;
}

.step:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateX(5px);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  background: rgba(55, 65, 81, 0.1);
  transition: all 0.3s ease;
}

.step-header:hover {
  background: rgba(55, 65, 81, 0.2);
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.step:hover .step-number {
  transform: scale(1.1);
}

.step-title {
  flex: 1;
  font-weight: 600;
  color: #ffffff;
  font-size: 1rem;
  letter-spacing: -0.01em;
  margin: 0;
}

.step-arrow {
  color: #94a3b8;
  transition: transform 0.3s ease;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.step.active .step-arrow {
  transform: rotate(180deg);
}

.step-content {
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s ease;
}

.step.active .step-content {
  max-height: 400px;
}

.step-description {
  padding: 20px;
  color: #cbd5e1;
  background: rgba(30, 30, 30, 0.5);
  font-size: 0.9rem;
  line-height: 1.6;
}

.partner-info {
  margin-bottom: 16px;
}

.partner-info:last-child {
  margin-bottom: 0;
}

.step-description strong {
  color: #a78bfa;
  font-weight: 600;
}

/* Предупреждение */
.alert {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 30px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1.6s forwards;
}

.alert-icon {
  color: #f59e0b;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.alert-content {
  color: #fbbf24;
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}

.alert-title {
  font-weight: 600;
  margin-bottom: 4px;
  margin-top: 0;
}

.alert-content p {
  margin: 0;
}

.alert a {
  color: #fcd34d;
  text-decoration: underline;
  transition: color 0.3s ease;
  font-weight: 600;
}

.alert a:hover {
  color: #fbbf24;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  .header-title {
    font-size: 2.2rem;
  }

  .partner-buttons {
    flex-direction: column;
    align-items: center;
  }

  .partner-btn {
    min-width: 200px;
    justify-content: center;
  }

  .card {
    padding: 20px;
    border-radius: 12px;
  }

  .process-card {
    padding: 20px;
    border-radius: 12px;
  }

  .step-header {
    padding: 12px;
  }

  .step {
    border-radius: 8px;
  }

  .step-description {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .header-title {
    font-size: 1.8rem;
  }

  .header-subtitle {
    font-size: 1rem;
  }

  .partner-btn {
    min-width: 100%;
  }
}