/* ====== CONFIG BÁSICA ====== */
:root {
  --vino: #5d1631;
  --vino-900: #4a0f27;
  --gris-400: #ccc;
  --azul: #1e88e5;
  --azul-osc: #0d47a1;
  --verde: #2e7d32;

  /* Anchos de columnas sticky */
  --w-gra: 60px;
  --w-id: 80px;
  --w-nombre: 300px;
  --w-region: 180px; /* ya no sticky, pero lo dejamos por si reutilizas */
}

/* ====== GENERALES ====== */
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: #fff;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ====== ENCABEZADO ====== */
.encabezado {
  background-color: var(--vino);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
  flex-wrap: wrap;
}
.encabezado img {
  height: 60px;
  width: auto;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.logo-cultura img {
  transform: scale(1.15);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4));
}
.encabezado img:hover {
  transform: scale(1.2);
  filter: brightness(1.2);
}

/* ====== TÍTULO ====== */
.titulo {
  text-align: center;
  margin: 1.2rem 1rem;
}
.titulo h1 {
  font-weight: 600;
  color: #777;
  letter-spacing: 1px;
  font-size: 1.8rem;
}
.titulo p {
  font-size: 0.95rem;
  color: #666;
  margin-top: 0.3rem;
}

/* ====== FILTROS ====== */
.filtros {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}
.barra-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  background-color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.barra-filtros input,
.barra-filtros select {
  padding: 0.5rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 1rem;
  font-size: 0.9rem;
  outline: none;
}
.btn-buscar {
  background-color: #8b1d3a;
  color: #fff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 1rem;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn-limpiar {
  background-color: #555;
  color: #fff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 1rem;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn-agregar {
  background-color: var(--vino);
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 1.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  align-self: flex-end;
  margin-right: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
button:hover { opacity: 0.9; transform: scale(1.03); }

/* ====== CONTENIDO PRINCIPAL ====== */
main.contenido {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ====== MARCO DE TABLA (autoajuste) ====== */
.tabla-scroll{
  height: 80vh;          /* 80% del alto de la pantalla */
  width: 100%;
  overflow: auto;        /* scroll vertical y horizontal */
  border-top: 2px solid var(--vino-900);
  border-bottom: 2px solid var(--vino-900);
  background: #fafafa;
  box-sizing: border-box;
}

/* ====== TABLA ====== */
.tabla-scroll table{
  min-width: 100%;       /* si el contenido es pequeño, ocupa 100% */
  width: max-content;    /* si el contenido es grande, crece y aparece scroll X */
  border-collapse: separate;
  border-spacing: 0;
}
.tabla-scroll th,
.tabla-scroll td{
  border: 1px solid var(--gris-400);
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  white-space: nowrap;   /* evita quiebres que deformen celdas */
}

/* Encabezado (1ª fila) pegado arriba */
.tabla-scroll thead th{
  position: sticky;
  top: 0;
  z-index: 7;
  background: var(--vino);
  color: #fff;
  text-align: center;
  font-weight: 700;
}

/* Sub-encabezados (2ª fila) */
.sub{
  background: #eee !important;
  color: #333 !important;
  font-weight: 600 !important;
}

/* Bandas de grupo */
.band{
  background: var(--vino) !important;
  color: #fff !important;
  font-weight: 700 !important;
}

/* TH "en blanco" (sin texto, blanco) */
.head-blank{
  background: #fff !important;
  color: transparent !important;
}
.head-blank > * { visibility: hidden; }

/* ====== COLUMNAS STICKY IZQ ====== */
.sticky { position: sticky; background: #fff; z-index: 6; }
.c-gra    { left: 0;                               min-width: var(--w-gra);    width: var(--w-gra); }
.c-id     { left: calc(var(--w-gra));              min-width: var(--w-id);     width: var(--w-id); }
.c-nombre { left: calc(var(--w-gra) + var(--w-id));min-width: var(--w-nombre); width: var(--w-nombre); }

/* Región: ya NO sticky (no definimos .c-region) */

/* ====== VARIOS ====== */
.num { text-align: right; font-variant-numeric: tabular-nums; }
a.link { color: var(--azul); text-decoration: none; }
a.link:hover { color: var(--azul-osc); }
.check {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid #8d8d8d; border-radius: 3px; vertical-align: middle;
}
.check.yes {
  background: conic-gradient(from 180deg at 45% 60%, transparent 0 70%, var(--verde) 0 100%);
}

/* ====== FOOTER ====== */
.pie {
  background-color: var(--vino);
  color: #fff;
  text-align: center;
  padding: 0.6rem;
  font-size: 0.85rem;
  margin-top: auto;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .encabezado { justify-content: center; gap: 1rem; }
  .encabezado img { height: 45px; }
  .titulo h1 { font-size: 1.4rem; }
  .barra-filtros { flex-direction: column; align-items: stretch; }
  .btn-agregar { align-self: center; margin-right: 0; }
  .tabla-scroll { height: 70vh; }
}


.encabezado-blanco {
  color: #fff;
  background: transparent;  /* sin fondo */
  border: none;
  font-weight: normal;
  text-transform: none;     /* sin mayúsculas */
}