/* CocheJusto · estilos compartidos de las páginas interiores (reparaciones y guías) */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: dark;
  --bg:        #000000;
  --surface:   #111113;
  --surface-2: #1d1d1f;
  --line:      rgba(255,255,255,.1);
  --border:    rgba(255,255,255,.1);
  --text:      #f5f5f7;
  --body:      #a1a1a6;
  --muted:     #86868b;
  --accent:    #f5a623;
  --accent-hi: #ffb93f;
  --green:     #30d158;
  --orange:    #ff9f0a;
  --yellow:    #ffd60a;
  --red:       #ff453a;
  --font:      -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --wrap:      1080px;
  --col:       800px;
  --gutter:    clamp(1.25rem, 4vw, 2rem);
  --space:     clamp(5.5rem, 12vw, 10rem);
  --ease:      cubic-bezier(.25,.1,.25,1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

/* ── NAV ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0,0,0,.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.logo { font-size: 1.15rem; font-weight: 600; letter-spacing: -.03em; color: var(--text); }
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); list-style: none; }
.nav-links a { font-size: .78rem; color: rgba(245,245,247,.8); transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-links .nav-cta { background: var(--accent); color: #000; font-weight: 600; padding: .32rem .85rem; border-radius: 999px; }
.nav-links .nav-cta:hover { background: var(--accent-hi); color: #000; }
@media (max-width: 640px) { .nav-links li:not(:last-child) { display: none; } }

/* ── CABECERA DE PÁGINA ── */
.hero {
  max-width: calc(var(--col) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) 0;
}
.breadcrumb { font-size: .8rem; color: var(--muted); margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.breadcrumb a { transition: color .2s; }
.breadcrumb a:hover { color: var(--text); }
.tag { color: var(--accent); font-size: clamp(.95rem, 1.6vw, 1.1rem); font-weight: 600; margin-bottom: 1rem; }
h1 {
  font-size: clamp(2.3rem, 6.4vw, 4.25rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.04em;
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--accent); }
.intro {
  color: var(--muted);
  font-size: clamp(1.12rem, 2.1vw, 1.4rem);
  line-height: 1.45;
  letter-spacing: -.015em;
  margin-top: 1.75rem;
  text-wrap: pretty;
}
.alerta { background: rgba(255,69,58,.1); border-radius: 18px; padding: 1.35rem 1.6rem; margin-top: 2.5rem; }
.alerta p { color: var(--text); font-size: 1rem; line-height: 1.55; }
.alerta strong { color: var(--red); }

.precio-destaque {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.precio-item { padding: clamp(1.5rem, 4vw, 2.25rem) 1rem; }
.precio-item:first-child { padding-left: 0; }
.precio-item + .precio-item { border-left: 1px solid var(--line); padding-left: clamp(1rem, 3vw, 2rem); }
.precio-item strong {
  display: block;
  color: var(--accent);
  font-size: clamp(1.35rem, 3.1vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-bottom: .7rem;
}
.precio-item span { color: var(--muted); font-size: .88rem; line-height: 1.4; display: block; }
@media (max-width: 640px) {
  .precio-destaque { grid-template-columns: 1fr; }
  .precio-item, .precio-item + .precio-item { padding: 1.4rem 0; border-left: none; }
  .precio-item + .precio-item { border-top: 1px solid var(--line); }
  .precio-item strong { font-size: 1.75rem; }
}

/* ── CONTENIDO ── */
.content {
  max-width: calc(var(--col) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) var(--space);
}
.content h2 {
  font-size: clamp(1.7rem, 3.9vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.035em;
  text-wrap: balance;
  margin: clamp(3.5rem, 8vw, 5.5rem) 0 1.25rem;
}
.content h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; margin: 2.25rem 0 .6rem; }
.content p { color: var(--body); font-size: 1.06rem; line-height: 1.65; margin-bottom: 1.1rem; text-wrap: pretty; }
.content strong { color: var(--text); font-weight: 600; }
.content p a, .content li a, .coste-row a { color: var(--accent); }
.content p a:hover, .content li a:hover, .coste-row a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── BOTONES ── */
.cta-btn, .btn-analyze {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #000;
  font-family: inherit;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -.01em;
  padding: .85rem 1.75rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, transform .2s var(--ease);
}
.cta-btn:hover, .btn-analyze:hover { background: var(--accent-hi); }
.cta-btn:active, .btn-analyze:active { transform: scale(.98); }

/* ── HERRAMIENTA ── */
.tool-card {
  background: var(--surface);
  border-radius: 28px;
  padding: clamp(1.5rem, 5vw, 3rem);
  scroll-margin-top: 72px;
}
.tool-card h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 0 0 .6rem; }
.tool-card > p { color: var(--muted); font-size: 1rem; margin-bottom: 2rem; }
label { display: block; font-size: .85rem; font-weight: 500; color: var(--muted); margin: 1.5rem 0 .55rem; }
label:first-of-type { margin-top: 0; }

select, input[type="number"], input[type="text"] {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 1.06rem;
  letter-spacing: -.01em;
  padding: 1rem 1.15rem;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
select {
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2386868b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.15rem center;
  cursor: pointer;
}
input::placeholder { color: #6e6e73; }
select:focus, input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(245,166,35,.18); }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.price-row { display: grid; grid-template-columns: 1fr minmax(150px, auto); gap: .75rem; }
@media (max-width: 440px) { .price-row { grid-template-columns: 1fr; } }
.btn-analyze { width: 100%; margin-top: 2rem; padding-block: 1.05rem; }
.content .form-error { color: var(--red); font-size: .9rem; margin: 1rem 0 0; min-height: 1.35em; }

/* ── RESULTADO ── */
.result-box { display: none; }
.result-box.visible {
  display: block;
  margin-top: 1.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
  animation: fade .5s var(--ease);
}
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }
.semaforo { display: flex; align-items: center; gap: .85rem; margin-bottom: 2.25rem; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--surface-2); flex-shrink: 0; transition: background .3s; }
.dot.green  { background: var(--green);  box-shadow: 0 0 18px rgba(48,209,88,.6); }
.dot.orange { background: var(--orange); box-shadow: 0 0 18px rgba(255,159,10,.6); }
.dot.red    { background: var(--red);    box-shadow: 0 0 18px rgba(255,69,58,.6); }
.verdict { font-size: clamp(2rem, 6vw, 3rem); font-weight: 600; line-height: 1.05; letter-spacing: -.035em; }
.verdict.green  { color: var(--green); }
.verdict.orange { color: var(--orange); }
.verdict.red    { color: var(--red); }
.content .result-body { color: var(--muted); font-size: 1.02rem; line-height: 1.6; margin: 0; }

.range-wrap { margin-bottom: 2rem; }
.range-labels { position: relative; height: 1.5rem; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.range-labels span { position: absolute; transform: translateX(-50%); white-space: nowrap; transition: left .7s var(--ease); }
.range-bar { height: 6px; border-radius: 999px; background: var(--surface-2); position: relative; }
.range-fill {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--green);
  opacity: .85;
  transition: left .7s var(--ease), width .7s var(--ease);
}
.range-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px var(--surface), 0 2px 10px rgba(0,0,0,.6);
  transition: left .7s var(--ease);
  z-index: 2;
}
.content .range-caption { text-align: center; margin: 1rem 0 0; font-size: .8rem; color: var(--muted); }

/* ── ADSENSE ── */
.ad {
  min-height: 100px;
  margin: clamp(2.5rem, 6vw, 4rem) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.result-box .ad { margin-bottom: 0; }
.ad-label { color: #48484a; font-size: .68rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; padding: .5rem; }
.ad ins { width: 100%; }

/* ── TABLAS ── */
.table-wrap { overflow-x: auto; margin: 1.75rem 0 2.25rem; }
.tabla { width: 100%; min-width: 440px; border-collapse: collapse; font-size: .98rem; }
.tabla th {
  text-align: left;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 500;
  padding: 0 1.25rem .9rem 0;
  border-bottom: 1px solid var(--line);
}
.tabla td { padding: 1rem 1.25rem 1rem 0; border-bottom: 1px solid var(--line); color: var(--body); vertical-align: top; }
.tabla td:first-child { color: var(--text); }
.tabla th:last-child, .tabla td:last-child { padding-right: 0; }

/* ── LISTAS CON INDICADOR ── */
.senal-lista { list-style: none; margin: 1.5rem 0 2rem; border-top: 1px solid var(--line); }
.senal-lista li {
  display: flex;
  gap: .9rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--body);
  font-size: 1.02rem;
  line-height: 1.55;
}
.senal-lista li[class]::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: .52em;
  background: var(--muted);
}
.senal-lista li.ok::before   { background: var(--green); }
.senal-lista li.warn::before { background: var(--orange); }
.senal-lista li.mild::before { background: var(--yellow); }
.senal-lista li.bad::before  { background: var(--red); }

/* ── DESTACADOS ── */
.highlight { background: var(--surface); border-radius: 18px; padding: 1.5rem 1.75rem; margin: 2.5rem 0; }
.content .highlight p { margin: 0; font-size: 1rem; line-height: 1.6; }
.highlight strong:first-child { color: var(--accent); }

.cta-box {
  background: var(--surface);
  border-radius: 28px;
  padding: clamp(2.5rem, 7vw, 4.5rem) 1.5rem;
  margin: clamp(3.5rem, 8vw, 5.5rem) 0 0;
  text-align: center;
}
.content .cta-box h3 { font-size: clamp(1.6rem, 3.8vw, 2.4rem); line-height: 1.1; letter-spacing: -.035em; text-wrap: balance; margin: 0 0 .85rem; }
.content .cta-box p { color: var(--muted); margin: 0 0 2rem; }
.cta-box + h2 { margin-top: clamp(3.5rem, 8vw, 5.5rem); }

/* ── GUÍAS: desglose de costes ── */
.coste-card { border-top: 1px solid var(--line); margin: 1.5rem 0 2.25rem; }
.coste-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.02rem;
}
.coste-row span:first-child { color: var(--body); }
.coste-row span:last-child { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ── GUÍAS: ranking de reparaciones ── */
.rep-card { display: flex; gap: clamp(1rem, 4vw, 2rem); padding: 2.25rem 0; border-bottom: 1px solid var(--line); }
.rep-num {
  flex-shrink: 0;
  width: 3rem;
  color: #48484a;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.content .rep-content h3 { font-size: 1.45rem; letter-spacing: -.025em; margin: 0 0 .35rem; }
.rep-precio { color: var(--accent); font-size: 1.05rem; font-weight: 500; font-variant-numeric: tabular-nums; margin-bottom: .75rem; }
.content .rep-content p { margin: 0; }
.rep-content a { display: inline-block; color: var(--accent); font-size: 1rem; font-weight: 500; margin-top: .9rem; }
.rep-content a::after { content: ' ›'; }
.rep-content a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── GUÍAS: señales y consejos ── */
.senal, .consejo { padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.content .senal h3, .content .consejo h3 { display: flex; gap: .9rem; margin: 0 0 .5rem; }
.senal h3::before, .consejo h3::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: .52em;
  background: var(--red);
}
.consejo h3::before { background: var(--green); }
.content .senal p, .content .consejo p { margin: 0 0 0 calc(8px + .9rem); }

/* ── GUÍAS: regla y casos ── */
.regla { background: var(--surface); border-radius: 28px; padding: clamp(2.25rem, 6vw, 3.5rem) clamp(1.5rem, 5vw, 3rem); margin: 2.5rem 0; text-align: center; }
.content .regla h3 { color: var(--accent); font-size: 1rem; letter-spacing: -.01em; margin: 0 0 1rem; }
.content .regla p { color: var(--text); font-size: clamp(1.3rem, 3vw, 1.75rem); font-weight: 600; line-height: 1.25; letter-spacing: -.03em; text-wrap: balance; margin: 0; }
.content .regla strong { color: var(--accent); }

.caso { background: var(--surface); border-radius: 22px; padding: clamp(1.4rem, 4vw, 2rem); margin: 1rem 0; }
.caso-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .85rem; }
.content .caso h3 { font-size: 1.12rem; margin: 0; }
.caso-decision { flex-shrink: 0; font-size: .8rem; font-weight: 600; padding: .3rem .8rem; border-radius: 999px; white-space: nowrap; }
.reparar { background: rgba(48,209,88,.14); color: var(--green); }
.cambiar { background: rgba(255,69,58,.14); color: var(--red); }
.content .caso p { margin: 0; font-size: 1rem; }
@media (max-width: 520px) { .caso-header { flex-direction: column-reverse; gap: .75rem; } }

/* ── LEGALES Y CONTACTO ── */
.legal .content { padding-top: clamp(3rem, 8vw, 6rem); }
.legal h1 { font-size: clamp(2.2rem, 5.5vw, 3.5rem); margin-bottom: 1.5rem; }
.legal .content h2 { font-size: 1.45rem; letter-spacing: -.025em; margin: 3rem 0 .9rem; }
.content .subtitle { color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.45; margin-bottom: 2.5rem; }
.form-card { background: var(--surface); border-radius: 28px; padding: clamp(1.5rem, 5vw, 3rem); }
input[type="email"], textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 1.06rem;
  letter-spacing: -.01em;
  padding: 1rem 1.15rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 150px; resize: vertical; display: block; }
textarea::placeholder { color: #6e6e73; }
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(245,166,35,.18); }
.btn {
  width: 100%;
  margin-top: 2rem;
  background: var(--accent);
  color: #000;
  font-family: inherit;
  font-size: 1.06rem;
  font-weight: 600;
  padding: 1.05rem 1.75rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: var(--accent-hi); }
.btn:disabled { opacity: .5; cursor: default; }
.success { display: none; margin-top: 1.5rem; background: rgba(48,209,88,.12); border-radius: 14px; padding: 1.1rem; text-align: center; color: var(--green); font-weight: 600; }

/* ── FOOTER ── */
footer { border-top: 1px solid var(--line); padding-block: 3.5rem 2.5rem; color: var(--muted); font-size: .8rem; }
.foot-cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .foot-cols { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
.foot-brand p { margin-top: .75rem; max-width: 26em; line-height: 1.55; }
.foot-cols h2 { color: var(--text); font-size: .8rem; font-weight: 600; margin-bottom: .9rem; }
.foot-cols ul { list-style: none; display: grid; gap: .6rem; }
.foot-cols a:not(.logo):hover { color: var(--text); }
.foot-note { padding-top: 1.5rem; line-height: 1.6; }
.foot-note a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ── NOTA DE METODOLOGÍA Y CONTACTO ── */
.nota-metodo { color: var(--muted); font-size: .85rem; line-height: 1.5; margin-top: 1.25rem; }
.nota-metodo a { color: var(--accent); }
.nota-metodo a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mail-link { display: inline-block; color: var(--accent); font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 600; letter-spacing: -.02em; word-break: break-all; margin: .5rem 0 1.5rem; }
.mail-link:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
