/* Unidad de Laboratorios - UNCP | Hoja de estilos base */

:root {
  --teal-900: #17294d;
  --teal-700: #1f3f73;
  --teal-600: #295499;
  --teal-500: #5c7fbf;
  --mint-200: #c9d9f2;
  --mint-100: #eaf1fb;
  --ink-900: #16233d;
  --ink-700: #3c4a63;
  --ink-500: #5c667d;   /* 5.75:1 sobre blanco, 5.35:1 sobre --paper-soft */
  --ink-400: #697285;   /* 4.83:1 sobre blanco - texto atenuado que sigue siendo informativo */
  --ink-300: #a3aebe;   /* 2.24:1 - SOLO para elementos decorativos (separadores, bordes) */
  --line-200: #dbe1ec;
  --paper: #ffffff;
  --paper-soft: #f4f7fb;

  --font-heading: 'Sora', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* ---------- Utilidades de accesibilidad ---------- */

/* Texto solo para lectores de pantalla (WCAG 1.3.1, 1.4.1) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Saltar al contenido principal (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 1100;
  background: var(--teal-700);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 0 0 10px 10px;
  transition: top .15s ease;
}

.skip-link:focus { top: 0; }

/* Indicador de foco visible y con contraste suficiente (WCAG 2.4.7, 1.4.11) */
:focus-visible {
  outline: 3px solid var(--teal-600);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Respetar la preferencia de movimiento reducido (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .js-anim [data-animate] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- Animaciones compartidas ---------- */

@keyframes fade-up-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes soft-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes nav-drop-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gentle-pulse {
  0%, 100% { box-shadow: 0 14px 30px -10px rgba(15, 30, 60, 0.45), 0 0 0 0 rgba(41, 84, 153, 0.45); }
  50% { box-shadow: 0 14px 30px -10px rgba(15, 30, 60, 0.45), 0 0 0 8px rgba(41, 84, 153, 0); }
}

/* Aparicion al hacer scroll (progressive enhancement).
   Sin la clase .js-anim (JS deshabilitado o sin cargar) el contenido
   se muestra siempre, para no depender de JS para ser legible (WCAG 1.3.1). */
.js-anim [data-animate] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.16,.84,.44,1), transform .6s cubic-bezier(.16,.84,.44,1);
}

.js-anim [data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.site-main > * { flex: none; }

a { text-decoration: none; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  margin: 0;
  color: var(--teal-900);
}

p { margin: 0; }

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--teal-900);
  color: var(--mint-100);
  font-size: 13px;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 38px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.topbar-contact {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-contact a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mint-100);
}

.topbar-contact a:hover { text-decoration: underline; }

.topbar-contact a svg { width: 14px; height: 14px; flex: none; }

.topbar-tag {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--mint-200);
}

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line-200);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding-top: 8px;
  padding-bottom: 8px;
  gap: 24px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-200);
  border-radius: 8px;
  background: var(--paper);
  color: var(--teal-900);
  cursor: pointer;
  flex: none;
}

.nav-toggle svg { width: 20px; height: 20px; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.brand-mark img { width: 100%; height: 100%; object-fit: contain; }

.brand-text { line-height: 1.15; }

.brand-text .brand-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16.5px;
  color: var(--teal-900);
}

.brand-text .brand-sub {
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 500;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.main-nav a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-700);
  padding: 8px 0;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--teal-600);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}

.main-nav a:hover { color: var(--teal-700); }
.main-nav a:hover::after { transform: scaleX(1); }

.main-nav a.is-active { color: var(--teal-700); }
.main-nav a.is-active::after { transform: scaleX(1); }

.main-nav a.nav-login {
  color: #fff;
  background: var(--teal-600);
  padding: 8px 18px;
  border-radius: 999px;
}
.main-nav a.nav-login::after { display: none; }
.main-nav a.nav-login:hover { color: #fff; background: var(--teal-700); }

/* ---------- Page header (wave banner) ---------- */
.page-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--mint-100) 0%, var(--mint-200) 55%, var(--teal-500) 130%);
  padding-top: 56px;
}

.page-header .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 32px;
  padding-bottom: 64px;
}

.page-header .breadcrumb { animation: fade-up-in .5s ease both; }
.page-header h1 { animation: fade-up-in .55s ease .06s both; }
.page-header .lede { animation: fade-up-in .55s ease .12s both; }

.page-header-art .hero-logo-circle {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 30px 60px -20px rgba(15, 66, 62, 0.45);
  animation: soft-float 6s ease-in-out infinite;
}

.breadcrumb { margin-bottom: 18px; }

.breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--teal-700);
  font-weight: 600;
}

.breadcrumb li { display: flex; align-items: center; gap: 8px; }

.breadcrumb a:hover { text-decoration: underline; }

/* Separador puramente decorativo: se genera desde CSS para que
   los lectores de pantalla no lean "barra" entre cada nivel. */
.breadcrumb li + li::before {
  content: "/";
  color: var(--ink-300);
}

.breadcrumb .current { color: var(--ink-500); font-weight: 500; }

.page-header h1 {
  font-size: 44px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.page-header .lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-700);
  max-width: 46ch;
}

.page-header-art { display: flex; justify-content: center; }
.page-header-art .hero-logo-circle { width: 100%; max-width: 260px; }

.hero-logo-circle {
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.hero-logo-circle img { width: 100%; height: 100%; object-fit: contain; }

.wave-divider {
  display: block;
  width: 100%;
  height: 56px;
  margin-top: -1px;
}

/* ---------- Layout: sidebar + grid ---------- */
.labs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  padding: 56px 0 88px;
  align-items: start;
}

.filters-panel {
  background: var(--paper-soft);
  border: 1px solid var(--line-200);
  border-radius: 16px;
  padding: 24px;
  position: sticky;
  top: 96px;
  box-shadow: 0 20px 40px -28px rgba(23, 41, 77, 0.4);
}

.filters-panel h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  position: relative;
  padding-left: 14px;
}

.filters-panel h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--teal-600), var(--teal-500));
}

.filters-panel .filters-hint {
  font-size: 12.5px;
  color: var(--ink-500);
  margin-bottom: 18px;
  line-height: 1.5;
}

.filter-field {
  margin-bottom: 16px;
}

.filter-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-700);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.filter-select-wrap { position: relative; }

select.filter-select {
  width: 100%;
  border: 1px solid var(--line-200);
  background: var(--paper);
  border-radius: 8px;
  padding: 10px 34px 10px 12px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--ink-900);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.filter-select-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--ink-500);
  pointer-events: none;
}

.filters-submit {
  width: 100%;
  margin-top: 4px;
  padding: 11px 14px;
  border: 1px solid var(--teal-600);
  border-radius: 8px;
  background: var(--teal-600);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.filters-submit:hover { background: var(--teal-700); border-color: var(--teal-700); }

.filters-clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-700);
  margin-top: 4px;
}

.filters-count {
  border-top: 1px solid var(--line-200);
  margin-top: 18px;
  padding-top: 16px;
  font-size: 13px;
  color: var(--ink-500);
}

.filters-count strong { color: var(--teal-900); }

/* ---------- Labs grid + cards ---------- */
.labs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.labs-toolbar .results-label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-500);
}

.labs-toolbar .results-label strong { color: var(--ink-900); }

.sort-select {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
  border: 1px solid var(--line-200);
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
}

.labs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lab-card {
  border: 1px solid var(--line-200);
  border-radius: 16px;
  background: var(--paper);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.lab-card:hover {
  box-shadow: 0 14px 32px -16px rgba(15, 66, 62, 0.3);
  transform: translateY(-3px);
  border-color: var(--mint-200);
}

.lab-card:hover .lab-icon {
  background: var(--teal-600);
  color: #fff;
}

.lab-icon {
  transition: background-color .2s ease, color .2s ease;
}

.lab-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lab-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: var(--mint-100);
  color: var(--teal-700);
}

.lab-icon svg { width: 24px; height: 24px; }

.resource-chip {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--teal-700);
  background: var(--mint-100);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}

.lab-card h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.lab-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lab-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-500);
  background: var(--paper-soft);
  border: 1px solid var(--line-200);
  border-radius: 999px;
  padding: 4px 9px;
}

.lab-desc {
  font-size: 13.5px;
  color: var(--ink-700);
  line-height: 1.55;
}

.lab-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--line-200);
}

.lab-location {
  font-size: 12px;
  color: var(--ink-500);
  display: flex;
  align-items: center;
  gap: 5px;
}

.lab-location svg { width: 13px; height: 13px; flex: none; }

.btn-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-700);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-link svg { width: 14px; height: 14px; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.pagination a, .pagination span {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
  border: 1px solid var(--line-200);
}

.pagination .is-active {
  background: var(--teal-600);
  border-color: var(--teal-600);
  color: #fff;
}

.pagination .disabled { opacity: 0.4; }

/* ---------- Lab detail page ---------- */
.lab-detail-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--mint-100) 0%, var(--mint-200) 55%, var(--teal-500) 130%);
  padding-top: 32px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--teal-700);
  margin-bottom: 22px;
  animation: fade-up-in .45s ease both;
  transition: gap .2s ease;
}

.back-link:hover { gap: 10px; }

.back-link svg { width: 15px; height: 15px; transition: transform .2s ease; }

.lab-detail-top {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 40px;
  animation: fade-up-in .55s ease .08s both;
}

.lab-detail-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--teal-900);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 20px 40px -16px rgba(15, 66, 62, 0.45);
  animation: soft-float 6s ease-in-out infinite;
}

.lab-detail-icon svg { width: 32px; height: 32px; }

.lab-detail-logo { width: 100%; height: 100%; object-fit: contain; }

.lab-detail-top h1 {
  font-size: 32px;
  line-height: 1.15;
  margin-bottom: 10px;
}

.lab-detail-top .lede {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-700);
  max-width: 62ch;
  margin-bottom: 14px;
}

/* Info tiles */
.info-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: -32px 0 40px;
  position: relative;
  z-index: 1;
}

.info-tile {
  background: var(--paper);
  border: 1px solid var(--line-200);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 12px 28px -20px rgba(15, 66, 62, 0.35);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.info-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px -18px rgba(15, 66, 62, 0.45);
  border-color: var(--mint-200);
}

.info-tile-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--mint-100);
  color: var(--teal-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: background-color .2s ease, color .2s ease;
}

.info-tile:hover .info-tile-icon { background: var(--teal-600); color: #fff; }

.info-tile-icon svg { width: 19px; height: 19px; }

.info-tiles dl, .info-tiles dt, .info-tiles dd { margin: 0; }

.info-tile-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-500);
  margin-bottom: 3px;
}

.info-tile-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.4;
}

.info-tile-sub {
  font-size: 12.5px;
  color: var(--ink-500);
}

/* Resources section */
.resources-section { padding-bottom: 88px; }
.resources-section + .resources-section { padding-top: 8px; }

.resources-section h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.resources-section .section-hint {
  font-size: 14px;
  color: var(--ink-500);
  margin-bottom: 24px;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.resource-card {
  border: 1px solid var(--line-200);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.resource-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--paper-soft);
  color: var(--teal-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.resource-card-icon svg { width: 21px; height: 21px; }

.resource-card h3 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 4px;
  line-height: 1.3;
}

.resource-card .resource-category {
  font-size: 11.5px;
  color: var(--ink-500);
  margin-bottom: 6px;
}

.resource-qty {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--teal-700);
  background: var(--mint-100);
  border-radius: 999px;
  padding: 3px 9px;
}

/* ---------- Documentos ---------- */

.documents-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.document-card {
  border: 1px solid var(--line-200);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.document-card:hover {
  box-shadow: 0 14px 30px -18px rgba(15, 66, 62, 0.4);
  transform: translateY(-3px);
  border-color: var(--mint-200);
}

.document-card:hover .document-card-icon {
  background: var(--teal-600);
  color: #fff;
}

.document-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  background: var(--paper-soft);
  transition: background-color .2s ease, color .2s ease;
  color: var(--teal-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.document-card-icon svg {
  width: 24px;
  height: 24px;
}

.document-card-content h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 8px 0;
  line-height: 1.3;
  word-break: break-word;
}

.document-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal-700);
  text-decoration: none;
  border-bottom: 1.5px solid var(--teal-700);
  padding-bottom: 1px;
  transition: color 0.2s ease;
}

.document-link:hover {
  color: var(--teal-600);
  border-bottom-color: var(--teal-600);
}

.document-nofile {
  font-size: 12px;
  color: var(--ink-400);
  font-style: italic;
}

/* ---------- Organigrama ---------- */

/* La jerarquia se expresa con listas anidadas; se quitan las vinetas
   pero se conserva la semantica para lectores de pantalla (WCAG 1.3.1). */
.org-panels, .org-members-grid {
  list-style: none;
  margin: 0;
  padding: 0;
}

.org-panels > li {
  display: flex;
  flex: 1;
  min-width: 300px;
}

.org-panels > li > .org-panel { width: 100%; }
.org-chart {
  padding: 24px 0 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.org-avatar {
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  flex: none;
  background: var(--teal-600);
}

/* Tarjeta de mayor jerarquia visual: el mismo lenguaje de acento oscuro
   que la banda de cifras de Home, a escala de componente. */
.org-chief {
  position: relative;
  overflow: hidden;
  background: var(--teal-900);
  background-image: radial-gradient(circle at 85% 0%, rgba(92, 127, 191, 0.4), transparent 60%);
  border-radius: 18px;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 320px;
  box-shadow: 0 24px 48px -24px rgba(15, 30, 60, 0.5);
  animation: fade-up-in .5s ease both;
}

.org-chief .org-avatar {
  width: 58px;
  height: 58px;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1.5px rgba(234, 241, 251, 0.5);
}

.org-chief-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 17px;
  color: #fff;
}

.org-chief-role {
  font-size: 13px;
  color: var(--mint-200);
  margin-top: 3px;
}

.org-connector {
  width: 1px;
  height: 28px;
  background: var(--line-200);
}

.org-panels {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 920px;
}

.org-panel {
  border: 1px solid var(--line-200);
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.org-panel:hover {
  box-shadow: 0 16px 32px -20px rgba(23, 41, 77, 0.35);
  transform: translateY(-3px);
  border-color: var(--mint-200);
}

.org-panels > li.is-compact { flex: 0 1 280px; min-width: 0; }

.org-panel-header {
  background: var(--paper-soft);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line-200);
}

.org-panel-header .org-avatar { width: 38px; height: 38px; font-size: 12.5px; background: var(--teal-700); }

.org-panel-name { font-family: var(--font-body); font-weight: 700; font-size: 13.5px; color: var(--ink-900); }
.org-panel-role { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; }

.org-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 16px;
}

.org-member {
  background: var(--paper-soft);
  border-radius: 10px;
  padding: 10px 12px;
}

.org-member-name { font-size: 12.5px; font-weight: 700; color: var(--ink-900); }
.org-member-role { font-size: 11px; color: var(--ink-500); margin-top: 2px; }

/* ---------- Home ---------- */

.home-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--mint-100) 0%, var(--mint-200) 55%, var(--teal-500) 130%);
  padding-top: 56px;
}

/* Mancha decorativa adicional: aporta profundidad sin depender de una imagen */
.home-hero-glow {
  position: absolute;
  inset: -20% -10% auto auto;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.home-hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 36px;
  padding-bottom: 64px;
}

.home-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-700);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 6px 14px 6px 12px;
  margin-bottom: 20px;
  animation: fade-up-in .5s ease both;
}

.home-hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-600);
  flex: none;
}

.home-hero h1 {
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  max-width: 17ch;
  animation: fade-up-in .55s ease .06s both;
}

.home-hero h1 .text-accent {
  background: linear-gradient(100deg, var(--teal-700), var(--teal-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero .lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-700);
  max-width: 48ch;
  margin-bottom: 28px;
  animation: fade-up-in .55s ease .12s both;
}

.home-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: fade-up-in .55s ease .18s both;
}

.btn-solid, .btn-outline {
  font-size: 14.5px;
  font-weight: 700;
  padding: 13px 22px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.btn-solid svg, .btn-outline svg { width: 16px; height: 16px; transition: transform .2s ease; }

.btn-solid {
  background: var(--teal-600);
  color: #fff;
  box-shadow: 0 12px 24px -12px rgba(23, 41, 77, 0.55);
}
.btn-solid:hover { background: var(--teal-700); transform: translateY(-1px); box-shadow: 0 16px 28px -12px rgba(23, 41, 77, 0.6); }
.btn-solid:hover svg { transform: translateX(2px); }
.btn-solid:active { transform: translateY(0); }

.btn-outline { background: var(--paper); color: var(--teal-700); border: 1px solid var(--teal-600); }
.btn-outline:hover { background: var(--mint-100); transform: translateY(-1px); }
.btn-outline:active { transform: translateY(0); }

.home-hero-art { display: flex; justify-content: center; }

.home-hero-art .hero-logo-circle {
  width: 100%;
  max-width: 280px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 30px 60px -20px rgba(15, 66, 62, 0.45);
  animation: soft-float 6s ease-in-out infinite;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: 22px;
  position: relative;
  padding-left: 16px;
}

.section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--teal-600), var(--teal-500));
}

/* Banda de contraste: unica seccion oscura de la pagina, para dar un
   momento de peso visual real sin romper el resto del layout claro. */
.stats-band {
  background: var(--teal-900);
  background-image: radial-gradient(circle at 15% 20%, rgba(92, 127, 191, 0.35), transparent 55%);
  color: var(--mint-100);
}

.stats-band-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 12px 0;
}

.stat-band-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 28px;
  border-left: 1px solid rgba(234, 241, 251, 0.15);
}

.stat-band-item:first-child { border-left: none; }

.stat-band-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: var(--mint-200);
  background: rgba(234, 241, 251, 0.07);
  border: 1px solid rgba(234, 241, 251, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.stat-band-icon svg { width: 24px; height: 24px; }

.stat-band-value {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1;
}

.stat-band-label {
  font-size: 12.5px;
  color: var(--mint-200);
  margin-top: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.home-section { padding: 64px 0; }

/* Bento asimetrico: el laboratorio destacado ocupa el doble de alto en
   vez de repetir tres tarjetas identicas. */
.featured-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-auto-rows: 1fr;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.featured-grid .lab-card.is-featured {
  grid-row: span 2;
  padding: 32px;
}

.featured-grid .lab-card.is-featured .lab-icon { width: 54px; height: 54px; }
.featured-grid .lab-card.is-featured .lab-icon svg { width: 28px; height: 28px; }
.featured-grid .lab-card.is-featured h3 { font-size: 24px; }
.featured-grid .lab-card.is-featured .lab-desc { -webkit-line-clamp: 5; }

.featured-grid .lab-card .lab-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.org-teaser {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(120deg, var(--paper-soft) 0%, var(--mint-100) 140%);
  border: 1px solid var(--line-200);
  border-radius: 16px;
  padding: 26px 28px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.org-teaser .org-avatar {
  width: 56px;
  height: 56px;
  font-size: 18px;
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--line-200);
}

.org-teaser-text { flex: 1; min-width: 240px; }
.org-teaser-text h2 { font-size: 19px; margin-bottom: 6px; }
.org-teaser-text p { font-size: 14px; color: var(--ink-700); }

/* ---------- Calendario ---------- */
.cal-detail-layout {
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .cal-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    padding-bottom: 72px;
  }

  .cal-detail-layout .cal-card { margin-bottom: 0; }
  .cal-detail-layout .agenda-list { max-height: 560px; overflow-y: auto; }
}

.cal-year-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 8px 0 28px;
}

.cal-year-nav h2 {
  font-size: 18px;
  min-width: 90px;
  text-align: center;
}

.cal-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-200);
  background: var(--paper);
  color: var(--teal-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.cal-nav-btn:hover {
  background: var(--teal-600);
  border-color: var(--teal-600);
  color: #fff;
  transform: scale(1.08);
}

.cal-nav-btn svg { width: 16px; height: 16px; }

.cal-months-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding-bottom: 72px;
}

.cal-month-card {
  border: 1px solid var(--line-200);
  border-radius: 14px;
  padding: 16px;
  display: block;
  transition: box-shadow .15s ease, transform .15s ease;
}

.cal-month-card:hover {
  box-shadow: 0 10px 26px -16px rgba(15, 66, 62, 0.3);
  transform: translateY(-2px);
}

.cal-month-card h3 {
  font-size: 14px;
  text-align: center;
  margin-bottom: 10px;
  color: var(--ink-900);
}

.cal-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-mini-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--ink-700);
}

.cal-mini-cell span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.cal-mini-cell.has-event span { background: var(--mint-100); color: var(--teal-700); font-weight: 700; }
.cal-mini-cell.is-today span { background: var(--teal-600); color: #fff; font-weight: 700; }

/* Month detail */
.cal-card {
  border: 1px solid var(--line-200);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
}

.cal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--teal-900);
}

.cal-card-header h2 { font-size: 17px; color: #fff; }

.cal-card-header .cal-nav-btn {
  border-color: rgba(234, 241, 251, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: var(--mint-200);
}

.cal-card-header .cal-nav-btn:hover {
  background: var(--teal-600);
  border-color: var(--teal-600);
  color: #fff;
}

.cal-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  padding: 14px 16px 20px;
  display: block;
}

.cal-table thead, .cal-table tbody { display: block; }

.cal-table tr {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-table thead tr { margin-bottom: 4px; }

.cal-table th {
  text-align: center;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-500);
  padding: 0 0 4px;
}

.cal-table th abbr {
  text-decoration: none;
  border: 0;
  cursor: help;
}

.cal-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.cal-cell span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--ink-900);
}

.cal-cell.is-muted span { color: var(--ink-400); }
.cal-cell.has-event span { background: var(--mint-100); color: var(--teal-700); font-weight: 700; }
.cal-cell.is-today span { background: var(--teal-600); color: #fff; font-weight: 700; }

.agenda-section h2 { font-size: 20px; margin-bottom: 4px; }
.agenda-section .section-hint { font-size: 13.5px; color: var(--ink-500); margin-bottom: 20px; }

.agenda-list { border-top: 1px solid var(--line-200); list-style: none; margin: 0; padding: 0; }

.agenda-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line-200);
  transition: background-color .2s ease, padding-left .2s ease;
}

.agenda-item:hover {
  background: var(--paper-soft);
  padding-left: 10px;
}

.agenda-date {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--mint-100);
  color: var(--teal-700);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
}

.agenda-date .day { font-size: 17px; font-weight: 700; line-height: 1; }
.agenda-date .month { font-size: 10.5px; text-transform: uppercase; margin-top: 3px; }

.agenda-info h3 { font-size: 14.5px; margin-bottom: 3px; }
.agenda-info .agenda-meta { font-size: 12.5px; color: var(--ink-500); }

.agenda-empty {
  padding: 32px 4px;
  text-align: center;
  color: var(--ink-500);
  font-size: 14px;
}

/* ---------- Comunicados ---------- */
.comunicado-bell {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--teal-600);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 14px 30px -10px rgba(15, 30, 60, 0.45);
  z-index: 900;
  transition: background-color .2s ease, transform .2s ease;
  animation: gentle-pulse 2.8s ease-in-out infinite;
}

.comunicado-bell:hover { background: var(--teal-700); transform: scale(1.06); animation-play-state: paused; }
.comunicado-bell svg { width: 24px; height: 24px; }

.comunicado-bell-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e0393f;
  border: 2px solid var(--paper);
}

@keyframes backdrop-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-pop-in {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Oculto por defecto: si el JS falla, la pagina sigue siendo usable.
   El script le anade .is-open cuando corresponde. */
.comunicado-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 60, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.comunicado-backdrop.is-open {
  display: flex;
  animation: backdrop-fade-in .25s ease both;
}

.comunicado-modal-inner {
  max-height: 90vh;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.comunicado-slide:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.comunicado-slide p { flex: 1; }

.comunicado-modal {
  position: relative;
  background:
    linear-gradient(180deg, var(--mint-100) 0%, rgba(234, 241, 251, 0) 200px),
    var(--paper);
  border-radius: 24px;
  max-width: 620px;
  width: 100%;
  min-height: min(64vh, 560px);
  max-height: 90vh;
  padding: 44px 38px 34px;
  box-shadow: 0 30px 70px -24px rgba(15, 30, 60, 0.5);
  animation: modal-pop-in .3s cubic-bezier(.2,.8,.3,1) both;
  display: flex;
  flex-direction: column;
}

.comunicado-slide:not([hidden]) {
  animation: fade-up-in .35s ease both;
}

.comunicado-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-200);
  background: var(--paper);
  color: var(--ink-700);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.comunicado-close:hover {
  background: var(--teal-600);
  border-color: var(--teal-600);
  color: #fff;
  transform: rotate(90deg);
}

.comunicado-close svg { width: 15px; height: 15px; }

.comunicado-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--teal-700);
  background: var(--paper);
  border: 1px solid var(--mint-200);
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  margin-bottom: 18px;
  box-shadow: 0 6px 16px -10px rgba(23, 41, 77, 0.4);
}

.comunicado-badge svg { width: 13px; height: 13px; flex: none; }

.comunicado-modal h3 {
  font-size: 23px;
  margin-bottom: 12px;
  padding-right: 26px;
}

.comunicado-adjunto {
  margin-bottom: 14px;
  border-radius: 12px;
  overflow: hidden;
}

.comunicado-adjunto img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line-200);
  transition: transform .35s ease;
}

.comunicado-adjunto a:hover img { transform: scale(1.03); }

.comunicado-pdf-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-200);
  color: var(--teal-700);
  background: var(--mint-100);
  font-size: 13.5px;
  font-weight: 600;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.comunicado-pdf-link:hover {
  box-shadow: 0 12px 24px -14px rgba(15, 66, 62, 0.45);
  transform: translateY(-2px);
  border-color: var(--teal-500);
}

.comunicado-pdf-link svg { width: 20px; height: 20px; flex-shrink: 0; }

.comunicado-modal p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-700);
  white-space: pre-line;
  margin-bottom: 18px;
}

.comunicado-meta {
  font-size: 13px;
  color: var(--ink-500);
  border-top: 1px solid var(--line-200);
  padding-top: 16px;
}

.comunicado-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
}

.comunicado-nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-200);
  background: var(--paper);
  color: var(--teal-700);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.comunicado-nav-btn:hover {
  background: var(--teal-600);
  border-color: var(--teal-600);
  color: #fff;
  transform: scale(1.1);
}

.comunicado-nav-btn svg { width: 14px; height: 14px; }

.comunicado-dots { display: flex; align-items: center; gap: 6px; }

.comunicado-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--line-200);
  transition: background-color .25s ease, width .25s ease;
}

.comunicado-dot.is-active { background: var(--teal-600); width: 20px; }

/* Comunicados vigentes list (Calendario) */
.comunicados-section { padding: 8px 0 4px; }
.comunicados-section h2 { font-size: 20px; margin-bottom: 16px; }

.comunicados-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  list-style: none;
  padding: 0;
  margin-left: 0;
}

.comunicado-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line-200);
  border-radius: 14px;
  background: var(--paper-soft);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.comunicado-item:hover {
  box-shadow: 0 14px 30px -18px rgba(15, 66, 62, 0.35);
  transform: translateY(-2px);
  border-color: var(--mint-200);
}

.comunicado-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--mint-100);
  color: var(--teal-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.comunicado-icon svg { width: 19px; height: 19px; }

.comunicado-info h3 { font-size: 14.5px; margin-bottom: 4px; }
.comunicado-info p { font-size: 13px; color: var(--ink-700); line-height: 1.5; margin-bottom: 6px; }
.comunicado-range { font-size: 11.5px; font-weight: 700; color: var(--teal-700); }

/* ---------- Tablas de inventario ---------- */
.materials-list { margin-top: 40px; }

.materials-list h3 {
  font-size: 18px;
  margin-bottom: 20px;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table caption {
  text-align: left;
  font-size: 12.5px;
  color: var(--ink-500);
  padding-bottom: 10px;
}

.data-table th {
  background: var(--paper-soft);
  border-bottom: 2px solid var(--line-200);
  padding: 12px;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--ink-900);
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line-200);
  color: var(--ink-900);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal-900);
  color: var(--mint-100);
  margin-top: 40px;
}

.site-footer .container {
  padding: 40px 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer p { font-size: 13px; opacity: 0.85; }

/* ---------- Responsive ---------- */

/* Tablet: hamburger nav, sidebar moves above the grid, grid stays 2-up */
@media (max-width: 900px) {
  .container { padding: 0 18px; }

  .nav-toggle { display: inline-flex; }

  /* Cerrado: display:none saca los enlaces del orden de tabulacion.
     Con max-height:0 seguian siendo enfocables aunque no se vieran (WCAG 2.4.3). */
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line-200);
    box-shadow: 0 16px 30px -20px rgba(15, 66, 62, 0.4);
  }

  .main-nav.is-open { display: flex; animation: nav-drop-in .22s ease both; }

  .main-nav a {
    padding: 14px 20px;
    border-bottom: 1px solid var(--line-200);
    transition: background-color .15s ease;
  }

  .main-nav a.is-active::after { display: none; }
  .main-nav a.is-active { background: var(--paper-soft); }

  .page-header .container { grid-template-columns: 1fr; padding-bottom: 44px; }
  .page-header-art { display: none; }
  .page-header h1 { font-size: 32px; }

  .labs-layout { grid-template-columns: 1fr; gap: 24px; }
  .filters-panel { position: static; }

  .lab-detail-top h1 { font-size: 26px; }
  .info-tiles { grid-template-columns: repeat(2, 1fr); margin-top: 0; }
  .resources-grid { grid-template-columns: repeat(2, 1fr); }

  .org-panels > li,
  .org-panels > li.is-compact { min-width: 100%; flex-basis: 100%; }

  .home-hero .container { grid-template-columns: 1fr; padding-bottom: 44px; }
  .home-hero-art { display: none; }
  .home-hero h1 { font-size: 32px; max-width: none; }

  .stats-band-grid { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .stat-band-item:nth-child(3) { border-left: none; padding-left: 0; }

  .featured-grid { grid-template-columns: 1fr; }
  .featured-grid .lab-card.is-featured { grid-row: auto; padding: 22px; }
  .featured-grid .lab-card.is-featured h3 { font-size: 17px; }
  .featured-grid .lab-card.is-featured .lab-icon { width: 46px; height: 46px; }
  .featured-grid .lab-card.is-featured .lab-icon svg { width: 24px; height: 24px; }
  .featured-grid .lab-card.is-featured .lab-desc { -webkit-line-clamp: 2; }
}

/* Mobile: single column throughout */
@media (max-width: 640px) {
  .topbar-tag { display: none; }
  .topbar-contact { gap: 14px; overflow: hidden; }
  .topbar-contact a:nth-child(2) { display: none; }
  .topbar .container { padding: 0 18px; }

  .site-header .container { height: 64px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-text .brand-title { font-size: 15px; }
  .brand-text .brand-sub { font-size: 11px; }

  .page-header { padding-top: 40px; }
  .page-header h1 { font-size: 26px; }
  .page-header .lede { font-size: 14.5px; }

  .labs-toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }

  .labs-grid { grid-template-columns: 1fr; gap: 16px; }

  .site-footer .container { flex-direction: column; align-items: flex-start; }

  .lab-detail-top { flex-direction: column; }
  .lab-detail-icon { width: 52px; height: 52px; border-radius: 14px; }
  .lab-detail-icon svg { width: 26px; height: 26px; }
  .lab-detail-top h1 { font-size: 22px; }

  .info-tiles { grid-template-columns: 1fr; margin-top: 0; }
  .resources-grid { grid-template-columns: 1fr; }

  .org-chief { min-width: 0; width: 100%; }
  .org-members-grid { grid-template-columns: 1fr; }

  .home-hero { padding-top: 40px; }
  .home-hero .lede { font-size: 14.5px; }

  .comunicado-bell { right: 16px; bottom: 16px; width: 48px; height: 48px; }
  .comunicado-bell svg { width: 21px; height: 21px; }
  .stats-band-grid { grid-template-columns: repeat(2, 1fr); row-gap: 26px; padding: 40px 0; }
  .stat-band-item { padding: 0 16px; }
  .stat-band-value { font-size: 30px; }
  .featured-grid { grid-template-columns: 1fr; gap: 16px; }
  .org-teaser { padding: 20px; }

  .cal-months-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cal-month-card { padding: 12px; border-radius: 12px; }
  .cal-month-card h3 { font-size: 12.5px; margin-bottom: 6px; }
  .cal-mini-grid { gap: 1px; }
  .cal-mini-cell span { width: 15px; height: 15px; font-size: 9.5px; }
  .cal-cell span { width: 26px; height: 26px; font-size: 12px; }
  .cal-card-header h2 { font-size: 14px; }
  .agenda-item { gap: 12px; }
  .agenda-date { width: 44px; height: 44px; }
  .cal-nav-btn { width: 44px; height: 44px; }
}
