/*
 * Estilos específicos de la página de tecnología (tecnologia.html).
 * Reutiliza la paleta e identidad visual de index.html (marca LEPAS a nivel
 * general, no de un modelo concreto), con componentes propios para bloques
 * técnicos, tabla comparativa y FAQ.
 */

:root {
  --bg: #0f1113;
  --panel: #15191c;
  --panel-soft: #1d2328;
  --line: #2a333a;
  --text: #f4f6f8;
  --muted: #a5b0ba;
  --brand: #c98a2e;
  --brand-strong: #e0a64a;
  --brand-text: #111317;
  --radius-lg: 22px;
  --radius-md: 14px;
  --maxw: 1240px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

body {
  margin: 0;
  font-family: "SourceHan", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 15% 0%, #1b2025 0%, var(--bg) 42%) fixed;
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; }

section { padding: 64px 0; }

.eyebrow {
  color: var(--brand);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

h1, h2, h3, p { margin-top: 0; }

.section-title {
  margin: 0 0 18px;
  font-size: clamp(26px, 3.2vw, 40px);
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
  font-size: 16px;
}

/* Hero: imagen a pantalla completa con el texto sobrepuesto (sin tarjeta) */
.tech-hero {
  position: relative;
  padding: 0;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.tech-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.tech-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

/* Overlay translúcido: solo se oscurece la zona donde se apoya el texto,
   el resto de la imagen queda visible sin velo. */
.tech-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 17, 19, .88) 0%, rgba(15, 17, 19, .68) 32%, rgba(15, 17, 19, .18) 58%, rgba(15, 17, 19, 0) 72%),
    linear-gradient(180deg, rgba(15, 17, 19, 0) 0%, rgba(15, 17, 19, .3) 55%, rgba(15, 17, 19, .85) 100%);
  z-index: 1;
}

.tech-hero .hero-copy {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: 0;
  padding: 140px 0 56px;
  text-align: left;
}

.tech-hero h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.hero-copy p {
  color: var(--muted);
  font-size: 16px;
  margin: 20px 0 30px;
  max-width: 52ch;
}

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

.metric {
  background: rgba(21, 25, 28, .72);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-md);
  padding: 14px;
  backdrop-filter: blur(6px);
}
.metric strong { font-size: 22px; display: block; }
.metric span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

/* Bloques de contenido alterna texto/imagen */
.tech-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.tech-block--reverse .tech-block__media { order: 2; }
.tech-block--reverse .tech-block__copy { order: 1; }

/* Sección "Plataforma": imagen a la izquierda, a la misma altura que el
   bloque de texto de la derecha. */
#plataforma .tech-block {
  align-items: stretch;
}
#plataforma .tech-block__media {
  order: -1;
  height: 100%;
}
#plataforma .tech-block__media img {
  height: 100%;
  min-height: 100%;
}

/* Sección "Baterías": la imagen crece hasta igualar la altura del texto. */
#baterias .tech-block {
  align-items: stretch;
}
#baterias .tech-block__media {
  height: 100%;
}
#baterias .tech-block__media img {
  height: 100%;
  min-height: 100%;
}

/* Sección "Carga": imagen a la izquierda, a la misma altura que el texto. */
#carga .tech-block {
  align-items: stretch;
}
#carga .tech-block__media {
  order: -1;
  height: 100%;
}
#carga .tech-block__media img {
  height: 100%;
  min-height: 100%;
}

/* Sección "Conducción asistida y software": la imagen crece hasta igualar
   la altura del texto. */
#adas .tech-block {
  align-items: stretch;
}
#adas .tech-block__media {
  height: 100%;
}
#adas .tech-block__media img {
  height: 100%;
  min-height: 100%;
}

/* Sección "Diseño y aerodinámica": imagen a la izquierda, a la misma altura
   que el texto. */
#diseno-aerodinamica .tech-block {
  align-items: stretch;
}
#diseno-aerodinamica .tech-block__media {
  order: -1;
  height: 100%;
}
#diseno-aerodinamica .tech-block__media img {
  height: 100%;
  min-height: 100%;
}

/* Sección "Confort sensorial": la imagen crece hasta igualar la altura
   del texto. */
#confort .tech-block {
  align-items: stretch;
}
#confort .tech-block__media {
  height: 100%;
}
#confort .tech-block__media img {
  height: 100%;
  min-height: 100%;
}

.tech-block__media img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.tech-block__copy ul {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.tech-block__copy li {
  padding-left: 26px;
  position: relative;
  color: var(--muted);
}

.tech-block__copy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
}

.tech-block__copy li strong {
  color: var(--text);
}

/* Tarjetas de especificación (grid de 3-4) */
.tech-stats-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tech-stat {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
}

.tech-stat strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.tech-stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

/* Panel destacado (batería de estado sólido, etc.) */
.tech-callout {
  margin-top: 32px;
  background: linear-gradient(160deg, #1d2328, #15191c);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 34px;
  display: grid;
  gap: 10px;
}

.tech-callout p {
  color: var(--muted);
  max-width: 78ch;
}

.tech-callout__badge {
  display: inline-flex;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(201, 138, 46, 0.14);
  color: var(--brand-strong);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

/* Imagen a ancho completo entre el texto y la tabla de la comparativa */
.tech-compare-media {
  margin: 32px 0;
  width: 100%;
}

.tech-compare-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* Tabla comparativa por modelo */
.tech-compare {
  margin-top: 28px;
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 14px;
}

.tech-compare caption {
  caption-side: top;
  text-align: left;
  color: var(--muted);
  margin-bottom: 12px;
  font-size: 13px;
}

.tech-compare th,
.tech-compare td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.tech-compare thead th {
  background: var(--panel-soft);
  color: var(--brand-strong);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tech-compare tbody th {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

.tech-compare tbody td {
  color: var(--muted);
}

.tech-compare tbody tr:last-child th,
.tech-compare tbody tr:last-child td {
  border-bottom: 0;
}

.tech-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

/* FAQ (mismo patrón visual que lepas-l6.html) */
.faq-list {
  display: grid;
  gap: 10px;
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 4px 18px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-weight: 600;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--brand-strong);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  margin: 0 0 16px;
  color: var(--muted);
}

/* CTA final: enlaces a los 3 modelos */
.tech-models {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tech-model-card {
  display: block;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color .2s ease, transform .2s ease;
}

.tech-model-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.tech-model-card strong {
  display: block;
  font-size: 18px;
  color: var(--text);
}

.tech-model-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.brand-strip {
  background: #13171b;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 24px;
  padding: 34px 0;
}

.brand-strip__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 38px;
  flex-wrap: wrap;
}

.brand-strip img { height: 30px; width: auto; opacity: .92; }

@media (max-width: 900px) {
  .tech-block,
  .tech-models {
    grid-template-columns: 1fr;
  }
  .tech-block--reverse .tech-block__media,
  .tech-block--reverse .tech-block__copy {
    order: initial;
  }
  .tech-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tech-hero { min-height: 480px; }
  .tech-hero .hero-copy { padding: 100px 0 40px; }
}

@media (max-width: 700px) {
  section { padding: 44px 0; }
  .tech-compare { font-size: 13px; }
  .tech-compare th, .tech-compare td { padding: 10px; }
  .hero-metrics { grid-template-columns: 1fr; }
  .tech-hero { min-height: 420px; }
  .tech-hero .hero-copy { padding: 70px 0 32px; }
}

@media (max-width: 480px) {
  .tech-stats-grid { grid-template-columns: 1fr; }
}
