:root {
  /* Color — monocromo puro */
  --bg: #fcfcfc;
  --surface: #ffffff;
  --surface-2: #f4f4f4;
  --border: #e8e8e8;
  --text: #1a1a1a;
  --text-muted: #8a8a8a;
  --text-faint: #b5b5b5;
  --accent: #000000;        /* negro = acción principal */
  --accent-ink: #ffffff;    /* texto sobre negro */
  --accent-2: #1a1a1a;
  --danger: #b3261e;        /* solo para errores de formulario */
  --success: #1a1a1a;

  /* Layout */
  --radius: 2px;
  --radius-lg: 2px;
  --maxw: 1180px;

  /* Type — una sola familia, como en la referencia */
  --font-display: "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #000; color: #fff; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 800;
  margin: 0 0 0.4em;
}

p { color: var(--text-muted); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 252, 252, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.logo .plate {
  border: 1px solid var(--text);
  border-radius: 0;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.65rem;
  color: var(--text);
  letter-spacing: 0.15em;
}

.main-nav {
  display: flex;
  gap: 4px;
}

.main-nav a {
  padding: 10px 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  border-radius: 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
  background: transparent;
  border-bottom-color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--text);
  padding: 8px 10px;
  font-size: 1.1rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  cursor: pointer;
  border: 1px solid var(--text);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: #000;
  color: #fff;
}
.btn-primary:hover { background: #fff; color: #000; border-color: #000; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}
.btn-outline:hover { background: #000; color: #fff; }

/* ---------- Hero ---------- */

.hero {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 96px 0 64px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 14px 0 20px;
}

.hero h1 span { color: var(--text); text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }

.hero p.lead {
  font-size: 1.02rem;
  max-width: 46ch;
  margin-bottom: 30px;
}

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

.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 40px;
}

.hero-stats div strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--text);
}

.hero-stats div span {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--text);
  border-radius: 0;
  padding: 24px;
  display: grid;
  gap: 14px;
}

.hero-panel .panel-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.25em;
}

/* quick-search inside hero panel */
.quick-search {
  display: grid;
  gap: 10px;
}

.quick-search select,
.quick-search input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

/* ---------- Section headings ---------- */

.section {
  padding: 64px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 34px;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.section-head h2 { font-size: 1.7rem; margin: 0; letter-spacing: 0.04em; }
.section-head p { margin: 6px 0 0; }

/* ---------- Car grid / cards ---------- */

.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.car-card {
  background: var(--surface);
  border: none;
  border-radius: 0;
  overflow: hidden;
  transition: background 0.15s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.car-card:hover {
  background: #fafafa;
}

/* Al pasar el cursor por cualquier lado de la tarjeta, se destaca el botón "Ver detalle" */
.car-card:hover .btn-outline {
  background: #000;
  color: #fff;
}

.car-photo {
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
  position: relative;
  overflow: hidden; /* OBLIGATORIO: Recorta la foto cuando se agranda */
}

.car-photo img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  filter: grayscale(15%);
  transition: transform 0.4s ease, filter 0.4s ease; /* Transición suave de animación */
  will-change: transform;
}

/* Efecto de zoom y color al pasar el cursor por la tarjeta */
.car-card:hover .car-photo img {
  transform: scale(1.08); /* Aumenta la imagen un 8% */
  filter: grayscale(0%);   /* Muestra la foto en sus colores originales */
}

.car-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(15%); }

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: #000;
  border: 1px solid #000;
  color: #fff;
  padding: 4px 9px;
  border-radius: 0;
}

.car-body {
  padding: 18px;
  display: grid;
  gap: 8px;
  flex: 1;
}

.car-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.car-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 0.68rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.car-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  margin-top: 4px;
}

.car-foot {
  padding: 0 18px 18px;
}

.car-foot .btn { width: 100%; }

.empty-state {
  border: 1px dashed var(--border);
  border-radius: 0;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

/* ---------- Filters bar (autos.html) ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 16px;
}

.filters select,
.filters input {
  padding: 11px 12px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
}

.filters .grow { flex: 1; min-width: 180px; }

/* ---------- Steps / how it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.step {
  background: var(--surface);
  border: none;
  border-radius: 0;
  padding: 28px;
}

.step .num {
  font-family: var(--font-mono);
  color: #fff;
  background: #000;
  font-weight: 800;
  font-size: 0.85rem;
  width: 34px; height: 34px;
  border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}

/* ---------- Forms (vender.html) ---------- */

.form-shell {
  background: var(--surface);
  border: 1px solid var(--text);
  border-radius: 0;
  padding: 40px;
}

.form-section {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}
.form-section:first-child { border-top: none; padding-top: 0; }

.form-section h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: 0.08em;
}

.form-section .hint {
  font-size: 0.85rem;
  margin-bottom: 18px;
}

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

.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }

.field label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.field label .req { color: var(--danger); }

.field input,
.field select,
.field textarea {
  padding: 12px 12px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.94rem;
  resize: vertical;
}

.field textarea { min-height: 78px; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--text);
}

.field .sub {
  font-size: 0.76rem;
  color: var(--text-faint);
  margin-top: -2px;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.form-status {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-status.ok { color: #1a1a1a; }
.form-status.err { color: var(--danger); }

/* ---------- About page ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 20px;
}

.value-card {
  background: var(--surface);
  border: none;
  border-radius: 0;
  padding: 24px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer p {
  margin: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-family: var(--font-mono);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .car-card, .btn { transition: none; }
}

/* ---------- Detalle de auto (auto.html) ---------- */

.detail-back {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.detail-back:hover { color: var(--text); }

.detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
}

.gallery-main {
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.85rem;
  overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.gallery-thumb {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  overflow: hidden;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--text); }

.detail-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--text);
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--text);
  padding: 24px;
  margin-top: 28px;
}

.contact-card .field label { font-size: 0.68rem; }
.contact-card .field input,
.contact-card .field textarea {
  width: 100%;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.9rem;
}
.spec-table tr { border-top: 1px solid var(--border); }
.spec-table tr:first-child { border-top: none; }
.spec-table td {
  padding: 10px 0;
}
.spec-table td:first-child {
  color: var(--text-muted);
  width: 40%;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; }
}
/* ---------- Lightbox / Visor de imágenes ---------- */

.gallery-main {
  cursor: pointer;
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  user-select: none;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 160px);
  max-height: 90vh;
  margin: 0 auto;
}

.lightbox-img-wrapper {
  max-width: 100%;
  max-height: calc(90vh - 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.lightbox-img-wrapper img {
  max-width: 100%;
  max-height: calc(90vh - 40px);
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.25s ease;
}

.lightbox-img-wrapper img.zoomed {
  transform: scale(1.8);
  cursor: zoom-out;
}

.lightbox-counter {
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lightbox-arrow {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.6rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  z-index: 1001;
  flex-shrink: 0;
}

.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.4rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 720px) {
  .lightbox {
    padding: 12px;
  }
  .lightbox-container {
    max-width: calc(100vw - 70px);
  }
  .lightbox-arrow {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
}


/* Ajustes de robustez, accesibilidad y rendimiento en pantallas pequeñas */
.car-photo-placeholder { display:flex; width:100%; height:100%; min-height:180px; align-items:center; justify-content:center; padding:1rem; text-align:center; }
.car-summary { margin:0; font-size:.85rem; }
img { height:auto; }
button, input, select, textarea { font:inherit; }
button, .btn, .main-nav a { touch-action:manipulation; }
:focus-visible { outline:3px solid var(--accent, #b7a06a); outline-offset:3px; }
@media (max-width:720px) {
  .container { width:min(100% - 28px, 1180px); }
  .site-header { position:relative; z-index:100; }
  .site-header .container { gap:12px; }
  .main-nav.open { z-index:101; max-height:calc(100dvh - 76px); overflow-y:auto; box-shadow:0 12px 28px rgba(0,0,0,.18); }
  .main-nav a { min-height:44px; display:flex; align-items:center; padding:10px 12px; }
  .nav-toggle { min-width:44px; min-height:44px; align-items:center; justify-content:center; }
  .hero { padding-top:36px; }
  .hero h1 { font-size:clamp(2rem, 9vw, 3.25rem); line-height:1.08; overflow-wrap:anywhere; }
  .hero-actions { display:grid; grid-template-columns:1fr; gap:10px; }
  .hero-actions .btn, .quick-search .btn { width:100%; min-height:46px; justify-content:center; }
  .hero-stats { grid-template-columns:1fr; gap:14px; }
  .section-head { align-items:flex-start; gap:16px; flex-wrap:wrap; }
  .car-grid { grid-template-columns:1fr; }
  .car-photo { aspect-ratio: 16 / 10; }
  .field-grid { gap:14px; }
  input, select, textarea { max-width:100%; min-height:44px; }
  .lightbox { padding:8px; }
  .lightbox-container { max-width:calc(100vw - 64px); }
  .lightbox-arrow { width:40px; height:44px; }
}
@media (max-width:380px) {
  .logo { font-size:1rem; }
  .hero h1 { font-size:1.9rem; }
  .hero-stats > div { min-width:0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

/* ---------- Ajuste real de layout móvil ---------- */
/* Evita que grids, textos largos o controles ensanchen el viewport. */
.container,
.container > *,
.section,
.about-grid,
.about-grid > *,
.hero .container,
.hero .container > *,
.hero-panel,
.hero-stats,
.hero-stats > div,
.value-grid,
.value-card,
.steps,
.step,
.form-shell,
.form-section,
.form-section > *,
.field-grid,
.field,
.field label,
.form-footer,
.site-footer .container {
  min-width: 0;
}

p,
li,
.value-card h3,
.value-card p,
.step h3,
.step p,
.form-section h3,
.form-section .hint,
.hero-stats span {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 720px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 18px;
    padding-right: 18px;
  }

  .section {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .section-head {
    width: 100%;
    margin-bottom: 22px;
  }

  .section-head > *,
  .section-head p {
    max-width: 100%;
  }

  .section-head h1,
  .section-head h2,
  .about-grid h1,
  .form-section h2 {
    font-size: clamp(1.55rem, 7vw, 2.1rem) !important;
    line-height: 1.12;
    letter-spacing: -0.015em;
  }

  .about-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .about-grid .lead {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .about-grid .btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  .hero-panel {
    width: 100%;
    padding: 18px;
    gap: 12px;
  }

  .hero-panel .panel-title {
    letter-spacing: 0.15em;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
  }

  .hero-stats > div {
    min-width: 0;
    padding: 14px 12px;
    background: var(--surface-2);
  }

  .hero-stats div strong {
    font-size: clamp(1.45rem, 7vw, 1.8rem);
    line-height: 1.15;
  }

  .hero-stats div span {
    display: block;
    font-size: 0.66rem;
    line-height: 1.45;
    letter-spacing: 0.06em;
    overflow-wrap: anywhere;
  }

  .value-grid,
  .steps {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    margin-top: 24px;
  }

  .value-card,
  .step {
    padding: 20px 18px;
  }

  .value-card h3,
  .step h3 {
    font-size: 1rem !important;
    line-height: 1.3;
  }

  .value-card p,
  .step p {
    margin-bottom: 0;
    font-size: 0.93rem;
    line-height: 1.65;
  }

  /* La ficha queda contenida dentro del ancho visible del teléfono. */
  .form-shell {
    width: 100%;
    max-width: 100%;
    padding: 20px 16px;
  }

  .form-section {
    padding: 22px 0;
  }

  .form-section h3 {
    font-size: 0.96rem;
    line-height: 1.35;
  }

  .form-section .hint {
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 16px;
  }

  .field-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .field,
  .field.full {
    grid-column: 1 / -1;
    width: 100%;
  }

  .field label {
    font-size: 0.7rem;
    letter-spacing: 0.055em;
    line-height: 1.45;
  }

  .field input,
  .field select,
  .field textarea,
  .filters input,
  .filters select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .form-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .form-footer .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .form-status {
    overflow-wrap: anywhere;
  }

  /* Sobrescribe las grillas inline de la sección de metodología. */
  .form-section > div[style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  .form-section > div[style*="grid-template-columns"] > div {
    min-width: 0;
    padding: 20px 18px !important;
  }

  .form-section .btn {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .site-footer {
    padding: 28px 0;
  }

  .site-footer .container {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 380px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .form-shell {
    padding: 16px 12px;
  }

  .hero-panel {
    padding: 14px;
  }

  .hero-stats {
    gap: 8px;
  }

  .hero-stats > div {
    padding: 12px 9px;
  }

  .value-card,
  .step {
    padding: 17px 14px;
  }
}
