.roi-calculator-section {
  padding: 4rem 0;
  background-color: var(--dl-color-background-light);
}

.roi-calculator-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.roi-calculator-section h1 {
  color: var(--dl-color-neutral-dark);
  margin-bottom: 1rem;
  text-align: center;
}

.roi-calculator-section > .container > p {
  text-align: center;
  color: var(--dl-color-grey-05);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.preset-selector-container {
  max-width: 600px;
  margin: 0 auto 2rem;
  text-align: center;
}

.preset-selector-container label {
  display: block;
  color: var(--dl-color-neutral-dark);
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.preset-select {
  width: 100%;
  max-width: 400px;
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
  border-radius: 12px;
  border: 2px solid var(--dl-color-brand-primary);
  background-color: var(--dl-color-neutral-white);
  color: var(--dl-color-neutral-dark);
  cursor: pointer;
  transition: all 0.3s ease;
}

.preset-select:hover {
  border-color: var(--dl-color-brand-primary-dark);
  box-shadow: 0 4px 12px rgba(49, 99, 171, 0.15);
}

.preset-select:focus {
  outline: none;
  border-color: var(--dl-color-brand-primary);
  box-shadow: 0 0 0 4px rgba(49, 99, 171, 0.2);
}

.calculator-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  background: linear-gradient(
    135deg,
    var(--dl-color-neutral-white) 0%,
    rgba(247, 250, 250, 0.8) 100%
  );
}

/* Input Columns Layout */
.input-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.input-column {
  background: var(--dl-color-neutral-white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--dl-color-grey-03);
}

.input-column h2 {
  color: var(--dl-color-brand-primary);
  margin-bottom: 2rem;
  margin-top: 0;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-column:first-child h2::before {
  content: "🏢";
  font-size: 1.2rem;
}

.input-column:last-child h2::before {
  content: "⚡";
  font-size: 1.2rem;
}

/* Summary Section */
.summary-section {
  background: var(--dl-color-neutral-white);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--dl-color-grey-03);
}

/* Total ROI Highlight Section */
.total-roi-highlight {
  margin-bottom: 3rem;
  padding: 2rem;
  background: linear-gradient(
    135deg,
    var(--dl-color-brand-primary) 0%,
    var(--dl-color-brand-secondary) 100%
  );
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(49, 99, 171, 0.2);
  position: relative;
  overflow: hidden;
}

.total-roi-highlight::before {
  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 4s infinite;
}

.roi-highlight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.roi-highlight-item {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.roi-highlight-item.primary {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transform: scale(1.02);
}

.roi-highlight-item h3 {
  color: white;
  margin: 0 0 1rem 0;
  font-weight: 600;
  opacity: 0.9;
}

.roi-highlight-value {
  text-align: center;
}

.highlight-large-value {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1;
}

.highlight-label {
  display: block;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* Chart Container */
.chart-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding: 2rem;
  background: linear-gradient(
    135deg,
    rgba(49, 99, 171, 0.05) 0%,
    rgba(28, 122, 95, 0.05) 100%
  );
  border-radius: 16px;
  border: 1px solid var(--dl-color-grey-03);
}

.chart-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chart-title {
  color: var(--dl-color-brand-primary);
  margin-bottom: 1.5rem;
  margin-top: 0;
  font-weight: 600;
  text-align: center;
}

.chart-wrapper canvas {
  max-width: 400px;
  max-height: 400px;
  width: 100% !important;
  height: auto !important;
}

.chart-legend {
  padding: 1rem;
}

.chart-legend h3 {
  color: var(--dl-color-brand-primary);
  margin-bottom: 1.5rem;
  margin-top: 0;
  font-weight: 600;
  text-align: center;
  font-size: 1.2rem;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: var(--dl-color-neutral-white);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.legend-item:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.legend-label {
  flex-grow: 1;
  font-size: 0.9rem;
  color: var(--dl-color-neutral-dark);
  font-weight: 500;
}

.legend-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dl-color-brand-primary);
  min-width: 80px;
  text-align: right;
}

.summary-section h2 {
  color: var(--dl-color-brand-primary);
  margin-bottom: 2rem;
  margin-top: 0;
  text-align: center;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.summary-section h2::before {
  content: "📊";
  font-size: 1.4rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.summary-card {
  background: linear-gradient(
    135deg,
    var(--dl-color-neutral-white) 0%,
    rgba(247, 250, 250, 0.9) 100%
  );
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--dl-color-grey-03);
  transition: all 0.3s ease;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.summary-card h3 {
  color: var(--dl-color-brand-primary);
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.summary-value {
  text-align: center;
}

.large-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--dl-color-brand-primary);
  margin-bottom: 0.5rem;
  background: linear-gradient(
    90deg,
    var(--dl-color-brand-primary) 0%,
    var(--dl-color-brand-secondary) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.medium-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dl-color-brand-primary);
  margin-bottom: 0.25rem;
  background: linear-gradient(
    90deg,
    var(--dl-color-brand-secondary) 0%,
    var(--dl-color-brand-primary) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.summary-label {
  display: block;
  font-size: 0.875rem;
  color: var(--dl-color-grey-05);
  font-weight: 500;
}

.highlight-card {
  background: linear-gradient(
    135deg,
    rgba(49, 99, 171, 0.1) 0%,
    rgba(28, 122, 95, 0.1) 100%
  );
  border: 2px solid var(--dl-color-brand-primary);
  position: relative;
  overflow: hidden;
}

.highlight-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: shimmer 3s infinite;
}

.featured-card {
  background: linear-gradient(
    135deg,
    rgba(28, 122, 95, 0.1) 0%,
    rgba(49, 99, 171, 0.1) 100%
  );
  border: 2px solid var(--dl-color-brand-secondary);
  grid-column: span 2;
}

.labor-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--dl-color-grey-03);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.detail-label {
  font-size: 0.875rem;
  color: var(--dl-color-grey-05);
}

.detail-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dl-color-brand-primary);
}

@media (max-width: 1024px) {
  .input-columns {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .calculator-container {
    gap: 2rem;
    padding: 2rem;
  }

  .featured-card {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .calculator-container {
    padding: 1.5rem;
    gap: 2rem;
  }

  .input-column {
    padding: 1.5rem;
  }

  .summary-section {
    padding: 2rem;
  }

  .total-roi-highlight {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }

  .roi-highlight-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .roi-highlight-item.primary {
    transform: none;
  }

  .highlight-large-value {
    font-size: 2.5rem;
  }

  .chart-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
  }

  .chart-wrapper canvas {
    max-width: 300px;
    max-height: 300px;
  }

  .chart-legend {
    padding: 0.5rem;
  }

  .legend-item {
    margin-bottom: 0.75rem;
    padding: 0.4rem;
  }

  .legend-label {
    font-size: 0.85rem;
  }

  .legend-value {
    font-size: 0.85rem;
    min-width: 70px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .large-value {
    font-size: 1.8rem;
  }

  .medium-value {
    font-size: 1.3rem;
  }

  .input-subsection {
    margin-top: 2rem;
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
  }

  .form-input {
    padding: 0.875rem 1rem;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .cta-section {
    margin-top: 3rem;
    padding: 2rem 1.5rem;
  }

  .cta-button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}

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

.form-group {
  margin-bottom: 1.5rem;
}

.input-subsection {
  color: var(--dl-color-brand-primary);
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  background: linear-gradient(
    90deg,
    rgba(49, 99, 171, 0.1) 0%,
    transparent 100%
  );
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--dl-color-brand-primary);
  position: relative;
}

.input-subsection:first-of-type {
  margin-top: 0;
}

.input-subsection::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--dl-color-brand-primary);
  border-radius: 0 2px 2px 0;
}

.form-group label {
  display: block;
  color: var(--dl-color-neutral-dark);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group label.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

/* Membership fields container */
.membership-fields {
  transition: all 0.3s ease;
  overflow: hidden;
}

.membership-fields.hidden {
  opacity: 0;
  max-height: 0;
  margin: 0;
  pointer-events: none;
}

.input-help {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--dl-color-grey-05);
  font-style: italic;
  line-height: 1.3;
}

.form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--dl-color-grey-03);
  border-radius: 12px;
  font-size: 1rem;
  background: linear-gradient(
    135deg,
    var(--dl-color-neutral-white) 0%,
    rgba(247, 250, 250, 0.9) 100%
  );
  color: var(--dl-color-neutral-dark);
  transition: all 0.3s ease;
  font-weight: 500;
}

.form-input:hover {
  border-color: var(--dl-color-brand-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.form-input:focus {
  outline: none;
  border-color: var(--dl-color-brand-primary);
  box-shadow:
    0 0 0 4px rgba(49, 99, 171, 0.15),
    0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Cleaned up - old result styles removed as we now use summary cards */

.cta-section {
  text-align: center;
  margin-top: 4rem;
  padding: 3rem 2rem;
}

.cta-section p {
  color: var(--dl-color-neutral-dark);
  margin-bottom: 2rem;
  font-size: 1.2rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.cta-button {
  display: inline-block;
  background-color: #3163ab;
  color: #ffffff !important;
  padding: 1rem 2rem;
  border-radius: 32px;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(49, 99, 171, 0.2);
  border: none;
}

.cta-button:hover {
  background-color: #274f89;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(49, 99, 171, 0.4);
  text-decoration: none;
}

.cta-button:visited {
  color: #ffffff !important;
}

.cta-button:active {
  color: #ffffff !important;
  transform: translateY(0);
}

/* Extra specificity to ensure white text */
.roi-calculator-section .cta-section .cta-button {
  color: #ffffff !important;
}

a.cta-button {
  color: #ffffff !important;
}

/* Export PDF Button */
.export-pdf-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--dl-color-brand-primary);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(49, 99, 171, 0.2);
}

.export-pdf-button:hover {
  background-color: var(--dl-color-brand-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(49, 99, 171, 0.3);
}

.export-pdf-button:active {
  transform: translateY(0);
}

.export-pdf-button svg {
  width: 20px;
  height: 20px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .roi-calculator-section {
    background-color: var(--surface-dark);
  }

  .calculator-container {
    background-color: var(--surface-container-dark);
  }

  .form-input {
    background-color: var(--surface-dark);
    border-color: var(--outline-dark);
  }

  .result-item {
    background-color: var(--surface-dark);
  }
}
