:root {
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --primary: #1f3469;
  --primary-hover: #16254c;
  --primary-active: #0f1a36;
  --primary-light: #f0f4fa;
  --primary-border: #c6d3e8;
  
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.03);
  --shadow-xl: 0 20px 35px -10px rgba(15,23,42,0.12);
  
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

.reno-estimator-container * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.reno-estimator-container {
  font-family: var(--font-body);
  color: var(--slate-800);
  line-height: 1.6;
  width: 100%;
}

.container {
  max-width: 880px;
  margin: 0 auto;
}

/* Card */
.card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(226, 232, 240, 0.9);
  position: relative;
  overflow: hidden;
}

/* Step Header & Progress */
.step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--slate-100);
}

.service-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.progress-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.progress-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-dot {
  width: 24px;
  height: 6px;
  border-radius: 999px;
  background: var(--slate-200);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-dot.active {
  background: linear-gradient(90deg, var(--primary) 0%, #3b82f6 100%);
  width: 38px;
  box-shadow: 0 2px 8px rgba(31, 52, 105, 0.4);
}

/* Step Content Transitions */
.step-content {
  will-change: transform, opacity;
}

.step-content.slide-in-right {
  animation: slideInRight 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.step-content.slide-in-left {
  animation: slideInLeft 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.step-content.slide-out-left {
  animation: slideOutLeft 0.2s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

.step-content.slide-out-right {
  animation: slideOutRight 0.2s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

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

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

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

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

.step-content h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.025em;
  margin-bottom: 8px;
  line-height: 1.25;
}

.step-content p.subtext {
  font-size: 1rem;
  color: var(--slate-500);
  margin-bottom: 32px;
}

/* Option Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  border: 2px solid var(--slate-200);
  background: #ffffff;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.option-card:hover {
  border-color: #93c5fd;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -6px rgba(31, 52, 105, 0.12);
}

.option-card.selected {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--primary-light) 0%, #ffffff 100%);
  box-shadow: 0 8px 20px -4px rgba(31, 52, 105, 0.2);
}

.option-card input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  cursor: pointer;
  z-index: 5;
}

.selected-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--slate-200);
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: all 0.2s ease;
}

.selected-badge svg {
  width: 16px;
  height: 16px;
}

.option-card.selected .selected-badge {
  background: var(--primary);
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(31, 52, 105, 0.4);
}

.img-container {
  width: 100%;
  height: 170px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--slate-100);
  border-bottom: 1px solid var(--slate-200);
  transition: transform 0.4s ease;
}

.option-card:hover .img-container {
  transform: scale(1.04);
}

.option-card h3 {
  padding: 16px 14px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate-800);
  text-align: center;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.35;
}

.option-card.selected h3 {
  color: var(--primary-active);
  font-weight: 700;
}

/* Actions Footer */
.actions-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--slate-100);
  margin-top: 20px;
}

.actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.btn-next {
  font-family: var(--font-heading);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 26px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(31, 52, 105, 0.3);
  transition: all 0.2s ease;
}

.btn-next svg { width: 18px; height: 18px; }

.btn-next:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 52, 105, 0.45);
}

.btn-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-back {
  font-family: var(--font-heading);
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--slate-200);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back svg { width: 18px; height: 18px; }

.btn-back:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

.btn-start-over {
  font-family: var(--font-heading);
  background: transparent;
  color: #ef4444;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-start-over:hover {
  background: #fef2f2;
  text-decoration: underline;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate-800);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--slate-300);
  background: var(--slate-50);
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(31, 52, 105, 0.12);
}

/* Results Table */
/* Results Table Wrapper & Enhancements */
.results-table-wrapper {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(203, 213, 225, 0.8);
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  overflow: hidden;
  margin-bottom: 32px;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
  border: none;
  font-family: var(--font-body);
}

.results-table thead tr {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.results-table th {
  padding: 16px 20px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-600);
  font-weight: 800;
  border-bottom: 1.5px solid var(--slate-200);
  text-align: left;
}

.results-table th.edit-col {
  text-align: center;
  width: 90px;
}

.results-table th.amount {
  text-align: right;
}

.results-table tbody tr {
  border-bottom: 1px solid var(--slate-100);
  transition: background-color 0.2s ease;
}

.results-table tbody tr:hover {
  background-color: #f8fafc;
}

.results-table td {
  padding: 16px 20px;
  vertical-align: middle;
}

.summary-service-tag-wrapper {
  margin-bottom: 4px;
}

.summary-service-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
}

.summary-field-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--slate-900);
  line-height: 1.3;
}

.summary-field-value {
  font-size: 0.88rem;
  color: var(--slate-600);
  margin-top: 2px;
}

.results-table td.edit-col {
  text-align: center;
  width: 90px;
}

.edit-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #f1f5f9;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.edit-link:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(31, 52, 105, 0.25);
}

.results-table td.amount {
  text-align: right;
  font-weight: 700;
  font-size: 1.05rem;
  color: #15803d;
  font-family: var(--font-heading);
}

.results-table tr.total-row td {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  padding: 22px 20px;
  border-top: 2px solid #334155;
  border-bottom: none;
}

.total-label-sub {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 2px;
}

.total-label-main {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: #ffffff;
}

.results-table tr.total-row td.amount {
  font-size: 1.4rem;
  font-weight: 900;
  color: #38bdf8;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-800) 100%);
  padding: 36px;
  border-radius: var(--radius-lg);
  text-align: center;
  color: #ffffff;
  margin: 36px 0;
  box-shadow: 0 15px 30px -10px rgba(15, 23, 42, 0.25);
}

.cta-section h2 {
  font-family: var(--font-heading);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.cta-section p { color: var(--slate-300); }

.cta-section button {
  font-family: var(--font-heading);
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 14px;
  box-shadow: 0 4px 14px rgba(31, 52, 105, 0.4);
}

.cta-section button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(31, 52, 105, 0.5);
}

/* Accordion */
.accordion { margin-top: 32px; }

.accordion-item {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  background: #ffffff;
  transition: all 0.2s ease;
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background: #ffffff;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--slate-800);
  font-size: 1rem;
}

.accordion-header:hover {
  background: var(--slate-50);
  color: var(--primary);
}

.accordion-header span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--slate-100);
  color: var(--primary);
  font-weight: 800;
  font-size: 1.1rem;
}

.accordion-content {
  display: none;
  padding: 20px 24px;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-100);
  color: var(--slate-600);
  line-height: 1.7;
}

.accordion-content.active {
  display: block;
  animation: slideInRight 0.25s ease-out;
}

.accordion-content ul { padding-left: 20px; }
.accordion-content li { margin-bottom: 8px; }

@media (max-width: 768px) {
  .card { padding: 24px 18px; border-radius: 16px; }
  .step-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
  }
  .step-header > div {
    width: 100%;
  }
  .progress-dots {
    width: 100%;
    justify-content: flex-start;
  }
  .step-content h1 { font-size: 1.4rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .img-container { height: 130px; }
  .actions-footer button,
  .actions-footer .btn-next,
  .actions-footer .btn-back,
  .actions-footer .btn-start-over {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}
