:root {
  --primary: #4c6fff;
  --primary-dark: #3257ff;
  --primary-light: #edf0ff;
  --gray: #666;
  --light-gray: #f4f6fd;
  --border: #e0e0e0;
  --font-base: 16px;
  --red: #ff4d4d;
  --green: #2ecc71;
}

.container-calc {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}

.header {
  background: var(--primary);
  color: #fff;
  border-radius: 16px 16px 0 0;
  padding: 32px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(76, 111, 255, 0.15);
}

.header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.header p {
  margin: 8px 0 0;
  font-size: 18px;
  opacity: 0.9;
}

.quiz-container {
  background: #fff;
  border-radius: 0 0 16px 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: relative;
}

.progress-bar {
  height: 4px;
  background: #e0e6ff;
  width: 100%;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
  width: 0%;
}

.step {
  padding: 32px;
  display: none;
  animation: fadeEffect 0.5s;
}

.step.active {
  display: block;
}

@keyframes fadeEffect {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 24px;
  color: #333;
}

.service-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  position: relative;
}

.service-card:hover {
  border-color: var(--primary-light);
  background: var(--light-gray);
}

.service-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.service-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.service-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  flex-shrink: 0;
}

.service-card.selected .service-icon {
  background: var(--primary);
  color: white;
}

.service-info {
  flex: 1;
}

.service-name {
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.service-rate {
  color: var(--primary);
  font-weight: bold;
}

.service-desc {
  font-size: 18px;
  color: var(--gray);
  margin-top: 8px;
}

.param {
  margin: 24px 0;
}

.param-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 500;
}

.param-value {
  background: var(--primary);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.range-slider {
  position: relative;
  width: 100%;
  height: 6px;
  background: #e0e6ff;
  border-radius: 3px;
  margin: 24px 0;
}

.range-fill {
  position: absolute;
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
}

.range-thumb {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.range-thumb:hover,
.range-thumb:active {
  transform: translate(-50%, -50%) scale(1.1);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--gray);
  font-size: 14px;
}

.frequency-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  position: relative;
}

.frequency-card:hover {
  border-color: var(--primary-light);
  background: var(--light-gray);
}

.frequency-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.frequency-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.frequency-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  flex-shrink: 0;
}

.frequency-card.selected .frequency-icon {
  background: var(--primary);
  color: white;
}

.frequency-info {
  flex: 1;
}

.frequency-name {
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.discount-tag {
  background: rgba(46, 204, 113, 0.15);
  color: var(--green);
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding: 0 32px 32px;
}

.btn {
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-prev {
  background: #f0f3ff;
  color: var(--primary);
}

.btn-prev:hover {
  background: #e0e6ff;
}

.btn-next,
.btn-submit {
  background: var(--primary);
  color: #fff !important;
}

.btn-next:hover,
.btn-submit:hover {
  background: #fedb5c;
  color: #000 !important;
}

.result {
  padding: 32px;
}

.result-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.result-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.result-service {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.result-desc {
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border);
}

.result-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.result-item-label {
  color: var(--gray);
  font-weight: bold;
}

.result-discount {
  color: var(--green);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.result-total {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.savings-section {
  margin-top: 24px;
  padding: 20px;
  background: #f9feff;
  border-radius: 12px;
  border: 1px solid #e3f2fd;
}

.savings-title {
  font-weight: 600;
  margin-bottom: 16px;
  color: #0288d1;
}

.comparison-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.comparison-row.highlight {
  font-weight: 600;
  color: var(--green);
  margin-top: 12px;
}

.old-price {
  text-decoration: line-through;
  color: var(--red);
  margin-right: 8px;
}

.savings-highlight {
  background: rgba(46, 204, 113, 0.15);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  margin-top: 16px;
}

.savings-highlight .amount {
  color: var(--green);
  font-size: 18px;
}

.note {
  margin-top: 16px;
  padding: 16px;
  background: #f4f0cc;
  border-radius: 8px;
  font-size: 18px;
  text-align: center;
  color: var(--gray);
}

.inclusions {
  margin-top: 24px;
  padding-left: 20px;
  font-size: 18px;
}

.inclusions li {
  margin-bottom: 8px;
  color: var(--gray);
}

.inclusions li::marker {
  color: var(--primary);
}

.additional-service {
  margin-top: 24px;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.additional-service-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.additional-service-desc {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 16px;
}

.additional-service-checkbox {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.additional-service-checkbox input {
  margin-right: 8px;
}

.window-size-select {
  margin-top: 12px;
  display: none;
}

.window-size-select.active {
  display: block;
}

.window-size-option {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.window-size-option:last-child {
  border-bottom: none;
}

.window-price {
  font-weight: 600;
  color: var(--primary);
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.price-table th,
.price-table td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.price-table th {
  font-weight: 600;
  color: var(--gray);
}

.additional-service-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.additional-service-checkbox:hover {
  background-color: var(--light-gray);
}

.additional-service-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.additional-service-checkbox label {
  cursor: pointer;
  margin: 0;
}

#additionalServices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#additionalServices label {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

#additionalServices label:hover {
  border-color: var(--primary-light);
  background: var(--light-gray);
}

#additionalServices input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

#additionalServices span {
  margin: 0;
  font-weight: 500;
  color: #333;
}

a.tj-secondary-btn.tj-hover-btn.waBtn,
a.tj-secondary-btn.tj-hover-btn.tgBtn {
  width: 100%;
  text-align: center;
  font-size: 18px;
  margin-top: 10px;
}

a.tj-secondary-btn.tj-hover-btn.tgBtn {
  background: #1c93e3;
}

a.tj-secondary-btn.tj-hover-btn.wa-color.waBtn span,
a.tj-secondary-btn.tj-hover-btn.tgBtn span {
  color: #fff;
}

/* Added styles for category selection step */
.category-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  position: relative;
  min-height: 100px;
}

.category-card:hover {
  border-color: var(--primary-light);
  background: var(--light-gray);
}

.category-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.category-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.category-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  flex-shrink: 0;
  font-size: 32px;
}

.category-card.selected .category-icon {
  background: var(--primary);
  color: white;
}

.category-info {
  flex: 1;
}

.category-name {
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 4px;
}

/* Responsive styles */
@media (max-width: 768px) {
  .container-calc {
    margin: 20px auto;
  }

  .header {
    padding: 24px;
  }

  .header h1 {
    font-size: 24px;
  }

  .header p {
    font-size: 16px;
  }

  .step,
  .result {
    padding: 24px;
  }

  .step-title {
    font-size: 20px;
  }

  .nav-buttons {
    padding: 0 24px 24px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {

  .result-item {
     flex-direction: column; 
}
  .service-card,
  .frequency-card {
    padding: 16px;
  }

  .service-icon,
  .frequency-icon {
    width: 32px;
    height: 32px;
  }

  .service-name,
  .frequency-name {
    font-size: 16px;
  }

  .discount-tag {
    font-size: 10px;
  }

  .tj-secondary-btn {
    padding: 20px 10px;
  }
}
