/* ============================================================
   Gravel Coverage Calculator — Page-specific styles
   gravel-coverage-calculator.css
   Primary: Green #16A34A | Extends site design system
   ============================================================ */

/* ── Hero Section ─────────────────────────────────────────── */
.cov-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 36px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}

.cov-hero-copy { max-width: 600px; }

.cov-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 16px;
  padding: 7px 14px;
  border: 1px solid #d4e9db;
  border-radius: 99px;
  background: #eef9f1;
  color: #16A34A;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.cov-hero .hero-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16A34A;
}

.cov-hero h1 {
  margin: 0 0 16px;
  color: #0d1321;
  font: 800 clamp(34px, 4.2vw, 56px)/1.05 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: -2.2px;
}

.cov-hero h1 span { color: #16A34A; }

.cov-hero .hero-subtitle {
  margin: 0 0 24px;
  color: #596477;
  font-size: 16px;
  line-height: 1.7;
}

.cov-hero .hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: 0;
  border-radius: 10px;
  background: #16A34A;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, transform .15s;
  box-shadow: 0 6px 20px #16A34A30;
}

.cov-hero .hero-cta:hover {
  background: #137a39;
  transform: translateY(-2px);
}

/* Hero visual */
.cov-hero-visual {
  position: relative;
  min-height: 320px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef9f1 0%, #ecf2fb 100%);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 30px;
}

.cov-hero-visual svg { width: 100%; max-width: 420px; height: auto; }

/* ── Mode Selector ───────────────────────────────────────── */
.cov-calc-wrap {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 24px;
}

.cov-calc-card {
  border: 1px solid #e3e6ed;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 30px #2837550b;
  overflow: hidden;
}

.cov-calc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 28px;
  border-bottom: 1px solid #eef0f6;
  background: #f6fbf7;
}

.cov-calc-header .calc-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #16A34A;
  color: #fff;
  font-size: 20px;
  flex: none;
}

.cov-calc-header h2 {
  margin: 0;
  color: #172033;
  font: 800 22px/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: -.6px;
}

.cov-calc-header p { margin: 2px 0 0; color: #7c8496; font-size: 12px; }

/* Mode toggle tabs */
.cov-mode-tabs {
  display: flex;
  gap: 0;
  padding: 16px 28px 0;
  background: #f6fbf7;
  border-bottom: 1px solid #eef0f6;
}

.cov-mode-tab {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d4e9db;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #eef9f1;
  color: #4d7460;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition: background .15s, color .15s;
  margin-bottom: -1px;
}

.cov-mode-tab:first-child { border-right: 0; border-radius: 10px 0 0 0; }
.cov-mode-tab:last-child { border-radius: 0 10px 0 0; }

.cov-mode-tab.active {
  background: #fff;
  color: #16A34A;
  border-color: #e3e6ed;
  border-bottom-color: #fff;
  position: relative;
  z-index: 2;
}

/* Calculator body */
.cov-calc-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.cov-input-panel { padding: 28px; border-right: 1px solid #eef0f6; }
.cov-results-panel { padding: 28px; background: #f8f9fc; }

/* ── Steps ──────────────────────────────────────────────── */
.cov-step { margin-bottom: 28px; }
.cov-step:last-child { margin-bottom: 0; }

.cov-step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.cov-step-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #16A34A;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  flex: none;
}

.cov-step-title {
  color: #172033;
  font: 800 15px/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* ── Fields ─────────────────────────────────────────────── */
.cov-field { margin-bottom: 12px; }

.cov-field label {
  display: block;
  margin-bottom: 5px;
  color: #596477;
  font-size: 12px;
  font-weight: 700;
}

.cov-field input[type="number"],
.cov-field select {
  width: 100%;
  height: 42px;
  border: 1px solid #d8dce7;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: #172033;
  font: 700 14px ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.cov-field input[type="number"]:focus,
.cov-field select:focus {
  border-color: #16A34A;
  box-shadow: 0 0 0 3px #16A34A15;
}

.cov-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cov-field-row.three { grid-template-columns: 1fr 1fr 1fr; }

/* Input with unit suffix */
.cov-input-group {
  display: flex;
  align-items: stretch;
  border: 1px solid #d8dce7;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}

.cov-input-group:focus-within {
  border-color: #16A34A;
  box-shadow: 0 0 0 3px #16A34A15;
}

.cov-input-group input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 0;
  padding: 0 14px;
  background: transparent;
  color: #172033;
  font: 700 14px ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  outline: none;
}

.cov-input-group .unit-suffix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: #eef4ef;
  color: #4d7460;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Radio group */
.cov-radio-group { display: flex; gap: 10px; margin-bottom: 14px; }

.cov-radio {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d8dce7;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.cov-radio:hover { border-color: #a8d8b8; }

.cov-radio input { margin: 0; accent-color: #16A34A; }

.cov-radio.active { border-color: #16A34A; background: #eef9f1; }

.cov-radio-label { color: #313a4c; font-size: 13px; font-weight: 700; }

/* ── Results Dashboard ──────────────────────────────────── */
.cov-results-panel h3 {
  margin: 0 0 18px;
  color: #172033;
  font: 800 18px/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.result-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.result-card {
  padding: 18px;
  border: 1px solid #e3e6ed;
  border-radius: 12px;
  background: #fff;
  transition: transform .15s, box-shadow .15s;
}

.result-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px #2837550a; }

.result-card.highlight {
  grid-column: 1 / -1;
  border-color: #16A34A;
  border-width: 2px;
  background: linear-gradient(135deg, #eef9f1 0%, #fff 100%);
}

.result-card-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: #7c8496;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.result-card-label .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.result-card-value {
  color: #172033;
  font: 800 28px/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: -1px;
}

.result-card.highlight .result-card-value { font-size: 38px; color: #16A34A; }

.result-card-sub { margin-top: 4px; color: #858d9d; font-size: 11px; }

/* ── Coverage Chart / Tables ────────────────────────────── */
.cov-section {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 24px;
}

.cov-section h2 {
  margin: 0 0 8px;
  color: #172033;
  font: 800 28px/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: -.8px;
}

.cov-section > p { margin: 0 0 24px; color: #596477; font-size: 14px; line-height: 1.7; }

.cov-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e3e6ed;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.cov-table th, .cov-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid #eef0f6;
}

.cov-table th {
  background: #f6fbf7;
  color: #4d7460;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.cov-table td { color: #313a4c; font-size: 14px; }
.cov-table td strong { color: #172033; }
.cov-table td .cov-range { font-weight: 800; color: #16A34A; }
.cov-table tr:last-child td { border-bottom: 0; }
.cov-table tr:hover td { background: #f6fbf7; }

/* ── Coverage Examples ──────────────────────────────────── */
.cov-examples-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.cov-example-card {
  padding: 24px;
  border: 1px solid #e3e6ed;
  border-radius: 14px;
  background: #fff;
  transition: transform .15s, box-shadow .15s;
}

.cov-example-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px #2837550a; }

.cov-example-card .ec-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: #eef9f1;
  font-size: 22px;
}

.cov-example-card h3 { margin: 0 0 8px; color: #172033; font: 800 17px/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
.cov-example-card .ec-detail { color: #596477; font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
.cov-example-card .ec-result {
  padding: 12px 16px;
  border-radius: 8px;
  background: #eef9f1;
  color: #16A34A;
  font: 800 16px/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* ── What Determines Coverage ───────────────────────────── */
.cov-factors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.cov-factor-card {
  padding: 24px;
  border: 1px solid #e3e6ed;
  border-radius: 12px;
  background: #fff;
}

.cov-factor-card .fc-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: #eef9f1;
  font-size: 20px;
}

.cov-factor-card h3 { margin: 0 0 8px; color: #172033; font: 800 15px/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
.cov-factor-card p { margin: 0; color: #596477; font-size: 13px; line-height: 1.6; }

/* ── How To Calculate ───────────────────────────────────── */
.cov-formula-box {
  margin-top: 20px;
  padding: 24px;
  border-radius: 12px;
  background: #172033;
  color: #fff;
  text-align: center;
}

.cov-formula-box .formula-label { margin-bottom: 8px; color: #a8d8b8; font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.cov-formula-box .formula-text { font: 800 18px/1.5 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
.cov-formula-box .formula-text span { color: #4ade80; }

/* ── Internal Links ─────────────────────────────────────── */
.internal-links-section {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 24px;
}

.internal-links-section h2 {
  margin: 0 0 16px;
  color: #172033;
  font: 800 22px/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.internal-links-grid { display: flex; flex-wrap: wrap; gap: 10px; }

.internal-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: 1px solid #e3e6ed;
  border-radius: 99px;
  background: #fff;
  color: #313a4c;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .15s, background .15s, transform .15s;
}

.internal-link-pill:hover { border-color: #16A34A; background: #eef9f1; color: #16A34A; transform: translateY(-1px); }
.internal-link-pill::after { content: '→'; font-size: 12px; opacity: .5; }

/* ── Copy button ─────────────────────────────────────────── */
.cov-copy-btn {
  width: 100%;
  height: 42px;
  margin-top: 16px;
  border: 0;
  border-radius: 8px;
  background: #16A34A;
  color: #fff;
  font: 800 13px ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  cursor: pointer;
  transition: background .15s;
}

.cov-copy-btn:hover { background: #137a39; }
.cov-fine-print { margin: 12px 0 0; color: #858d9d; font-size: 11px; line-height: 1.6; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1000px) {
  .cov-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 28px;
  }
  .cov-hero-visual { min-height: 240px; order: -1; }
  .cov-calc-body { grid-template-columns: 1fr; }
  .cov-input-panel { border-right: 0; border-bottom: 1px solid #eef0f6; }
  .cov-factors-grid { grid-template-columns: 1fr 1fr; }
  .cov-examples-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .cov-hero { padding: 20px 16px 24px; }
  .cov-hero h1 { font-size: 30px; letter-spacing: -1.5px; }
  .cov-hero .hero-subtitle { font-size: 14px; }
  .cov-calc-wrap { padding: 0 16px; }
  .cov-mode-tabs { padding: 12px 16px 0; }
  .cov-mode-tab { font-size: 11px; padding: 10px 8px; }
  .cov-calc-header { padding: 18px 20px; }
  .cov-input-panel, .cov-results-panel { padding: 20px 18px; }
  .result-cards-grid { grid-template-columns: 1fr; }
  .result-card.highlight .result-card-value { font-size: 32px; }
  .cov-section { padding: 0 16px; }
  .cov-section h2 { font-size: 22px; }
  .cov-table { display: block; overflow-x: auto; }
  .cov-factors-grid { grid-template-columns: 1fr; }
  .cov-formula-box .formula-text { font-size: 14px; }
  .internal-links-section { padding: 0 16px; }
  .internal-links-section h2 { font-size: 18px; }
}

@media (max-width: 480px) {
  .cov-field-row, .cov-field-row.three { grid-template-columns: 1fr; }
  .cov-radio-group { flex-direction: column; }
}
