/*Elementos compartidos en todas las paginas*/

:root {
  /* Color — paleta "archivo de biblioteca" */
  --tp:        #232424; /* texto principal */
  --tms:   #444;   /* texto mas suave */
  --paper:      #e4dbd0e3; /* Fondo principal */
  --paper-warm: #F3F0E6; /* Tarjetas sobre fondo */
  --brass:      #b12121e1; /* Botones y detalles pequeños */
  --teal:       #444; /* acento secundario — tinta */
  --muted:      #666; /* texto secundario */
  --line:       #777; /* líneas sobre fondo claro */
  --line-dark:  #777; /* líneas sobre fondo oscuro */

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'IBM Plex Sans', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--tp);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  line-height: 1.08;
}

h3 {
  font-size: 18px;
}

p { 
  margin: 0; 
  font-size: 20px;
}

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

/* Foco visible accesible en toda la app */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* Menu de Navegacion */

.encabezado {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--tp);
  color: var(--paper);
  border-bottom: 3px solid var(--brass);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

.encabezado .envolvente {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

/* Logo */

.logo-marca {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex: 0 0 auto;
}

.logo-recuadro {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--brass);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo-recuadro img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
  display: block;
}

.logo-marca:hover .logo-recuadro {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 var(--brass);
}

/* Titulo */

.titulo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding-bottom: 0;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.05;
}

.titulo span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--brass);
  text-transform: uppercase;
  margin-top: 5px;
}

/* Navegacion */

.encabezado nav {
  margin-left: auto;
}

.nav-ficheros {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-ficheros a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  opacity: 1;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.nav-ficheros a:hover {
  background: var(--paper-warm);
  color: var(--tp);
  border-color: var(--line);
  transform: translateY(-1px);
}

.nav-ficheros a .clasif {
  display: block;
  color: var(--brass);
  font-size: 0.68rem;
  margin-bottom: 0;
}

.nav-ficheros a[aria-current="page"] {
  opacity: 1;
  background: var(--paper);
  color: var(--tp);
  border-color: var(--paper);
}

.nav-ficheros a[aria-current="page"] .clasif {
  color: var(--teal);
}

/* ============================================================
   AVISO DE COOKIES
   ============================================================ */

.cookie-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 9999;

    background: var(--paper-warm);
    color: var(--tp);

    border: 1px solid var(--line);
    border-radius: 12px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.20);

    padding: 22px 26px;
}

.cookie-contenido {
    max-width: 1100px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.cookie-texto {
    flex: 1;
}

.cookie-texto h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.cookie-texto p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.92rem;
    color: var(--tms);
}

.cookie-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.cookie-botones button {
    border: 1px solid var(--line-dark);
    padding: 10px 15px;
    border-radius: 6px;

    font-family: inherit;
    font-size: 0.85rem;

    cursor: pointer;
    transition: 0.2s ease;
}

.cookie-aceptar {
    background: var(--tp);
    color: var(--paper);
}

.cookie-rechazar,
.cookie-configurar {
    background: transparent;
    color: var(--tp);
}

.cookie-botones button:hover {
    transform: translateY(-1px);
    opacity: 0.85;
}


/* RESPONSIVE */

@media (max-width: 700px) {

    .cookie-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 18px;
    }

    .cookie-contenido {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .cookie-botones {
        justify-content: stretch;
    }

    .cookie-botones button {
        flex: 1;
    }
}

/* Tablet */

@media (max-width: 1000px) {

  .encabezado .envolvente {
    gap: 13px;
  }

  .logo-recuadro {
    width: 52px;
    height: 52px;
  }

  .titulo {
    font-size: 1rem;
  }

  .nav-ficheros {
    gap: 2px;
  }

  .nav-ficheros a {
    padding: 8px 7px;
    font-size: 0.74rem;
    gap: 5px;
  }

}

/* Movil */

@media (max-width: 800px) {

  .encabezado .envolvente {
    padding-top: 12px;
    padding-bottom: 12px;
    flex-wrap: wrap;
  }

  .titulo {
    margin-right: auto;
  }

  .encabezado nav {
    width: 100%;
    order: 3;
  }

  .nav-ficheros {
    width: 100%;
    justify-content: stretch;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-ficheros li {
    flex: 1 0 auto;
  }

  .nav-ficheros a {
    justify-content: center;
  }

}

@media (max-width: 500px) {

  .logo-recuadro {
    width: 46px;
    height: 46px;
    box-shadow: 3px 3px 0 var(--brass);
  }

  .titulo {
    font-size: 0.92rem;
  }

  .titulo span {
    font-size: 0.68rem;
  }

  .nav-ficheros a {
    padding: 8px 9px;
    font-size: 0.7rem;
  }

  .nav-ficheros a .clasif {
    display: none;
  }

}


/* ---------- Pie de página ---------- */

.pie {
  background: var(--tp);
  color: var(--paper);
  margin-top: 96px;
  border-top: 3px solid var(--brass);
}

.pie .envolvente {
  display: grid;
  grid-template-columns: 1.4fr 1.6fr 1fr 1fr;
  gap: 40px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 32px;
}

/* Identidad */
.pie-identidad h3 {
  font-size: 1.175rem;
  margin-bottom: 8px;
}

.pie-identidad p {
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 12px;
}

.pie-identidad > span {
  font-size: 0.9rem;
  color: #9BA79E;
}

/* Columnas */
.pie-contacto,
.pie-navegacion,
.pie-redes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.titulo-seccion {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
}

/* Enlaces */
.enlace-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.enlace-footer:hover { opacity: 0.8; }

.enlace-footer span {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.enlace-footer small {
  font-size: 0.85rem;
}

.icono-footer {
  color: var(--brass);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

/* Copyright */
.pie-inferior {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #9BA79E;
}

@media (max-width: 800px) {
  .pie .envolvente { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {
  .pie .envolvente { grid-template-columns: 1fr; }
}

/* ---------- Utilidades compartidas ---------- */

.etiqueta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

.boton {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  padding: 13px 22px;
  border: 1px solid var(--tp);
  color: var(--tp);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.boton:hover { background: var(--tp); color: var(--paper); }

.boton-relleno {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--tp);
}

.boton-relleno:hover { background: var(--tp); color: var(--paper); border-color: var(--tp); }
