:root {
  /* Brand */
  --primary-color: #bb431a;
  --primary-dark: #8a3214;

  /* Strong neutrals */
  --bg: #0b0d10;
  --bg-2: #11151b;

  /* Light surfaces */
  --surface: #ffffff;
  --surface-2: #f3f4f6;     /* stronger than #f8f9fa */
  --surface-3: #e9ecef;     /* for subtle panels */

  /* Text */
  --text: #111827;
  --text-2: #374151;        /* readable secondary */
  --muted: #4b5563;         /* not washed out */

  /* Borders + shadows */
  --border: #d1d5db;        /* visible on white */
  --border-strong: #9ca3af; /* for emphasis */
  --shadow: 0 12px 32px rgba(0,0,0,0.14);
  --shadow-soft: 0 8px 22px rgba(0,0,0,0.10);

  /* Focus */
  --focus: rgba(187, 67, 26, 0.35);

  /* Slider colours */
  --slider-fill: #bb431a;
  --slider-track: #cbd5e1;
  --slider-track-dark: #94a3b8;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--surface-2);
}

/* Hero Section */
.tool-hero {
  background:
    linear-gradient(rgba(0,0,0,0.88), rgba(0,0,0,0.92)),
    url('https://images.unsplash.com/photo-1581094794329-c8112a89af12?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80') center/cover no-repeat;
  padding: 100px 0 80px;
  color: #fff;
  position: relative;
}

.tool-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(187, 67, 26, 0.28) 0%, transparent 52%);
  pointer-events: none;
}

.tool-badge {
  background-color: rgba(0,0,0,0.35);
  border: 2px solid rgba(255,255,255,0.28);
  border-radius: 50px;
  padding: 0.55rem 1.4rem;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.hero-cta {
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 14px 34px rgba(0,0,0,0.25);
}

/* Calculator Section */
.calculator-section {
  padding: 5rem 0;
  background-color: var(--surface-2);
}

.calculator-card,
.result-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  height: 100%;
  border: 2px solid var(--border);
}

.result-card {
  border-top: 6px solid var(--primary-color);
}

/* Labels / text */
.form-label {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.small,
.result-label,
.slider-labels {
  color: var(--muted);
}

/* Inputs */
.form-control {
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  background: #fff;
  color: var(--text);
}

.form-control::placeholder {
  color: #6b7280;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.22rem var(--focus);
  outline: none;
}

/* Button */
.btn-calculate {
  background: var(--primary-color);
  color: #fff;
  padding: 1rem 2.5rem;
  border-radius: 999px;
  font-weight: 800;
  border: 2px solid rgba(0,0,0,0.15);
  font-size: 1.1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  width: 100%;
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

.btn-calculate:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.22);
}

/* Result panels */
.result-box {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.result-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary-color);
  margin: 0;
}

.result-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Size indicators (bold + readable) */
.size-indicator {
  display: inline-block;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  font-weight: 800;
  margin: 1rem 0;
  border: 2px solid rgba(0,0,0,0.12);
}

.size-small { background: #1f8a3b; color: #fff; }
.size-medium { background: #ffbf1f; color: #111827; }
.size-large { background: #c81e1e; color: #fff; }

/* Warning / critical boxes - higher contrast */
.warning-box {
  background: #fff2cc;
  border-left: 6px solid #ff9800;
  border: 2px solid #f2c66d;
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  color: #3b2f00;
}

.critical-box {
  background: #ffe1e6;
  border-left: 6px solid #f44336;
  border: 2px solid #f3a3ab;
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  color: #3a0b10;
}

/* Understanding Section */
.understanding-section {
  padding: 5rem 0;
  background: var(--surface);
}

.concept-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  border: 2px solid var(--border);
}

.concept-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.concept-icon {
  width: 60px;
  height: 60px;
  background: rgba(187, 67, 26, 0.14);
  border: 2px solid rgba(187, 67, 26, 0.30);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  font-size: 1.5rem;
}

/* Solutions Section */
.solutions-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3) 100%);
}

.solution-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  height: 100%;
  border: 2px solid var(--border);
}

/* Survey CTA */
.survey-cta-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 6rem 0;
  text-align: center;
  border-top: 6px solid rgba(0,0,0,0.22);
}

.cta-button {
  display: inline-block;
  background-color: #fff;
  color: var(--primary-color);
  padding: 1rem 3rem;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  border: 2px solid #fff;
  font-size: 1.1rem;
  margin: 0.5rem;
  box-shadow: 0 12px 26px rgba(0,0,0,0.18);
}

.cta-button:hover {
  background-color: transparent;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(0,0,0,0.22);
}

/* Section title underline - thicker and clearer */
.section-title {
  position: relative;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 90px;
  height: 5px;
  background-color: var(--primary-color);
  border-radius: 3px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.section-title.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ==========================================
   RANGE SLIDERS (VISIBLE TRACK + PROGRESS)
   ========================================== */

.range-slider-container {
  position: relative;
  padding: 10px 0;
  margin: 15px 0;
}

input.form-range[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 20px;
  background: transparent;
  cursor: pointer;
  outline: none;
}

/* WebKit track: clear unfilled + filled */
input.form-range[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(to right,
      var(--slider-fill) 0%,
      var(--slider-fill) var(--slider-progress, 50%),
      var(--slider-track) var(--slider-progress, 50%),
      var(--slider-track) 100%);
  border: 2px solid var(--slider-track-dark);
}

/* Thumb */
input.form-range[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  margin-top: -8px;
  transition: transform 0.15s ease, background 0.15s ease;
}

input.form-range[type="range"]::-webkit-slider-thumb:hover {
  background: var(--primary-dark);
  transform: scale(1.08);
}

/* Firefox track + progress */
input.form-range[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: var(--slider-track);
  border: 2px solid var(--slider-track-dark);
}

input.form-range[type="range"]::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--slider-fill);
}

input.form-range[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  transition: transform 0.15s ease, background 0.15s ease;
}

input.form-range[type="range"]::-moz-range-thumb:hover {
  background: var(--primary-dark);
  transform: scale(1.08);
}

/* Slider value */
.slider-value {
  display: inline-block;
  margin-left: 10px;
  font-weight: 800;
  color: var(--primary-color);
  min-width: 44px;
}

/* Labels under slider */
.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .tool-hero {
    padding: 80px 0 60px;
    text-align: center;
  }
  .tool-hero h1 { font-size: 2.5rem; }
  .cta-button {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 1rem auto;
  }
  .result-value { font-size: 1.6rem; }
}
/* -------------------------------------------------
   RESULTS VISIBILITY FIX (force readable text colours)
   ------------------------------------------------- */

.result-card,
.calculator-card,
.solution-card,
.concept-card,
.result-box {
  color: var(--text) !important;
}

.result-card h1,
.result-card h2,
.result-card h3,
.result-card h4,
.result-card h5,
.result-card h6,
.result-card p,
.result-card li,
.result-card label,
.result-card small,
.result-card span,
.result-card div {
  color: var(--text) !important;
}

/* Secondary text inside results */
.result-card .text-muted,
.result-card .result-label,
.result-card .slider-labels,
.result-card small {
  color: var(--muted) !important;
}

/* Keep your red numbers red */
.result-card .result-value,
.result-card .slider-value {
  color: var(--primary-color) !important;
}

/* If you use alert boxes inside result cards */
.result-card .warning-box { color: #3b2f00 !important; }
.result-card .critical-box { color: #3a0b10 !important; }
/* -------------------------------
   MOULD RISK BADGE (missing)
--------------------------------- */

.risk-indicator{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 2px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text) !important; /* beats your .result-card div { color: ... !important } */
}

/* Risk levels */
.risk-high{
  background: #ffe1e6 !important;
  border-color: #f3a3ab !important;
  color: #3a0b10 !important;
}

.risk-medium{
  background: #fff2cc !important;
  border-color: #f2c66d !important;
  color: #3b2f00 !important;
}

.risk-low{
  background: #d7f5df !important;
  border-color: #9dd9ad !important;
  color: #0f2f1a !important;
}

/* Mobile: stop it spilling */
@media (max-width: 420px){
  .risk-indicator{ white-space: normal; text-align: center; }
}
/* ---------------------------------------
   RISK BADGE (used by mould + ventilation)
   --------------------------------------- */

.risk-indicator{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;

  padding: .75rem 1.25rem;
  border-radius: 999px;

  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;

  border: 2px solid var(--border-strong);
  background: var(--surface-2);

  /* beats your .result-card div { color: ... !important } */
  color: var(--text) !important;

  /* keep it tidy in the centre */
  max-width: 100%;
  text-align: center;
}

/* Risk levels */
.risk-high{
  background: #ffe1e6 !important;
  border-color: #f3a3ab !important;
  color: #3a0b10 !important;
}

.risk-medium{
  background: #fff2cc !important;
  border-color: #f2c66d !important;
  color: #3b2f00 !important;
}

.risk-low{
  background: #d7f5df !important;
  border-color: #9dd9ad !important;
  color: #0f2f1a !important;
}

/* Mobile wrap so it doesn't look shite */
@media (max-width: 420px){
  .risk-indicator{ white-space: normal; }
}
/* -------------------------------------------------
   Allow Bootstrap text utility colours inside results
   (your visibility fix currently flattens them)
   ------------------------------------------------- */

.result-card .text-danger,
.result-card .text-warning,
.result-card .text-info,
.result-card .text-success,
.result-card .text-primary,
.result-card .text-secondary,
.result-card .text-muted {
  color: inherit;
}

/* Now force the correct ones back ON (Bootstrap-like) */
.result-card .text-danger{ color: #dc3545 !important; }
.result-card .text-warning{ color: #ffc107 !important; }
.result-card .text-info{ color: #0dcaf0 !important; }
.result-card .text-success{ color: #198754 !important; }
.result-card .text-primary{ color: var(--primary-color) !important; }
.result-card .text-muted{ color: var(--muted) !important; }
/* Tone alerts to match tool style */
.result-card .alert{
  border-radius: 12px;
  border-width: 2px;
}
/* ==========================================
   MOULD CALC – INPUT SPACING FIX
   (CSS only, no markup changes)
   ========================================== */

/* Tighten each field block a touch */
#mouldFormAjax .mb-4{
  margin-bottom: 1.25rem !important;
}

/* Make label + value sit neatly */
#mouldFormAjax .form-label{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .5rem;
  line-height: 1.2;
}

/* Stop the strong value jumping about */
#mouldFormAjax .form-label strong{
  font-weight: 900;
  white-space: nowrap;
}

/* Range container: remove wasted vertical space */
#mouldFormAjax .range-slider-container{
  padding: 6px 0 0 0;     /* was 10px 0 */
  margin: 10px 0 6px 0;   /* was 15px 0 */
}

/* Your range input is set to height:20px; keep it but align it */
#mouldFormAjax input.form-range[type="range"]{
  height: 22px;           /* gives thumb breathing room */
  margin: 0;              /* kill browser default margins */
  padding: 0;
}

/* Slider labels: keep close to track */
#mouldFormAjax .slider-labels{
  margin-top: 4px;        /* was 6px */
  font-size: .85rem;
  line-height: 1;
  opacity: .9;
}

/* Explanatory text: consistent spacing and no washed-out clash */
#mouldFormAjax small.text-muted{
  display: block;
  margin-top: 6px;
  line-height: 1.25;
}

/* Fix: Bootstrap .text-muted may be overridden by your result-card rules
   but this is inside calculator-card, so enforce your muted token */
#mouldFormAjax .text-muted{
  color: var(--muted) !important;
}
/* =========================================================
   DRYING TIME RESULTS – polish + consistency
   ========================================================= */

/* Give the AJAX wrapper predictable spacing */
.results-content { width: 100%; }
.results-content > h3 { margin-bottom: 1.25rem !important; }

/* Time badge (the span in "Estimated Drying Time") */
.time-indicator{
  display:inline-block;
  padding: .55rem 1.2rem;
  border-radius: 999px;
  font-weight: 800;
  margin: .35rem 0 0;
  border: 2px solid rgba(0,0,0,.12);
  line-height: 1.1;
}

/* If these already exist elsewhere, keep whichever you prefer */
.time-fast{ background:#1f8a3b; color:#fff; }
.time-moderate{ background:#ffbf1f; color:#111827; }
.time-slow{ background:#c81e1e; color:#fff; }
.time-very-slow{ background:#6b7280; color:#fff; }

/* Progress bars: keep them tidy inside result cards */
.result-card .progress{
  border-radius: 999px;
  overflow: hidden;
}
.result-card .progress-bar strong{
  color: #fff;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

/* The two side panels inside results should match your result-box tone */
.result-card .results-content .result-box{
  margin-bottom: 1rem;
}

/* =========================================================
   FIX: don't nuke Bootstrap alert colours inside result cards
   ========================================================= */

/* Undo the overly-aggressive !important colouring for alerts */
.result-card .alert,
.result-card .alert *{
  color: inherit !important;
}

/* Still keep normal text readable everywhere else */
.result-card :where(h1,h2,h3,h4,h5,h6,p,li,small,span,div):not(.alert):not(.alert *){
  color: var(--text);
}

/* Keep muted text muted */
.result-card .text-muted{ color: var(--muted) !important; }

/* Keep your branded red numbers */
.result-card .result-value{ color: var(--primary-color) !important; }
/* ===== Fix: AJAX output CTA panel (dark) readability ===== */
.results-content .bg-dark,
#resultsContainer .bg-dark,
.result-card .bg-dark{
  color: #fff !important;
}

.results-content .bg-dark p,
.results-content .bg-dark li,
.results-content .bg-dark span,
.results-content .bg-dark small,
#resultsContainer .bg-dark p,
#resultsContainer .bg-dark li,
#resultsContainer .bg-dark span,
#resultsContainer .bg-dark small{
  color: rgba(255,255,255,.92) !important;
}

/* Headings strong white */
.results-content .bg-dark h1,
.results-content .bg-dark h2,
.results-content .bg-dark h3,
.results-content .bg-dark h4,
.results-content .bg-dark h5,
.results-content .bg-dark h6,
#resultsContainer .bg-dark h1,
#resultsContainer .bg-dark h2,
#resultsContainer .bg-dark h3,
#resultsContainer .bg-dark h4,
#resultsContainer .bg-dark h5,
#resultsContainer .bg-dark h6{
  color:#fff !important;
}

/* Links in dark CTA */
.results-content .bg-dark a,
#resultsContainer .bg-dark a{
  color:#fff !important;
  text-decoration: none;
}

.results-content .bg-dark a:hover,
#resultsContainer .bg-dark a:hover{
  text-decoration: underline;
  opacity: .95;
}

/* Button stays readable */
.results-content .bg-dark .btn.btn-light,
#resultsContainer .bg-dark .btn.btn-light{
  color:#111 !important;
}
