/* Grupo PRASA – hoja de estilos
   Sin dependencias externas: fuentes del sistema, sin CDN. */

:root {
  --amarillo: #f2b705;
  --amarillo-oscuro: #d99a00;
  --negro: #000;
  --fondo: #ececec;
  --fondo-pagina: #fafafa;
  --texto: #333;
  --texto-suave: #5a5a5a;
  --pie: #444;
  --pie-texto: #e8e8e8;
  --borde: #dcdcdc;
  --ancho: 960px;
  --fuente: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--fuente);
  font-size: 16px;
  line-height: 1.6;
}

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

a { color: inherit; }

:focus-visible { outline: 2px solid var(--amarillo-oscuro); outline-offset: 3px; }

.pagina {
  max-width: var(--ancho);
  margin: 20px auto;
  background: var(--fondo-pagina);
}

@media (max-width: 1000px) {
  .pagina { margin: 0 auto; }
}

/* ---------- Cabecera ---------- */

.cabecera {
  background: var(--negro);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

.cabecera__logo img { width: 225px; }

/* ---------- Carrusel ---------- */

.carrusel {
  position: relative;
  height: clamp(150px, 21.875vw, 210px);
  overflow: hidden;
  background: #1c1c1c;
}

.carrusel__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.carrusel__img.activa { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .carrusel__img { transition: none; }
}

/* ---------- Datos de contacto ---------- */

.contacto {
  display: grid;
  grid-template-columns: 234px 1fr;
  gap: 20px;
  padding: 62px 20px 0;
}

.contacto__logo img { width: 135px; }

.contacto h1 {
  margin: 0 0 28px;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  color: #3a3a3a;
}

.direccion {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--texto-suave);
}

.telefono {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .03em;
}

.telefono a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.telefono a:hover span { text-decoration: underline; }

.telefono svg { width: 17px; height: 17px; color: var(--amarillo-oscuro); flex: none; }

@media (max-width: 640px) {
  .contacto { grid-template-columns: 1fr; gap: 24px; padding: 32px 16px 0; }
  .contacto h1 { margin-bottom: 16px; }
}

/* ---------- Mapa (se carga solo al pulsar) ---------- */

.mapa { padding: 40px 20px; }

.mapa__marco {
  position: relative;
  height: 200px;
  overflow: hidden;
  border: 1px solid var(--borde);
  background-color: #eeebe4;
  background-image:
    linear-gradient(115deg, transparent 0 61%, #cfe3ee 61% 63%, transparent 63%),
    linear-gradient(28deg, transparent 0 35%, rgba(255, 255, 255, .9) 35% 36.2%, transparent 36.2%),
    repeating-linear-gradient(0deg, transparent 0 46px, rgba(255, 255, 255, .55) 46px 48px),
    repeating-linear-gradient(90deg, transparent 0 72px, rgba(255, 255, 255, .55) 72px 74px);
}

.mapa__marco iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.mapa__aviso {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.mapa__tarjeta {
  max-width: 440px;
  padding: 14px 20px;
  border-radius: 4px;
  background: rgba(250, 250, 250, .95);
  box-shadow: 0 1px 6px rgba(0, 0, 0, .15);
  text-align: center;
}

.mapa__acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
}

.boton {
  padding: 8px 18px;
  border: 0;
  border-radius: 3px;
  background: var(--amarillo);
  color: #111;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.boton:hover { background: var(--amarillo-oscuro); }

.mapa__enlace { font-size: 14px; color: var(--texto); }

.mapa__nota {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--texto-suave);
}

/* ---------- Pie ---------- */

.pie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 26px 20px;
  background: var(--pie);
  color: var(--pie-texto);
  font-size: 13px;
  line-height: 1.5;
}

.pie p { margin: 0; }

.pie a { color: var(--amarillo); text-decoration: none; }

.pie a:hover { text-decoration: underline; }

.pie__textos { display: grid; gap: 6px; }

.pie__legal { display: flex; flex-wrap: wrap; gap: 4px 0; }

.pie__legal a + a::before {
  content: "·";
  display: inline-block;
  margin: 0 9px;
  color: #aaa;
}

.pie__arriba {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border-radius: 3px;
  background: #f2f2f2;
  color: #777 !important;
  text-decoration: none !important;
}

.pie__arriba svg { width: 16px; height: 16px; }

/* ---------- Páginas legales ---------- */

.legal {
  max-width: 820px;
  padding: 48px 64px 56px;
}

.legal h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.25;
}

.legal .actualizado {
  margin: 0 0 32px;
  font-size: 14px;
  color: var(--texto-suave);
}

.legal h2 {
  margin: 34px 0 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.legal p, .legal li, .legal dd, .legal dt { font-size: 15px; }

.legal ul { padding-left: 22px; }

.legal li { margin-bottom: 6px; }

.legal a { color: #8a6200; }

.datos {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 6px 16px;
  margin: 12px 0 0;
  padding: 16px 20px;
  border-left: 3px solid var(--amarillo);
  background: #fff;
}

.datos dt { font-weight: 600; }

.datos dd { margin: 0; }

.tabla { overflow-x: auto; margin: 12px 0; }

.tabla table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }

.tabla th, .tabla td {
  padding: 10px 12px;
  border: 1px solid var(--borde);
  text-align: left;
  vertical-align: top;
}

.tabla th { background: #f3f3f3; font-weight: 600; }

.volver { margin-top: 40px; font-size: 15px; }

@media (max-width: 640px) {
  .legal { padding: 32px 16px 40px; }
  .legal h1 { font-size: 24px; }
  .datos { grid-template-columns: 1fr; gap: 2px; padding: 14px 16px; }
  .datos dd { margin-bottom: 8px; }
}

/* Dato pendiente: se resalta hasta que se sustituya CORREO@PENDIENTE por el correo real */
a[href="mailto:CORREO@PENDIENTE"] {
  padding: 0 4px;
  background: #fff3a0;
  outline: 2px dashed var(--amarillo-oscuro);
}
