/* ============================================
   Area Kit Pro - Calculator Pages
   ============================================ */

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.8125rem;
  color: var(--medium-gray);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--teal);
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--navy);
}

/* ---------- Calculator Hero ---------- */
.calc-hero {
  padding: 100px 0 40px;
  background: linear-gradient(135deg, var(--white) 0%, var(--light-gray) 100%);
}

.calc-hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.calc-hero-sub {
  font-size: 1.0625rem;
  color: var(--dark-gray);
  max-width: 640px;
  line-height: 1.7;
}

/* ---------- Layout ---------- */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

.calc-main {
  min-width: 0;
}

/* ---------- Calculator Card ---------- */
.calc-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.calc-form {
  padding: 32px;
}

.calc-field {
  margin-bottom: 20px;
}

.calc-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.calc-field input[type="text"],
.calc-field select {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color var(--transition);
}

.calc-field input:focus,
.calc-field select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.calc-field select {
  cursor: pointer;
  appearance: auto;
}

/* Input with prefix ($) */
.input-prefix {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}

.input-prefix:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.input-prefix span {
  padding: 10px 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--medium-gray);
  background: var(--light-gray);
  border-right: 1px solid var(--border);
}

.input-prefix input {
  border: none !important;
  box-shadow: none !important;
  flex: 1;
}

/* Input with suffix (%) */
.input-suffix {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}

.input-suffix:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.input-suffix span {
  padding: 10px 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--medium-gray);
  background: var(--light-gray);
  border-left: 1px solid var(--border);
}

.input-suffix input {
  border: none !important;
  box-shadow: none !important;
  flex: 1;
}

/* Input row (two inputs side by side) */
.input-row {
  display: flex;
  gap: 12px;
}

.input-row .input-prefix {
  flex: 1;
}

.input-row .input-suffix {
  width: 120px;
}

/* Two-column field row */
.calc-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Sliders */
.calc-field input[type="range"] {
  width: 100%;
  margin-top: 8px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.calc-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--teal);
  border: 3px solid var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}

.calc-field input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--teal);
  border: 3px solid var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}

/* ---------- Results ---------- */
.calc-results {
  padding: 32px;
  background: var(--light-gray);
  border-top: 1px solid var(--border);
}

.result-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.result-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--medium-gray);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.result-amount {
  font-size: 3rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.result-green .result-amount {
  color: #22863a;
}

.result-red .result-amount {
  color: #e53e3e;
}

/* Breakdown rows */
.result-breakdown {
  margin-bottom: 20px;
}

.result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.9375rem;
}

.result-row span:nth-child(2) {
  flex: 1;
  color: var(--dark-gray);
}

.result-val {
  font-weight: 700;
  color: var(--navy);
}

.result-deduct .result-val {
  color: #e53e3e;
}

/* Color dots */
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-navy { background: var(--navy); }
.dot-teal { background: var(--teal); }
.dot-gold { background: var(--gold); }
.dot-gray { background: var(--medium-gray); }

/* Progress bar */
.result-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--border);
}

.bar-seg {
  height: 100%;
  transition: width 0.3s ease;
}

.bar-navy { background: var(--navy); }
.bar-teal { background: var(--teal); }
.bar-gold { background: var(--gold); }
.bar-gray { background: var(--medium-gray); }

/* Summary grid */
.result-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

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

.summary-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--medium-gray);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.summary-val {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--navy);
}

/* ---------- Sidebar ---------- */
.calc-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 80px;
}

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.sidebar-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.sidebar-links {
  list-style: none;
}

.sidebar-links li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-links li:last-child {
  border-bottom: none;
}

.sidebar-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--teal);
  transition: color var(--transition);
}

.sidebar-links a:hover {
  color: var(--navy);
}

/* Sidebar CTA */
.sidebar-cta {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
}

.sidebar-cta h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.sidebar-cta p {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ---------- SEO Content ---------- */
.calc-content {
  padding: 40px 32px;
}

.calc-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 12px;
  margin-top: 32px;
  color: var(--navy);
}

.calc-content h2:first-child {
  margin-top: 0;
}

.calc-content p {
  font-size: 0.9375rem;
  color: var(--dark-gray);
  line-height: 1.7;
  margin-bottom: 16px;
}

.calc-content ul,
.calc-content ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.calc-content li {
  font-size: 0.9375rem;
  color: var(--dark-gray);
  line-height: 1.7;
  margin-bottom: 8px;
  list-style: disc;
}

.calc-content ol li {
  list-style: decimal;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }

  .calc-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .calc-sidebar > * {
    flex: 1;
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .calc-hero {
    padding: 90px 0 32px;
  }

  .calc-hero h1 {
    font-size: 1.75rem;
  }

  .calc-form {
    padding: 24px;
  }

  .calc-results {
    padding: 24px;
  }

  .calc-row-2 {
    grid-template-columns: 1fr;
  }

  .result-amount {
    font-size: 2.25rem;
  }

  .result-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .calc-content {
    padding: 32px 24px;
  }

  .input-row {
    flex-direction: column;
  }

  .input-row .input-suffix {
    width: 100%;
  }

  .calc-sidebar {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .calc-hero h1 {
    font-size: 1.5rem;
  }

  .result-amount {
    font-size: 2rem;
  }
}
