:root {
  --uz-blue: #223d71;
  --uz-blue-dark: #172b52;
  --uz-link: #315f91;
  --uz-soft: #eff3f7;
  --uz-bg: #fafbfc;
  --uz-border: #c1d2e2;
  --uz-border-neutral: #dfe3e7;
  --uz-text: #2f3337;
  --uz-muted: #5a6470;
  --uz-white: #ffffff;
  --uz-focus: #d97706;
  --genud-green: #82a900;
  --genud-green-soft: #eef5d8;
  --genud-red: #c90f2e;
  --genud-red-soft: #fbecef;
  --uz-max: 1240px;
  --uz-radius: 8px;
  --uz-shadow: 0 8px 24px rgba(34, 61, 113, 0.09);
  --uz-font: "Lato", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --uz-font-heading: "Karla", "Lato", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  scroll-behavior: smooth;
  scroll-padding-top: 150px;
}

body {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow-x: hidden;
  color: var(--uz-text);
  background: var(--uz-bg);
  font-family: var(--uz-font);
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}

main {
  min-width: 0;
  flex: 1 0 auto;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--uz-link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--uz-blue-dark);
}

button,
input,
select,
textarea {
  font: inherit;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--uz-focus);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.shell-container,
.container {
  width: min(calc(100% - 36px), var(--uz-max));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: 10px;
  left: 10px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border: 2px solid var(--uz-blue);
  border-radius: 4px;
  color: var(--uz-blue);
  background: var(--uz-white);
  font-weight: 800;
  box-shadow: var(--uz-shadow);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  border-bottom: 1px solid var(--uz-border);
  background: var(--uz-white);
  box-shadow: 0 2px 12px rgba(34, 61, 113, 0.06);
}

.brand-panel {
  position: relative;
  background: var(--uz-white);
}

.brand-panel::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--genud-red) 0,
    var(--genud-red) 50%,
    var(--genud-green) 50%,
    var(--genud-green) 100%
  );
}

.brand-row {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 24px;
  color: inherit;
  text-decoration: none;
}

.site-identity:hover {
  color: inherit;
}

.institutional-logos {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.institutional-logos img {
  width: auto;
  display: block;
  object-fit: contain;
}

.logo-unizar {
  height: 56px;
}

.logo-genud {
  height: 66px;
}

.site-heading {
  min-width: 0;
  display: block;
  padding-left: 24px;
  border-left: 1px solid var(--uz-border);
}

.site-kicker,
.site-title,
.site-subtitle {
  display: block;
}

.site-kicker {
  color: var(--uz-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.site-title {
  color: var(--uz-blue);
  font-family: var(--uz-font-heading);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 900;
  line-height: 1.05;
}

.site-subtitle {
  margin-top: 2px;
  color: var(--uz-muted);
  font-size: 0.78rem;
}

.nav-toggle {
  width: 46px;
  height: 46px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--uz-border);
  border-radius: 4px;
  color: var(--uz-blue);
  background: var(--uz-white);
  cursor: pointer;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  width: 22px;
  height: 2px;
  display: block;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-icon {
  position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-icon::before { top: -7px; }
.nav-toggle-icon::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { top: 0; transform: rotate(-45deg); }

.primary-nav {
  color: var(--uz-white);
  background: var(--uz-blue);
}

.nav-shell {
  overflow: visible;
}

.primary-nav-list {
  min-height: 46px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav-list > li {
  position: relative;
  min-width: 0;
  display: flex;
}

.nav-item-row {
  min-width: 0;
  display: flex;
}

.primary-nav-list > li > a,
.nav-item-row > a {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 7px 11px;
  border-bottom: 3px solid transparent;
  color: var(--uz-white);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

.primary-nav-list a:hover,
.primary-nav-list a[aria-current="page"],
.nav-item-has-submenu:focus-within > .nav-item-row > a,
.nav-item-has-submenu:hover > .nav-item-row > a {
  border-bottom-color: var(--uz-white);
  color: var(--uz-white);
  background: rgba(255, 255, 255, 0.1);
}

.primary-nav-list a:focus-visible,
.submenu-toggle:focus-visible {
  outline-color: var(--uz-white);
  outline-offset: -4px;
}

.submenu-toggle {
  min-width: 28px;
  padding: 0 8px 0 2px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--uz-white);
  background: transparent;
  cursor: pointer;
}

.submenu-toggle span {
  width: 8px;
  height: 8px;
  display: block;
  transform: rotate(45deg) translateY(-2px);
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transition: transform 0.16s ease;
}

.submenu-is-open .submenu-toggle span {
  transform: rotate(225deg) translate(-1px, -1px);
}

.submenu {
  position: absolute;
  z-index: 20;
  top: calc(100% - 1px);
  left: 0;
  width: max-content;
  min-width: 225px;
  max-width: 320px;
  margin: 0;
  padding: 7px;
  transform: translateY(-5px);
  visibility: hidden;
  opacity: 0;
  border: 1px solid var(--uz-border);
  border-top: 3px solid var(--genud-green);
  border-radius: 0 0 var(--uz-radius) var(--uz-radius);
  background: var(--uz-white);
  box-shadow: 0 14px 30px rgba(23, 43, 82, 0.16);
  list-style: none;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.submenu-align-right {
  right: 0;
  left: auto;
}

.nav-item-has-submenu:hover > .submenu,
.nav-item-has-submenu.submenu-is-open > .submenu {
  transform: translateY(0);
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.nav-item-has-submenu.submenu-suppressed:hover > .submenu {
  transform: translateY(-5px);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.submenu a {
  display: block;
  padding: 10px 12px;
  border-radius: 4px;
  color: var(--uz-blue);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.submenu a:hover,
.submenu a:focus-visible {
  color: var(--uz-blue-dark);
  background: var(--uz-soft);
}

.page-hero {
  padding: 20px 0 4px;
}

.page-hero-card {
  position: relative;
  padding: 20px 0 14px;
}

.page-hero-card .eyebrow {
  margin-bottom: 3px;
  font-size: 0.7rem;
}

.page-hero-card h1 {
  max-width: none;
  margin-bottom: 5px;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  line-height: 1.12;
}

.page-hero-card .lead {
  max-width: 100ch;
  font-size: 0.98rem;
  line-height: 1.5;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--uz-blue);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--uz-text);
  font-family: var(--uz-font-heading);
  line-height: 1.18;
}

h1 {
  max-width: 22ch;
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.15rem);
  letter-spacing: -0.025em;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
}

h3 {
  margin: 0 0 9px;
  font-size: 1.12rem;
}

.lead {
  max-width: 76ch;
  margin: 0;
  color: var(--uz-muted);
  font-size: 1.08rem;
}

.section {
  padding: 22px 0 40px;
}

.section-alt {
  border-block: 1px solid var(--uz-border-neutral);
  background: var(--uz-white);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  padding-bottom: 11px;
  border-bottom: 1px dotted var(--uz-border);
}

.section-heading h1,
.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.section-heading h1 {
  max-width: none;
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  letter-spacing: normal;
}

.compact-heading {
  align-items: center;
}

.anchor-section {
  scroll-margin-top: 150px;
}

.history-grid,
.three-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.history-card,
.content-card,
.person-card,
.publication-card,
.contact-card,
.social-card,
.tool-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--uz-border-neutral);
  border-radius: var(--uz-radius);
  background: var(--uz-white);
  box-shadow: 0 4px 14px rgba(34, 61, 113, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.history-card:hover,
.content-card:hover,
.person-card:hover,
.publication-card:hover,
.social-card:hover,
.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--uz-border);
  box-shadow: 0 12px 24px rgba(34, 61, 113, 0.09);
}

.history-card:nth-child(1) { border-top: 4px solid var(--genud-red); }
.history-card:nth-child(2) { border-top: 4px solid var(--uz-blue); }
.history-card:nth-child(3) { border-top: 4px solid var(--genud-green); }

.history-image,
.card-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  border-bottom: 1px solid var(--uz-border-neutral);
  background: var(--uz-soft);
}

.history-body,
.content-card-body {
  padding: 24px;
}

.landing-card {
  display: flex;
  flex-direction: column;
}

.landing-card .history-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
}

.landing-card .history-body > p:not(.eyebrow) {
  flex: 1;
}

.story-layout {
  max-width: 980px;
}

.story-figure,
.story-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--uz-border-neutral);
  border-radius: var(--uz-radius);
  background: var(--uz-white);
  box-shadow: var(--uz-shadow);
}

.story-figure {
  margin-bottom: 24px;
}

.story-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.story-card {
  padding: clamp(24px, 5vw, 52px);
  border-top: 4px solid var(--uz-blue);
}

.story-section + .story-section {
  margin-top: 32px;
  padding-top: 30px;
  border-top: 1px dotted var(--uz-border);
}

.story-section h2 {
  color: var(--uz-blue);
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
}

.story-section p:last-child {
  margin-bottom: 0;
}

.history-section + .history-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px dotted var(--uz-border);
}

.history-section h3 {
  color: var(--uz-blue);
}

.history-section p:last-child,
.content-card-body p:last-child {
  margin-bottom: 0;
}

.provisional-label,
.status-chip {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 4px 9px;
  border: 1px solid #e8b7c1;
  border-radius: 999px;
  color: #8b1530;
  background: var(--genud-red-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.notice {
  margin: 0 0 26px;
  padding: 15px 18px;
  border-left: 4px solid var(--genud-green);
  border-radius: 0 var(--uz-radius) var(--uz-radius) 0;
  color: var(--uz-muted);
  background: var(--genud-green-soft);
}

.notice p {
  margin: 0;
}

.team-section,
.publication-section {
  margin-bottom: 34px;
}

.people-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.person-card {
  --person-avatar-size: 112px;
  display: grid;
  grid-template-columns: var(--person-avatar-size) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 20px 22px;
}

.person-monogram,
.person-photo {
  width: var(--person-avatar-size);
  height: var(--person-avatar-size);
  border: 1px solid var(--uz-border);
  border-radius: 50%;
  object-fit: cover;
}

.person-monogram {
  display: grid;
  place-items: center;
  color: var(--uz-blue);
  background: var(--uz-soft);
  font-family: var(--uz-font-heading);
  font-size: 2rem;
  font-weight: 900;
}

.person-content {
  min-width: 0;
}

.person-content h3 {
  color: var(--uz-blue-dark);
}

.person-role,
.person-institution {
  margin: 0;
}

.person-role {
  font-weight: 700;
}

.person-institution {
  margin-top: 3px;
  color: var(--uz-muted);
  font-size: 0.92rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profile-links a {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--uz-border-neutral);
  border-radius: 50%;
  background: var(--uz-white);
  box-shadow: 0 2px 6px rgba(34, 61, 113, 0.08);
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.profile-links a:hover {
  transform: translateY(-2px);
  border-color: var(--uz-border);
  box-shadow: 0 5px 10px rgba(34, 61, 113, 0.14);
}

.profile-links img {
  width: 20px;
  height: 20px;
  display: block;
}

.count-badge {
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--uz-border);
  border-radius: 50%;
  color: var(--uz-blue);
  background: var(--uz-soft);
  font-weight: 900;
}

.publication-list {
  display: grid;
  gap: 16px;
}

.publication-card {
  padding: 22px;
  border-left: 4px solid var(--uz-blue);
}

.publication-section:nth-of-type(even) .publication-card {
  border-left-color: var(--genud-green);
}

.publication-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 9px;
  color: var(--uz-muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.publication-meta .status-chip {
  margin: 0;
}

.publication-citation {
  max-width: 100ch;
  margin: 0 0 17px;
  color: var(--uz-text);
  font-size: 1rem;
  line-height: 1.65;
}

.publication-citation-authors {
  font-weight: 650;
}

.publication-citation-date {
  white-space: nowrap;
}

.publication-title {
  font-weight: 700;
}

a.publication-title {
  color: var(--uz-blue);
}

.publication-citation cite {
  color: var(--uz-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  border: 1px solid var(--uz-blue);
  border-radius: 4px;
  color: var(--uz-white);
  background: var(--uz-blue);
  font-weight: 800;
  text-decoration: none;
}

.button:hover {
  border-color: var(--uz-blue-dark);
  color: var(--uz-white);
  background: var(--uz-blue-dark);
}

.button-secondary {
  color: var(--uz-blue);
  background: transparent;
}

.button-secondary:hover {
  color: var(--uz-white);
}

.button-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  margin-right: 7px;
}

.empty-state,
.data-error {
  padding: 20px;
  border: 1px dashed var(--uz-border);
  border-radius: var(--uz-radius);
  color: var(--uz-muted);
  background: var(--uz-white);
}

.data-error {
  border-color: #e8b7c1;
  color: #75182d;
  background: var(--genud-red-soft);
}

.contact-grid,
.material-grid,
.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.contact-card,
.tool-card,
.social-card {
  padding: 24px;
}

.contact-card address {
  font-style: normal;
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li + li {
  margin-top: 12px;
}

.social-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.social-card {
  position: relative;
  padding-top: 48px;
  color: var(--uz-text);
  text-decoration: none;
}

.social-card::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 24px;
  width: 34px;
  height: 4px;
  border-radius: 2px;
  background: var(--genud-green);
}

.social-card:nth-child(even)::before {
  background: var(--genud-red);
}

.social-card h3 {
  color: var(--uz-blue);
}

.tool-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.tool-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--uz-border);
  border-radius: 50%;
  color: var(--uz-blue);
  background: var(--uz-soft);
  font-weight: 900;
}

.tool-card .actions {
  margin-top: auto;
  padding-top: 12px;
}

.partner-strip {
  padding: 30px 0;
  border-top: 1px solid var(--uz-border-neutral);
  background: var(--uz-white);
}

.partner-logos {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.partner-logos a {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border: 1px solid var(--uz-border-neutral);
  border-radius: var(--uz-radius);
  background: var(--uz-white);
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.partner-logos a:hover {
  transform: translateY(-2px);
  border-color: var(--uz-border);
  box-shadow: var(--uz-shadow);
}

.partner-logos img,
.partner-logos .partner-logo-samid {
  width: 100%;
  max-width: 220px;
  max-height: 76px;
  object-fit: contain;
  transform: scale(1.1);
}

.partner-logos .partner-logo-samid {
  height: auto;
}

.site-footer {
  margin-top: auto;
  color: rgba(255, 255, 255, 0.9);
  background: var(--uz-blue);
}

.footer-main {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 26px;
}

.footer-brand {
  font-family: var(--uz-font-heading);
  font-size: 1.15rem;
  font-weight: 900;
}

.footer-meta {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--uz-white);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 1120px) {
  html { scroll-padding-top: 92px; }
  .anchor-section { scroll-margin-top: 92px; }
  .nav-toggle { display: inline-flex; flex: 0 0 auto; }
  .primary-nav { max-height: calc(100vh - 88px); overflow-y: auto; }
  .nav-shell { width: 100%; }
  .primary-nav-list { display: grid; grid-template-columns: 1fr; padding: 7px 18px 12px; }
  .primary-nav-list > li { display: block; }
  .nav-item-row { width: 100%; display: grid; grid-template-columns: 1fr 48px; }
  .primary-nav-list > li > a,
  .nav-item-row > a {
    min-height: 48px;
    justify-content: flex-start;
    padding-inline: 12px;
    border-bottom: 0;
    border-left: 4px solid transparent;
    font-size: 0.95rem;
    text-align: left;
  }
  .primary-nav-list a:hover,
  .primary-nav-list a[aria-current="page"],
  .nav-item-has-submenu:focus-within > .nav-item-row > a,
  .nav-item-has-submenu:hover > .nav-item-row > a {
    border-bottom-color: transparent;
    border-left-color: var(--uz-white);
  }
  .submenu-toggle { min-width: 48px; padding: 0; border-bottom: 0; }
  .submenu-toggle span { margin: auto; }
  .submenu {
    position: static;
    width: auto;
    max-width: none;
    display: none;
    transform: none;
    visibility: visible;
    opacity: 1;
    margin: 0 0 7px 16px;
    border: 0;
    border-left: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: auto;
  }
  .nav-item-has-submenu:hover > .submenu,
  .nav-item-has-submenu:focus-within > .submenu { display: none; }
  .nav-item-has-submenu.submenu-is-open > .submenu { display: block; }
  .submenu a { color: var(--uz-white); }
  .submenu a:hover,
  .submenu a:focus-visible { color: var(--uz-white); background: rgba(255, 255, 255, 0.1); }
}

@media (max-width: 900px) {
  .history-grid,
  .three-card-grid { grid-template-columns: 1fr; }
  .history-image { aspect-ratio: 16 / 8; }
  .social-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partner-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .shell-container,
  .container { width: min(calc(100% - 28px), var(--uz-max)); }
  .brand-row { min-height: 74px; gap: 12px; }
  .site-identity { gap: 10px; }
  .institutional-logos { gap: 8px; }
  .logo-unizar { height: 42px; }
  .logo-genud { height: 48px; }
  .site-heading { padding-left: 10px; }
  .site-kicker,
  .site-subtitle { display: none; }
  .site-title { font-size: 1.08rem; }
  .primary-nav { max-height: calc(100vh - 74px); }
  .page-hero { padding: 14px 0 2px; }
  .page-hero-card { padding: 17px 0 11px; }
  .section { padding: 18px 0 32px; }
  .section-heading { align-items: flex-start; }
  .people-grid,
  .contact-grid,
  .material-grid { grid-template-columns: 1fr; }
  .footer-main,
  .footer-links { align-items: flex-start; flex-direction: column; }
  .footer-links { gap: 10px; }
  .partner-logos a { min-height: 96px; }
}

@media (max-width: 500px) {
  .institutional-logos .logo-unizar { width: 132px; height: auto; }
  .logo-genud { width: 42px; height: 42px; }
  .site-heading { border-left: 0; }
  .history-image { aspect-ratio: 4 / 3; }
  .history-body,
  .content-card-body,
  .contact-card,
  .tool-card { padding: 19px; }
  .person-card {
    --person-avatar-size: 72px;
    grid-template-columns: var(--person-avatar-size) minmax(0, 1fr);
    gap: 14px;
    padding: 15px;
  }
  .person-monogram,
  .person-photo { width: var(--person-avatar-size); height: var(--person-avatar-size); }
  .person-monogram { font-size: 1.45rem; }
  .social-grid { grid-template-columns: 1fr; }
  .publication-card { padding: 18px; }
  .partner-logos { grid-template-columns: 1fr 1fr; gap: 10px; }
  .partner-logos a { min-height: 86px; padding: 12px; }
  .partner-logos img,
  .partner-logos .partner-logo-samid { max-height: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Publicaciones agrupadas por año */
.year-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.year-index a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid var(--uz-border);
  border-radius: 999px;
  color: var(--uz-blue);
  background: var(--uz-white);
  font-weight: 800;
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.year-index a span {
  color: var(--uz-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.year-index a:hover {
  color: var(--uz-white);
  background: var(--uz-blue);
}

.year-index a:hover span {
  color: var(--uz-white);
}

.year-group {
  margin-bottom: 12px;
  border: 1px solid var(--uz-border-neutral);
  border-radius: var(--uz-radius);
  background: var(--uz-white);
}

.year-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  list-style: none;
}

.year-group > summary::-webkit-details-marker {
  display: none;
}

.year-group > summary::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: none;
  border-right: 2px solid var(--uz-blue);
  border-bottom: 2px solid var(--uz-blue);
  transform: rotate(-45deg);
  transition: transform 0.16s ease;
}

.year-group[open] > summary::before {
  transform: rotate(45deg);
}

.year-group-title {
  flex: 1;
  color: var(--uz-blue-dark);
  font-family: var(--uz-font-heading);
  font-size: 1.35rem;
  font-weight: 900;
}

.year-group-count {
  color: var(--uz-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.year-group[open] > summary {
  border-bottom: 1px solid var(--uz-border-neutral);
}

.year-group .publication-list {
  gap: 12px;
  padding: 16px;
  background: var(--uz-bg);
}

.year-group .publication-card {
  padding: 16px 18px;
}

.year-group .publication-citation {
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.year-group .button {
  min-height: 36px;
}

@media (max-width: 640px) {
  .year-group > summary { padding: 12px 14px; }
  .year-group .publication-list { padding: 10px; }
  .year-group .publication-card { padding: 14px; }
}

/* Laboratorio */
.lab-section {
  margin-bottom: 40px;
}

.lab-table-wrap {
  margin-top: 10px;
  overflow-x: auto;
  border: 1px solid var(--uz-border-neutral);
  border-radius: var(--uz-radius);
  background: var(--uz-white);
}

.lab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
}

.lab-table th,
.lab-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--uz-border-neutral);
  text-align: left;
  vertical-align: top;
}

.lab-table th {
  color: var(--uz-blue-dark);
  background: var(--uz-soft);
  font-weight: 800;
}

.lab-table tbody tr:last-child td {
  border-bottom: 0;
}

.lab-table td:last-child,
.lab-table th:last-child {
  white-space: nowrap;
  text-align: right;
}

.lab-table .lab-fee {
  white-space: nowrap;
  text-align: right;
}

.lab-table-fees td:last-child,
.lab-table-fees th:last-child {
  white-space: nowrap;
}

.lab-fee-types {
  padding-left: 18px;
}

.lab-fee-types li + li {
  margin-top: 2px;
}

.lab-note {
  margin: 12px 0 0;
  color: var(--uz-muted);
}

.tour-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--uz-border-neutral);
  border-radius: var(--uz-radius);
  background: var(--uz-soft);
}

.tour-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Menú compacto en pantallas intermedias (9 apartados) */
@media (min-width: 1121px) and (max-width: 1280px) {
  .primary-nav-list > li > a,
  .nav-item-row > a {
    padding: 7px 7px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .submenu-toggle {
    min-width: 22px;
    padding: 0 5px 0 0;
  }
}

/* Tour virtual (vídeo vertical) */
.tour-layout {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.tour-lang {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tour-lang-button {
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--uz-border);
  border-radius: 999px;
  color: var(--uz-blue);
  background: var(--uz-white);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.tour-lang-button.is-active {
  border-color: var(--uz-blue);
  color: var(--uz-white);
  background: var(--uz-blue);
}

.tour-video {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 80vh;
  display: block;
  border-radius: var(--uz-radius);
  background: #000;
  box-shadow: var(--uz-shadow);
}

.tour-text p {
  max-width: 60ch;
  margin: 0 0 12px;
}

@media (max-width: 760px) {
  .tour-layout { grid-template-columns: 1fr; gap: 18px; }
  .tour-player { max-width: 420px; width: 100%; margin: 0 auto; }
}

/* Selector de idioma ES | EN */
.lang-switch {
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid var(--uz-border);
  border-radius: 999px;
  background: var(--uz-white);
}

.lang-switch a {
  min-width: 42px;
  padding: 7px 11px;
  color: var(--uz-blue);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
}

.lang-switch a + a {
  border-left: 1px solid var(--uz-border);
}

.lang-switch a:hover {
  background: var(--uz-soft);
}

.lang-switch a[aria-current="true"] {
  color: var(--uz-white);
  background: var(--uz-blue);
}

/* Proyectos */
.project-section {
  margin-bottom: 36px;
}

.project-list {
  display: grid;
  gap: 18px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--uz-border-neutral);
  border-left: 4px solid var(--genud-green);
  border-radius: var(--uz-radius);
  background: var(--uz-white);
  box-shadow: 0 4px 14px rgba(34, 61, 113, 0.05);
}

.project-card.has-image {
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
}

.project-image {
  width: 100%;
  height: 100%;
  min-height: 200px;
  display: block;
  object-fit: cover;
  background: var(--uz-soft);
}

.project-body {
  min-width: 0;
  padding: 22px 24px;
}

.project-body h3 {
  margin: 0 0 10px;
  color: var(--uz-blue-dark);
  font-size: 1.2rem;
  line-height: 1.3;
}

.project-body > p {
  max-width: 85ch;
  margin: 0 0 10px;
  line-height: 1.6;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 22px;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--uz-border-neutral);
}

.project-meta dt {
  color: var(--uz-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-meta dd {
  margin: 2px 0 0;
  font-weight: 700;
}

.project-body .actions {
  margin-top: 16px;
}

@media (max-width: 760px) {
  .project-card.has-image { grid-template-columns: 1fr; }
  .project-image { height: 190px; min-height: 0; }
  .project-body { padding: 18px; }
  .lang-switch a { min-width: 36px; padding: 6px 8px; }
}

@media (max-width: 460px) {
  .site-heading { display: none; }
}

.project-figure {
  display: block;
  margin: 18px 0 4px;
  overflow: hidden;
  border: 1px solid var(--uz-border-neutral);
  border-radius: var(--uz-radius);
}

.project-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.project-refs-title {
  margin: 20px 0 8px;
  color: var(--uz-blue-dark);
  font-size: 0.95rem;
}

.project-refs {
  margin: 0;
  padding-left: 22px;
  color: var(--uz-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.project-refs li + li {
  margin-top: 6px;
}

.project-refs a,
.project-body > p a {
  overflow-wrap: anywhere;
}

/* Proyectos: tarjetas con infografía + ventana con la información completa */
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.project-tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--uz-border-neutral);
  border-radius: 18px;
  color: inherit;
  background: var(--uz-white);
  box-shadow: 0 4px 14px rgba(34, 61, 113, 0.07);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.project-tile:hover,
.project-tile:focus-visible {
  transform: translateY(-4px);
  border-color: var(--uz-border);
  box-shadow: 0 16px 30px rgba(34, 61, 113, 0.14);
}

.project-tile-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--uz-border-neutral);
  background: var(--uz-soft);
}

.project-tile-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: left top;
  transition: transform 0.3s ease;
}

.project-tile:hover .project-tile-image img {
  transform: scale(1.04);
}

.project-tile-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 16px;
}

.project-tile-title {
  color: var(--uz-blue-dark);
  font-weight: 800;
  line-height: 1.35;
}

.project-tile-more {
  color: var(--uz-link);
  font-size: 0.88rem;
  font-weight: 800;
}

.project-dialog {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--uz-text);
  background: var(--uz-white);
  box-shadow: 0 30px 80px rgba(23, 43, 82, 0.35);
}

.project-dialog::backdrop {
  background: rgba(23, 43, 82, 0.6);
}

.project-dialog-inner {
  position: relative;
  padding: 28px 30px 30px;
}

.project-dialog h3 {
  margin: 0 48px 16px 0;
  color: var(--uz-blue-dark);
  font-size: 1.4rem;
  line-height: 1.3;
}

.project-dialog .project-figure {
  margin: 0 0 18px;
}

.project-dialog .project-body {
  padding: 0;
}

.project-dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--uz-border);
  border-radius: 50%;
  color: var(--uz-blue);
  background: var(--uz-white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.project-dialog-close:hover {
  background: var(--uz-soft);
}

@media (max-width: 1100px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .project-dialog-inner { padding: 20px 18px 22px; }
  .project-dialog h3 { font-size: 1.15rem; }
}

/* Proyectos: selector de grupo (EXER-GENUD / NUTRI-GENUD) */
.project-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 30px;
  padding: 16px 20px;
  border: 1px solid var(--uz-border-neutral);
  border-left: 4px solid var(--uz-blue);
  border-radius: var(--uz-radius);
  background: var(--uz-white);
}

.project-filter label {
  color: var(--uz-blue-dark);
  font-family: var(--uz-font-heading);
  font-weight: 800;
}

.project-filter select {
  min-height: 44px;
  min-width: 220px;
  padding: 8px 40px 8px 14px;
  border: 1px solid var(--uz-border);
  border-radius: var(--uz-radius);
  color: var(--uz-blue-dark);
  background: var(--uz-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23223d71' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  appearance: none;
}

.project-group[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .project-filter select { width: 100%; min-width: 0; }
}

/* Material registrado: fichas de obras registradas */
.registered-card-image {
  display: block;
  width: calc(100% + 48px);
  margin: -24px -24px 18px;
  border-bottom: 1px solid var(--uz-border-neutral);
}

.registered-card-image img {
  width: 100%;
  height: auto;
  display: block;
}

.registered-chip {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #4b6200;
  background: var(--genud-green-soft);
  font-size: 0.85rem;
  font-weight: 800;
}

.registered-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  width: 100%;
  margin: 4px 0 14px;
}

.registered-meta dt {
  color: var(--uz-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.registered-meta dd {
  margin: 2px 0 0;
  color: var(--uz-blue-dark);
  font-weight: 800;
}

.registered-details {
  width: 100%;
  border-top: 1px dotted var(--uz-border);
  padding-top: 10px;
  font-size: 0.93rem;
}

.registered-details summary {
  color: var(--uz-link);
  font-weight: 700;
  cursor: pointer;
}

.registered-details p {
  margin: 10px 0 0;
}
