/* Tipografías autoalojadas: las mismas del CSS de Elementor del original (Poppins + Figtree), subconjunto latin */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/poppins-400.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/poppins-500.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/poppins-600.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/poppins-700.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap; src: url('../fonts/figtree-var.woff2') format('woff2'); }

/* Colores de marca: variables globales de Elementor del original (post-7.css) + verde del menú (post-82.css) */
:root {
  --hub-primary: #383F42;
  --hub-secondary: #101719;
  --hub-text: #3E4244;
  --hub-accent: #1D1D1D;
  --hub-bg: #FFFFFF;
  --hub-bg-accent: #DFE8EB;
  --hub-green: #00CE1B;       /* solo decorativo: sin contraste suficiente como color de texto */
  --hub-green-dark: #007A10;  /* variante accesible para foco/enlaces sobre blanco */
  --hub-font-heading: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hub-font-text: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hub-header-h: 84px;

  --bs-body-font-family: var(--hub-font-text);
  --bs-body-color: var(--hub-text);
  --bs-link-color-rgb: 16, 23, 25;
  --bs-link-hover-color-rgb: 0, 122, 16;
}

body { font-family: var(--hub-font-text); color: var(--hub-text); background: var(--hub-bg); display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }
main:focus { outline: none; }
h1, h2, h3, h4, .h1, .h2, .h3, .h4 { font-family: var(--hub-font-heading); font-weight: 600; color: var(--hub-secondary); line-height: 1.2; }
h1, .h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem); }
h2, .h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
a { text-underline-offset: .15em; }
:focus-visible { outline: 3px solid var(--hub-green-dark); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

.skip-link { position: absolute; left: .5rem; top: -3rem; z-index: 2000; background: var(--hub-secondary); color: #fff; padding: .5rem 1rem; border-radius: .25rem; }
.skip-link:focus { top: .5rem; color: #fff; }

/* ---------- Cabecera y menú ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--hub-bg-accent); position: sticky; top: 0; z-index: 1000; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--hub-header-h); flex-wrap: wrap; }
.brand img { width: 64px; height: auto; display: block; }
.menu, .submenu { list-style: none; margin: 0; padding: 0; }
.menu a { display: block; text-decoration: none; color: var(--hub-secondary); font-family: var(--hub-font-heading); font-weight: 500; font-size: .95rem; padding: .6rem .75rem; border-radius: .25rem; }
.menu a:hover, .menu a:focus-visible { background: var(--hub-bg-accent); }
.menu a[aria-current="page"], .menu .in-section > a { box-shadow: inset 0 -3px 0 var(--hub-green); }
.menu-pdf { font-size: .8em; color: #5b6366; font-weight: 400; }
.menu-toggle { display: none; align-items: center; gap: .4rem; background: none; border: 1px solid var(--hub-primary); border-radius: .375rem; padding: .4rem .75rem; font: 500 1rem var(--hub-font-heading); color: var(--hub-secondary); }
.menu-toggle .bi { font-size: 1.5rem; line-height: 1; }

@media (min-width: 992px) {
  .menu { display: flex; align-items: center; gap: .15rem; }
  .menu-item { position: relative; }
  .has-sub > a::after { content: "\F282"; font-family: "bootstrap-icons"; font-size: .7em; margin-left: .35em; vertical-align: middle; }
  .submenu { display: none; position: absolute; left: 0; top: 100%; min-width: 290px; background: #fff; border: 1px solid var(--hub-bg-accent); border-radius: .375rem; box-shadow: 0 10px 30px rgba(16, 23, 25, .12); padding: .4rem; z-index: 1010; }
  .has-sub:hover > .submenu, .has-sub:focus-within > .submenu { display: block; }
  .submenu a { font-family: var(--hub-font-text); font-weight: 500; }
}
@media (max-width: 991.98px) {
  .js .menu-toggle { display: inline-flex; }
  .site-nav { flex-basis: 100%; padding-bottom: .75rem; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .submenu { padding-left: 1rem; border-left: 2px solid var(--hub-bg-accent); margin-left: .75rem; }
  .submenu a { font-family: var(--hub-font-text); }
  .site-header { position: static; }
}

/* ---------- Pie ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--hub-bg-accent); padding: 2rem 0 1.5rem; margin-top: 3rem; text-align: center; }
.footer-logos { width: 600px; max-width: 100%; }
.footer-copy { margin: 1rem 0 0; font-size: .9rem; text-transform: uppercase; letter-spacing: .03em; }

/* ---------- Bloques comunes ---------- */
.page-header { background: var(--hub-bg-accent); padding: 2.5rem 0 2rem; margin-bottom: 2rem; }
.page-header h1 { margin: 0; }
.page-header .lead { margin: .75rem 0 0; }
.prose { max-width: 75ch; }
.prose p, .prose li { font-size: 1.05rem; line-height: 1.65; }

/* Portada */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--hub-secondary); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.hero .container { position: relative; padding-top: clamp(3rem, 8vw, 7rem); padding-bottom: clamp(3rem, 8vw, 7rem); }
.hero h1 { color: #fff; max-width: 22ch; }
.hero-text { max-width: 70ch; }
.hero-text p { font-size: 1.1rem; line-height: 1.65; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.destacado { border: 2px solid var(--hub-secondary); border-left: 10px solid var(--hub-green); border-radius: .5rem; padding: 1.5rem; background: #fff; }
.destacado h2 { margin-top: 0; }
.btn-hub { background: var(--hub-secondary); color: #fff; border: 2px solid var(--hub-secondary); font-family: var(--hub-font-heading); font-weight: 500; }
.btn-hub:hover, .btn-hub:focus-visible { background: #fff; color: var(--hub-secondary); border-color: var(--hub-secondary); }

.ratio-film iframe { display: block; width: 100%; max-width: 900px; height: 1400px; border: 0; border-radius: 10px; background: #f3f6f7; }
.card-img-top { aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- Tablas y filtros ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--hub-bg-accent); border-radius: .375rem; margin-bottom: 1.5rem; }
.table-hub { margin: 0; font-size: .95rem; }
.table-hub caption { caption-side: top; font-family: var(--hub-font-heading); font-weight: 600; color: var(--hub-secondary); padding: .75rem 1rem .5rem; }
.table-hub thead th { background: var(--hub-secondary); color: #fff; font-family: var(--hub-font-heading); font-weight: 500; white-space: nowrap; }
.table-hub td.col-fecha { white-space: nowrap; }
.filtro { background: var(--hub-bg-accent); border-radius: .5rem; padding: 1rem; margin-bottom: 1.5rem; }
.filtro .form-label, .filtro .chips-label { font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { border: 1px solid var(--hub-primary); background: #fff; color: var(--hub-secondary); border-radius: 999px; padding: .3rem .8rem; font-size: .9rem; }
.chip[aria-pressed="true"] { background: var(--hub-secondary); border-color: var(--hub-secondary); color: #fff; }
.filtro-estado { margin: .75rem 0 0; font-weight: 600; }
.filtro-estado:empty { display: none; }

/* Material disponible */
.lotes-lista { list-style: none; padding: 0; margin: 0; }
.lotes-lista li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--hub-bg-accent); }
.lotes-lista a { display: block; padding: .8rem 0; font-family: var(--hub-font-heading); font-weight: 600; font-size: 1.2rem; text-decoration: none; color: var(--hub-secondary); }
.lotes-lista a:hover, .lotes-lista a:focus-visible { color: var(--hub-green-dark); text-decoration: underline; }
.table-wrap[role="region"] { max-height: 75vh; }
.table-wrap[role="region"]:focus-visible { outline: 3px solid var(--hub-green-dark); }
.table-lote { font-size: .875rem; }
.table-lote thead th { position: sticky; top: 0; z-index: 1; white-space: normal; min-width: 8rem; }
.table-lote td { min-width: 6rem; }

/* Formulario de registro */
.form-registro { margin-top: 3rem; padding-top: 2rem; border-top: 3px solid var(--hub-green); scroll-margin-top: calc(var(--hub-header-h) + 1rem); }
.form-registro .form-label { font-weight: 600; color: var(--hub-secondary); }
.form-registro .form-control { background: #f9f9f9; }
.form-registro .form-control:focus { background: #fff; }
.form-registro .req { color: #b02a37; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Actividades */
.mes-titulo { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 3px solid var(--hub-green); padding-bottom: .4rem; }
.eventos-lista { list-style: none; padding: 0; margin: 0; }
.evento { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem 1.25rem; padding: 1.5rem 0; border-bottom: 1px solid var(--hub-bg-accent); }
.evento-dia { text-align: center; font-family: var(--hub-font-heading); color: var(--hub-secondary); }
.evento-dia-sem { display: block; font-size: .85rem; text-transform: uppercase; }
.evento-dia-num { display: block; font-size: 1.8rem; font-weight: 600; line-height: 1; }
.evento-fecha { margin: 0 0 .25rem; font-weight: 600; font-size: .95rem; }
.evento-titulo { font-size: 1.3rem; margin: 0 0 .5rem; }
.evento-titulo a { color: var(--hub-secondary); text-decoration: none; }
.evento-titulo a:hover, .evento-titulo a:focus-visible { text-decoration: underline; }
.evento-lugar, .evento-resumen { margin: 0 0 .25rem; }
.evento-img { grid-column: 2; max-width: 360px; }
@media (min-width: 768px) {
  .evento { grid-template-columns: 4rem 1fr 280px; }
  .evento-img { grid-column: 3; grid-row: 1; }
}
.evento-detalles { background: var(--hub-bg-accent); border-radius: .5rem; padding: 1.25rem; }
.evento-detalles dt { font-weight: 600; }
.evento-detalles dd { margin-bottom: .6rem; }
.evento-descripcion img { max-width: 100%; height: auto; }

/* Consejo Rector */
.miembro-foto { width: 100%; aspect-ratio: 340 / 416; object-fit: cover; background: var(--hub-bg-accent); }
.miembro-cargo { font-size: .95rem; }

/* Cesiones */
.anios-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.anios-nav a { border: 2px solid var(--hub-secondary); border-radius: .375rem; padding: .35rem 1rem; text-decoration: none; font-family: var(--hub-font-heading); font-weight: 600; color: var(--hub-secondary); }
.anios-nav a:hover, .anios-nav a:focus-visible { background: var(--hub-secondary); color: #fff; }
.anio { scroll-margin-top: calc(var(--hub-header-h) + 1rem); margin-bottom: 2.5rem; }
.anio-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; border-bottom: 3px solid var(--hub-green); margin-bottom: 1rem; }
.anio-header h2 { margin: 0 0 .25rem; }
.contadores { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1rem; font-size: .9rem; }
.contadores li { background: #f3f6f7; border-radius: .25rem; padding: .15rem .6rem; }
.actualizado { font-size: .95rem; }

/* ---------- Impresión ---------- */
@media print {
  .site-header, .skip-link, .menu-toggle, .site-nav, .filtro, .anios-nav, .no-print, iframe { display: none !important; }
  body { font-size: 10pt; display: block; }
  .site-footer { margin-top: 1rem; padding: .5rem 0; border: 0; }
  .footer-logos { display: none; }
  .page-header { background: none; padding: 0; margin-bottom: .5rem; }
  .table-wrap, .table-wrap[role="region"] { overflow: visible; border: 0; max-height: none; }
  .table-lote thead th { position: static; }
  .table-hub thead th { background: #fff !important; color: #000; border-bottom: 2px solid #000; }
  .table-hub tbody tr[hidden] { display: table-row !important; }
  .table-hub .sin-resultados { display: none !important; }
  .table-hub tr { break-inside: avoid; }
  thead { display: table-header-group; }
  a { color: #000; text-decoration: none; }
}
