/* Общие стили */
:root {
  --primary-color: #00809d;
  --secondary-color: #e8f1f5;
  --accent-color: #ff5555;
  --text-color: #333;
  --light-text: #666;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
  --transition-speed: 0.3s;
}

body {
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
  background-color: #f9f9f9;
  color: var(--text-color);
  margin: 0;
  padding: 0;
}

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

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Стили заголовка */
.header {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem 0;
  margin-bottom: 2rem;
  text-align: center;
  box-shadow: var(--box-shadow);
}

.header h1 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 2.2rem;
  color: white; /* Явно указываем белый цвет для заголовка */
}

.header p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

/* Стили для калькулятора */
.calculator-card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: all var(--transition-speed);
  animation: fadeIn 0.8s ease-out;
}

.calculator-card:hover {
  box-shadow: var(--hover-shadow);
}

.calculator-card .card-title {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
  width: 100%;
  font-size: 1.4rem;
}

.calculator-card .card-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 1.5px;
}

.calculator-section {
  margin-bottom: 1rem;
  padding: 1rem;
  background-color: #f8fbfd;
  border-radius: var(--border-radius);
  border: 1px solid #e8f1f5;
  transition: all var(--transition-speed);
}

.calculator-section:hover {
  background-color: #f0f8fb;
  border-color: #d1e6f0;
}

.calculator-section h3 {
  color: var(--primary-color);
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.calculator-section h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 24px;
  background-color: var(--primary-color);
  margin-right: 10px;
  border-radius: 4px;
}

.form-label {
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.form-control, .form-select {
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  padding: 0.5rem;
  transition: all var(--transition-speed);
  font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 128, 157, 0.2);
  border-color: var(--primary-color);
}

.form-text {
  color: var(--light-text);
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

.form-check {
  margin-bottom: 0.5rem;
}

.form-check-label {
  font-size: 0.9rem;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  transition: all var(--transition-speed);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background-color: #006d84;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-warning {
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: all var(--transition-speed);
}

/* Результаты */
.results-card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  display: none;
  animation: fadeIn 0.8s ease-out;
}

/* Стили заголовка "Детализация стоимости опций" */
.details-title, .cost-details-title {
  color: #000000 !important;
  font-weight: 700 !important;
  margin-bottom: 0.7rem !important;
  border-bottom: 1px solid #e8f1f5 !important;
  padding-bottom: 0.3rem !important;
  font-size: 1rem !important;
}

/* Стиль для подзаголовка "Выбранные опции" */
.selected-options-title {
  color: #000000 !important;
  font-weight: 600 !important;
  margin: 0.3rem 0 !important;
  font-size: 0.9rem !important;
}

.results-card .card-title {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
  width: 100%;
  font-size: 1.4rem;
}

.results-card .card-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 1.5px;
}

.results-section {
  margin-bottom: 1rem;
}

.results-section h3 {
  color: var(--primary-color);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
  border-bottom: 1px solid #e8f1f5;
  padding-bottom: 0.2rem;
}

.result-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.2rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid #f8f8f8;
}

.result-label {
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.9rem;
}

.result-value {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 0.9rem;
}

.total-price {
  background-color: #f0f8fb;
  border-radius: var(--border-radius);
  padding: 0.7rem;
  text-align: center;
  margin-top: 0.5rem;
}

.total-price h3 {
  margin-bottom: 0.2rem;
  color: var(--text-color);
  border: none;
  font-size: 1rem;
}

.total-price-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Стиль для строки итоговой стоимости */
.result-row.total-price {
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.8rem;
  text-align: center;
  padding: 1rem;
  background-color: #e9f5fb;
}

.result-row.total-price .result-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #000;
}

.result-row.total-price .result-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #025b8c;
}

/* Адаптив для мобильных устройств */
@media (max-width: 767.98px) {
  .result-row.total-price {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .result-row.total-price .result-label,
  .result-row.total-price .result-value {
    text-align: center;
    width: 100%;
  }
  
  .result-row.total-price .result-value {
    font-size: 1.6rem;
  }
}

.options-details {
  background-color: #f8fbfd;
  border-radius: var(--border-radius);
  padding: 0.7rem;
  margin-top: 0.7rem;
}

.options-details h4 {
  color: #000000;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.options-details ul {
  padding-left: 1rem;
  margin-bottom: 0;
}

.options-details li {
  margin-bottom: 0.1rem;
  font-size: 0.8rem;
}

.option-detail {
  font-size: 0.9rem;
  margin-bottom: 0.25rem !important;
}

.option-detail .fw-bold {
  color: #000000;
  margin-bottom: 0.15rem;
}

.option-detail .ms-3 {
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

/* Стили для блока детализации опций */
.options-details {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #e9f0f5;
  border-radius: var(--border-radius);
  padding: 0.5rem 1rem;
  background-color: #f8fbfd;
}

/* Заголовок по центру с крупным шрифтом */
.options-details-title {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #000000;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

/* Уменьшаем вертикальные отступы для заголовка опций */
#options-details-title, .text-center.mb-4.mt-4 {
  margin-top: 1rem !important;
  margin-bottom: 0.5rem !important;
}

/* Стиль для таблицы опций */
.options-details-table {
  display: flex;
  flex-direction: column;
}

/* Заголовок "Выбранные опции" */
.options-details-table .section-header {
  font-weight: 600;
  font-size: 1rem;
  margin: 0.5rem 0;
  color: #333;
  text-align: left;
}

/* Список выбранных опций */
.options-details-table .option-item {
  display: flex;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  line-height: 1.3;
  text-align: left;
  justify-content: flex-start;
}

.options-details-table .option-item:before {
  content: "•";
  margin-right: 5px;
  color: #000;
}

/* Блок с подробностями каждой опции */
.options-details-table .option-block {
  margin-top: 0.8rem;
  margin-bottom: 0.8rem;
}

/* Заголовок блока опции */
.options-details-table .option-block-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: #333;
  text-align: left;
}

/* Цена опции */
.options-details-table .option-price {
  font-weight: 600;
  color: #000;
}

/* Детали по опции */
.options-details-table .option-details {
  margin-left: 0;
  font-size: 0.9rem;
  color: #333;
  line-height: 1.5;
}

/* Контейнер с деталями опций */
.options-details {
  text-align: left;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 767.98px) {
  .options-details {
    padding: 0.8rem;
    margin-top: 0.3rem;
    margin-bottom: 0.8rem;
    text-align: left;
  }
  
  #options-details-title, .text-center.mb-4.mt-4 {
    margin-top: 0.7rem !important;
    margin-bottom: 0.3rem !important;
    text-align: left !important;
  }
  
  .options-details-title {
    font-size: 1.1rem;
  }
  
  .options-details-table .option-item {
    font-size: 0.9rem;
    line-height: 1.2;
    text-align: left;
    justify-content: flex-start;
  }
  
  .options-details-table .option-block-title {
    font-size: 0.95rem;
  }
  
  .options-details-table .option-details {
    font-size: 0.85rem;
    line-height: 1.3;
  }
}

#options-details-content {
  background-color: #fbfdff;
  padding: 0.5rem;
  text-align: left;
}

/* Детализация стоимости опций - заголовок */
#options-details-title {
  text-align: left !important;
}

/* Адаптивность */
@media (max-width: 767.98px) {
  .header {
    padding: 1.5rem 0;
  }
  
  .header h1 {
    font-size: 1.8rem;
    color: white; /* Явно указываем белый цвет для заголовка в мобильной версии */
  }
  
  .calculator-card, .results-card {
    padding: 1.5rem;
  }
  
  .calculator-section {
    padding: 1rem;
  }
  
  .calculator-section h3 {
    font-size: 1.2rem;
  }
  
  .total-price-value {
    font-size: 1.6rem;
  }
  
  /* Увеличиваем шрифт и уменьшаем высоту строк для мобильной версии */
  .result-label {
    font-size: 1.05rem;
    line-height: 1.2;
  }
  
  .result-value {
    font-size: 1.05rem;
    line-height: 1.2;
  }
  
  .result-row {
    margin-bottom: 0.15rem;
    padding: 0.15rem 0;
  }
}

/* Уведомления */
#notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1050;
  max-width: 350px;
}

.notification {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 1rem;
  margin-bottom: 10px;
  animation: slideIn 0.3s ease-out;
  border-left: 4px solid #28a745;
  display: flex;
  align-items: flex-start;
}

.notification.error {
  border-left-color: #dc3545;
}

.notification.warning {
  border-left-color: #ffc107;
}

.notification.info {
  border-left-color: #17a2b8;
}

.notification-close {
  background: none;
  border: none;
  color: #999;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
  margin-left: 10px;
  cursor: pointer;
}

.notification-message {
  flex: 1;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Стиль для футера */
.footer {
  margin-top: 3rem;
  padding: 1rem 0;
  background-color: #f8f9fa !important;
  border-top: 1px solid #dee2e6;
  width: 100%;
  z-index: 1030;
  position: relative;
}

.footer .text-muted {
  font-size: 0.9rem;
  color: #343a40 !important;
  font-weight: 500;
}