/* ==========================================================================
   COINDESOCOL · Estilos base
   Variables, reinicio de estilos, tipografía, enlaces, formularios y tablas.
   ========================================================================== */

:root {
  --color-acento: #046bd2;
  --color-acento-oscuro: #045cb4;
  --color-titulos: #1e293b;
  --color-texto: #334155;
  --color-blanco: #ffffff;
  --color-fondo-suave: #f0f5fa;
  --color-negro: #111111;
  --color-borde: #d1d5db;
  --color-verde: #24772b;
  --color-cabecera: #d6d6d6;
  --fuente-sistema: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --interlineado: 1.65;
}

/* --- Reinicio ------------------------------------------------------------ */
html {
  box-sizing: border-box;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

html, body, address, blockquote, dd, dl, dt, fieldset, figure,
h1, h2, h3, h4, h5, h6, hr, iframe, legend, li, ol, p, pre, textarea, ul {
  border: 0;
  font-size: 100%;
  font-style: inherit;
  font-weight: inherit;
  margin: 0;
  outline: 0;
  padding: 0;
  vertical-align: baseline;
}

body {
  margin: 0;
  position: relative;
  overflow-x: hidden;
  background: var(--color-blanco);
  color: var(--color-texto);
  font-family: var(--fuente-sistema);
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: var(--interlineado);
  -webkit-font-smoothing: antialiased;
}

/* --- Tipografía ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  clear: both;
  color: var(--color-titulos);
  font-weight: 600;
}

h1 { font-size: 2.25rem; line-height: 1.4em; }
h2 { font-size: 1.875rem; line-height: 1.3em; }
h3 { font-size: 1.5rem; line-height: 1.3em; }
h4 { font-size: 1.25rem; line-height: 1.2em; }

p { margin-bottom: 1.75em; }

ul, ol { box-sizing: border-box; margin: 0 0 1.5em 3em; }
ul { list-style: disc; }
li > ul, li > ol { margin-bottom: 0; margin-left: 1.5em; }

b, strong { font-weight: 700; }
cite, dfn, em, i { font-style: italic; }
small { font-size: 80%; }
big { font-size: 125%; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -.5em; }
sub { bottom: -.25em; }
abbr, acronym { border-bottom: 1px dotted #666; cursor: help; }
mark, ins { background: transparent; text-decoration: none; }
dt { font-weight: 600; }
dd { margin: 0 1.5em 1em; }

blockquote {
  position: relative;
  margin: 1.5em 1em 1.5em 3em;
  padding: 20px;
  border-left: 5px solid var(--color-borde);
  font-size: 1.1em;
  font-style: italic;
  line-height: inherit;
}

hr {
  box-sizing: content-box;
  height: 1px;
  margin-bottom: 1.5em;
  border: 0;
  background-color: #ccc;
}

pre {
  max-width: 100%;
  margin-bottom: 1.6em;
  padding: 1.6em;
  overflow: auto;
  background: #eceff3;
  font-family: "Courier 10 Pitch", Courier, monospace;
}

code, kbd, tt, var { font: 1em Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; }

/* --- Enlaces --------------------------------------------------------------- */
a {
  color: #000;
  background-color: transparent;
  text-decoration: none;
  transition: all .2s linear;
}

a:hover, a:focus { color: #000; }
a:focus { outline: thin dotted; }
a:hover, a:active { outline: 0; }
a:focus-visible { outline: thin dotted inherit; }

/* --- Multimedia ------------------------------------------------------------ */
img {
  height: auto;
  max-width: 100%;
  border: 0;
  vertical-align: middle;
}

embed, iframe, object { max-width: 100%; }
figure { margin: 0; }

/* --- Tablas ---------------------------------------------------------------- */
table, td, th { border: 1px solid var(--color-borde); }

table {
  width: 100%;
  margin: 0 0 1.5em;
  border-collapse: separate;
  border-spacing: 0;
  border-width: 1px 0 0 1px;
}

td, th { padding: .7em 1em; border-width: 0 1px 1px 0; }
th { font-weight: 600; }

/* --- Formularios ----------------------------------------------------------- */
button, input, optgroup, select, textarea {
  margin: 0;
  color: #808285;
  font: inherit;
  font-family: var(--fuente-sistema);
  font-size: 1rem;
  font-weight: 400;
  line-height: var(--interlineado);
  vertical-align: baseline;
}

button, select { text-transform: none; }
optgroup { font-weight: 700; }
textarea { overflow: auto; }

input { outline: none; }

button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
  -webkit-appearance: button;
  appearance: button;
  cursor: pointer;
  padding: 15px 30px;
  border: 0 solid var(--color-acento);
  border-radius: 4px;
  background-color: var(--color-acento);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1em;
}

button:hover, button:focus,
input[type="button"]:hover, input[type="button"]:focus,
input[type="reset"]:hover, input[type="reset"]:focus,
input[type="submit"]:hover, input[type="submit"]:focus {
  border-color: #000;
  background-color: #000;
  color: #fff;
}

button[disabled], input[disabled] { cursor: default; }

input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { height: auto; }
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }

input[type="text"], input[type="number"], input[type="email"], input[type="url"],
input[type="password"], input[type="search"], input[type="reset"], input[type="tel"],
input[type="date"], select, textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-borde);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
  color: #475569;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px;
  transition: all .2s linear;
}

input[type="email"], input[type="password"], input[type="search"],
input[type="tel"], input[type="text"], input[type="url"], textarea {
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"], input[type="number"], input[type="email"], input[type="url"],
input[type="password"], input[type="search"], input[type="reset"], input[type="tel"],
input[type="date"], select { height: 40px; }

select { padding: 6px 10px; }

input:focus, textarea:focus {
  border-style: dotted;
  border-width: thin;
  border-color: #000;
}

input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus,
input[type="url"]:focus, input[type="password"]:focus, input[type="search"]:focus,
input[type="reset"]:focus, input[type="tel"]:focus, input[type="date"]:focus,
select:focus, textarea:focus {
  border-color: var(--color-acento);
  background-color: #fff;
  box-shadow: none;
  outline: none;
  color: #475569;
}

input[type="range"] { -webkit-appearance: none; width: 100%; margin: 5.7px 0; padding: 0; border: none; }
input[type="color"] { width: 100px; height: 30px; padding: 0; border: none; cursor: pointer; }

label, legend {
  color: var(--color-titulos);
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 20px;
}

fieldset { margin: 0; padding: .35em .625em .75em; border: 1px solid var(--color-borde); }
legend { padding: 0; border: 0; }
fieldset legend { margin-bottom: 1.5em; padding: 0 .5em; }

/* Elementos con color de borde en línea muestran el borde sólido */
html :where([style^="border-color"], [style*=";border-color"], [style*="; border-color"]) { border-style: solid; }

/* --- Utilidades ------------------------------------------------------------ */
.texto-lector {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  word-wrap: normal !important;
}

.texto-lector:focus {
  top: 5px;
  left: 5px;
  z-index: 100000;
  display: block;
  width: auto;
  height: auto;
  padding: 15px 23px 14px;
  clip: auto;
  clip-path: none;
  border-radius: 2px;
  background-color: #f1f1f1;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, .6);
  color: #21759b;
  font-size: .875rem;
  line-height: normal;
  text-decoration: none;
}

/* --- Tamaños en pantallas medianas y pequeñas ------------------------------ */
@media (max-width: 921px) {
  html { font-size: 91.2%; }
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5625rem; }
  h3 { font-size: 1.25rem; }

  button, input[type="button"], input[type="reset"], input[type="submit"] { padding: 14px 28px; }
}

@media (max-width: 544px) {
  button, input[type="button"], input[type="reset"], input[type="submit"] { padding: 12px 24px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
