* {
  box-sizing: border-box;
}

:root {
  --brand-red: #9f0000;
  --brand-red-dark: #4b0000;
  --brand-black: #070707;
  --brand-white: #ffffff;
  --brand-gray: #f3f4f6;
  --brand-border: #e5e7eb;
  --brand-text: #111827;
  --brand-muted: #6b7280;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(159, 0, 0, 0.10), transparent 32%),
    #f3f4f6;
  color: var(--brand-text);
}

/* CABECERA CORPORATIVA */
.brand-hero {
  position: relative;
  min-height: 315px;
  display: grid;
  place-items: center;
  padding: 42px 18px;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(159, 0, 0, 0.96), rgba(75, 0, 0, 0.92) 48%, rgba(0, 0, 0, 0.96)),
    url("fondo-gestoria.jpg") center / cover no-repeat;
  color: #ffffff;
}

.brand-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 34% 24%, rgba(255,255,255,0.15), transparent 24%),
    linear-gradient(90deg, rgba(159,0,0,0.55), rgba(0,0,0,0.55));
  pointer-events: none;
}

.brand-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.46));
  pointer-events: none;
}

.brand-hero__content {
  position: relative;
  z-index: 2;
  width: min(920px, 100%);
  text-align: center;
  display: grid;
  justify-items: center;
}

.brand-logo {
  width: min(360px, 72vw);
  height: auto;
  display: block;
  margin: 0 auto 28px;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.38));
}

.brand-hero h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.16;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 12px 28px rgba(0,0,0,0.42);
}

.brand-hero p {
  margin: 18px 0 0;
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 800;
  text-shadow: 0 10px 24px rgba(0,0,0,0.40);
}

.back-button {
  position: absolute;
  z-index: 5;
  left: 22px;
  top: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.96);
  color: #111827;
  text-decoration: none;
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 16px 34px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.back-button:hover {
  transform: translateY(-2px);
  background: #111827;
  color: #ffffff;
}

/* CALCULADORA */
.wrap {
  min-height: calc(100vh - 315px);
  padding: 46px 16px 60px;
}

.calc-card {
  max-width: 980px;
  margin: -74px auto 0;
  position: relative;
  z-index: 4;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 24px;
  box-shadow: 0 26px 58px rgba(17, 24, 39, 0.16);
  overflow: hidden;
}

.calc-head {
  position: relative;
  padding: 30px 28px 20px;
  border-bottom: 1px solid var(--brand-border);
  background:
    linear-gradient(90deg, rgba(159, 0, 0, 0.08), rgba(255,255,255,0));
}

.calc-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-red-dark), var(--brand-black));
}

.calc-head h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.calc-head p {
  margin: 0;
  color: var(--brand-muted);
  line-height: 1.55;
}

.calc-form {
  padding: 28px;
  display: grid;
  gap: 18px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 14px;
  font-weight: 800;
  color: #111827;
}

.field input,
.field select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 15px;
  font-size: 15px;
  background: #fff;
  color: #111827;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(159, 0, 0, 0.12);
}

.help-text {
  font-size: 12px;
  color: var(--brand-muted);
  min-height: 16px;
}

.help-text.error {
  color: #b91c1c;
}

.help-text.ok {
  color: #166534;
}

.search-field {
  position: relative;
  align-self: start;
  align-content: start;
}

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.16);
  overflow: hidden;
  z-index: 20;
  max-height: 360px;
  overflow-y: auto;
}

.suggestion-item {
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: rgba(159, 0, 0, 0.06);
}

.suggestion-title {
  font-weight: 800;
  font-size: 14px;
}

.suggestion-meta {
  font-size: 13px;
  color: var(--brand-muted);
  margin-top: 3px;
}

.no-results {
  padding: 12px 14px;
  color: var(--brand-muted);
  font-size: 14px;
}

.vehicle-box {
  padding: 18px;
  border: 1px solid var(--brand-border);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(159, 0, 0, 0.055), rgba(249, 250, 251, 1) 42%);
}

.vehicle-box__title {
  font-weight: 900;
  margin-bottom: 8px;
  color: #111827;
}

.vehicle-box__content {
  color: #4b5563;
  line-height: 1.6;
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.vehicle-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(159, 0, 0, 0.16);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  color: #374151;
}

.client-box {
  padding: 20px;
  border: 1px solid rgba(159, 0, 0, 0.14);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(159, 0, 0, 0.07), rgba(255, 255, 255, 1) 48%);
  display: grid;
  gap: 16px;
}

.client-box__head {
  display: grid;
  gap: 5px;
}

.client-box__head h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
  color: #111827;
}

.client-box__head p {
  margin: 0;
  color: var(--brand-muted);
  font-size: 14px;
  line-height: 1.5;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-main,
.btn-secondary {
  border: none;
  border-radius: 999px;
  min-height: 52px;
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-main {
  background: linear-gradient(135deg, #111827, #000000);
  color: #fff;
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.22);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
  color: #fff;
  box-shadow: 0 14px 30px rgba(159, 0, 0, 0.22);
}

.btn-main:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  opacity: 0.96;
}

.btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  background: #d1d5db;
  color: #4b5563;
}

.result {
  margin: 0 28px 28px;
  padding: 22px;
  border: 1px solid var(--brand-border);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(159, 0, 0, 0.055), #f9fafb 38%);
}

.result h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.result-total {
  font-size: 34px;
  font-weight: 950;
  margin: 4px 0 18px;
  color: var(--brand-red-dark);
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--brand-border);
}

.result-row:last-child {
  border-bottom: none;
}

.result-note {
  margin-top: 14px;
  color: var(--brand-muted);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 768px) {
  .brand-hero {
    min-height: 270px;
    padding: 70px 18px 36px;
  }

  .back-button {
    left: 14px;
    top: 14px;
    min-height: 40px;
    padding: 9px 14px;
    max-width: calc(100% - 28px);
  }

  .brand-logo {
    width: min(260px, 72vw);
    margin-bottom: 20px;
  }

  .brand-hero h2 {
    font-size: 28px;
  }

  .brand-hero p {
    font-size: 18px;
  }

  .wrap {
    padding: 28px 14px 42px;
  }

  .calc-card {
    margin-top: -52px;
    border-radius: 20px;
  }

  .calc-head,
  .calc-form {
    padding: 20px;
  }

  .result {
    margin: 0 20px 20px;
  }

  .grid-2,
  .vehicle-grid {
    grid-template-columns: 1fr;
  }

  .result-row {
    flex-direction: column;
    gap: 4px;
  }

  .result-total {
    font-size: 28px;
  }

  .actions {
    flex-direction: column;
  }

  .btn-main,
  .btn-secondary {
    width: 100%;
  }
}
