/* ==========================================================================
   Bosquejo · Cámara de Comercio, Turismo e Industria de Linares
   Sistema base: colores, tipografía, botones y piezas compartidas
   (sitio público y panel de administración usan este mismo archivo)
   ========================================================================== */

:root {
  /* Paleta institucional: blanco, azul marino, un rojo y el dorado solo
     como acento del centenario. Los nombres se mantienen para no tocar el resto. */
  --tinta: #16233A;          /* azul marino: texto y fondos oscuros */
  --tinta-80: #3A4557;
  --tinta-60: #667085;
  --cal: #FFFFFF;            /* fondo general */
  --cal-2: #F3F4F6;          /* gris muy claro: secciones alternas */
  --papel: #FFFFFF;
  --boleta: #FFFFFF;
  --ocre: #B58A3C;           /* dorado del centenario (acento, nunca fondo grande) */
  --ocre-claro: #F2EDE3;
  --celeste: #F3F4F6;
  --celeste-claro: #C5CEDB;
  --rosa: #F3F4F6;
  --rosa-claro: #E5E7EB;
  --rojo: #A4232B;           /* rojo institucional */
  --rojo-oscuro: #7F1A21;

  --linea: rgba(22, 35, 58, .12);
  --linea-fuerte: rgba(22, 35, 58, .3);

  /* Una sola familia (Libre Franklin) + mono solo para la boleta */
  --f-sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --f-serif: var(--f-sans);
  --f-mono: "IBM Plex Mono", "Courier New", monospace;

  --ancho: 1200px;
  --margen: clamp(16px, 4vw, 48px);
  --radio: 4px;
  --sombra-papel: 0 1px 2px rgba(22, 35, 58, .06), 0 12px 32px -16px rgba(22, 35, 58, .28);
}

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

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

body {
  margin: 0;
  background: var(--cal);
  color: var(--tinta);
  font-family: var(--f-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-weight: 700; letter-spacing: -.015em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.envoltura {
  width: 100%;
  max-width: var(--ancho);
  margin-inline: auto;
  padding-inline: var(--margen);
}

.visualmente-oculto {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--rojo); outline-offset: 3px; }

/* ---------- Etiqueta de sección ---------- */
.folio {
  display: flex;
  align-items: center;
  gap: .7em;
  margin: 0 0 1rem;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rojo);
}
.folio::before { content: none; }

/* ---------- Titulares ---------- */
.titulo-seccion {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.025em;
  margin-bottom: .5em;
}
.entrada {
  font-size: clamp(1.05rem, 1.25vw, 1.2rem);
  line-height: 1.65;
  max-width: 48ch;
  color: var(--tinta-80);
}
.pie-foto {
  font-size: .82rem;
  line-height: 1.45;
  color: var(--tinta-60);
  margin: .7rem 0 0;
}

/* ---------- Botones ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  padding: .9em 1.35em;
  border: 1.5px solid var(--tinta);
  border-radius: var(--radio);
  background: transparent;
  color: var(--tinta);
  font-family: var(--f-sans);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.boton:hover { background: var(--tinta); color: var(--cal); }
.boton--tinta { background: var(--tinta); color: var(--cal); }
.boton--tinta:hover { background: var(--rojo); border-color: var(--rojo); color: #FFFFFF; }
.boton--rojo { background: var(--rojo); border-color: var(--rojo); color: #FFFFFF; }
.boton--rojo:hover { background: var(--rojo-oscuro); border-color: var(--rojo-oscuro); color: #fff; }
.boton--crema { border-color: var(--cal); color: var(--cal); }
.boton--crema:hover { background: var(--cal); color: var(--tinta); }
.boton--chico { padding: .62em .95em; font-size: .76rem; }
.boton .flecha { transition: transform .2s; }
.boton:hover .flecha { transform: translateX(4px); }

.enlace {
  font-weight: 700;
  text-decoration: none;
  padding-bottom: 2px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
  transition: background-size .3s;
}
.enlace:hover { background-size: 0 2px; background-position: 100% 100%; }

/* ---------- Ficha destacada (antes «aviso de diario») ---------- */
.aviso {
  background: var(--papel);
  border: 1px solid var(--linea);
  border-top: 4px solid var(--tinta);
  border-radius: var(--radio);
  padding: clamp(24px, 3vw, 36px) clamp(20px, 2.6vw, 32px);
  text-align: left;
  box-shadow: var(--sombra-papel);
}
.aviso__marca {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.aviso__sub {
  margin: .5rem 0 1.2rem;
  font-size: .95rem;
  font-weight: 400;
  color: var(--tinta-60);
}
.aviso__lista {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  font-weight: 500;
}
.aviso__lista li { padding: .55rem 0 .55rem 1.4rem; border-top: 1px solid var(--linea); position: relative; }
.aviso__lista li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 8px; height: 2px; background: var(--rojo); }
.aviso__lista li:last-child { border-bottom: 1px solid var(--linea); }
.aviso__fila {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0;
  font-size: .88rem;
  font-weight: 600;
}
.aviso__ciudad {
  margin: .9rem 0 0;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--tinta-60);
}

/* ---------- Matasellos (SVG generado por js/datos.js) ---------- */
.matasellos-svg { display: block; width: 100%; height: auto; overflow: visible; }
.matasellos-svg text { font-family: var(--f-sans); }
.ms-arco { font-size: 12px; font-weight: 700; letter-spacing: 2.4px; }
.ms-chico { font-size: 10px; font-weight: 700; letter-spacing: 2.4px; }
.ms-numero { font-size: 40px; font-weight: 800; letter-spacing: -1px; }
.ms-lema { font-size: 9.5px; font-weight: 700; letter-spacing: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
