/* Xestionado por Ansible (rol mirror). Tema dos listados (autoindex + indice.js).
   Estilo claro (referencia: mirror.raiolanetworks.com). Sen fontes nin CSS
   externos. As cores saen do logo da CIXUG (#90ab4f). */

:root {
  --verde: #90ab4f;          /* logo */
  --verde-escuro: #4f6a1f;   /* cabeceiras de táboa, pé (texto branco AA) */
  --verde-claro: #f1f6e7;    /* seccións alternas, hover */
  --fondo: #f3f6f7;
  --texto: #2b2f33;
  --suave: #6b7378;
  --ligazon: #2f6db5;
  --borde: #e5e9ea;
  --raia: #f7f9f9;
  --cartafol: #f2b631;
  --sombra: 0 6px 10px -1px rgba(0, 0, 0, .12);
  --raio: .75rem;
}

/* Con JS, o listado simple de nginx non se pinta mentres indice.js monta a
   páxina (html.tema). Se indice.js non chega, amósase igual aos 3 s. */
html.js:not(.tema) body {
  visibility: hidden;
  animation: amosar 0s 3s forwards;
}
@keyframes amosar { to { visibility: visible; } }

html.tema body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Open Sans", Arial, sans-serif;
}
html.tema *, html.tema *::before, html.tema *::after { box-sizing: border-box; }

.contedor { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* Cabeceira: branca, co logo en cor e unha raia verde enriba */
.cab { background: #fff; border-top: 4px solid var(--verde); box-shadow: 0 0 20px rgba(0, 0, 0, .08); }
.cab .contedor { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 72px; }
.cab .marca img { display: block; height: 40px; width: auto; }
.cab nav a { color: var(--texto); text-decoration: none; font-weight: 600; margin-left: 20px; }
.cab nav a:hover { color: var(--verde-escuro); text-decoration: underline; }

/* Portada (só na raíz, desde inicio.html) */
.seccion { padding: 48px 0; background: #fff; }
.seccion.alt { background: var(--verde-claro); }
.seccion h1 { font-size: 1.5rem; margin: 0 0 12px; }
.seccion h2 { font-size: 1.25rem; margin: 0 0 12px; }
.seccion p { margin: 0 0 16px; line-height: 1.65; max-width: 80ch; }
.seccion p:last-child { margin-bottom: 0; }
.seccion a { color: var(--ligazon); }

.proxectos { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 24px;
  border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; background: #fff; }
.proxectos th, .proxectos td { text-align: left; padding: 14px 20px; }
.proxectos thead th { background: var(--verde-escuro); color: #fff; font-weight: 600; }
.proxectos tbody tr:nth-child(even) td { background: #f6f7f5; }
.proxectos tbody tr:hover td { background: var(--verde-claro); }
.proxectos a { color: var(--verde-escuro); font-weight: 700; text-decoration: none; }
.proxectos a:hover { text-decoration: underline; }
.proxectos td.orixe { color: var(--suave); font-size: .9rem; word-break: break-all; }
.proxectos td.freq { white-space: nowrap; }

/* Listado: tarxeta branca sobre fondo gris claro */
/* .contedor.cartafol: sen o recheo do contedor, co mesmo ancho útil */
.contedor.cartafol { max-width: 1092px; padding: 0; background: #fff; margin: 40px auto; border-radius: 6px;
  box-shadow: 0 2px 5px 1px rgba(0, 0, 0, .05); overflow: hidden; }
.cartafol > header { padding: 20px 24px 12px; }
.etiqueta { text-transform: uppercase; font-size: 11px; letter-spacing: 1px; color: #939393; margin: 0 0 4px 3px; }
.migas { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; font-size: 1.3rem; color: #c5c5c5; }
.migas li + li::before { content: "/"; padding: 0 2px; }
.migas a, .migas span { color: #000; text-decoration: none; padding: 0 3px; border-radius: 3px; }
.migas a:hover { background: #ffffc4; }

.meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 24px;
  border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); font-size: 14px; color: var(--suave); }
.meta b { color: var(--texto); }
.meta .resumo { margin-right: auto; }
.filtro { font: inherit; padding: 6px 10px 6px 30px; border: 1px solid #ccc; border-radius: 5px; min-width: 0; width: 220px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2'%3E%3Ccircle cx='10' cy='10' r='7'/%3E%3Cpath d='m21 21-6-6'/%3E%3C/svg%3E") no-repeat 9px center / 14px; }
.filtro:focus { outline: 2px solid var(--verde); outline-offset: 0; border-color: var(--verde); }

#list { width: 100%; border-collapse: collapse; }
#list th { position: sticky; top: 0; background: #fff; text-align: left; padding: 0; z-index: 1;
  border-bottom: 1px solid var(--borde); }
#list th button { all: unset; box-sizing: border-box; width: 100%; padding: 12px 8px; cursor: pointer;
  text-transform: uppercase; font-size: 13px; letter-spacing: 1px; color: #000; white-space: nowrap; }
#list th button:hover, #list th button:focus-visible { color: var(--verde-escuro); }
#list th button:focus-visible { outline: 2px solid var(--verde); outline-offset: -2px; }
#list th button[aria-sort]::after { content: " ▲"; font-size: 10px; }
#list th button[aria-sort="descending"]::after { content: " ▼"; }
#list td { padding: 0 8px; border-bottom: 1px solid var(--raia); white-space: nowrap; }
#list th:first-child button, #list td:first-child { padding-left: 24px; }
#list th:last-child button, #list td:last-child { padding-right: 24px; }
#list tbody tr { transition: background-color .15s; }
#list tbody tr:hover { background: #f4f9fd; }
#list td.nome { white-space: normal; word-break: break-all; width: 100%; }
#list td.nome a { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--ligazon); text-decoration: none; }
#list td.nome a:hover { color: #0095e4; text-decoration: underline; }
#list tr.subir td.nome a { color: var(--texto); text-transform: uppercase; font-size: 12px; font-weight: 700; letter-spacing: .5px; }
#list td.tam, #list th.tam { text-align: right; }
#list td.tam, #list td.data { font-size: 14px; color: var(--suave); font-variant-numeric: tabular-nums; }

.icona { flex: none; width: 20px; height: 20px; fill: none; stroke: #6b7378; stroke-width: 1.6; }
.icona.cartafol-i { fill: var(--cartafol); stroke: #d99a12; }

/* HEADER.html / FOOTER.html do proxecto, illados nun iframe */
.contedor.anexo { max-width: 1092px; padding: 0; }
.contedor.anexo:empty { display: none; }
.marco { display: block; width: 100%; height: 0; border: 0; background: #fff; margin-top: 40px;
  border-radius: 6px; box-shadow: 0 2px 5px 1px rgba(0, 0, 0, .05); overflow: hidden; }
.anexo + .contedor.cartafol { margin-top: 24px; }

.baleiro { color: var(--suave); padding: 16px 24px; margin: 0; }

.readme { max-width: 1092px; background: #fff; border: 1px solid var(--borde); border-radius: 6px; padding: 16px 20px; overflow-x: auto;
  white-space: pre-wrap; margin: 0 auto 40px; font-size: 14px; }

/* Pé: banda verde escura, como a cabeceira/pé de Raiola */
.pe { background: var(--verde-escuro); color: #fff; padding: 28px 0; font-size: .95rem; }
.pe .contedor { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.pe a { color: #fff; }

@media (max-width: 767px) {
  .contedor { padding: 0 16px; }
  .cab .marca img { height: 32px; }
  .seccion { padding: 32px 0; }
  .proxectos { display: block; overflow-x: auto; font-size: .9rem; }
  .proxectos th, .proxectos td { padding: 10px 8px; }
  .proxectos th:first-child, .proxectos td:first-child { padding-left: 12px; }
  .contedor.cartafol { margin: 16px 8px; }
  .contedor.anexo { margin: 0 8px; width: auto; }
  .marco { margin-top: 16px; }
  .seccion h1 { font-size: 1.3rem; }
  .readme { margin: 0 -8px 24px; }
  .cartafol > header, .meta { padding-left: 16px; padding-right: 16px; }
  .filtro { width: 100%; }
  #list .data { display: none; }
  #list th:first-child button, #list td:first-child { padding-left: 16px; }
  #list th:last-child button, #list td:last-child { padding-right: 16px; }
  #list th.tam button, #list td.tam { padding-right: 16px; }
}
@media (max-width: 480px) {
  .proxectos .orixe { display: none; }
}
