﻿:root{
  /* Palette scale */
  --brand-primary-500: #0071BA;
  --brand-primary-700: #005A94;
  --brand-primary-900: #003857;
  --brand-secondary-500: #00C1DF;
  --brand-secondary-700: #00A3BF;
  --accent-500: #FEB300;
  --accent-700: #E09F00;
  --brand-dark: var(--brand-primary-900);
  --brand-primary: var(--brand-primary-500);
  --brand-primary-rgb: 0, 113, 186;
  --brand-primary-dark: var(--brand-primary-700);
  --brand-secondary: var(--brand-secondary-500);
  --brand-secondary-rgb: 0, 193, 223;
  --brand-secondary-dark: var(--brand-secondary-700);
  --brand-secondary-dark-rgb: 0, 163, 191;
  --brand-accent-1: var(--accent-500);
  --brand-accent-1-rgb: 254, 179, 0;
  --brand-accent-1-dark: var(--accent-700);
  --brand-accent-1-dark-rgb: 224, 159, 0;
  --brand-accent-2: #BBD6EA;
  --brand-accent-2-rgb: 187, 214, 234;
  --brand-accent-2-dark: #8AB5D4;
  --brand-accent-2-dark-rgb: 138, 181, 212;
  --brand-accent-3: #A4219B;
  --brand-accent-3-rgb: 164, 33, 155;

  /* Semantic brand tokens */
  --color-primary: var(--brand-primary);
  --color-primary-strong: var(--brand-primary-dark);
  --color-primary-deep: var(--brand-dark);
  --color-secondary: var(--brand-secondary);
  --color-secondary-strong: var(--brand-secondary-dark);
  --color-accent: var(--brand-accent-1);
  --color-accent-strong: var(--brand-accent-1-dark);
  --theme-surface-dark-start: var(--brand-dark);
  --theme-surface-dark-mid: var(--brand-primary);
  --theme-surface-dark-end: var(--brand-primary-dark);
  --theme-surface-glow-rgb: var(--brand-primary-rgb);
  --theme-surface-glow-alt-rgb: var(--brand-secondary-rgb);
  --theme-people-women: var(--brand-primary);
  --theme-people-men: var(--brand-secondary);
  --theme-people-other: var(--brand-accent-3);
  --theme-events-kpi-main: var(--brand-accent-1);
  --theme-events-kpi-secondary: var(--brand-primary);
  --theme-events-label: rgba(255,255,255,.78);
  --theme-events-bar-label: rgba(255,255,255,.92);
  --theme-events-bar-track: rgba(255,255,255,.16);
  --theme-events-bar-start: var(--brand-secondary);
  --theme-events-bar-end: var(--brand-secondary-dark);
  --theme-events-bar-pct: rgba(255,255,255,.92);
  --theme-pub-accent: var(--brand-primary);
  --theme-pub-accent-rgb: var(--brand-primary-rgb);
  --theme-pub-title: var(--brand-accent-2);
  --theme-pub-card-bg: rgba(7,24,48,.34);
  --theme-pub-item-bg: rgba(4,18,36,.24);
  --theme-pub-icon-idle: var(--muted);
  --theme-pub-icon-open: var(--theme-pub-accent);
  --theme-pub-chip-text: var(--theme-pub-accent);
  --theme-pub-chip-hover-bg: var(--theme-pub-accent);
  --theme-pub-chip-hover-text: #fff;
  --theme-light-ring-rgb: var(--brand-primary-rgb);
  --finance-struct: var(--brand-accent-1);
  --finance-rdi: var(--brand-primary);
  --finance-other: var(--brand-secondary);
  --finance-source-1: var(--brand-primary);
  --finance-source-2: var(--brand-accent-2);
  --finance-area-1: var(--brand-primary);
  --finance-area-2: color-mix(in srgb, var(--brand-primary) 82%, white);
  --finance-area-3: color-mix(in srgb, var(--brand-primary) 64%, white);
  --finance-area-4: color-mix(in srgb, var(--brand-primary) 46%, white);
  --finance-area-5: color-mix(in srgb, var(--brand-primary) 28%, white);
  --finance-area-6: color-mix(in srgb, var(--brand-primary) 18%, white);
  --finance-area-7: color-mix(in srgb, var(--brand-primary) 10%, white);
  --pub-blob-1: var(--brand-primary);
  --pub-blob-2: var(--brand-accent-1);
  --pub-blob-articles: var(--brand-primary);
  --proj-color-1: var(--brand-primary);
  --proj-color-1-rgb: var(--brand-primary-rgb);
  --proj-color-2: var(--brand-secondary);
  --proj-color-2-rgb: var(--brand-secondary-rgb);
  --proj-color-3: var(--brand-accent-1);
  --proj-color-3-rgb: var(--brand-accent-1-rgb);
  --people-bar-text: #fff;
  --rec-color-1: var(--brand-accent-1-dark);
  --rec-color-1-rgb: var(--brand-accent-1-dark-rgb);
  --rec-color-2: var(--brand-primary);
  --rec-color-2-rgb: var(--brand-primary-rgb);
  --rec-color-3: var(--brand-secondary-dark);
  --rec-color-3-rgb: var(--brand-secondary-dark-rgb);
  --rec-color-4: var(--brand-accent-2-dark);
  --rec-color-4-rgb: var(--brand-accent-2-dark-rgb);
  --fin-bg-struct: var(--brand-accent-1-dark);
  --fin-text-struct: #fff;
  --fin-bg-rdi: var(--brand-primary);
  --fin-text-rdi: #fff;
  --fin-bg-other: var(--brand-secondary-dark);
  --fin-text-other: #fff;
  --fin-item-struct-rgb: var(--brand-accent-1-rgb);
  --fin-item-rdi-rgb: var(--brand-primary-rgb);
  --fin-item-other-rgb: var(--brand-secondary-rgb);

  /* Backward-compatible aliases */
  --imarina-yellow: var(--brand-accent-1);
  --imarina-yellow-dark: var(--brand-accent-1-dark);
  --imarina-cyan: var(--brand-secondary);
  --imarina-cyan-dark: var(--brand-secondary-dark);
  --imarina-blue: var(--brand-primary);
  --imarina-blue-dark: var(--brand-primary-dark);
  --imarina-navy: var(--brand-dark);
  --bg: #FAFBFC;
  --paper: #FFFFFF;
  --ink: #1A202C;
  --muted: #4A5568;
  --border: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow: 0 2px 8px rgba(0,0,0,.04);
  --shadow-lg: 0 4px 16px rgba(0,0,0,.08);
  --radius: 4px;
  --radius-lg: 8px;
  --radius-xl: 14px;
  --max: 1280px;
  --gutter: 24px;
  --topbar-h-large: 140px;
  --topbar-h-small: 72px;
  --ease: cubic-bezier(.4,0,.2,1);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg: #0F172A;
    --paper: #1E293B;
    --ink: #F1F5F9;
    --muted: #94A3B8;
    --border: #334155;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.6;
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

body.mem-loading .topbar,
body.mem-loading .hero-section,
body.mem-loading #main-content,
body.mem-loading .footer {
  opacity: 0;
  visibility: hidden;
}

body:not(.mem-loading) .topbar,
body:not(.mem-loading) .hero-section,
body:not(.mem-loading) #main-content,
body:not(.mem-loading) .footer {
  opacity: 1;
  visibility: visible;
  transition: opacity .22s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(40px, 6vw, 80px); font-weight: 900; }
h2 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; }
h3 { font-size: clamp(24px, 3vw, 40px); font-weight: 800; }
p { font-family: var(--font-body); font-weight: 400; line-height: 1.7; }
strong { font-weight: 700; }

a { color: var(--imarina-blue); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--imarina-blue-dark); }
a:focus { outline: 3px solid var(--imarina-cyan); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid var(--imarina-cyan); outline-offset: 2px;
}

/* TOPBAR */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topbar-h-large); z-index: 1000;
  background: transparent; border-bottom: 1px solid transparent;
  transition: all 0.4s var(--ease);
}
.topbar.scrolled {
  height: var(--topbar-h-small);
  backdrop-filter: blur(20px) saturate(180%);
  background: rgba(255,255,255,.95);
  border-bottom-color: var(--border);
  box-shadow: 0 2px 14px rgba(0,0,0,.08);
}
@media (prefers-color-scheme: dark) {
  .topbar.scrolled { background: rgba(30,41,59,.95); border-bottom-color: var(--border); }
}
.topbar-inner {
  height: 100%;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 24px;
  transition: all 0.4s var(--ease);
}
.menu-toggle {
  background: transparent; border: none; cursor: pointer; padding: 14px;
  display: flex; flex-direction: column; gap: 6px; justify-self: start;
  transition: all 0.3s var(--ease); z-index: 1001;
}
.menu-toggle span {
  display: block; width: 28px; height: 3px;
  background: white; border-radius: 2px; transition: all 0.3s var(--ease);
}
.topbar.scrolled .menu-toggle span { background: var(--ink); }
.menu-toggle:hover span { background: var(--imarina-yellow); }
.menu-toggle:focus { outline: 3px solid var(--imarina-cyan); outline-offset: 4px; }

.brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; transition: all 0.4s var(--ease); justify-self: center;
}
.brand:focus { outline: 3px solid var(--imarina-cyan); outline-offset: 4px; border-radius: 0; }
.brand img { height: 56px; width: auto; transition: all 0.4s var(--ease); }
.topbar.scrolled .brand img { height: 36px; }
/* Swap de logo: variante clara arriba (topbar transparente) / color al hacer sticky.
   Se apilan y se hace crossfade con opacity para conservar la transición. */
.brand { position: relative; }
.brand-logo--color {
  position: absolute; top: 0; left: 0;
  opacity: 0; pointer-events: none;
}
.topbar.scrolled .brand-logo--light { opacity: 0; }
.topbar.scrolled .brand-logo--color { opacity: 1; }
.brand-text {
  font-family: var(--font-display); font-weight: 800; font-size: 32px;
  color: white; letter-spacing: -.02em; transition: all 0.4s var(--ease);
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.topbar.scrolled .brand-text { font-size: 22px; color: var(--ink); text-shadow: none; }

.topbar-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 18px;
}
.lang-switch {
  position: relative;
  z-index: 1200;
  --lang-trigger-bg: transparent;
  --lang-trigger-border: transparent;
  --lang-trigger-text: #ffffff;
  --lang-trigger-hover-bg: rgba(255,255,255,.08);
  --lang-menu-bg: rgba(15, 23, 42, .96);
  --lang-menu-border: rgba(255,255,255,.14);
  --lang-menu-text: #ffffff;
  --lang-menu-hover-bg: rgba(255,255,255,.12);
  --lang-menu-active-bg: rgba(255,255,255,.18);
}
.lang-switch.lang-switch--on-light {
  --lang-trigger-bg: transparent;
  --lang-trigger-border: transparent;
  --lang-trigger-text: var(--brand-primary, var(--ink));
  --lang-trigger-hover-bg: rgba(0,0,0,.04);
  --lang-menu-bg: #ffffff;
  --lang-menu-border: rgba(31,41,55,.10);
  --lang-menu-text: var(--brand-primary, var(--ink));
  --lang-menu-hover-bg: rgba(0,0,0,.06);
  --lang-menu-active-bg: rgba(0,0,0,.10);
}
.lang-switch-trigger {
  min-width: 62px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: var(--lang-trigger-bg);
  color: var(--lang-trigger-text);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), opacity 0.3s var(--ease);
}
.lang-switch-trigger:hover {
  background: var(--lang-trigger-hover-bg);
  color: var(--lang-trigger-text);
}
.lang-switch-trigger:focus {
  outline: 3px solid var(--imarina-yellow);
  outline-offset: 2px;
}
.lang-switch-caret {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}
.lang-switch.is-open .lang-switch-caret {
  transform: rotate(-135deg) translateY(-1px);
}
.lang-switch-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border-radius: 16px;
  background: var(--lang-menu-bg);
  border: 1px solid var(--lang-menu-border);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 38px rgba(0,0,0,.24);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease), transform 0.3s var(--ease);
  z-index: 1210;
}
.lang-switch.is-open .lang-switch-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.lang-switch-option {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--lang-menu-text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.lang-switch-option:hover {
  background: var(--lang-menu-hover-bg);
  color: var(--lang-menu-text);
}
.lang-switch-option.is-active {
  background: var(--lang-menu-active-bg);
  color: var(--lang-menu-text);
}
.lang-switch-current,
.lang-switch-caret {
  color: inherit;
  opacity: 1;
}
.social-links { display: flex; gap: 16px; align-items: center; }
.social-links a {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,.15); color: white;
  text-decoration: none; font-size: 16px; transition: all 0.3s var(--ease); backdrop-filter: blur(10px);
}
.topbar.scrolled .social-links a { background: transparent; color: var(--muted); border: 2px solid var(--border); }
.social-links a:hover { background: var(--imarina-yellow); color: var(--imarina-navy); transform: translateY(-2px); }
.topbar.scrolled .social-links a:hover { background: var(--imarina-cyan); color: white; border-color: var(--imarina-cyan); }
.social-links a:focus { outline: 3px solid var(--imarina-yellow); outline-offset: 2px; }

/* Nav Overlay */
.nav-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
  background: linear-gradient(135deg, var(--imarina-navy) 0%, var(--imarina-blue) 50%, var(--imarina-cyan) 100%);
  z-index: 2000; opacity: 0; visibility: hidden; transition: all 0.4s var(--ease);
}
.nav-overlay.active { opacity: 1; visibility: visible; }
.nav-content {
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; position: relative;
  padding: 80px 24px; overflow-y: auto;
}
.nav-close {
  position: absolute; top: 40px; right: 40px; background: transparent; border: none;
  color: white; font-size: 36px; cursor: pointer; width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center; transition: all 0.3s var(--ease);
}
.nav-close:hover { color: var(--imarina-yellow); transform: rotate(90deg); }
.nav-close:focus { outline: 3px solid var(--imarina-yellow); outline-offset: 4px; }
.nav-menu { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; align-items: center; justify-items: center; }
.nav-menu li { opacity: 0; transform: translateY(30px); transition: all 0.4s var(--ease); }
.nav-overlay.active .nav-menu li { opacity: 1; transform: translateY(0); }
.nav-overlay.active .nav-menu li:nth-child(1)  { transition-delay: 0.05s; }
.nav-overlay.active .nav-menu li:nth-child(2)  { transition-delay: 0.08s; }
.nav-overlay.active .nav-menu li:nth-child(3)  { transition-delay: 0.11s; }
.nav-overlay.active .nav-menu li:nth-child(4)  { transition-delay: 0.14s; }
.nav-overlay.active .nav-menu li:nth-child(5)  { transition-delay: 0.17s; }
.nav-overlay.active .nav-menu li:nth-child(6)  { transition-delay: 0.20s; }
.nav-overlay.active .nav-menu li:nth-child(7)  { transition-delay: 0.23s; }
.nav-overlay.active .nav-menu li:nth-child(8)  { transition-delay: 0.26s; }
.nav-overlay.active .nav-menu li:nth-child(9)  { transition-delay: 0.29s; }
.nav-overlay.active .nav-menu li:nth-child(10) { transition-delay: 0.32s; }
.nav-overlay.active .nav-menu li:nth-child(11) { transition-delay: 0.35s; }
.nav-overlay.active .nav-menu li:nth-child(12) { transition-delay: 0.38s; }
.nav-link {
  font-family: var(--font-display); font-size: clamp(18px, 3vw, 36px); font-weight: 900;
  color: white; text-decoration: none; letter-spacing: -.02em; transition: all 0.3s var(--ease);
  position: relative; padding: 8px 16px; display: inline-block; text-align: center;
}
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 24px; right: 24px; height: 4px;
  background: var(--imarina-yellow); transform: scaleX(0); transition: transform 0.3s var(--ease);
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link:hover { color: var(--imarina-yellow); text-shadow: 0 0 20px rgba(254,179,0,.4); }
.nav-link:focus { outline: 3px solid var(--imarina-yellow); outline-offset: 8px; }

/* HERO */
.hero-section {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  min-height: 100vh;
  min-height: 100svh;
  height: auto;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, var(--imarina-navy) 0%, var(--imarina-blue) 50%, var(--imarina-cyan) 100%);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
  opacity: 0.45; filter: contrast(1.05) brightness(1.1);
}
.hero-section > .container {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: var(--topbar-h-large);
  padding-bottom: 16px;
}
.hero {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  padding: 0 0 8px;
}
.hero-content-center {
  text-align: center;
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  transform: translateY(clamp(64px, 10vh, 132px));
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.8vw, 68px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.03em;
  margin: 0 0 clamp(28px, 4.4vh, 44px);
  color: var(--imarina-yellow);
}
.hero h1 .hero-year {
  display: block;
  margin-top: 2px;
}
.hero-chapter-name {
  display: block;
  margin: 0 0 clamp(10px, 1.6vh, 16px);
  color: rgba(255,255,255,.92);
  font-family: var(--font-display);
  font-size: clamp(12px, .9vw, 15px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero p {
  font-family: var(--font-body);
  font-size: clamp(14px, 1vw, 17px);
  line-height: 1.38;
  margin: 0;
  max-width: 760px;
  font-weight: 400;
  margin-left: auto;
  margin-right: auto;
}
.hero-subtitle-toggle {
  margin-top: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
.hero-subtitle-toggle:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.65);
}
.hero-cta { display: none; }
.btn {
  padding: 16px 40px;
  font-family: var(--font-display); font-size: 16px;
  text-transform: uppercase; letter-spacing: .08em;
  font-weight: 800; cursor: pointer; border: none;
  transition: all 0.3s var(--ease);
}
.btn.primary {
  background: var(--imarina-yellow); color: var(--imarina-navy);
  border-bottom: 4px solid var(--imarina-yellow-dark);
}
.btn.primary:hover { background: var(--imarina-yellow-dark); border-bottom-color: var(--imarina-navy); }
.btn.secondary {
  background: transparent; border: 2px solid white; border-bottom-width: 4px; color: white;
}
.btn.secondary:hover { background: white; color: var(--imarina-navy); border-color: white; }

.hero-scroll-indicator {
  position: relative;
  left: 0; right: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 14px;
  padding-bottom: 22px;
  gap: 10px;
  color: var(--imarina-yellow);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
  animation: bounce 2.2s ease-in-out infinite;
  background: none;
  text-shadow: 0 1px 3px rgba(0,0,0,.25);
  padding-top: 8px;
}
.hero-scroll-indicator svg { width: 28px; height: 28px; fill: var(--imarina-yellow); filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--theme-surface-dark-mid) 86%, rgba(255,255,255,.18));
  color: #fff;
  box-shadow: 0 14px 34px rgba(0,0,0,.24);
  backdrop-filter: blur(12px);
  cursor: pointer;
  z-index: 80;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease), background .25s var(--ease);
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background: color-mix(in srgb, var(--color-2, var(--imarina-blue)) 82%, rgba(255,255,255,.18));
  transform: translateY(-2px);
}
.back-to-top:focus {
  outline: 3px solid var(--imarina-yellow);
  outline-offset: 3px;
}
.back-to-top i { font-size: 16px; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

section { scroll-margin-top: calc(var(--topbar-h-small) + 32px); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; gap: 24px; flex-wrap: wrap; }
/* ── Tipografía compartida: todos los títulos h2 de sección ── */
.section-header h2,
.org-title,
.pub-title,
.projects-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(36px, 5vw, 50px); letter-spacing: -.03em; line-height: 1.1;
}
.section-header h2 { color: var(--imarina-navy); }
@media (prefers-color-scheme: dark) { .section-header h2 { color: var(--imarina-cyan); } }

.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 0;
  font-family: var(--font-display); font-size: 11px; font-weight: 800;
  background: var(--imarina-cyan); color: white; border: 0; border-left: 3px solid var(--imarina-yellow);
  text-transform: uppercase; letter-spacing: .1em;
}
.badge.yellow { background: var(--imarina-yellow); color: var(--imarina-navy); border-left-color: var(--imarina-navy); }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--imarina-yellow); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }


.feature-blocks { display: grid; gap: 0; margin-top: 48px; }
.feature-block { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch; background: var(--paper); min-height: 500px; }
.feature-block.reverse .feature-image { order: 2; }
.feature-block.reverse .feature-content { order: 1; }
.feature-image { overflow: hidden; position: relative; height: 100%; }
.feature-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.feature-block:hover .feature-image img { transform: scale(1.08); }
.feature-content { padding: 64px; display: flex; flex-direction: column; justify-content: center; background: var(--paper); }
.feature-content h3 { font-family: var(--font-display); font-size: clamp(28px, 4vw, 48px); font-weight: 900; margin-bottom: 20px; letter-spacing: -.03em; color: var(--imarina-navy); line-height: 1.1; }
@media (prefers-color-scheme: dark) { .feature-content h3 { color: var(--imarina-cyan); } }
.feature-content p { font-family: var(--font-body); font-size: 17px; line-height: 1.7; color: var(--muted); margin-bottom: 28px; }
.tags { display: flex; flex-wrap: wrap; gap: 0; }
.tag { padding: 10px 20px; font-family: var(--font-display); font-size: 10px; font-weight: 800; background: transparent; color: var(--imarina-cyan); border: 0; border-left: 3px solid var(--imarina-cyan); text-transform: uppercase; letter-spacing: .1em; margin-right: 20px; margin-bottom: 8px; }
.tag.yellow { color: var(--imarina-yellow-dark); border-left-color: var(--imarina-yellow); }
.tag.blue { color: var(--imarina-blue); border-left-color: var(--imarina-blue); }

.full-image-section {
  width: 100%; height: 750px; overflow: hidden; position: relative; background: var(--theme-surface-dark-mid);
}
.full-image-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--color-2, var(--brand-primary, #0071BA)) 52%, transparent) 0%,
    color-mix(in srgb, var(--color-2, var(--brand-primary, #0071BA)) 32%, transparent) 45%,
    color-mix(in srgb, var(--color-2, var(--brand-primary, #0071BA)) 18%, transparent) 100%
  );
  pointer-events: none;
  z-index: 1;
}
.full-image-section img {
  position: absolute;
  left: 0;
  top: -28%;
  z-index: 0;
  width: 100%;
  height: 156%;
  object-fit: cover;
  display: block;
  transform: translateY(var(--parallax-shift, 0px)) scale(1.12);
  transition: transform .12s linear;
  will-change: transform;
}
.full-image-section .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,56,87,.88) 0%, rgba(0,56,87,.4) 50%, transparent 100%);
  display: flex; align-items: center;
  /* alinea el texto con el grid de max-width:1280 */
  padding: 0 max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  z-index: 2;
}
.full-image-section .text-content { max-width: 700px; color: white; }
.full-image-section .full-image-title { font-family: var(--font-display); font-size: clamp(36px, 6vw, 72px); font-weight: 900; margin-bottom: 20px; line-height: 1; letter-spacing: -.03em; }
.full-image-section p { font-family: var(--font-body); font-size: 19px; line-height: 1.6; opacity: .95; }

.service-card { background: var(--paper); border: 0; border-left: 6px solid var(--imarina-blue); border-radius: 0; box-shadow: 0 2px 8px rgba(0,0,0,.04); overflow: hidden; margin-bottom: 32px; }
.service-header { padding: 24px 32px; background: transparent; border-bottom: 1px solid var(--border); }
.service-header h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .5px; }
.service-header .meta { font-size: 14px; color: var(--muted); font-weight: 600; }
.accordion { border-bottom: 1px solid var(--border); }
.accordion:last-child { border-bottom: none; }
.accordion-trigger { width: 100%; padding: 20px 32px; border: none; background: transparent; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: all .3s var(--ease); text-align: left; font-family: inherit; }
.accordion-trigger:hover { background: rgba(0,193,223,.04); border-left: 4px solid var(--imarina-cyan); padding-left: 28px; }
.accordion-trigger:focus { outline: 3px solid var(--imarina-cyan); outline-offset: -3px; background: rgba(0,193,223,.06); }
.accordion-trigger .title { font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .5px; }
.accordion-trigger .count { font-size: 14px; color: var(--muted); font-weight: 600; margin-right: 14px; text-transform: uppercase; }
.accordion-trigger .icon { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; transition: all .3s var(--ease); font-size: 16px; flex-shrink: 0; color: var(--muted); }
.accordion.open > .accordion-trigger .icon { transform: rotate(180deg); color: var(--imarina-cyan); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.accordion.open > .accordion-content { max-height: 12000px; }
.accordion-body { padding: 0 32px 24px 32px; }
.item { padding: 20px; background: transparent; border: 0; border-left: 3px solid var(--border); margin-bottom: 16px; transition: all .3s var(--ease); }
.item:hover { border-left-color: var(--imarina-yellow); background: linear-gradient(90deg, rgba(254,179,0,.03), transparent); transform: translateX(4px); }
.item-text { font-size: 14px; line-height: 1.7; color: var(--ink); font-weight: 500; margin-bottom: 14px; }
.item-links { display: flex; gap: 14px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; font-weight: 700; background: transparent; color: var(--imarina-blue); border: 0; border-left: 2px solid var(--imarina-blue); transition: all .3s var(--ease); text-decoration: none; text-transform: uppercase; letter-spacing: .5px; }
.chip:hover { background: var(--imarina-blue); color: white; transform: translateX(2px); }
.chip:focus { outline: 3px solid var(--imarina-yellow); outline-offset: 2px; }
.chip--doi { color: var(--imarina-blue); border-left-color: var(--imarina-blue); }
.chip--doi:hover { background: var(--imarina-blue); color: #fff; }
.chip--handle { color: var(--imarina-cyan); border-left-color: var(--imarina-cyan); }
.chip--handle:hover { background: var(--imarina-cyan); color: #fff; }
.chip--pid { color: var(--imarina-yellow-dark); border-left-color: var(--imarina-yellow); }
.chip--pid:hover { background: var(--imarina-yellow); color: var(--imarina-navy); }
.chip.cyan { color: var(--imarina-cyan); border-left-color: var(--imarina-cyan); }
.chip.cyan:hover { background: var(--imarina-cyan); color: white; }
.chip.yellow { color: var(--imarina-yellow-dark); border-left-color: var(--imarina-yellow); }
.chip.yellow:hover { background: var(--imarina-yellow); color: var(--imarina-navy); }

.footer {
  --footer-bg: var(--theme-surface-dark-mid);
  --footer-text: #ffffff;
  --footer-muted: rgba(255,255,255,.72);
  margin-top: 0;
  padding: 250px 0 42px;
  border-top: none;
  background:
    radial-gradient(ellipse 70% 35% at 50% 0%, rgba(255,255,255,.06), transparent 100%),
    radial-gradient(ellipse 55% 65% at 10% 55%, rgba(var(--theme-surface-glow-alt-rgb), .18), transparent 60%),
    radial-gradient(ellipse 50% 55% at 90% 80%, rgba(var(--theme-surface-glow-rgb), .22), transparent 55%),
    linear-gradient(135deg, var(--theme-surface-dark-mid) 0%, var(--theme-surface-dark-end) 45%, var(--theme-surface-dark-start) 100%);
  color: var(--footer-text);
  font-size: 14px;
  font-weight: 600;
  min-height: 560px;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 56px;
  align-items: center;
}
.footer-address,
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-self: center;
}
.footer-logo {
  width: min(240px, 62vw);
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
}
.footer-logo--color { display: none; }
.footer.footer--light-bg .footer-logo--light { display: none; }
.footer.footer--light-bg .footer-logo--color { display: block; }
.footer-address-line {
  margin: 0;
  color: var(--footer-text);
  font-family: var(--font-display);
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.3;
  text-align: left;
}
.footer-brand {
  display: flex;
  align-items: center;
  justify-self: start;
}
.footer-social {
  display: flex;
  justify-self: end;
}
.footer-social[hidden] {
  display: none;
}
.footer-social-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.footer-social-link {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--footer-text);
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.06);
  transition: all .3s var(--ease);
}
.footer-social-link:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.40);
  color: #fff;
}
.footer-legal {
  margin-top: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  justify-content: center;
}
.footer-legal-logo {
  width: min(104px, 30vw);
  height: auto;
  display: block;
  opacity: .92;
  margin-top: 40px;
}
.footer-badge--legal {
  justify-self: center;
}
.footer-badge--legal .footer-badge-img {
  width: min(96px, 24vw);
}
.footer-badge-link {
  display: inline-flex;
}
.footer-badge-img {
  width: min(108px, 28vw);
  height: auto;
  display: block;
  box-shadow: 0 10px 32px rgba(0,0,0,.18);
}
.footer-copyright {
  margin: 10px 0 0;
  color: var(--footer-muted);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 760px) {
  .footer {
    margin-top: 72px;
    padding: 110px 0 30px;
    min-height: 430px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 26px;
    text-align: center;
    justify-items: center;
  }
  .footer-address,
  .footer-contact,
  .footer-brand,
  .footer-social {
    align-items: center;
    justify-self: center;
  }
  .footer-address-line {
    text-align: center;
  }
  .footer-legal {
    margin-top: 130px;
    gap: 0;
  }
  .footer-legal-logo {
    margin-top: 28px;
  }
  .footer-copyright {
    margin-top: 8px;
  }
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 46px;
    height: 46px;
  }
}

.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.active { opacity: 1; transform: translateY(0); }

.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; }

/* ─── Section layout: wrap (full-width) + constrained inner section ─── *
  *   .{name}-wrap   → width: 100% (background layer, zero cost if no bg)  *
  *   > section      → max-width centered, uniform padding                  */
.org-wrap, .tecnologia-wrap, .servicios-wrap { width: 100%; }
.org-wrap > .org-section { position: relative; overflow: hidden; }
.org-wrap > .org-section,
.tecnologia-wrap > #tecnologia,
.servicios-wrap > #servicios { max-width: var(--max); margin: 0 auto; padding: 80px var(--gutter); }
.org-header { padding: 30px 0 20px 0; margin-bottom: 100px; }
.org-title {
  position: relative; display: block; text-align: center;
  color: var(--imarina-navy); margin-bottom: 30px;
}
@media (prefers-color-scheme: dark) { .org-title { color: var(--ink); } }
.org-subtitle {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #dff1ff;
  margin: 72px auto 44px;
}
.org-subtitle--panels {
  margin: 46px auto 40px;
}
.section-intro {
  width: min(920px, 100%);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-intro--h2 {
  margin-top: clamp(12px, 1.8vw, 18px);
  margin-bottom: clamp(60px, 2.2vw, 100px);
}
.section-intro--h3,
.section-intro--h3Secondary {
  margin-top: clamp(10px, 1.4vw, 16px);
  margin-bottom: clamp(60px, 2.2vw, 100px);
}
.section-intro--h3 {
  width: min(840px, 100%);
}
.section-intro p {
  margin: 0;
  font-size: clamp(14px, 1.12vw, 17px);
  line-height: 1.58;
  color: rgba(255,255,255,.72);
}
.section-intro--h3 p,
.section-intro--h3Secondary p {
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.5;
  color: rgba(255,255,255,.62);
}
.section-intro p + p {
  margin-top: 6px;
}
.section-intro--h3 p + p,
.section-intro--h3Secondary p + p {
  margin-top: 5px;
}
.finance-section-wrap[data-theme="light"] .section-intro p,
.servicios-wrap[data-theme="light"] .section-intro p,
.people-wrap[data-theme="light"] .section-intro p,
.projects-wrap[data-theme="light"] .section-intro p,
.innov-section-wrap[data-theme="light"] .section-intro p,
.openscience-section-wrap[data-theme="light"] .section-intro p,
.news-section-wrap[data-theme="light"] .section-intro p,
.recognitions-section-wrap[data-theme="light"] .section-intro p,
.teaching-section-wrap[data-theme="light"] .section-intro p {
  color: color-mix(in srgb, var(--ink) 58%, transparent);
}
.finance-section-wrap[data-theme="light"] .section-intro--h3 p,
.servicios-wrap[data-theme="light"] .section-intro--h3 p,
.people-wrap[data-theme="light"] .section-intro--h3 p,
.projects-wrap[data-theme="light"] .section-intro--h3 p,
.innov-section-wrap[data-theme="light"] .section-intro--h3 p,
.openscience-section-wrap[data-theme="light"] .section-intro--h3 p,
.news-section-wrap[data-theme="light"] .section-intro--h3 p,
.recognitions-section-wrap[data-theme="light"] .section-intro--h3 p,
.teaching-section-wrap[data-theme="light"] .section-intro--h3 p,
.finance-section-wrap[data-theme="light"] .section-intro--h3Secondary p,
.servicios-wrap[data-theme="light"] .section-intro--h3Secondary p,
.people-wrap[data-theme="light"] .section-intro--h3Secondary p,
.projects-wrap[data-theme="light"] .section-intro--h3Secondary p,
.innov-section-wrap[data-theme="light"] .section-intro--h3Secondary p,
.openscience-section-wrap[data-theme="light"] .section-intro--h3Secondary p,
.news-section-wrap[data-theme="light"] .section-intro--h3Secondary p,
.recognitions-section-wrap[data-theme="light"] .section-intro--h3Secondary p,
.teaching-section-wrap[data-theme="light"] .section-intro--h3Secondary p {
  color: color-mix(in srgb, var(--ink) 48%, transparent);
}
.org-title .org-birds {
  position: absolute; top: -26px; right: -70px;
  width: 200px; height: auto; opacity: .07;
  pointer-events: none; z-index: -1; filter: blur(.16px);
}
.org-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 40px; margin-top: 100px; }
.org-section--has-kpis-subtitle .org-kpis { margin-top: 24px; }
.org-kpi { text-align: center; }
.org-kpi .num { font-family: var(--font-display); font-weight: 900; font-size: clamp(40px, 5vw, 64px); line-height: 1; color: var(--ink); }
.org-kpi .label { margin-top: 8px; font-family: var(--font-display); font-size: 14px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.org-subgroups { width: min(1100px, 100%); margin: 0 auto 60px; }
.org-subgroup { display: flex; flex-direction: column; gap: 20px; padding: clamp(30px, 3vw, 48px) 0; }
.org-subgroup + .org-subgroup { border-top: 1px solid rgba(255,255,255,.09); }
.org-subgroup:last-child { border-bottom: none; }
.org-subgroup-name { font-family: var(--font-display); font-size: clamp(13px, 1.1vw, 16px); font-weight: 700; color: var(--imarina-cyan, #5cc8ff); letter-spacing: .01em; line-height: 1.3; }
.org-subgroup-kpis { display: flex; flex-wrap: nowrap; gap: clamp(20px, 3.5vw, 70px); }
.org-subgroup-kpis .org-kpi { text-align: left; }
.org-subgroup-kpis .org-kpi .num { font-size: clamp(40px, 5vw, 64px); }

.org-icons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-bottom: 40px; align-items: center; text-align: center; }
.org-icons.org-icons--count-1 {
  grid-template-columns: minmax(220px, 320px);
  justify-content: center;
}
.org-icons.org-icons--count-2 {
  grid-template-columns: repeat(2, minmax(220px, 320px));
  justify-content: center;
}
.org-icon svg { width: 36px; height: 36px; color: var(--imarina-cyan); margin-bottom: 14px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.08)); }
.org-icon.big svg { width: 48px; height: 48px; color: var(--imarina-yellow); }
.org-icon .caption { font-family: var(--font-display); font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.2; }
.org-panels { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 24px; }
.org-panels.org-panels--count-1 {
  grid-template-columns: minmax(320px, 560px);
  justify-content: center;
}
.org-panels.org-panels--count-2 {
  grid-template-columns: repeat(2, minmax(280px, 420px));
  justify-content: center;
}
.org-panel { background: var(--paper); border: 1px solid var(--border); padding: 38px 32px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.org-panel h3 { font-size: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 16px; }
.org-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; margin-top: 22px; }
.org-item { border-left: 4px solid var(--imarina-cyan); padding-left: 14px; }
.org-panel.center .org-item { border-left-color: var(--imarina-yellow); }
.org-panel.right .org-item { border-left-color: var(--imarina-blue); }
.org-item .name { font-weight: 700; font-size: 14px; color: var(--ink); line-height: 1.4; }
.org-item .meta { font-size: clamp(14px, 1vw, 14px); font-weight: 600; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

@media (max-width: 1024px) {
  .feature-block { grid-template-columns: 1fr; min-height: auto; }
  .feature-image { min-height: 350px; }
  .feature-content { padding: 40px 24px; }
  .full-image-section { height: 350px; }
  .full-image-section .overlay { padding: 0 24px; }
  .org-kpis { grid-template-columns: repeat(2, 1fr); }
  .org-icons { grid-template-columns: 1fr; }
  .org-panels { grid-template-columns: 1fr; }
  .org-title .org-birds { right: -30px; top: -18px; width: 170px; }
  .org-subtitle { margin: 52px auto 30px; }
  .org-subtitle--panels { margin: 34px auto 28px; }
  .org-subgroup-kpis { flex-wrap: wrap; }
}
@media (max-width: 768px) {
  :root {
    --topbar-h-large: 96px;
    --topbar-h-small: 64px;
  }
  .topbar-inner { grid-template-columns: auto 1fr auto; gap: 16px; }
  .topbar-actions { gap: 10px; }
  .lang-switch-trigger {
    min-width: 54px;
    height: 34px;
    padding: 0 10px;
    font-size: 11px;
  }
  .lang-switch-menu {
    min-width: 64px;
    padding: 5px;
  }
  .lang-switch-option {
    min-height: 30px;
    padding: 0 8px;
    font-size: 11px;
  }
  .brand-text { font-size: 24px; }
  .topbar.scrolled .brand-text { font-size: 18px; }
  .social-links a { width: 36px; height: 36px; font-size: 14px; }
  .nav-link { font-size: clamp(16px, 6vw, 28px); }
  .nav-close { top: 24px; right: 24px; font-size: 28px; width: 48px; height: 48px; }
  .hero-scroll-indicator { display: flex; }
  .hero-section > .container { padding-bottom: 10px; }
  .hero { padding-top: 0; }
  .hero-content-center {
    max-width: 34rem;
    transform: translateY(clamp(32px, 8vh, 72px));
  }
  .hero h1 { font-size: clamp(32px, 8.2vw, 52px); }
  .hero-chapter-name {
    font-size: clamp(11px, 1.8vw, 13px);
    letter-spacing: .06em;
    margin-bottom: 10px;
  }
  .hero p {
    font-size: clamp(13px, 2vw, 15px);
    line-height: 1.34;
    max-width: 32rem;
  }
}

@media (max-height: 820px) {
  .hero-section > .container { padding-bottom: 8px; }
  .hero { padding-top: 0; }
  .hero-content-center {
    transform: translateY(clamp(24px, 5vh, 48px));
  }
  .hero h1 {
    font-size: clamp(30px, 5.2vw, 54px);
    margin-bottom: 0;
  }
  .hero-chapter-name {
    font-size: clamp(10px, .85vw, 12px);
    margin: 18px 0 10px;
  }
  .hero p {
    font-size: clamp(13px, .92vw, 16px);
    line-height: 1.3;
    max-width: 34rem;
  }
  .hero-scroll-indicator {
    margin-top: 2px;
    padding-bottom: 4px;
    gap: 2px;
    font-size: 8px;
  }
}

@media (max-height: 700px) {
  .hero-section > .container { padding-top: var(--topbar-h-small); }
  .hero { align-items: center; }
  .hero-content-center {
    transform: translateY(clamp(12px, 3vh, 24px));
  }
  .hero h1 { font-size: clamp(26px, 4.6vw, 42px); }
  .hero-chapter-name {
    font-size: 10px;
    margin: 16px 0 8px;
  }
  .hero p {
    font-size: 12px;
    line-height: 1.25;
    max-width: 30rem;
  }
  .hero-scroll-indicator { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ========================================
    PUBLICACIONES — NUEVO DISEÑO CON BLOBS
======================================== */

/* Faja full-width que extiende el fondo navy de lado a lado */
.pub-section-wrap {
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 80% at 15% 50%, rgba(0,193,223,.18), transparent 55%),
    radial-gradient(ellipse 55% 70% at 85% 40%, rgba(254,179,0,.10), transparent 55%),
    radial-gradient(ellipse 70% 60% at 55% 100%, rgba(0,113,186,.20), transparent 60%),
    linear-gradient(135deg, var(--imarina-navy) 0%, #004a7a 55%, var(--imarina-blue) 100%);
  padding: clamp(60px, 8vw, 100px) 0;
}

.pub-section {
  position: relative;
  overflow: visible;
  border-radius: 0;
  padding: 0 var(--gutter);
  color: #fff;
  background: transparent;
  box-shadow: none;
  max-width: var(--max);
  margin: 0 auto;
}

/* Título de la sección */
.pub-title {
  text-align: center; color: #fff;
  margin: 0 0 clamp(40px, 5vw, 64px);
}
.pub-subtitle {
  color: rgba(255,255,255,.82);
  margin: -10px auto 40px;
}
.events-subtitle {
  color: rgba(255,255,255,.82);
  margin: -10px auto 40px;
}

/* Layout principal: blob total arriba + fila inferior */
.pub-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(56px, 8vw, 90px);
}

/* --- BLOB TOTAL (grande, central) --- */
.pub-blob-total {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(580px, 82vw);
  aspect-ratio: 600 / 360;
}
.pub-blob-total svg.blob-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pub-blob-total .blob-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.pub-blob-total .pub-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .90;
}
.pub-blob-total .pub-icon svg {
  width: clamp(40px, 5vw, 60px);
  height: clamp(40px, 5vw, 60px);
  color: #fff;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.25));
}

.pub-blob-total .pub-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 8vw, 100px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,.25);
}

/* --- FILA INFERIOR: blob artículos + círculos indicadores --- */
.pub-bottom-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 4vw, 56px);
  flex-wrap: wrap;
}

/* Artículos originales */
.pub-blob-articles {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: clamp(114px, 13vw, 150px);
  aspect-ratio: 1 / 1;
}
.pub-blob-articles svg.blob-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.pub-blob-articles .blob-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}
.pub-blob-articles .art-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 3.5vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.20);
}
.pub-blob-articles .art-label {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink, #00205B);
  margin-top: 4px;
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

/* Separador vertical entre blob artículos y círculos */
.pub-divider {
  width: 1px;
  height: 80px;
  background: rgba(255,255,255,.20);
  flex-shrink: 0;
}

/* Círculos de indicadores */
.pub-rings {
  display: flex;
  gap: clamp(16px, 2.5vw, 32px);
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.pub-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pub-ring .ring-label {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.80);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}
.pub-ring .ring-label.is-mid {
  font-size: clamp(13px, 1.2vw, 16px);
  letter-spacing: .12em;
}
.pub-ring .ring-label.is-long {
  font-size: clamp(13px, 1.2vw, 16px);
  letter-spacing: .12em;
}

.pub-ring .ring-circle {
  width: clamp(72px, 9vw, 100px);
  height: clamp(72px, 9vw, 100px);
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s var(--ease);
  cursor: default;
}

.pub-ring:hover .ring-circle {
  border-color: rgba(255,255,255,.80);
  background: rgba(255,255,255,.12);
  transform: scale(1.06);
}

.pub-ring .ring-val {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(20px, 2.5vw, 30px);
  letter-spacing: -0.02em;
  color: #fff;
}

.pub-detail-card {
  margin-top: clamp(36px, 5vw, 56px);
}
.pub-detail-hd {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  margin-top: clamp(56px, 8vw, 96px);
}
.pub-detail-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: rgba(254,179,0,.15);
  color: var(--color-4, #FEB300);
}
.pub-detail-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-4, #FEB300);
  margin: 0;
}
.pub-detail-wrap {
  margin-top: 18px;
  position: relative;
  overflow: visible;
}
.pub-detail-wrap,
.pub-ancestor-body,
.pub-detail-wrap .pub-detail-card,
.pub-detail-card .pub-entity-accordion,
.pub-detail-card .accordion,
.pub-detail-card .accordion-content,
.pub-detail-card .accordion-body,
.pub-detail-card .item {
  width: 100%;
  box-sizing: border-box;
}
.pub-ancestor-title {
  margin: 0 0 14px;
  padding: 0 0 0 14px;
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(16px, 1.7vw, 24px);
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: rgba(255,255,255,.92);
  line-height: 1.2;
}
.pub-ancestor-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: .08em;
  width: 4px;
  height: 1.05em;
  border-radius: 3px;
  background: var(--imarina-cyan);
  opacity: .9;
}
.pub-ancestor-accordion {
  border-bottom: none;
  margin-bottom: 10px;
}
.pub-ancestor-trigger {
  padding: 0 0 0 14px;
  min-height: 46px;
  background: transparent;
  border-left: none;
  border-radius: 10px;
  transition: background .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.pub-ancestor-trigger:hover {
  padding-left: 14px;
  border-left: none;
  background: rgba(255,255,255,.03);
}
.pub-ancestor-trigger .title {
  position: relative;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: rgba(255,255,255,.92);
  line-height: 1.2;
}
.pub-ancestor-trigger .title::before {
  content: "";
  position: absolute;
  left: -14px;
  top: .08em;
  width: 4px;
  height: 1.05em;
  border-radius: 3px;
  background: var(--imarina-cyan);
  opacity: .9;
}
.pub-ancestor-body {
  padding: 8px 0 0;
}
.pub-ancestor-accordion.open > .pub-ancestor-trigger {
  background: linear-gradient(90deg, rgba(255,255,255,.10) 0%, rgba(var(--proj-color-1-rgb, 0,113,186), .28) 100%);
  box-shadow: inset 0 0 0 1px rgba(var(--proj-color-1-rgb, 0,113,186), .42), 0 10px 26px rgba(0,0,0,.10);
}
.pub-ancestor-accordion.open > .pub-ancestor-trigger .title {
  color: #fff;
}
.pub-ancestor-accordion.open > .pub-ancestor-trigger .title::before {
  opacity: 1;
  box-shadow: 0 0 0 4px rgba(var(--proj-color-1-rgb, 0,113,186), .18);
}
.pub-entity-accordion {
  border-bottom: none;
}
.pub-entity-trigger {
  border-bottom: 1px solid rgba(0,0,0,.10);
  border-radius: 0;
  transition: background .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.pub-entity-accordion.open .pub-entity-trigger {
  border-bottom-color: rgba(0,0,0,.12);
  background: linear-gradient(90deg, rgba(255,255,255,.10) 0%, rgba(var(--proj-color-1-rgb, 0,113,186), .24) 100%);
  box-shadow: inset 0 0 0 1px rgba(var(--proj-color-1-rgb, 0,113,186), .40), 0 8px 24px rgba(0,0,0,.10);
}
.pub-entity-trigger .title {
  font-size: clamp(16px, 1.45vw, 21px);
  font-weight: 800;
}
.pub-entity-trigger .count {
  text-transform: none;
  letter-spacing: .02em;
  margin-top: 6px;
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 700;
}
.pub-detail-wrap .pub-detail-card {
  margin-top: 0;
  margin-bottom: 18px;
}
.pub-detail-card .service-header {
  border-bottom-color: rgba(0,0,0,.10);
}
.pub-detail-card .accordion-trigger {
  align-items: center;
}
.pub-detail-card .accordion-trigger .title {
  font-weight: 700;
}
.pub-detail-card .accordion-trigger .count {
  font-size: clamp(14px, 1vw, 14px);
  font-weight: 600;
}
.pub-detail-card .pub-entity-trigger > div:first-child,
.pub-detail-card .pub-entity-trigger .title,
.pub-detail-card .pub-entity-trigger .count {
  transition: transform .25s var(--ease);
}
.pub-detail-card .pub-entity-trigger:hover > div:first-child,
.pub-detail-card .pub-entity-trigger:hover .title,
.pub-detail-card .pub-entity-trigger:hover .count {
  transform: translateX(4px);
}

.pub-detail-card .pub-entity-accordion > .accordion-content > .accordion > .accordion-trigger {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 32px;
  padding-right: 32px;
}
.pub-section-wrap .accordion-trigger .icon {
  transform: rotate(180deg);
}
.pub-section-wrap .accordion.open > .accordion-trigger .icon {
  transform: rotate(0deg);
}
.pub-detail-card .item {
  margin-bottom: 14px;
}
.pub-detail-card .item:last-child {
  margin-bottom: 0;
}
.pub-detail-card .pub-entity-trigger .title {
  font-weight: 700;
}
.pub-detail-card .pub-entity-trigger .count {
  font-size: clamp(14px, 1vw, 13px);
  font-weight: 600;
  color: var(--muted);
}
.pub-entity-accordion.open .pub-entity-trigger .title {
  color: #fff;
}
.pub-entity-accordion.open .pub-entity-trigger .count {
  color: rgba(255,255,255,.78);
}
.pub-detail-card .item-links .chip {
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  line-height: 1.35;
  /* #0071BA sobre fondo oscuro = 2.83:1 ❌ → cyan = ~9:1 ✅ */
  color: var(--imarina-cyan);
  border-left-color: var(--imarina-cyan);
}
.pub-detail-card .item-text strong a,
.pub-detail-card .item-text strong a:hover,
.pub-detail-card .item-text strong a:focus,
.pub-detail-card .item-text strong a:visited {
  color: inherit;
  text-decoration: none;
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="light"] .pub-detail-card .item-links .chip {
  color: var(--imarina-blue);
  border-left-color: var(--imarina-blue);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="light"] .pub-detail-card .item-links .chip:hover {
  background: var(--color-2, var(--imarina-blue));
  color: #fff;
  border-left-color: var(--color-2, var(--imarina-blue));
}
.pub-detail-card .pub-item-meta {
  color: var(--ink);
  font-weight: 400;
  font-style: italic;
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="light"] .pub-ancestor-title {
  color: var(--ink);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="light"] .pub-detail-title {
  color: var(--color-2, #004B87);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="light"] .pub-detail-hd {
  border-bottom-color: var(--border);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="light"] .pub-detail-icon {
  background: rgba(0,75,135,.10);
  color: var(--color-2, #004B87);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="light"] .pub-ancestor-title::before {
  background: var(--imarina-blue);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="light"] .pub-ancestor-trigger .title {
  color: var(--ink);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="light"] .pub-ancestor-trigger .title::before {
  background: var(--imarina-blue);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="light"] .pub-ancestor-accordion.open > .pub-ancestor-trigger {
  background: rgba(0, 113, 186, .08);
  box-shadow: none;
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="light"] .pub-ancestor-accordion.open > .pub-ancestor-trigger .title {
  color: var(--ink);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="light"] .pub-ancestor-accordion.open > .pub-ancestor-trigger .title::before {
  box-shadow: none;
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="light"] .pub-entity-accordion.open .pub-entity-trigger {
  background: rgba(0, 113, 186, .06);
  box-shadow: none;
  border-bottom-color: rgba(0, 113, 186, .20);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="light"] .pub-entity-accordion.open .pub-entity-trigger .title {
  color: var(--ink);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="light"] .pub-entity-accordion.open .pub-entity-trigger .count {
  color: var(--muted);
}
.pub-detail-card .pub-ancestor-meta {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  margin: 2px 0 14px;
}
.pub-detail-card .pub-item-authors {
  color: var(--muted);
  font-weight: 500;
  display: block;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Open Access icon inline */
.oa-icon {
  width: 16px; height: 16px;
  vertical-align: middle;
  opacity: .85;
}

/* Responsive */
@media (max-width: 680px) {
  .pub-divider { display: none; }
  .pub-bottom-row { flex-direction: column; gap: 32px; }
  .pub-rings { gap: 16px; }
}

/* ========================================
    FINANCIACIÓN — SECTION
======================================== */
.finance-section-wrap {
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 70% at 8% 25%, rgba(0,193,223,.14), transparent 55%),
    radial-gradient(ellipse 50% 60% at 92% 75%, rgba(254,179,0,.09), transparent 55%),
    linear-gradient(140deg, var(--imarina-navy) 0%, #002944 55%, #003d5c 100%);
}
.finance-section {
  position: relative;
  color: #fff;
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px var(--gutter) 24px;
}
.finance-title {
  text-align: center;
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(36px, 5vw, 50px); letter-spacing: -.03em;
  color: #fff; line-height: 1.1;
  margin: 0 0 clamp(40px, 5vw, 64px);
}
.finance-layout {
  display: flex;
  flex-direction: column;
  gap: clamp(40px,6vw,64px);
}
/* Breakdown */
.finance-breakdown { display: flex; flex-direction: column; gap: 20px; }
.fin-cat {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  overflow: hidden;
  transition: background .3s var(--ease);
}
.fin-cat:hover { background: rgba(255,255,255,.09); }
.fin-cat-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  padding: 30px 36px 26px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.fin-cat-name {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(16px,1.8vw,20px); letter-spacing: .06em;
  text-transform: uppercase; flex: 1;
}
.fin-cat--structural .fin-cat-name { color: var(--imarina-yellow); }
.fin-cat--rdi        .fin-cat-name { color: var(--imarina-cyan); }
.fin-cat--other      .fin-cat-name { color: #5ecfef; }
.fin-cat-amounts { display: flex; align-items: center; gap: 14px; }
.fin-cat-eur {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(17px,2vw,22px); color: #fff;
}
.fin-cat-pct {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(13px,1.4vw,16px); padding: 6px 18px; border-radius: 50px;
}
.fin-cat--structural .fin-cat-pct { background: var(--fin-bg-struct, var(--imarina-yellow)); color: var(--fin-text-struct, #3a2600); }
.fin-cat--rdi        .fin-cat-pct { background: var(--fin-bg-rdi,    var(--imarina-cyan));   color: var(--fin-text-rdi,    #003045); }
.fin-cat--other      .fin-cat-pct { background: var(--fin-bg-other,  var(--imarina-blue));   color: var(--fin-text-other,  #fff); }
.fin-cat-items { padding: 22px 36px 30px; display: grid; gap: 14px; }
.fin-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fin-item-name { font-size: clamp(13px,1.5vw,16px); font-weight: 500; line-height: 1.4; flex: 1; }
.fin-cat--structural .fin-item-name { color: rgba(var(--fin-item-struct-rgb, 254,179,0),.82); }
.fin-cat--rdi        .fin-item-name { color: rgba(var(--fin-item-rdi-rgb,    0,193,223),.82); }
.fin-cat--other      .fin-item-name { color: rgba(var(--fin-item-other-rgb,  94,207,239),.82); }
.fin-item-amounts { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: clamp(13px,1.5vw,16px); font-weight: 700; color: #fff; }
.fin-item-amounts em {
  font-style: normal; font-weight: 700; font-size: clamp(11px,1.2vw,14px);
  padding: 3px 11px; border-radius: 20px;
}
.fin-cat--structural .fin-item-amounts em { background: rgba(var(--fin-item-struct-rgb, 254,179,0),.18); color: var(--imarina-yellow); }
.fin-cat--rdi        .fin-item-amounts em { background: rgba(var(--fin-item-rdi-rgb,    0,193,223),.18); color: var(--imarina-cyan); }
.fin-cat--other      .fin-item-amounts em { background: rgba(var(--fin-item-other-rgb,  94,207,239),.28); color: var(--imarina-blue); }
.fin-total {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 36px;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px; margin-top: 4px;
}
.fin-total-label {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(16px, 1.8vw, 20px);
  letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.65);
}
.fin-total-eur {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(24px,3vw,38px); color: #fff; letter-spacing: -.02em;
}
/* Charts */
.finance-charts { display: flex; flex-direction: column; gap: 36px; align-items: center; }
.fin-chart-main-wrap {
  position: relative;
  width: min(320px, 90%);
  aspect-ratio: 1;
}
.fin-chart-center {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center; pointer-events: none;
}
.fin-chart-center-total {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(18px,2.6vw,28px); color: #fff; line-height: 1; letter-spacing: -.02em;
}
.fin-chart-center-label {
  font-size: 11px; font-weight: 700; letter-spacing: .10em;
  text-transform: uppercase; color: rgba(255,255,255,.60); margin-top: 6px;
}
.fin-chart-legend {
  display: flex; flex-direction: column; gap: 6px; width: 100%;
  padding: 0 4px;
}
.fin-legend-item {
  display: flex; align-items: center; gap: 8px;
}
.fin-legend-dot {
  width: 13px; height: 13px; border-radius: 50%; flex-shrink: 0;
}
.fin-legend-text { font-size: 16px; font-weight: 600; color: rgba(255,255,255,.80); flex: 1; }
.fin-legend-pct { font-size: 16px; font-weight: 900; color: #fff; }
.fin-chart-row { display: flex; flex-direction: column; gap: 36px; align-items: center; width: 100%; }
.fin-chart-secondary-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(280px, 90%); }
.fin-chart-secondary-label {
  font-family: var(--font-display); font-size: clamp(11px,1.3vw,14px); font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.65);
  text-align: center; line-height: 1.5;
}
/* Expenses */
.fin-expenses {
  margin-top: clamp(48px,6vw,72px);
  padding-top: clamp(36px,4vw,48px);
  border-top: 1px solid rgba(255,255,255,.14);
}
.fin-expenses-header { display: flex; align-items: baseline; gap: 20px; margin-bottom: 36px; }
.fin-expenses-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(26px,3.5vw,42px); color: #fff; letter-spacing: -.02em;
}
.fin-expenses-total {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(14px,1.6vw,18px); color: rgba(255,255,255,.58);
}
.fin-expenses-bars { display: grid; gap: 20px; max-width: 900px; }
.fin-expense-item {
  display: grid;
  grid-template-columns: 180px 1fr 150px 64px;
  align-items: center; gap: 18px;
}
.fin-expense-name {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(14px,1.6vw,17px); color: rgba(255,255,255,.85); white-space: nowrap;
}
.fin-expense-track { height: 10px; background: rgba(255,255,255,.12); border-radius: 6px; overflow: hidden; }
.fin-expense-fill { height: 100%; border-radius: 6px; }
.fin-expense-eur {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(13px,1.4vw,16px); color: rgba(255,255,255,.68); text-align: right; white-space: nowrap;
}
.fin-expense-pct {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(14px,1.6vw,17px); color: #fff; text-align: right;
}
@media (max-width: 600px) {
  .fin-expense-item { grid-template-columns: 120px 1fr 48px; }
  .fin-expense-eur { display: none; }
}

/* ---- Visual chart layout (3 cols) ---- */
.fin-visual-layout {
  display: grid;
  grid-template-columns: auto 200px 1fr;
  gap: 24px;
  align-items: center;
  margin-top: 48px;
}

/* Col 1: flex row — [left labels | canvas | bracket+label] */
.fin-col-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
}
/* Left column: Other income (top) + Structural (bottom) */
.fin-left-labels {
  display: flex; flex-direction: column;
  justify-content: space-between; align-items: flex-end;
  height: 220px;
  padding: 16px 16px 16px 0;
  flex-shrink: 0;
}
.fin-main-ring-wrap {
  position: relative;
  width: 220px; height: 220px;
  flex-shrink: 0;
}
.fin-ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none; text-align: center;
}
.fin-ring-center-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.55);
}
.fin-ring-center-total {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(14px,1.4vw,16px); color: #fff;
  letter-spacing: -.01em; line-height: 1.3; margin-top: 4px;
}
/* Bracket + label (right side of canvas) */
.fin-rdi-callout {
  display: flex; flex-direction: row; align-items: center;
}
.fin-rdi-bracket { flex-shrink: 0; }
.fin-rdi-text {
  display: flex; flex-direction: column; gap: 4px; padding-left: 10px;
}
/* Labels */
.fin-fl-label { display: flex; flex-direction: column; gap: 3px; }
.fin-fl-pct {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(16px,2vw,22px); line-height: 1; letter-spacing: -.02em;
}
.fin-fl-pct--other      { color: var(--imarina-cyan); }
.fin-fl-pct--structural { color: var(--imarina-yellow); }
.fin-fl-pct--rdi        { color: #e53e3e; }
.fin-fl-name {
  font-size: clamp(11px,1.2vw,13px); font-weight: 600; line-height: 1.4;
}
.fin-fl-name--other      { color: rgba(0,193,223,.78); }
.fin-fl-name--structural { color: rgba(254,179,0,.78); }
.fin-fl-name--rdi        { color: rgba(229,62,62,.80); }

/* Col 2: sub-donuts stacked */
.fin-col-sub {
  display: flex; flex-direction: column; gap: 28px; align-items: center;
}
.fin-sub-ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fin-sub-ring-label {
  font-family: var(--font-display); font-size: 10px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.58); text-align: center; line-height: 1.5;
}
.fin-sub-ring-canvas-wrap {
  position: relative; width: 160px; height: 160px;
}
.fin-ring-center--sm .fin-ring-center-label { font-size: 9px; }
.fin-ring-center--sm .fin-ring-center-total  { font-size: 11px; }

/* Col 3: data panels */
.fin-col-panels { display: flex; flex-direction: column; gap: 16px; }
.fin-panel {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px; padding: 20px 22px;
}
.fin-panel-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(14px,1.4vw,16px); color: #fff;
  margin-bottom: 14px; letter-spacing: -.01em;
}
.fin-panel-row {
  display: grid; grid-template-columns: 1fr auto auto;
  align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.02);
}
.fin-panel-row:last-child { border-bottom: none; }
.fin-pr-name  { font-size: clamp(14px,1.3vw,14px); font-weight: 700; }
.fin-pr-amount {
  font-size: clamp(11px,1.2vw,13px); font-weight: 500;
  color: rgba(255,255,255,.60); white-space: nowrap;
}
.fin-pr-pill {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(11px,1.2vw,13px);
  padding: 4px 11px; border-radius: 20px;
  color: #fff; white-space: nowrap; text-align: center; min-width: 58px;
}
@media (max-width: 1100px) {
  .fin-visual-layout { grid-template-columns: auto 1fr; }
  .fin-col-panels { display: none; }
}
@media (max-width: 760px) {
  .fin-visual-layout { grid-template-columns: 1fr; justify-items: center; }
  .fin-col-sub { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .fin-main-ring-wrap { width: 180px; height: 180px; }
  .fin-left-labels { height: 180px; }
  .fin-rdi-callout { display: none; }
}

/* ---- SVG Donuts (sin librería) ---- */
.fin-donut-svg   { display: block; width: 100%; height: 100%; }
.fin-donut-track { fill: none; stroke: rgba(255,255,255,.09); }
.fin-donut-seg   { fill: none; stroke-linecap: butt; transition: stroke-opacity .25s; }
.fin-donut-seg:hover { stroke-opacity: .72; cursor: default; }
.fin-main-ring-wrap .fin-donut-track,
.fin-main-ring-wrap .fin-donut-seg        { stroke-width: 30; }
.fin-sub-ring-canvas-wrap .fin-donut-track,
.fin-sub-ring-canvas-wrap .fin-donut-seg  { stroke-width: 22; }

@media (max-width:980px){ .fin2-note{display:none;} }

  .finance-sankey { position: relative; color: #fff; max-width: var(--max); margin: 0 auto;  padding: 0px var(--gutter) 80px; }
  .finance-sankey-wrap{width:100%;}
  .finance-sankey-svg{width:100%;height:auto;display:block;overflow:visible;}

  .finance-sankey-node{fill:rgba(255,255,255,.05);stroke:rgba(255,255,255,.10);stroke-width:1;}
  .finance-sankey-node--total{fill:rgba(255,255,255,.04);}
  .finance-sankey-node--rdi{fill:rgba(0,113,186,.14);stroke:rgba(0,113,186,.32);}
  .finance-sankey-node--struct{fill:rgba(254,179,0,.12);stroke:rgba(254,179,0,.28);}
  .finance-sankey-node--other{fill:rgba(0,193,223,.12);stroke:rgba(0,193,223,.28);}

  .finance-sankey-node--sourceA{fill:rgba(0,113,186,.12);stroke:rgba(0,113,186,.30);}
  .finance-sankey-node--sourceB{fill:rgba(0,163,191,.10);stroke:rgba(0,163,191,.28);}

  .finance-sankey-node--area{stroke-width:1;}

  .finance-sankey-link{fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:.85;
    filter:drop-shadow(0 10px 18px rgba(0,0,0,.22));
  }

  .finance-sankey-t-title{fill:#fff;font-family:var(--font-display);font-weight:900;font-size:16px;}
  .finance-sankey-t-value{fill:#fff;font-family:var(--font-display);font-weight:900;font-size:30px;}
  .finance-sankey-t-sub{fill:rgba(255,255,255,.82);font-family:var(--font-sans,Inter,system-ui);font-weight:700;font-size:16px;}
  .finance-sankey-t-mini{fill:rgba(255,255,255,.72);font-family:var(--font-sans,Inter,system-ui);font-weight:700;font-size:14px;}

  .finance-sankey-group{fill:rgba(255,255,255,.04);stroke:rgba(255,255,255,.10);stroke-width:1;}
  .finance-sankey-group-title{fill:rgba(255,255,255,.55);font-family:var(--font-sans,Inter,system-ui);
    font-weight:800;font-size:14px;letter-spacing:.08em;text-transform:uppercase;
  }
  .finance-sankey-group-sep{stroke:rgba(255,255,255,.14);stroke-width:1;stroke-dasharray:4 6;}

  /* (opcional) guías invisibles para debug */
  .finance-sankey-debug{stroke:rgba(255,255,255,.12);stroke-width:1;stroke-dasharray:3 6;}

/* ─── Finance Sankey — Mobile fallback ────────────────────────────── */
.fs-mobile {
  display: flex; flex-direction: column; gap: 20px;
  padding: 8px 0 16px;
  font-family: var(--font-sans, Inter, system-ui);
}
.fs-m-total {
  text-align: center;
  padding: 24px 16px 20px;
  background: rgba(255,255,255,.04);
  border-radius: 16px;
}
.fs-m-total-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: rgba(255,255,255,.55); text-transform: uppercase; margin-bottom: 8px;
}
.fs-m-total-value {
  font-family: var(--font-display); font-size: clamp(26px, 6vw, 38px);
  font-weight: 900; color: #fff; letter-spacing: -.02em;
}
.fs-m-breakdown {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px; background: rgba(255,255,255,.04); border-radius: 14px;
}
.fs-m-bd-item {
  display: flex; align-items: center; gap: 10px;
}
.fs-m-bd-dot {
  width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0;
}
.fs-m-bd-label {
  flex: 1; font-size: 16px; font-weight: 600; color: rgba(255,255,255,.88);
}
.fs-m-bd-pct {
  font-size: 16px; font-weight: 900; font-family: var(--font-display);
}
.fs-m-group {
  background: rgba(255,255,255,.04); border-radius: 14px; overflow: hidden;
}
.fs-m-group-title {
  font-size: 10px; font-weight: 800; letter-spacing: .10em; text-transform: uppercase;
  color: rgba(255,255,255,.45); padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,.02);
}
.fs-m-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.05);
}
.fs-m-row:last-child { border-bottom: none; }
.fs-m-row-bar {
  width: 4px; height: 32px; border-radius: 4px;
  background: var(--fs-color, #0071BA); flex-shrink: 0;
}
.fs-m-row-label {
  flex: 1; font-size: 16px; font-weight: 700; color: #fff;
}
.fs-m-row-amt {
  font-size: 14px; font-weight: 600; color: rgba(255,255,255,.65); text-align: right;
}
.fs-m-area {
  display: grid; grid-template-columns: 10px 1fr auto auto;
  align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,.05);
}
.fs-m-area:last-child { border-bottom: none; }
.fs-m-area-dot {
  width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0;
}
.fs-m-area-label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.88); }
.fs-m-area-amt   { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.55); }
.fs-m-area-pct   {
  font-size: 13px; font-weight: 900; font-family: var(--font-display);
  color: var(--fs-color, #fff); min-width: 42px; text-align: right;
}

/* Light mode */
.finance-section-wrap[data-theme="light"] .fs-m-total       { background: rgba(0,0,0,.04); }
.finance-section-wrap[data-theme="light"] .fs-m-total-label { color: var(--muted); }
.finance-section-wrap[data-theme="light"] .fs-m-total-value { color: var(--ink); }
.finance-section-wrap[data-theme="light"] .fs-m-breakdown   { background: rgba(0,0,0,.04); }
.finance-section-wrap[data-theme="light"] .fs-m-bd-label    { color: var(--ink); }
.finance-section-wrap[data-theme="light"] .fs-m-group       { background: rgba(0,0,0,.04); }
.finance-section-wrap[data-theme="light"] .fs-m-group-title { color: var(--muted); border-bottom-color: rgba(0,0,0,.08); }
.finance-section-wrap[data-theme="light"] .fs-m-row         { border-bottom-color: rgba(0,0,0,.06); }
.finance-section-wrap[data-theme="light"] .fs-m-row-label   { color: var(--ink); }
.finance-section-wrap[data-theme="light"] .fs-m-row-amt     { color: var(--muted); }
.finance-section-wrap[data-theme="light"] .fs-m-area        { border-bottom-color: rgba(0,0,0,.06); }
.finance-section-wrap[data-theme="light"] .fs-m-area-label  { color: var(--ink); }
.finance-section-wrap[data-theme="light"] .fs-m-area-amt    { color: var(--muted); }

/* ─── People Section ──────────────────────────────────────────────── */
.people-wrap {
  width: 100%;
  background:
    radial-gradient(ellipse 55% 70% at 5%  40%, rgba(27,141,201,.13), transparent 55%),
    radial-gradient(ellipse 45% 60% at 95% 60%, rgba(178,146,93,.10), transparent 55%),
    linear-gradient(150deg, #001830 0%, var(--color-1) 50%, #002a44 100%);
}
.people-section {
  --color-4: #B8892C;
  --color-5: #667085;
  position: relative;
  color: #fff;
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--section-pad, 80px 24px);
}
.people-title {
  text-align: center;
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(36px, 5vw, 50px); letter-spacing: -.03em;
  margin: 0 0 clamp(40px, 5vw, 64px);
}

/* Layout */
.people-layout {
  display: flex;
  flex-direction: row;
  gap: clamp(32px, 4vw, 56px);
  align-items: flex-start;
}

/* ── Left: gender panel ── */
.people-gender-panel {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  position: static;
  width: 260px;
  flex-wrap: nowrap;
}
.people-gender-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.people-gender-circle {
  width: 120px; height: 120px;
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  transition: all .3s var(--ease);
  cursor: default;
}
.people-gender-w .people-gender-circle {
  border: 2.5px solid var(--color-3);
  background: color-mix(in srgb, var(--color-3) 12%, transparent);
}
.people-gender-m .people-gender-circle {
  border: 2.5px solid var(--color-4);
  background: color-mix(in srgb, var(--color-4) 12%, transparent);
}
.people-gender-o .people-gender-circle {
  border: 2.5px solid var(--color-5);
  background: color-mix(in srgb, var(--color-5) 12%, transparent);
}
.people-gender-w:hover .people-gender-circle {
  border-color: var(--color-3);
  background: color-mix(in srgb, var(--color-3) 28%, transparent);
  transform: scale(1.06);
}
.people-gender-m:hover .people-gender-circle {
  border-color: var(--color-4);
  background: color-mix(in srgb, var(--color-4) 28%, transparent);
  transform: scale(1.06);
}
.people-gender-o:hover .people-gender-circle {
  border-color: var(--color-5);
  background: color-mix(in srgb, var(--color-5) 28%, transparent);
  transform: scale(1.06);
}
.people-gender-sym { font-size: 22px; line-height: 1; opacity: .8; }
.people-gender-w .people-gender-sym { color: var(--color-3); }
.people-gender-m .people-gender-sym { color: var(--color-4); }
.people-gender-o .people-gender-sym { color: var(--color-5); }
.people-gender-num {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(28px, 3vw, 30px); line-height: 1;
}
.people-gender-w .people-gender-num { color: var(--color-3); }
.people-gender-m .people-gender-num { color: var(--color-4); }
.people-gender-o .people-gender-num { color: var(--color-5); }
.people-gender-pct  { font-size: 16px; font-weight: 600; opacity: .9; }
.people-gender-label { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; opacity: .80; }

/* Donut */
.people-donut-wrap {
  width: 184px; height: 184px;
  transition: transform .3s var(--ease);
  cursor: default;
}
.people-donut-wrap:hover { transform: scale(1.06); }
.people-donut-svg  { width: 100%; height: 100%; }
.people-donut-label {
  fill: rgba(255,255,255,.7);
  font-family: var(--font-sans, Inter, system-ui); font-weight: 700;
  font-size: 16px; letter-spacing: 2px; text-transform: uppercase;
}
.people-donut-value {
  fill: #fff;
  font-family: var(--font-display); font-weight: 900; font-size: 42px;
}

/* ── Right: bars panel ── */
.people-bars-panel {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  margin: 0;
  overflow-x: hidden;
  padding-top: 0;
}
.people-bars-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  margin-bottom: 14px;
}
.people-bars-head-label {
  font-size: 16px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; opacity: .8;
}
.people-legend {
  display: flex; align-items: center; gap: 6px;
  font-size: 16px; opacity: .9;
}
.people-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.people-bars-list {
  display: flex; flex-direction: column; gap: 28px;
  max-height: 620px; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
  padding-right: 4px;
}
.people-bars-list::-webkit-scrollbar { width: 4px; }
.people-bars-list::-webkit-scrollbar-track { background: transparent; }
.people-bars-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }

.people-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 210px) 1fr 44px 38px;
  gap: 10px; align-items: center;
}
.people-bar-name {
  font-size: 16px; color: rgba(255,255,255,.88);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.people-bar-track {
  display: flex; height: 34px; border-radius: 17px;
  overflow: hidden; background: rgba(255,255,255,.06);
}
.people-bar-w,
.people-bar-m,
.people-bar-o {
  display: flex; align-items: center; justify-content: center;
  gap: 3px; padding: 0 5px;
  overflow: hidden; white-space: nowrap;
  width: 0;
  transition: width 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  min-width: 0;
}
.people-bar-w {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--color-3) 92%, white) 0%,
    var(--color-3) 58%,
    color-mix(in srgb, var(--color-3) 90%, black) 100%
  );
}
.people-bar-m {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--color-4) 92%, white) 0%,
    var(--color-4) 58%,
    color-mix(in srgb, var(--color-4) 90%, black) 100%
  );
}
.people-bar-o {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--color-5) 92%, white) 0%,
    var(--color-5) 58%,
    color-mix(in srgb, var(--color-5) 90%, black) 100%
  );
}
/* Texto en barras — configurable por cliente via --people-bar-text */
/* Default: #141414 sobre #43ACE5 = 7.25:1 ✅ · sobre #FEB300 = ~11:1 ✅ */
.people-bar-w .people-bar-pct,
.people-bar-w .people-bar-n   { color: var(--people-bar-text, #141414); }
.people-bar-m .people-bar-pct,
.people-bar-m .people-bar-n   { color: var(--people-bar-text, #141414); }
.people-bar-o .people-bar-pct,
.people-bar-o .people-bar-n   { color: var(--people-bar-text, #141414); }
.people-bar-pct { font-size: 13px; font-weight: 700; }
.people-bar-n   { font-size: 14px; }
.people-bar-total { font-size: 16px; font-weight: 700; text-align: right; color: rgba(255,255,255,.95); }
.people-bar-share { font-size: 13px; text-align: right; color: rgba(255,255,255,.7); }

@media (max-width: 768px) {
  .people-layout {
    flex-direction: column;
    gap: 24px;
  }
  .people-gender-panel {
    flex: none;
    width: 100%;
    flex-direction: row;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
  }
  .people-bars-panel {
    padding-top: 0;
  }
  .people-bar-row { grid-template-columns: minmax(90px, 1fr) 2fr 36px 32px; gap: 7px; }
  .people-bars-list { max-height: 330px; }
}

/* ========================================
    PROYECTOS — SECTION
======================================== */
.projects-wrap {
  width: 100%;
  background:
    radial-gradient(ellipse 55% 65% at 8% 45%,  rgba(0,113,186,.18),  transparent 55%),
    radial-gradient(ellipse 40% 50% at 92% 55%, rgba(0,193,223,.11),  transparent 55%),
    linear-gradient(155deg, #001525 0%, #001e38 55%, #002840 100%);
}
.projects-section {
  position: relative; color: #fff;
  max-width: var(--max); margin: 0 auto; padding: 80px var(--gutter);
}
.projects-title { margin: 0 0 clamp(40px, 5vw, 64px); text-align: center; }
.projects-layout {
  display: flex; gap: clamp(40px, 6vw, 80px); align-items: flex-start; overflow: visible;
}

/* ── Left stats panel ── */
.proj-stats-panel {
  flex: 0 0 210px;
  display: flex; flex-direction: column; gap: 0;
  position: relative; overflow: visible;
}
/* Sin tronco de panel — las conexiones verticales las gestionan las tarjetas */
.proj-stats-panel::before { display: none; }

/* Total — nodo raíz */
.proj-total-card {
  position: relative;
  background: linear-gradient(135deg, var(--color-3) 0%, rgba(0,90,160,.85) 100%);
  border-radius: 20px; padding: 28px 24px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 8px 32px rgba(27,141,201,.30);
  margin-bottom: 20px;
}
/* Línea centrada: baja desde el centro-inferior del Total hasta el card de Activos */
.proj-total-card::before {
  content: '';
  position: absolute;
  left: 50%; top: 100%; transform: translateX(-50%);
  width: 2px; height: 20px; border-radius: 0;
  background: rgba(255,255,255,.28);
}
.proj-total-card::after { display: none; }

.proj-total-lbl {
  font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; opacity: .9;
}
.proj-total-num {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(38px, 4vw, 54px); line-height: 1;
}

/* Stats — nodos hijos con caja redondeada */
.proj-stat {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 14px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  margin-bottom: 14px;
}
.proj-stat:last-child { margin-bottom: 0; }
.proj-stat--active { margin-bottom: 0; }
.proj-stats-panel--with-new .proj-stat--active { margin-bottom: 64px; }
.proj-stat--new    { padding: 10px 14px; }

/* Obtenidos — sub-elemento más pequeño */
.proj-stat--new { opacity: .80; }
.proj-stat--new .proj-stat-num {
  font-size: clamp(18px, 2vw, 24px);
}
.proj-stat--new .proj-stat-lbl {
  font-size: 14px;
}

/* Sin conectores por defecto */
.proj-stat::before { display: none; }
.proj-stat::after  { display: none; }

/* Activos → vertical hacia Obtenidos (misma height que margin-bottom) */
.proj-stats-panel--with-new .proj-stat--active::before {
  content: '';
  display: block;
  position: absolute;
  left: 50%; transform: translateX(-50%);
  top: 100%;
  width: 2px; height: 64px;
  background: rgba(255,255,255,.28);
}
/* Activos → horizontal que SALE del borde derecho de la caja y alcanza el tronco de grupos */
.proj-stat--active::after {
  content: '';
  display: block;
  position: absolute;
  left: 100%; top: 50%; transform: translateY(-50%);
  width: calc(clamp(40px, 6vw, 80px) + 14px);
  height: 2px;
  background: rgba(255,255,255,.28);
  z-index: 0; pointer-events: none;
}

.proj-stat-icon {
  font-size: 20px; font-weight: 900; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; width: 24px;
  position: relative; z-index: 1;
}
.proj-stat--active .proj-stat-icon { color: var(--color-3); }
.proj-stat--new    .proj-stat-icon { color: rgba(255,255,255,.45); }
.proj-stat-num {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(24px, 3vw, 34px); line-height: 1; display: block;
  position: relative; z-index: 1;
}
.proj-stat-lbl {
  font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; opacity: .80; display: block; margin-top: 4px;
  position: relative; z-index: 1;
}

/* ── Right groups panel (árbol) ── */

/* NIVEL 0 — Tronco principal que une todos los grupos */
.proj-groups {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  position: relative;
  padding-left: 60px;
}
.proj-groups::before { display: none; }

/* NIVEL 1 — Nodo de grupo */
.proj-group {
  position: relative;
  display: flex; flex-direction: row; gap: 24px; align-items: flex-start;
  padding-bottom: 36px;
}
.proj-group:last-child { padding-bottom: 0; }

/* Dot coloreado — centrado en x=14px del tronco (60-55+7=12) */
.proj-group::after {
  content: '';
  position: absolute;
  left: -55px; top: 19px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--proj-color);
  box-shadow: 0 0 14px rgba(var(--proj-rgb),.6);
  z-index: 1;
}
/* Conector vertical entre dots — mismo x que el dot (center -48px desde grupo) */
.proj-group:not(:last-child)::before {
  content: '';
  position: absolute;
  left: -49px;
  top: 26px;
  bottom: -26px;
  width: 2px;
  background: rgba(255,255,255,.20);
  z-index: 0;
}
/* Rama horizontal: del tronco (x≈14px) al inicio de la cabecera (x=60px) → 48px */
.proj-group-head { position: relative; }
.proj-group-head::before {
  content: '';
  position: absolute;
  left: -48px; top: 25px;
  width: 48px; height: 2px;
  background: linear-gradient(to right, rgba(255,255,255,.15), var(--proj-color));
}

.proj-group-head {
  display: flex; align-items: center; gap: 16px;
  flex: 0 0 180px; /* ancho fijo para alinear items de todos los grupos */
}
.proj-group-icon {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  background: rgba(var(--proj-rgb),.12); border: 1.5px solid rgba(var(--proj-rgb),.28);
  display: flex; align-items: center; justify-content: center;
  color: var(--proj-color); transition: all .3s var(--ease);
}
.proj-group:hover .proj-group-icon { background: rgba(var(--proj-rgb),.22); transform: scale(1.06); }
.proj-group-icon svg { width: 22px; height: 22px; }
.proj-group-info { display: flex; flex-direction: column; gap: 2px; }
.proj-group-label {
  font-size: 14px; font-weight: 700; text-transform: uppercase;
  opacity: .8;
}
.proj-group-total {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(28px, 3.5vw, 42px); line-height: 1; color: #fff;
}

/* NIVEL 2 — Hojas (sub-items): a la derecha de la cabecera */
.proj-group-items {
  flex: 1;
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  padding-left: 0;
}
/* Tronco: va del centro del primer item al centro del último (item height ≈ 46px, centro ≈ 23px) */
.proj-group-items::before { display: none; }

/* Cada hoja */
.proj-item {
  position: relative;
  display: grid; grid-template-columns: 56px 1fr auto;
  align-items: center; gap: 14px;
  padding: 11px 16px 11px 14px;
  border-radius: 10px;
  background: rgba(var(--proj-rgb),.10); border: 1px solid rgba(var(--proj-rgb),.25);
  transition: background .25s, border-color .25s;
}
.proj-item:hover { background: rgba(var(--proj-rgb),.18); border-color: rgba(var(--proj-rgb),.40); }
.proj-item::before { display: none; }
.proj-item::after  { display: none; }

.proj-item-badge {
  border-radius: 8px; padding: 6px 10px; text-align: center;
  font-family: var(--font-display); font-weight: 900; font-size: 16px; line-height: 1;
}
.proj-item-label  { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.82); }
.proj-item-amount { font-size: 14px; font-weight: 700; text-align: right; white-space: nowrap; }

@media (max-width: 768px) {
  .projects-layout   { flex-direction: column; }
  .proj-stats-panel  { flex: none; width: 100%; position: static; flex-direction: column; gap: 0; }
  .proj-total-card   { width: 100%; margin-bottom: 14px; }
  .proj-stat--active { margin-bottom: 14px; }
  /* Ocultar conectores en móvil */
  .proj-total-card::before,
  .proj-stat--active::before,
  .proj-stat--active::after { display: none; }
  .proj-groups         { padding-left: 90px; }
  .proj-groups::before { left: 24px; width: 4px; }
  .proj-group::after   { left: -71px; }
  .proj-group::before  { left: -62px; width: 62px; }
  /* En móvil: items debajo del padre, no a la derecha */
  .proj-group          { flex-direction: column; gap: 14px; }
  .proj-group-head     { min-width: 0; }
  .proj-group-items    { margin-left: 48px; }
  .proj-item { grid-template-columns: 48px 1fr auto; gap: 10px; }
}

/* ========================================
   NOTICIAS — SECTION
======================================== */
.news-section-wrap {
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 70% at 8% 25%, rgba(0,193,223,.14), transparent 55%),
    radial-gradient(ellipse 50% 60% at 92% 75%, rgba(254,179,0,.09), transparent 55%),
    linear-gradient(140deg, var(--imarina-navy) 0%, #002944 55%, #003d5c 100%);
}
.news-section {
  position: relative;
  color: #fff;
  max-width: 900px;
  margin: 0 auto;
  padding: 80px var(--gutter);
}
.section-subtitle {
  text-align: center;
  font-size: clamp(14px, 1.8vw, 18px);
  color: rgba(255,255,255,.85);
  max-width: 780px;
  margin: -16px auto clamp(28px, 4vw, 48px);
  line-height: 1.6;
}
[data-theme="light"] .section-subtitle { color: rgba(0,0,0,.65); }
.news-title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(36px, 5vw, 50px);
  letter-spacing: -.03em;
  color: #fff;
  line-height: 1.1;
  margin: 0 0 clamp(40px, 5vw, 64px);
}
.news-months { display: grid; gap: 18px; }
.news-month {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.news-month-title {
  margin: 0 0 10px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(254,179,0,.24);
  color: var(--imarina-yellow);
  font-family: var(--font-display);
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 800;
  line-height: 1;
}
.news-list { list-style: none; display: grid; gap: 6px; padding-left: 22px; }
.news-item {
  display: block;
}
.news-date {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  padding-top: 2px;
}
.news-text {
  position: relative;
  padding-left: 14px;
  font-size: clamp(13px, .95vw, 16px);
  font-weight: 450;
  line-height: 1.45;
  color: rgba(255,255,255,.93);
}
.news-text::before {
  content: "";
  position: absolute;
  left: 0;
  top: .60em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--imarina-yellow);
}
.news-text a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.35);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.news-text a:hover {
  color: #fff;
  border-bottom-color: var(--imarina-yellow);
}
.news-empty {
  color: rgba(255,255,255,.7);
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}
@media (max-width: 760px) {
  .news-item { display: block; }
  .news-date { font-size: 11px; padding-top: 0; }
}

/* ================================================================
   SECTION THEMING — light / dark overrides via [data-theme]
   Aplicado por base.js según config.json sections.[key].theme
================================================================ */

/* ── Fondo + variables CSS: cualquier wrapper con data-theme="light" */
.org-wrap[data-theme="light"],
.pub-section-wrap[data-theme="light"],
.servicios-wrap[data-theme="light"],
.people-wrap[data-theme="light"],
.projects-wrap[data-theme="light"],
.finance-section-wrap[data-theme="light"],
.innov-section-wrap[data-theme="light"],
.events-section-wrap[data-theme="light"],
.recognitions-section-wrap[data-theme="light"],
.teaching-section-wrap[data-theme="light"],
.openscience-section-wrap[data-theme="light"],
.news-section-wrap[data-theme="light"] {
  --paper:  #ffffff;
  --ink:    #1A202C;
  --muted:  #4A5568;
  --border: #E2E8F0;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8edf5 100%);
}
.innov-section-wrap[data-theme="light"] .innov-section    { color: var(--ink); }
.innov-section-wrap[data-theme="light"] .innov-main-title { color: var(--ink); }
.innov-section-wrap[data-theme="light"] .innov-block-hd   { border-bottom-color: var(--border); }
.innov-section-wrap[data-theme="light"] .innov-block-title { color: var(--color-2, #004B87); }
.innov-section-wrap[data-theme="light"] .innov-block-icon  { color: var(--color-2, #004B87); }
.innov-section-wrap[data-theme="light"] .innov-row        { border-bottom-color: rgba(0,0,0,.05); }
.innov-section-wrap[data-theme="light"] .innov-row-label  { color: var(--muted); }
.innov-section-wrap[data-theme="light"] .innov-row-desc strong { color: var(--ink); }
.innov-section-wrap[data-theme="light"] .innov-row-desc span   { color: var(--muted); }
.innov-section-wrap[data-theme="light"] .innov-sep        { color: rgba(0,0,0,.40); }

/* ── PUBLICACIONES — tema light ─────────────────────────────────── */
/* Título de sección y valores de los círculos → oscuros */
.pub-section-wrap[data-theme="light"] .pub-title,
.pub-section-wrap[data-theme="light"] .ring-val { color: var(--ink); }
.pub-section-wrap[data-theme="light"] .ring-label { color: var(--muted); }
/* Blob total → fondo coloreado, texto siempre blanco */
.pub-section-wrap[data-theme="light"] .pub-divider { background: var(--border); }
.pub-section-wrap[data-theme="light"] .ring-circle {
  border-color: rgba(27,141,201,.25);
  background: rgba(27,141,201,.10);
  backdrop-filter: none;
}
.pub-section-wrap[data-theme="light"] .ring-circle:hover {
  border-color: rgba(27,141,201,.50);
  background: rgba(27,141,201,.18);
}
.pub-section-wrap[data-theme="light"] .pub-icon {
  opacity: 1;
}
.pub-section-wrap[data-theme="light"] .pub-icon svg { color: #fff; }

/* ── FINANCIACIÓN — tema light ──────────────────────────────────── */
.finance-section-wrap[data-theme="light"] {
  background: linear-gradient(135deg, #f0f4f8 0%, #e8edf5 100%);
}
.finance-section-wrap[data-theme="light"] .finance-section { color: var(--ink); }
.finance-section-wrap[data-theme="light"] .finance-title   { color: var(--ink); }
.finance-section-wrap[data-theme="light"] .fin-cat {
  background: var(--paper);
  border-color: var(--border);
}
.finance-section-wrap[data-theme="light"] .fin-cat:hover { background: #f5f7fa; }
.finance-section-wrap[data-theme="light"] .fin-cat-header { border-bottom-color: var(--border); }
.finance-section-wrap[data-theme="light"] .fin-cat-eur,
.finance-section-wrap[data-theme="light"] .fin-item-amounts { color: var(--ink); }
.finance-section-wrap[data-theme="light"] .fin-total {
  background: var(--paper);
  border-color: var(--border);
}
.finance-section-wrap[data-theme="light"] .fin-total-label { color: var(--muted); }
.finance-section-wrap[data-theme="light"] .fin-total-eur   { color: var(--ink); }
.finance-section-wrap[data-theme="light"] .fin-chart-center-total,
.finance-section-wrap[data-theme="light"] .fin-ring-center-total { color: var(--ink); }
.finance-section-wrap[data-theme="light"] .fin-chart-center-label,
.finance-section-wrap[data-theme="light"] .fin-ring-center-label { color: var(--muted); }
/* Sankey — SVG fills/strokes */
.finance-section-wrap[data-theme="light"] .finance-sankey { color: var(--ink); }
.finance-section-wrap[data-theme="light"] .finance-sankey-node          { fill: #fff; stroke: rgba(0,0,0,.10); }
.finance-section-wrap[data-theme="light"] .finance-sankey-node--total   { fill: #fff; }
.finance-section-wrap[data-theme="light"] .finance-sankey-node--rdi     { fill: rgba(0,113,186,.12); stroke: rgba(0,113,186,.26); }
.finance-section-wrap[data-theme="light"] .finance-sankey-node--struct  { fill: rgba(254,179,0,.14); stroke: rgba(254,179,0,.30); }
.finance-section-wrap[data-theme="light"] .finance-sankey-node--other   { fill: rgba(0,193,223,.14); stroke: rgba(0,193,223,.28); }
.finance-section-wrap[data-theme="light"] .finance-sankey-node--sourceA { fill: rgba(0,113,186,.10); stroke: rgba(0,113,186,.24); }
.finance-section-wrap[data-theme="light"] .finance-sankey-node--sourceB { fill: rgba(0,163,191,.10); stroke: rgba(0,163,191,.24); }
.finance-section-wrap[data-theme="light"] .finance-sankey-t-title       { fill: var(--ink); }
.finance-section-wrap[data-theme="light"] .finance-sankey-t-value       { fill: var(--ink); }
.finance-section-wrap[data-theme="light"] .finance-sankey-t-sub         { fill: var(--muted); }
.finance-section-wrap[data-theme="light"] .finance-sankey-t-mini        { fill: var(--muted); }
.finance-section-wrap[data-theme="light"] .finance-sankey-group         { fill: #fff; stroke: rgba(0,0,0,.08); }
.finance-section-wrap[data-theme="light"] .finance-sankey-group-title   { fill: var(--muted); }
.finance-section-wrap[data-theme="light"] .finance-sankey-group-sep     { stroke: var(--border); }

/* ── PERSONAL — tema light ──────────────────────────────────────── */
.people-wrap[data-theme="light"] {
  background: linear-gradient(135deg, #f0f4f8 0%, #e8edf5 100%);
}
.people-wrap[data-theme="light"] .people-section { color: var(--ink); }
.people-wrap[data-theme="light"] .people-title   { color: var(--ink); }
.people-wrap[data-theme="light"] .people-bars-head { border-bottom-color: var(--border); }
.people-wrap[data-theme="light"] .people-bar-name  { color: var(--ink); }
.people-wrap[data-theme="light"] .people-bar-track { background: rgba(0,0,0,.08); }
.people-wrap[data-theme="light"] .people-bars-list {
  scrollbar-color: rgba(0,0,0,.18) transparent;
}
.people-wrap[data-theme="light"] .people-bars-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,.18); }
.people-wrap[data-theme="light"] .people-bar-total { color: var(--ink); }
.people-wrap[data-theme="light"] .people-bar-share { color: var(--muted); }
.people-wrap[data-theme="light"] .people-donut-label { fill: var(--muted); }
.people-wrap[data-theme="light"] .people-donut-value { fill: var(--ink); }

/* ── PROYECTOS — tema light ─────────────────────────────────────── */
.projects-wrap[data-theme="light"] .projects-section { color: var(--ink); }
.projects-wrap[data-theme="light"] .projects-title   { color: var(--ink); }
/* Tarjeta TOTAL — fondo azul propio, texto siempre blanco */
.projects-wrap[data-theme="light"] .proj-total-card  { color: #fff; }
/* Número total de cada grupo (87 / 189 / 32) */
.projects-wrap[data-theme="light"] .proj-group-total { color: var(--ink); }
/* Etiqueta de los items */
.projects-wrap[data-theme="light"] .proj-item-label  { color: var(--ink); }
/* Tarjetas de stats (Activos / Obtenidos) */
.projects-wrap[data-theme="light"] .proj-stat {
  background: var(--paper);
  border-color: var(--border);
}
.projects-wrap[data-theme="light"] .proj-stat--new .proj-stat-icon { color: var(--muted); }
/* Líneas conectoras (pseudo-elementos con rgba blanco) */
.projects-wrap[data-theme="light"] .proj-total-card::before,
.projects-wrap[data-theme="light"] .proj-stat--active::before,
.projects-wrap[data-theme="light"] .proj-stat--active::after { background: var(--border); }
.projects-wrap[data-theme="light"] .proj-group:not(:last-child)::before { background: var(--border); }
.projects-wrap[data-theme="light"] .proj-group-head::before {
  background: linear-gradient(to right, var(--border), var(--proj-color));
}
.news-section-wrap[data-theme="light"] .news-title { color: var(--ink); }
.news-section-wrap[data-theme="light"] .news-month {
  background: transparent;
  border-color: transparent;
}
.news-section-wrap[data-theme="light"] .news-month-title {
  background: rgba(254,179,0,.20);
  color: #9a6500;
}
.news-section-wrap[data-theme="light"] .news-date { color: var(--muted); }
.news-section-wrap[data-theme="light"] .news-text { color: var(--ink); }
.news-section-wrap[data-theme="light"] .news-text::before { background: var(--color-2, #004B87); opacity: .9; }
.news-section-wrap[data-theme="light"] .news-text a { border-bottom-color: rgba(0,75,135,.30); }
.news-section-wrap[data-theme="light"] .news-text a:hover {
  color: var(--color-2, #004B87);
  border-bottom-color: var(--color-2, #004B87);
}
.news-section-wrap[data-theme="light"] .news-empty { color: var(--muted); }

/* ── Fondo unificado: cualquier wrapper con data-theme="dark" ─────── */
.org-wrap[data-theme="dark"],
.pub-section-wrap[data-theme="dark"],
.servicios-wrap[data-theme="dark"],
.people-wrap[data-theme="dark"],
.projects-wrap[data-theme="dark"],
.finance-section-wrap[data-theme="dark"],
.innov-section-wrap[data-theme="dark"],
.events-section-wrap[data-theme="dark"],
.news-section-wrap[data-theme="dark"] {
  background:
    radial-gradient(ellipse 55% 65% at 8% 45%, rgba(0,113,186,.18), transparent 55%),
    radial-gradient(ellipse 40% 50% at 92% 55%, rgba(0,193,223,.11), transparent 55%),
    linear-gradient(155deg, #001525 0%, #001e38 55%, #002840 100%);
}

/* ── ORG — tema dark: variables CSS + ajustes propios ───────────── */
.org-wrap[data-theme="dark"] {
  --paper:  rgba(255,255,255,.06);
  --ink:    #f0f4f8;
  --muted:  rgba(255,255,255,.55);
  --border: rgba(255,255,255,.12);
}
.org-wrap[data-theme="dark"] .org-title { color: var(--ink); }
.org-wrap[data-theme="dark"] .org-panel { box-shadow: none; }


/* ── SERVICIOS — tema dark: variables CSS ────────────────────────── */
.servicios-wrap[data-theme="dark"] {
  --paper:  rgba(255,255,255,.06);
  --ink:    #f0f4f8;
  --muted:  rgba(255,255,255,.55);
  --border: rgba(255,255,255,.12);
}

/* ── DETAIL compartido: Publications / Events / Innov / Teaching ── */
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="dark"] {
  --paper:  rgba(255,255,255,.06);
  --ink:    #f0f4f8;
  --muted:  rgba(255,255,255,.55);
  --border: rgba(255,255,255,.12);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="dark"] .pub-detail-title,
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="dark"] .pub-detail-icon {
  color: var(--theme-pub-title);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="dark"] .pub-detail-icon {
  background: color-mix(in srgb, var(--theme-pub-title) 16%, transparent);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="dark"] .pub-ancestor-title::before,
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="dark"] .pub-ancestor-trigger .title::before {
  background: var(--theme-pub-accent);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="dark"] .pub-detail-card {
  background: var(--theme-pub-card-bg);
  border-left-color: var(--theme-pub-accent);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="dark"] .pub-detail-card .service-header,
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="dark"] .pub-detail-card .pub-entity-trigger,
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="dark"] .pub-detail-card .accordion {
  border-bottom-color: rgba(var(--theme-pub-accent-rgb), .20);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="dark"] .pub-detail-card .item {
  background: var(--theme-pub-item-bg);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="dark"] .pub-detail-card .icon {
  color: var(--theme-pub-icon-idle);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="dark"] .accordion.open > .accordion-trigger .icon {
  color: var(--theme-pub-icon-open);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="dark"] .pub-detail-card .item-links .chip {
  color: var(--theme-pub-chip-text);
  border-left-color: var(--theme-pub-chip-text);
}
:is(.pub-section-wrap, .events-section-wrap, .innov-section-wrap, .teaching-section-wrap, .recognitions-section-wrap)[data-theme="dark"] .pub-detail-card .item-links .chip:hover {
  background: var(--theme-pub-chip-hover-bg);
  color: var(--theme-pub-chip-hover-text);
}

/* ================================================================
   INNOVACIÓN Y DOCENCIA
================================================================ */
.innov-section-wrap {
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 70% at 8% 25%, rgba(0,193,223,.14), transparent 55%),
    radial-gradient(ellipse 50% 60% at 92% 75%, rgba(254,179,0,.09), transparent 55%),
    linear-gradient(140deg, var(--imarina-navy) 0%, #002944 55%, #003d5c 100%);
}
.innov-section {
  position: relative;
  color: #fff;
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px var(--gutter);
}
.innov-main-title {
  text-align: center;
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(36px,5vw,50px); letter-spacing: -.03em;
  color: #fff; line-height: 1.1;
  margin: 0 0 clamp(40px,5vw,64px);
}
/* — Cards alineadas con fin-cat — */
.innov-blocks {
  display: flex; flex-direction: column; gap: 48px;
  max-width: 720px; margin: 0 auto; width: 100%;
}
.innov-block-hd {
  display: flex; align-items: center; gap: 14px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.innov-block-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.innov-block--innov .innov-block-icon { background: rgba(0,193,223,.18); color: var(--imarina-cyan); }
.innov-block--doc   .innov-block-icon { background: rgba(254,179,0,.15); color: var(--imarina-yellow); }
.innov-block-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(14px,1.6vw,18px); letter-spacing: .06em; text-transform: uppercase;
}
.innov-block--innov .innov-block-title { color: var(--imarina-cyan); }
.innov-block--doc   .innov-block-title { color: var(--imarina-yellow); }

.innov-rows { display: flex; flex-direction: column; padding: 0; }
.innov-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px 28px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,.02);
}
.innov-row:last-child { border-bottom: none; }
.innov-row-label {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(14px, 1.3vw, 16px); color: rgba(255,255,255,.50);
  text-align: right; line-height: 1.45; letter-spacing: .02em;
}
.innov-bubbles { display: flex; align-items: center; gap: 10px; }
.innov-bubble {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 900;
  color: #fff; flex-shrink: 0; line-height: 1;
}
/* — Colores usando vars de tema del cliente — */
.innov-bubble--total {
  width: 100px; height: 100px; font-size: 32px;
  background: linear-gradient(140deg, var(--imarina-cyan) 0%, var(--color-2, #004B87) 100%);
}
.innov-bubble--new {
  width: 74px; height: 74px; font-size: 25px;
  background: linear-gradient(140deg, var(--color-4, #FEB300) 0%, color-mix(in srgb, var(--color-4, #FEB300) 60%, #000) 100%);
}
.innov-bubble--doc {
  background: linear-gradient(140deg, var(--color-3, #00C1DF) 0%, var(--color-2, #005A94) 100%);
}
.innov-sep {
  font-size: 20px;
  font-weight: 600;
  color: rgba(255,255,255,.42);
  line-height: 1;
  user-select: none;
}
.innov-row-desc strong {
  display: block;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(14px,1.3vw,18px); color: #fff; line-height: 1.35;
  margin-bottom: 3px;
}
.innov-row-desc span {
  font-size: 11px; color: rgba(255,255,255,.42); font-weight: 500;
}
@media (max-width: 600px) {
  .innov-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px 0;
    text-align: center;
  }
  .innov-bubbles {
    order: 1;
    justify-content: center;
    gap: 12px;
  }
  .innov-row-desc {
    order: 3;
    text-align: center;
  }
  .innov-row-desc strong {
    margin-bottom: 0;
    font-size: 15px;
  }
  .innov-row-desc span { display: none; }
  .innov-row-label {
    order: 2;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,.88);
  }
  .innov-bubble--total {
    width: 92px;
    height: 92px;
    font-size: 30px;
  }
  .innov-bubble--new {
    width: 72px;
    height: 72px;
    font-size: 24px;
  }
}

/* ── CONTRATOS Y CONVENIOS — treemap (dentro de innov) ───────────── */
.innov-contracts {
  max-width: 720px; margin: 0 auto clamp(48px,6vw,72px);
}
.ic-kpis {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 20px;
  margin: 18px 0 18px;
}
.ic-kpi {
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
}
.ic-kpi-n {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(26px,3vw,34px); line-height: 1; color: var(--imarina-cyan);
}
.ic-kpi--new .ic-kpi-n { color: var(--imarina-yellow); }
.ic-kpi-lbl {
  font-size: 14px; color: rgba(255,255,255,.50); font-weight: 600;
  font-family: var(--font-display); letter-spacing: .02em; text-align: right;
}
.ic-treemap-wrap {
  position: relative; width: 100%;
  aspect-ratio: 700 / 300;
  border-radius: 14px; overflow: hidden;
}
.ic-tooltip {
  position: absolute; pointer-events: none; z-index: 10;
  background: rgba(0,0,0,.82); color: #fff;
  padding: 5px 11px; border-radius: 7px;
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  max-width: min(560px, calc(100vw - 40px));
  white-space: normal;
  backdrop-filter: blur(4px);
}
.ic-tooltip[hidden] { display: none; }
/* light theme overrides */
.innov-section-wrap[data-theme="light"] .ic-kpi-lbl  { color: var(--muted); }
@media (max-width: 640px) {
  .innov-section { padding: 56px var(--gutter); }
  .innov-blocks { gap: 32px; }
  .innov-contracts { margin: 0 auto 32px; }
  .ic-kpis {
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin: 14px 0 12px;
  }
  .ic-kpi { align-items: center; text-align: center; }
  .ic-kpi-n { font-size: 32px; }
  .ic-kpi-lbl { font-size: 12px; line-height: 1.2; text-align: center; }
  .ic-treemap-wrap { aspect-ratio: 380 / 260; }
}

/* ── EVENTS — Participación en congresos y eventos ───────────────── */
.events-section-wrap {
  padding: clamp(60px,8vw,100px) 0;
}
.events-section {
  max-width: var(--max); margin: 0 auto;
  padding: 0 var(--gutter);
}
.events-main-title {
  text-align: center;
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(36px, 5vw, 50px); letter-spacing: -.03em; color: #fff;
  margin: 0 0 clamp(40px, 5vw, 64px);
}
.ev-wrap {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px 64px;
  align-items: start;
}
.ev-kpis {
  display: flex; flex-direction: column; gap: 32px;
}
.ev-kpi {
  display: flex; flex-direction: column; gap: 4px;
}
.ev-kpi-n {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(44px,5.5vw,64px); line-height: 1; color: var(--imarina-cyan);
}
.ev-kpi--main .ev-kpi-n { color: var(--imarina-yellow); }
.ev-kpi-lbl {
  font-family: var(--font-display); font-size: 14px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  line-height: 1.2;
}
.ev-bars {
  display: flex; flex-direction: column; gap: 20px; padding-top: 8px;
}
.ev-bar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 6px 14px;
  align-items: center;
}
.ev-bar-label {
  font-size: clamp(13px,1.4vw,16px); color: rgba(255,255,255,.78);
  font-family: var(--font-display); font-weight: 600;
  grid-column: 1; grid-row: 1;
}
.ev-bar-pct {
    font-size: clamp(18px,2.2vw,24px); font-weight: 900;
    font-family: var(--font-display); color: var(--imarina-yellow);
    grid-column: 2; grid-row: 1 / 3;
    align-self: center;
  }
.ev-bar-track {
  grid-column: 1; grid-row: 2;
  height: 8px; border-radius: 99px;
  background: rgba(255,255,255,.12); overflow: hidden;
}
@keyframes ev-bar-grow {
  from { width: 0; }
  to   { width: calc(var(--pct) * 1%); }
}
.ev-bar-fill {
  height: 100%; border-radius: 99px;
  background: var(--imarina-cyan); width: 0;
}
.events-section.active .ev-bar-fill {
  animation: ev-bar-grow 1s var(--ease) var(--delay, 0ms) both;
}
@media (max-width: 640px) {
  .ev-wrap { grid-template-columns: 1fr; gap: 32px; }
  .ev-kpis { flex-direction: row; flex-wrap: wrap; gap: 24px 32px; }
}
/* light theme */
.events-section-wrap[data-theme="light"] .events-main-title { color: var(--ink); }
.events-section-wrap[data-theme="light"] .ev-kpi-lbl { color: var(--muted); }
.events-section-wrap[data-theme="light"] .ev-bar-label { color: var(--ink); }
.events-section-wrap[data-theme="light"] .ev-bar-track { background: var(--border); }
.events-section-wrap[data-theme="light"] .ev-bar-pct { color: var(--proj-color-2); }

/* Shared events renderer overrides for memoria visual parity */
.events-section-wrap .imarina-events-chart {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px 64px;
  align-items: start;
  color: #fff;
}
.events-section-wrap .imarina-events-chart__stats {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.events-section-wrap .imarina-events-chart__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.events-section-wrap .imarina-events-chart__stat-value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(44px,5.5vw,64px);
  line-height: 1;
}
.events-section-wrap .imarina-events-chart__stat-label {
  margin-top: 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--muted);
}
.events-section-wrap .imarina-events-chart__bars {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 8px;
}
.events-section-wrap .imarina-events-chart__row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 6px 14px;
  align-items: center;
}
.events-section-wrap .imarina-events-chart__row-head {
  display: contents;
  margin-bottom: 0;
}
.events-section-wrap .imarina-events-chart__row-label {
  font-size: clamp(13px,1.4vw,16px);
  color: rgba(255,255,255,.78);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.6;
  grid-column: 1;
  grid-row: 1;
}
.events-section-wrap .imarina-events-chart__row-value {
  font-size: clamp(18px,2.2vw,24px);
  font-weight: 900;
  font-family: var(--font-display);
  line-height: 1;
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
}
.events-section-wrap .imarina-events-chart__track {
  grid-column: 1;
  grid-row: 2;
  height: 8px;
  border-radius: 99px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}
.events-section-wrap .imarina-events-chart__fill {
  height: 100%;
  border-radius: 99px;
  width: 0;
}

/* ── RECONOCIMIENTOS ─────────────────────────────────────────────── */
.recognitions-section-wrap {
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse 50% 60% at 10% 40%, rgba(0,113,186,.18), transparent 55%),
    radial-gradient(ellipse 35% 45% at 90% 62%, rgba(0,193,223,.10), transparent 55%),
    linear-gradient(160deg, #001525 0%, #001c35 58%, #00263f 100%);
}
.recognitions-section {
  max-width: var(--content-max, 900px);
  margin: 0 auto;
  padding: var(--section-pad, 80px 24px);
}
.recognitions-section .pub-detail-hd,
.recognitions-section .pub-detail-wrap {
  width: min(var(--max), calc(100vw - (var(--gutter, 24px) * 2)));
  margin-left: 50%;
  transform: translateX(-50%);
}
.rec-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(36px, 5vw, 50px);
  letter-spacing: -.03em;
  line-height: 1.1;
  text-align: center;
  color: #fff;
  margin: 0 0 clamp(40px, 5vw, 64px);
}
.rec-layout {
  margin: 0 auto;
}
.rec-block-hd {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  margin-bottom: 26px;
}
.rec-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  background: rgba(254,179,0,.15);
  color: var(--color-4, #FEB300);
}
.rec-subtitle {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-4, #FEB300);
  margin: 0;
}
.rec-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.rec-card {
  flex: 0 1 calc((100% - 42px) / 4);
  min-width: 180px;
  max-width: calc((100% - 42px) / 4);
  background: rgba(var(--rec-accent-rgb, 27,141,201), .14);
  border: 1px solid rgba(var(--rec-accent-rgb, 27,141,201), .42);
  border-radius: 16px;
  padding: 18px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 170px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.rec-card-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.rec-medal {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
/* Medalles: usen el color del card (--rec-accent / --rec-accent-rgb) */
.rec-medal--1,
.rec-medal--2,
.rec-medal--3,
.rec-medal--4 { background: rgba(var(--rec-accent-rgb, 27,141,201),.16); color: var(--rec-accent, #1B8DC9); }
.rec-count {
  font-family: var(--font-display);
  font-size: clamp(46px, 4.2vw, 66px);
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -.02em;
  margin-top: 4px;
}
.rec-label {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 700;
  color: rgba(255,255,255,.86);
  line-height: 1.3;
  margin-top: auto;
}
@media (max-width: 720px) {
  .rec-card {
    flex-basis: calc((100% - 14px) / 2);
    max-width: calc((100% - 14px) / 2);
    min-width: 0;
  }
}
@media (max-width: 560px) {
  .rec-card {
    flex-basis: 100%;
    max-width: 100%;
  }
}
.recognitions-section-wrap[data-theme="light"] { background: linear-gradient(135deg, #f0f4f8 0%, #e8edf5 100%); }
.recognitions-section-wrap[data-theme="light"] .rec-title    { color: var(--ink); }
.recognitions-section-wrap[data-theme="light"] .rec-subtitle { color: var(--color-2, #004B87); }
.recognitions-section-wrap[data-theme="light"] .rec-icon     { background: rgba(0,75,135,.10); color: var(--color-2, #004B87); }
.recognitions-section-wrap[data-theme="light"] .rec-block-hd { border-bottom-color: var(--border); }
.recognitions-section-wrap[data-theme="light"] .rec-label    { color: var(--ink); }
.recognitions-section-wrap[data-theme="light"] .rec-count    { color: var(--ink); }
.recognitions-section-wrap[data-theme="light"] .rec-card     {
  background: rgba(var(--rec-accent-rgb, 27,141,201), .10);
  border-color: rgba(var(--rec-accent-rgb, 27,141,201), .35);
}

/* ── DOCENCIA Y FORMACIÓN ──────────────────────────────────────────── */
.teaching-section-wrap {
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 65% at 8% 45%,  rgba(0,113,186,.18),  transparent 55%),
    radial-gradient(ellipse 40% 50% at 92% 55%, rgba(0,193,223,.11),  transparent 55%),
    linear-gradient(155deg, #001525 0%, #001e38 55%, #002840 100%);
}
.teaching-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section-pad, 80px 24px);
}
.teach-main-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(36px, 5vw, 50px);
  letter-spacing: -.03em;
  line-height: 1.1;
  text-align: center;
  margin: 0 0 clamp(40px, 5vw, 64px);
  color: #fff;
}
.teach-blocks {
  display: flex;
  flex-direction: column;
  gap: 72px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}
.teach-block-hd {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  margin-bottom: 4px;
}
.teach-block-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  background: rgba(254,179,0,.15);
  color: var(--color-4, #FEB300);
}
.teach-block-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-4, #FEB300);
}

/* Filas bolas padre/hijo */
.teach-rows { display: flex; flex-direction: column; padding: 0; }
.teach-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px 24px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.02);
}
.teach-row:last-child { border-bottom: none; }
.teach-row-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(14px, 1.1vw, 16px);
  color: rgba(255,255,255,.70);
  text-align: right;
  line-height: 1.45;
  letter-spacing: .02em;
}
.teach-row-child-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(16px, 1.3vw, 18px);
  color: #fff;
  line-height: 1.35;
  align-self: center;
  text-align: left;
}

/* Colores propios de docencia sobre las burbujas reutilizadas */
.innov-bubble--teach {
  background: linear-gradient(140deg, var(--color-3, #1B8DC9) 0%, var(--color-1, #00205B) 100%);
}
.innov-bubble--teach-child {
  background: linear-gradient(140deg, var(--color-4, #FEB300) 0%, color-mix(in srgb, var(--color-4, #FEB300) 55%, #000) 100%);
}

/* Fila inline: burbujas standalone en horizontal */
.teach-row--inline {
  grid-template-columns: 1fr;
  justify-items: center;
}
.teach-inline-group {
  display: flex;
  gap: clamp(16px, 3vw, 40px);
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  padding: 8px 0;
}
.teach-inline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Bloque 8.2: círculos simples */
.teach-items {
  display: flex;
  gap: clamp(20px, 4vw, 48px);
  justify-content: center;
  flex-wrap: wrap;
  padding: 24px 0 8px;
}
.teach-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.teach-item-bubble {
  width: clamp(70px, 9vw, 96px);
  height: clamp(70px, 9vw, 96px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(22px, 3vw, 34px);
  color: #fff;
  background: linear-gradient(140deg, var(--color-3, #1B8DC9) 0%, var(--color-1, #00205B) 100%);
}
.teach-item-label {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.3vw, 18px);
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
  text-align: center;
  max-width: 150px;
}

@media (max-width: 600px) {
  .teach-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px 0;
    text-align: center;
  }
  .teach-row .innov-bubbles {
    order: 1;
    justify-content: center;
    gap: 12px;
  }
  .teach-row-label {
    order: 2;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,.88);
  }
  .teach-row-child-label {
    order: 3;
    text-align: center;
    font-size: 15px;
  }
}

/* light theme */
.teaching-section-wrap[data-theme="light"] .teach-main-title  { color: var(--ink); }
.teaching-section-wrap[data-theme="light"] .teach-block-title { color: var(--color-2, #004B87); }
.teaching-section-wrap[data-theme="light"] .teach-block-icon  { background: rgba(0,75,135,.10); color: var(--color-2, #004B87); }
.teaching-section-wrap[data-theme="light"] .teach-row        { border-bottom-color: rgba(0,0,0,.05); }
.teaching-section-wrap[data-theme="light"] .teach-row-label   { color: var(--muted); }
.teaching-section-wrap[data-theme="light"] .teach-row-child-label { color: var(--ink); }
.teaching-section-wrap[data-theme="light"] .teach-item-label { color: var(--ink); }

/* ── CIENCIA ABIERTA ───────────────────────────────────────────────── */
.openscience-section-wrap {
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 65% at 8% 45%,  rgba(0,113,186,.18),  transparent 55%),
    radial-gradient(ellipse 40% 50% at 92% 55%, rgba(0,193,223,.11),  transparent 55%),
    linear-gradient(155deg, #001525 0%, #001e38 55%, #002840 100%);
}
.openscience-section {
  max-width: var(--content-max, 900px);
  margin: 0 auto;
  padding: var(--section-pad, 80px 24px);
}
.os-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(36px, 5vw, 50px);
  letter-spacing: -.03em;
  line-height: 1.1;
  text-align: center;
  color: #fff;
  margin: 0 0 clamp(40px, 5vw, 64px);
}
.os-oa-hd {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  margin-bottom: 40px;
}
.os-oa-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  background: rgba(254,179,0,.15);
  color: var(--color-4, #FEB300);
  padding: 8px;
}
.os-oa-icon svg { width: 100%; height: 100%; }
.os-oa-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-4, #FEB300);
  margin: 0;
}
/* Total stat */
.os-total-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 44px;
  justify-content: center;
}
.os-total-icon {
  width: 52px;
  height: 52px;
  display: none;
  color: rgba(255,255,255,.7);
  flex-shrink: 0;
}
.os-total-icon svg { width: 100%; height: 100%; }
.os-total-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.os-total-num {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 60px);
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -.03em;
}
.os-total-label {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  letter-spacing: .10em;
  margin-top: 5px;
}

/* Barra apilada */
.os-bar-track {
  display: flex;
  height: 42px;
  border-radius: 21px;
  overflow: hidden;
  margin: 0 0 36px;
}
.os-bar-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-width: 0;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
.os-bar-pct {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  color: #141414;
  white-space: nowrap;
  padding: 0 8px;
}

/* Leyenda */
.os-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 110px;
}
.os-leg-item {
  display: grid;
  grid-template-columns: 22px 1fr auto auto;
  align-items: center;
  gap: 0 10px;
}
.os-leg-icon {
  width: 20px;
  height: 22px;
  display: flex;
  align-items: center;
}
.os-leg-icon svg { width: 100%; height: 100%; }
.os-leg-label {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 700;
  color: rgba(255,255,255,.8);
}
.os-leg-count {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 900;
  color: #fff;
  text-align: right;
  white-space: nowrap;
}
.os-leg-pct {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  min-width: 40px;
  text-align: right;
  white-space: nowrap;
}

/* Repositorios */
.os-repos {
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: clamp(40px, 5vw, 60px);
}
.os-repos-total-row {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
  text-align: center;
  margin: 36px 0 44px;
}
.os-repos-total-row .os-total-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.os-repos-total-icon {
  font-size: 28px;
  display: none;
  color: rgba(255,255,255,.55);
  flex-shrink: 0;
  line-height: 1;
}
.os-repos-hd {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  margin-bottom: 24px;
}
.os-repos-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex;
  align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  background: rgba(254,179,0,.15);
  color: var(--color-4, #FEB300);
}
.os-repos-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-4, #FEB300);
  margin: 0;
}
.os-repos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.os-repo-card {
  background: rgba(255,255,255,.05);
  border-radius: 14px;
  border-top: 3px solid var(--color-3, #1B8DC9);
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background .2s, transform .2s;
  opacity: 0;
  transform: translateY(14px);
}
.os-repos-grid.is-visible .os-repo-card {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .45s cubic-bezier(.4,0,.2,1) calc(var(--i) * 55ms),
              transform .45s cubic-bezier(.4,0,.2,1) calc(var(--i) * 55ms),
              background .2s;
}
.os-repo-card:hover {
  background: rgba(255,255,255,.09);
  transform: translateY(-2px);
}
.os-repo-card--top {
  border-top-color: var(--color-4, #FEB300);
}
.os-rc-rank {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  color: rgba(255,255,255,.75);
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.os-repo-card--top .os-rc-rank {
  color: var(--color-4, #FEB300);
  opacity: .8;
}
.os-rc-count {
  font-family: var(--font-display);
  font-size: clamp(34px, 3.8vw, 50px);
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -.02em;
}
.os-repo-card--top .os-rc-count {
  color: var(--color-4, #FEB300);
}
.os-rc-name {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.1vw, 16px);
  font-weight: 700;
  color: rgba(255,255,255,.82);
  margin-top: 6px;
}
.os-rc-pct {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,.75);
}

.os-open-source .os-repos-icon,
.os-open-source .os-repos-title {
  color: var(--color-3, #1B8DC9);
}
.os-open-source .os-repos-icon {
  background: rgba(27,141,201,.15);
}
.os-mini-bars {
  display: grid;
  gap: 14px;
}
.os-mini-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 2fr) auto auto;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px);
  animation: osMiniIn .45s cubic-bezier(.4,0,.2,1) forwards;
  animation-delay: calc(var(--i) * 65ms);
}
@keyframes osMiniIn {
  to { opacity: 1; transform: translateY(0); }
}
.os-mini-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,.82);
}
.os-mini-track {
  height: 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.os-mini-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-3, #1B8DC9), #29b3da);
  transition: width .65s cubic-bezier(.4,0,.2,1);
}
.os-mini-value {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  text-align: right;
  min-width: 26px;
}
.os-mini-pct {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,.45);
  text-align: right;
  min-width: 42px;
}

@media (max-width: 860px) {
  .os-repos-grid { grid-template-columns: repeat(3, 1fr); }
  .os-mini-row {
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) auto auto;
  }
}
@media (max-width: 600px) {
  .os-bar-track { height: 32px; border-radius: 16px; }
  .os-bar-pct { font-size: 10px; }
  .os-legend { grid-template-columns: 1fr; gap: 10px; }
  .os-leg-pct { display: none; }
  .os-repos-grid { grid-template-columns: repeat(2, 1fr); }
  .os-mini-row {
    grid-template-columns: 1fr auto auto;
    row-gap: 6px;
  }
  .os-mini-label {
    grid-column: 1 / -1;
  }
}

/* light theme */
.openscience-section-wrap[data-theme="light"] { background: linear-gradient(135deg, #f0f4f8 0%, #e8edf5 100%); }
.openscience-section-wrap[data-theme="light"] .os-title      { color: var(--ink); }
.openscience-section-wrap[data-theme="light"] .os-oa-title   { color: var(--color-2, #004B87); }
.openscience-section-wrap[data-theme="light"] .os-oa-icon    { background: rgba(0,75,135,.10); color: var(--color-2, #004B87); }
.openscience-section-wrap[data-theme="light"] .os-total-icon { color: var(--ink); opacity: .6; }
.openscience-section-wrap[data-theme="light"] .os-total-num  { color: var(--ink); }
.openscience-section-wrap[data-theme="light"] .os-total-label{ color: var(--muted); }
.openscience-section-wrap[data-theme="light"] .os-leg-label  { color: var(--ink); }
.openscience-section-wrap[data-theme="light"] .os-leg-count  { color: var(--ink); }
.openscience-section-wrap[data-theme="light"] .os-leg-pct    { color: var(--muted); }
.openscience-section-wrap[data-theme="light"] .os-mini-label { color: var(--ink); }
.openscience-section-wrap[data-theme="light"] .os-mini-track { background: rgba(0,0,0,.08); }
.openscience-section-wrap[data-theme="light"] .os-mini-value { color: var(--ink); }
.openscience-section-wrap[data-theme="light"] .os-mini-pct   { color: var(--muted); }
.openscience-section-wrap[data-theme="light"] .os-repo-card          { background: rgba(0,0,0,.04); }
.openscience-section-wrap[data-theme="light"] .os-repo-card:hover    { background: rgba(0,0,0,.07); }
.openscience-section-wrap[data-theme="light"] .os-rc-rank            { color: rgba(0,0,0,.60); }
.openscience-section-wrap[data-theme="light"] .os-repo-card--top .os-rc-rank { color: var(--color-4, #FEB300); opacity: 1; }
.openscience-section-wrap[data-theme="light"] .os-rc-count           { color: var(--ink); }
.openscience-section-wrap[data-theme="light"] .os-repo-card--top .os-rc-count { color: var(--color-4, #FEB300); }
.openscience-section-wrap[data-theme="light"] .os-rc-name            { color: rgba(0,0,0,.70); }
.openscience-section-wrap[data-theme="light"] .os-rc-pct             { color: rgba(0,0,0,.65); }
.openscience-section-wrap[data-theme="light"] .os-repos-title        { color: var(--color-2, #004B87); }
.openscience-section-wrap[data-theme="light"] .os-repos-icon         { background: rgba(0,75,135,.10); color: var(--color-2, #004B87); }
.openscience-section-wrap[data-theme="light"] .os-repos-total-icon   { color: var(--color-2, #004B87); opacity: .7; }
.openscience-section-wrap[data-theme="light"] .os-repos-hd           { border-bottom-color: rgba(0,0,0,.10); }
.openscience-section-wrap[data-theme="light"] .os-oa-hd              { border-bottom-color: rgba(0,0,0,.10); }

/* Shared open access renderer overrides for memoria visual parity */
.openscience-section-wrap .imarina-openaccess-chart {
  color: var(--ink);
}
.openscience-section-wrap .imarina-openaccess-chart__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(0,0,0,.10);
}
.openscience-section-wrap .imarina-openaccess-chart__icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(0,75,135,.10);
  color: var(--color-2, #004B87);
  padding: 8px;
}
.openscience-section-wrap .imarina-openaccess-chart__icon .imarina-publications-chart__ring-icon {
  width: 100%;
  height: 100%;
}
.openscience-section-wrap .imarina-openaccess-chart__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-2, #004B87);
}
.openscience-section-wrap .imarina-openaccess-chart__total {
  padding: 36px 0 44px;
  text-align: center;
}
.openscience-section-wrap .imarina-openaccess-chart__total-value {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 60px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--ink);
}
.openscience-section-wrap .imarina-openaccess-chart__total-label {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .10em;
  margin-top: 5px;
}
.openscience-section-wrap .imarina-openaccess-chart__bar {
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  min-height: 42px;
}
.openscience-section-wrap .imarina-openaccess-chart__segment {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #101828;
  font-family: var(--font-display);
  font-size: clamp(16px, 1.5vw, 18px);
  font-weight: 900;
}
.openscience-section-wrap .imarina-openaccess-chart__legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 114px;
  margin-top: 28px;
}
.openscience-section-wrap .imarina-openaccess-chart__legend-item {
  display: grid;
  grid-template-columns: 22px 1fr 44px 42px;
  gap: 0 10px;
  align-items: center;
}
.openscience-section-wrap .imarina-openaccess-chart__legend-lock {
  width: 20px;
  height: 22px;
  display: flex;
  align-items: center;
}
.openscience-section-wrap .imarina-openaccess-chart__legend-label {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 700;
  color: var(--ink);
}
.openscience-section-wrap .imarina-openaccess-chart__legend-count {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 900;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
  line-height: 1;
  justify-self: end;
}
.openscience-section-wrap .imarina-openaccess-chart__legend-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
  justify-self: start;
}

/* ── Ajuste de legibilidad (textos pequeños) ───────────────────── */
  .accordion-trigger .title { font-size: 14px; }
  .accordion-trigger .count { font-size: 13px; }
  .chip { font-size: 14px; }
  /* ── Jerarquía pub-detail: override sobre la regla genérica anterior ── */
  .pub-ancestor-trigger .title { font-size: 17px; }
  .pub-detail-card .accordion-trigger .title { font-size: 14px; }
  .pub-detail-card .pub-entity-trigger .title { font-size: 16px; }  /* va último: misma especificidad que la anterior, gana por orden */

.org-kpi .label,
.org-icon .caption,
.org-panel h3,
.news-date,
.people-bar-n,
.people-bar-pct,
.people-bar-share,
.fs-m-kpi-label,
.fs-m-area-amt,
.os-mini-value,
.os-mini-pct {
  font-size: 16px;
}
