/* Стили для калькулятора ROI */
.calculator-section {
  position: relative;
  background-color: white;
  padding: 60px 0 80px;
  color: #333;
  z-index: 1;
}

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

.section-title {
  font-size: 42px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #121212;
}

.section-subtitle {
  font-size: 20px;
  font-weight: 400;
  text-align: center;
  color: #4a4b57;
  margin-bottom: 50px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Контейнер для калькулятора */
.calculator-container {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 40px;
}

/* Введение и объяснение */
.calculator-intro {
  background-color: #f5f7fb;
  padding: 30px;
  border-bottom: 1px solid #e2e8f0;
}

.calculator-intro p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
  color: #4a4b57;
}

.info-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.info-box {
  flex: 1;
  padding: 16px;
  border-radius: 12px;
  border-left-width: 4px;
  border-left-style: solid;
  min-width: 250px;
}

.info-box.realistic {
  background-color: #edf7ed;
  border-left-color: #52b36a;
}

.info-box.tip {
  background-color: #e6f7ff;
  border-left-color: #4c9cf2;
}

.info-box h4 {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.info-box .icon {
  margin-right: 8px;
}

.info-box p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* Форма ввода данных */
.calculator-form {
  padding: 30px;
  border-bottom: 1px solid #e2e8f0;
}

.calculator-form h3,
.calculator-results h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #6C5CE7;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #4a4b57;
}

.number-input {
  display: flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
}

.decrement-button,
.increment-button {
  background-color: #f3f4f6;
  border: none;
  padding: 8px 12px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.decrement-button:hover,
.increment-button:hover {
  background-color: #e5e7eb;
}

.number-field {
  width: 100%;
  border: none;
  padding: 8px 12px;
  text-align: center;
  font-size: 16px;
  -moz-appearance: textfield;
}

.number-field::-webkit-inner-spin-button,
.number-field::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
}

/* Стили для блока распределения мастеров */
.masters-distribution {
  display: flex;
  align-items: center;
  margin-top: 10px;
  background-color: #f9fafb;
  border-radius: 8px;
  padding: 10px;
  border: 1px solid #e5e7eb;
}

.master-category {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.master-category:first-child {
  border-right: 1px solid #e5e7eb;
}

.master-label {
  font-size: 13px;
  color: #4b5563;
  margin-right: 5px;
}

.master-count {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  background-color: #fff;
  border-radius: 4px;
  padding: 2px 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.top-masters .master-count {
  color: #6C5CE7;
}

.junior-masters .master-count {
  color: #10b981;
}

/* Стили для слайдера соотношения мастеров */
.masters-ratio-container {
  margin-top: 12px;
}

.masters-ratio-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

/* Специальный дизайн для слайдера распределения мастеров */
#masters-ratio-slider {
  background: linear-gradient(to right, #6C5CE7 0%, #6C5CE7 33%, #10b981 33%, #10b981 100%);
}

#masters-ratio-slider::-webkit-slider-thumb {
  box-shadow: 0 2px 6px rgba(108, 92, 231, 0.4);
}

#masters-ratio-slider::-moz-range-thumb {
  box-shadow: 0 2px 6px rgba(108, 92, 231, 0.4);
}

#masters-ratio-value {
  background-color: #6C5CE7;
}

/* Переключатель прогноза */
.forecast-switch {
  margin-bottom: 30px;
}

.forecast-switch label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #4a4b57;
}

.toggle-buttons {
  display: flex;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
}

.toggle-button {
  flex: 1;
  padding: 12px;
  border: none;
  background-color: white;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.toggle-button.active {
  background-color: #f3f4f6;
  font-weight: 600;
}

.toggle-button:first-child {
  border-right: 1px solid #d1d5db;
}

.toggle-button:hover:not(.active) {
  background-color: #f9fafb;
}

/* Слайдеры */
.sliders-container {
  margin-bottom: 30px;
}

.slider-group {
  margin-bottom: 24px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.slider-header label {
  font-size: 14px;
  font-weight: 600;
  color: #4a4b57;
}

.slider-value {
  background-color: #6C5CE7;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.slider-hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
  line-height: 1.4;
  font-style: italic;
}

.range-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background-color: #e5e7eb;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin-bottom: 8px;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #6C5CE7;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #6C5CE7;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
}

/* Период расчета */
.period-selector {
  margin-bottom: 30px;
}

.period-selector label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #4a4b57;
}

.period-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.period-button {
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: white;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.period-button:hover:not(.active) {
  background-color: #f9fafb;
}

.period-button.active {
  background-color: #10b981;
  color: white;
  border-color: #10b981;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.period-hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: 12px;
  line-height: 1.4;
}

/* Результаты расчета */
.calculator-results {
  padding: 30px;
  background-color: #f5f7fb;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.metric-card {
  background-color: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
}

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

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
  opacity: 0.5;
  z-index: 1;
}

.metric-card h4 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
}

.metric-value {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  position: relative;
  z-index: 2;
}

.metric-card.roi .metric-value {
  color: #10b981;
}

.metric-card.effect .metric-value {
  color: #ec4899;
}

.metric-card.clients .metric-value {
  color: #3b82f6;
}

/* График */
.chart-container {
  background-color: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.chart-container h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #374151;
}

.chart-content {
  height: 350px;
  background-color: #ffffff;
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid #edf2f7;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* Оставляем старые стили для обратной совместимости */
.chart-placeholder {
  height: 300px;
  background-color: #f9fafb;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.chart-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.chart-caption {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  margin: 0;
}

/* Таблица результатов */
.results-table-container {
  background-color: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  overflow-x: auto;
}

.results-table-container h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #374151;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
}

.results-table th,
.results-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.results-table th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b7280;
  background-color: #f9fafb;
}

.results-table td {
  font-size: 14px;
  color: #4b5563;
}

.results-table tr.subheader td {
  font-weight: 600;
  background-color: #f3f4f6;
  font-size: 14px;
}

.results-table tr.total td {
  font-weight: 700;
  background-color: #ecfdf5;
  color: #047857;
}

/* Пояснения */
.explanations {
  margin-top: 40px;
}

.explanation-item {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 16px;
  overflow: hidden;
}

.explanation-item summary {
  padding: 16px 24px;
  cursor: pointer;
  font-weight: 600;
  position: relative;
}

.explanation-item summary:hover {
  background-color: #f9fafb;
}

.explanation-content {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
}

.explanation-content p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  color: #4b5563;
}

.explanation-content p:last-child {
  margin-bottom: 0;
}

.explanation-content ul,
.explanation-content ol {
  margin: 0 0 16px 20px;
}

.explanation-content li {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 8px;
  color: #4b5563;
}

/* CTA контейнер */
.cta-container {
  text-align: center;
  margin-top: 50px;
}

.btn {
  display: inline-block;
  background: linear-gradient(45deg, #6C5CE7, #9F66FF);
  color: white;
  font-weight: 600;
  text-decoration: none;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 17px;
  box-shadow: 0px 8px 20px rgba(108, 92, 231, 0.3);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0px 12px 25px rgba(108, 92, 231, 0.4);
}

/* Адаптивность */
@media (max-width: 992px) {
  .section-title {
    font-size: 36px;
  }
  
  .section-subtitle {
    font-size: 18px;
  }
  
  .calculator-form h3,
  .calculator-results h3 {
    font-size: 22px;
  }
  
  .period-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .input-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 32px;
  }
  
  .info-boxes {
    flex-direction: column;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .section-title {
    font-size: 28px;
  }
  
  .calculator-intro,
  .calculator-form,
  .calculator-results {
    padding: 20px;
  }
  
  .input-grid {
    grid-template-columns: 1fr;
  }
  
  .period-buttons {
    grid-template-columns: 1fr;
  }
  
  /* Адаптация блока мастеров для мобильных устройств */
  .masters-distribution {
    padding: 8px;
  }
  
  .master-label {
    font-size: 12px;
  }
  
  .master-count {
    font-size: 14px;
    padding: 2px 6px;
  }
}