/*
 * ESTILOS DE LA WEB JLR
 *
 * Mapa rápido. Busca estos selectores para encontrar cada zona:
 *   :root                 Colores y variables compartidas
 *   .navbar               Cabecera, menú móvil y redes
 *   .editorial-home       Portada, retrato y enlaces
 *   .research-main-tabs   Pestañas de Investigación
 *   .academic-showcase    Evaluación, Asociaciones y Grupos
 *   .pub-row              Publicaciones y acciones de cada entrada
 *   .conf-layout          Congresos, mapa y listado
 *   .media-filterbar      Buscador y filtros de Medios
 *   .jlr-doc              Docencia y acordeones
 *   .trayectoria-list     Trayectoria institucional
 *   .cv-hero-full         Cabecera del CV
 *
 * La misma sección puede tener reglas de escritorio y ajustes dentro
 * de @media. Las reglas posteriores resuelven los casos en los que se
 * repite un selector con la misma prioridad. Los filtros fijos usan
 * --site-navbar-height para ajustarse a la altura real de la cabecera.
 *
 * Esta limpieza elimina declaraciones repetidas o reemplazadas en el
 * mismo selector y contexto. Se conservan las reglas condicionales,
 * los estados interactivos y las variantes ligadas al HTML de Quarto y R.
 */

/* ============================================================
   0) Variables globales
============================================================ */
:root{
  --cat-accent: #2C3B4D;
  --pub-accent: #FFB162;
  --pub-accent-strong: #E07A1F;
  --soft-bg: rgba(0,0,0,.04);
  --shadow-soft: 0 6px 18px rgba(0,0,0,0.12);
}

/* ============================================================
   1) Navbar + iconos
============================================================ */

.navbar .navbar-nav .nav-link.active,
.navbar .navbar-nav .nav-item.active > .nav-link{
  color:#fff !important;
  font-weight:600;
  opacity:1 !important;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus{
  color:#fff;
}

.navbar .navbar-nav{
  display:flex;
  align-items:center;
  gap:4px;
}

.navbar .nav-link{
  display:flex;
  align-items:center;
  justify-content:center;
  height:36px;
  padding-left:4px !important;
  padding-right:4px !important;
}

.navbar .navbar-nav .nav-item{
  margin-left:0 !important;
}

.navbar .bi,
.navbar i{
  color:#fff !important;
  font-size:.85rem !important;
  line-height:1;
}

.navbar img.navicon,
.navbar .navicon{
  width:.9rem !important;
  height:.9rem !important;
  display:block;
  filter:brightness(0) invert(1) !important;
  opacity:1;
}

.navbar .aa-SubmitIcon,
.navbar .aa-InputIcon{
  width:.85rem !important;
  height:.85rem !important;
}

.navbar .aa-SubmitIcon svg,
.navbar .aa-InputIcon svg{
  width:.85rem !important;
  height:.85rem !important;
}

/* ============================================================
   2) Ocultar título de página
============================================================ */

.quarto-title-block,
#title-block-header{
  display:none !important;
}

/* ============================================================
   3) Tipografía global
============================================================ */

html,
body{
  font-family:Georgia, "Times New Roman", Times, serif;
  line-height:1.6;
}

h1, h2, h3, h4, h5, h6{
  font-family:Georgia, "Times New Roman", Times, serif;
}

h3{
  margin-bottom:1.5rem;
}

h2{
  font-size:1.05rem;
  line-height:1.35;
}

.navbar-nav .nav-link{
  font-size:.8rem;
}

/* ============================================================
   5) Publications
============================================================ */

.pub-row{
  position:relative;
  margin:0 0 1.25rem 0;
  border:0.5px solid rgba(0,0,0,.09);
  border-top:3px solid var(--row-color, var(--pub-accent-strong));
  border-radius:14px;
}

.pub-row-main{
  display:flex;
  gap:14px;
  align-items:flex-start;
}

.pub-icon{
  width:44px;
  height:44px;
  border-radius:10px;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:1.1rem;
}

.pub-info{
  flex:1;
  min-width:0;
}

.pub-title{
  margin:0 0 .28rem 0;
  font-weight:700;
  line-height:1.3;
}

.pub-subtitle{
  opacity:.75;
  margin:.14rem 0 0 0;
  line-height:1.35;
}

.pub-source{
  font-size:.8rem;
  opacity:.75;
  margin:.18rem 0 .05rem 0;
  line-height:1.35;
  font-style:italic;
}

.pub-authors{
  font-size:.8rem;
  margin:.22rem 0 .35rem 0;
  line-height:1.4;
}

.orcid{
  display:inline-block;
  vertical-align:middle;
  margin-left:.25rem;
  text-decoration:none;
}

.orcid-icon{
  width:11px;
  height:11px;
  display:inline-block;
}

.pub-cats-row{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
  justify-content:flex-end;
  margin-top:.5rem;
}

.pub-cats-row .pub-chip{
  appearance:none;
  border:1px solid var(--chip-color, #999);
  color:var(--chip-color, #666);
  background:transparent;
  border-radius:999px;
  cursor:pointer;
  line-height:1.2;
}

.pub-cats-row .pub-chip:hover{
  background:var(--chip-color, #999);
  color:#fff;
  opacity:.85;
}

.pub-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.85rem;
  padding:.32rem .55rem;
  border-radius:6px;
  margin-top:1rem;
}

.pub-download,
.pub-replication,
.pub-cite-link{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  font-size:.76rem;
  font-weight:500;
  letter-spacing:.02em;
  text-decoration:none;
  cursor:pointer;
  transition:opacity .15s ease;
}

.pub-actions a:hover{
  opacity:.72;
  text-decoration:none;
}

.pub-actions .bi{
  font-size:.82rem;
  color:inherit;
  line-height:1;
}

.pub-abstract-body,
.pub-bibtex{
  margin-top:.5rem;
  padding:.6rem .75rem;
  background:var(--soft-bg);
  border-radius:6px;
  overflow-x:auto;
  max-width:42rem;
}

.pub-abstract-body{
  line-height:1.45;
  opacity:.9;
}

.pub-bibtex{
  font-size:.78rem;
}

.pub-toggle{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  font-size:.76rem;
  font-weight:500;
  letter-spacing:.02em;
  background:transparent;
  border:0;
  padding:0;
  cursor:pointer;
}

.pub-toggle:hover{
  opacity:.72;
}

.pub-panels{
  margin-top:.25rem;
}

/* ============================================================
   6) Headings comunes
============================================================ */

body.publications-page h2,
body.research-page h2{
  font-size:1.45rem;
  font-weight:700;
  margin-top:1rem;
  margin-bottom:.8rem;
  border-bottom:1px solid rgba(0,0,0,.10);
  padding-bottom:.3rem;
  letter-spacing:.03em;
}

/* ============================================================
   7) Sidebar / TOC
============================================================ */

body.publications-page .sidebar.toc-left,
body.publications-page #quarto-sidebar,
body.publications-page .quarto-sidebar,
body.research-page .sidebar.toc-left,
body.research-page #quarto-sidebar,
body.research-page .quarto-sidebar{
  position:sticky;
  top:6rem;
  max-height:calc(100vh - 6rem);
  overflow-y:auto;
}

body.publications-page nav#TOC,
body.publications-page #TOC,
body.research-page nav#TOC,
body.research-page #TOC{
  overflow-x:visible;
}

body.publications-page .sidebar,
body.publications-page .quarto-sidebar,
body.publications-page .sidebar.toc-left,
body.research-page .sidebar,
body.research-page .quarto-sidebar,
body.research-page .sidebar.toc-left{
  padding-left:.5rem !important;
  padding-right:.5rem !important;
}

/* ============================================================
   8) Índices sidebar / filtros
============================================================ */

body.publications-page .pub-categories,
body.research-page .talk-years-index{
  margin-top:1.25rem;
  padding-top:1rem;
  border-top:1px solid var(--bs-border-color);
}

body.publications-page .pub-categories h3,
body.research-page .talk-years-index h3{
  font-size:.65rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  margin:0 0 .75rem 0;
  opacity:.8;
  display: none;
}

body.publications-page .pub-categories h3{
  display:block;
}

body.publications-page .pub-categories ul,
body.research-page .talk-years-index ul{
  list-style:none;
  margin:0;
  padding:0;
}

body.publications-page .pub-categories li,
body.research-page .talk-years-index li{
  margin:0 0 .2rem 0;
}

body.publications-page .pub-categories .cat-link,
body.research-page .talk-years-index .talk-year-link{
  display:block;
  background:none;
  border:0;
  padding-left:.5rem;
  font-family:var(--bs-body-font-family);
  font-size:.78rem;
  line-height:1.05;
  color:#555;
  opacity:1;
  cursor:pointer;
  text-align:left;
  text-decoration:none;
  white-space:normal;
}

body.publications-page .pub-categories .cat-link.is-active,
body.research-page .talk-years-index .talk-year-link.is-active{
  font-weight:700;
}

/* ============================================================
   9) Research page — cards grid
============================================================ */

body.research-page h2{
  font-size:1.7rem;
  font-weight:800;
  margin:1rem 0 1.4rem 0;
  padding-bottom:.45rem;
  border-bottom:1px solid rgba(0,0,0,.10);
  letter-spacing:.03em;
}

.talk-year-section{
  margin-bottom:3rem;
}

.talks-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1.3rem;
}

.talk-item{
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
  border-radius:16px;
  box-shadow:0 8px 24px rgba(0,0,0,.045);
  transition:transform .18s ease, box-shadow .18s ease;
}

.talk-item:hover{
  transform:translateY(-3px);
  box-shadow:0 14px 30px rgba(0,0,0,.08);
}

.talk-image{
  width:100%;
  aspect-ratio:16/5;
  object-fit:cover;
  display:block;
  background:rgba(0,0,0,.04);
}

.talk-card-body{
  display:flex;
  flex-direction:column;
  flex-grow:1;
  padding:1rem 1rem 1.05rem 1rem;
}

.talk-date{
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--pub-accent-strong);
  margin-bottom:.5rem;
}

.talk-title{
  font-size:1rem;
  line-height:1.28;
  font-weight:800;
  margin:0 0 .45rem 0;
  color:#222;
}

.talk-meta{
  font-size:.82rem;
  line-height:1.48;
  color:#666;
  margin-bottom:1rem;
}

.talk-linksbar{
  margin-top:auto;
  display:flex;
  flex-wrap:wrap;
  gap:.45rem;
}

.talk-link{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.3rem .58rem;
  border-radius:999px;
  background:rgba(255,177,98,.14);
  color:var(--pub-accent-strong);
  text-decoration:none;
  font-size:.72rem;
  font-weight:600;
  transition:background .15s ease;
}

.talk-link:hover{
  background:rgba(255,177,98,.24);
  text-decoration:none;
}

.talk-link .bi{
  font-size:.78rem;
}

/* ============================================================
   10) Research years nav horizontal
============================================================ */

.talk-years-index{
  display:flex;

  justify-content:center;
  align-items:center;

  margin:0 0 2rem 0;
  padding:0 0 1rem 0;

  border-bottom:1px solid rgba(0,0,0,.08);
}

.talk-years-index h3{
  display:none;
}

.talk-years-index ul{
  display:flex;

  justify-content:center;
  align-items:center;

  gap:.7rem;

  list-style:none;

  margin:0;
  padding:0;
}

.talk-years-index li{
  margin:0;
  padding:0;
}

.talk-year-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.28rem .7rem;
  border-radius:999px;
  background:rgba(0,0,0,.04);
  color:#555;
  text-decoration:none;
  font-size:.78rem;
  font-weight:600;
  transition:background .15s ease, color .15s ease;
}

.talk-year-link:hover{
  background:rgba(255,177,98,.18);
  color:var(--pub-accent-strong);
  text-decoration:none;
}

.talk-year-link.is-active{
  background:rgba(255,177,98,.22);
  color:var(--pub-accent-strong);
}

/* ============================================================
   11) Teaching page — final
============================================================ */

body.teaching-page .page-columns,
body.teaching-page .content,
body.teaching-page #quarto-content{
  width:100% !important;
  max-width:100% !important;
}

.teaching-nav-wrap{
  position:sticky;
  top:56px;
  z-index:20;

  background:rgba(255,255,255,.96);
  backdrop-filter:blur(8px);

  border-bottom:1px solid rgba(0,0,0,.08);

  margin-bottom:2rem;
  padding:.8rem 0 1rem 0;
}

.teaching-topnav,
.teaching-areas-nav{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;

  gap:.45rem;

  width:100%;
}

.teaching-topnav{
  margin-bottom:1.25rem;
}

.teaching-topnav > span,
.teaching-areas-nav > span{
  flex-basis:100%;

  display:block;

  margin:0 0 .4rem 0;

  text-align:center;

  font-size:.6rem;
  font-weight:800;

  letter-spacing:.12em;
  text-transform:uppercase;

  color:#888;
}

.teaching-topnav .teach-type-btn{
  display:inline-flex;
  align-items:center;
  gap:5px;
  justify-content:center;

  padding:.28rem .75rem;

  border:1px solid rgba(0,0,0,.15);
  border-radius:999px;

  background:transparent;
  color:#333;

  cursor:pointer;

  font-size:.68rem;
  font-weight:700;

  --teach-type-color: #333;

  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease;
}

.teaching-topnav .teach-type-btn[data-type="grado"]{
  --teach-type-color: var(--pub-accent-strong);
  color:var(--teach-type-color);
  border-color:rgba(224,122,31,.35);
}
.teaching-topnav .teach-type-btn[data-type="posgrado"]{
  --teach-type-color: #2C3B4D;
  color:var(--teach-type-color);
  border-color:rgba(44,59,77,.35);
}
.teaching-topnav .teach-type-btn[data-type="cursos"]{
  --teach-type-color: #3D8B7D;
  color:var(--teach-type-color);
  border-color:rgba(61,139,125,.35);
}
.teaching-topnav .teach-type-btn[data-type="innovacion-docente"]{
  --teach-type-color: #9A5A35;
  color:var(--teach-type-color);
  border-color:rgba(154,90,53,.35);
}
.teaching-topnav .teach-type-btn[data-type="material-docente"]{
  --teach-type-color: #6B4570;
  color:var(--teach-type-color);
  border-color:rgba(107,69,112,.35);
}

.teaching-topnav .teach-type-btn.is-active{
  background:var(--teach-type-color);
  color:#fff;
  border-color:var(--teach-type-color);
}

.teaching-topnav .teach-type-btn.is-active .teach-type-dot{
  background:#fff;
}

.teach-type-dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--teach-type-color);
  flex-shrink:0;
}

.teach-area-dropdown{
  position:relative;
  display:flex;
  justify-content:center;
  margin-top:.65rem;
}

.teach-area-trigger{
  display:inline-flex;
  align-items:center;
  gap:6px;

  font-size:.68rem;
  color:#777;

  background:transparent;
  border:0.5px solid rgba(0,0,0,.14);
  padding:.28rem .75rem;
  border-radius:999px;

  cursor:pointer;
}

.teach-area-trigger:hover{
  background:rgba(0,0,0,.03);
}

.teach-area-trigger.has-filter{
  color:#6B4570;
  border-color:rgba(107,69,112,.35);
}

.teach-area-panel{
  position:absolute;
  top:100%;
  left:50%;
  transform:translateX(-50%);
  margin-top:.5rem;

  background:#fff;
  border:0.5px solid rgba(0,0,0,.10);
  border-radius:12px;
  padding:.6rem;

  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
  justify-content:center;

  max-width:520px;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
  z-index:20;
}

.teach-area-panel[hidden]{
  display:none;
}

.teach-area-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:.24rem .65rem;

  border:1px solid rgba(0,0,0,.13);
  border-radius:999px;

  background:transparent;
  color:#666;

  font-size:.68rem;
  font-weight:600;

  cursor:pointer;

  transition:
    background .15s ease,
    border-color .15s ease,
    color .15s ease;
}

.teach-area-btn:hover{
  background:rgba(107,69,112,.08);
  border-color:rgba(107,69,112,.35);
  color:#6B4570;
}

.teach-area-btn.is-active{
  background:#6B4570;
  border-color:#6B4570;

  color:#fff;
  font-weight:700;
}

body.teaching-page .teaching-section{
  scroll-margin-top: 13rem;
}

body.teaching-page h2{
  font-size:1.45rem !important;
  font-weight:800;
  text-align:center;

  margin:2rem 0 1.25rem 0;
  padding-bottom:.4rem;

  border-bottom:1px solid rgba(224,122,31,.18);
}

body.teaching-page .teach-center-block{
  width:100%;
  max-width:100%;

  margin:0 0 3rem 0;

  padding:0 !important;
  border-left:0 !important;
}

body.teaching-page .teach-center-title{
  display:block;

  margin:0 0 .85rem 0;
  padding:0;

  background:none;
  border-radius:0;

  color:var(--pub-accent-strong);
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
}

body.teaching-page .teaching-list{
  display:grid !important;

  grid-template-columns:repeat(2,minmax(320px,1fr)) !important;

  column-gap:1.4rem !important;
  row-gap:1.4rem !important;

  width:100%;
  max-width:100%;

  margin:0 !important;
  padding:0 !important;

  list-style:none !important;
}

body.teaching-page .teach-item{
  position:relative;

  width:100%;
  max-width:none;

  margin:0 !important;

  border:0.5px solid rgba(0,0,0,.09);
  border-radius:14px;
  background:#fff;

  list-style:none !important;

  --teach-type-color: var(--pub-accent-strong);
  --teach-type-tint: rgba(224,122,31,.12);
}

body.teaching-page .teach-item[data-type="posgrado"]{
  --teach-type-color: #2C3B4D;
  --teach-type-tint: rgba(44,59,77,.10);
}

body.teaching-page .teach-item[data-type="cursos"]{
  --teach-type-color: #3D8B7D;
  --teach-type-tint: rgba(61,139,125,.12);
}

body.teaching-page .teach-item[data-type="innovacion-docente"]{
  --teach-type-color: #9A5A35;
  --teach-type-tint: rgba(154,90,53,.12);
}

body.teaching-page .teach-item[data-type="material-docente"]{
  --teach-type-color: #6B4570;
  --teach-type-tint: rgba(107,69,112,.12);
}

body.teaching-page .teach-badge{
  display:inline-block;
  margin-bottom:.5rem;
  padding:.16rem .6rem;
  border-radius:999px;
  font-family:var(--bs-body-font-family, sans-serif);
  font-weight:800;
  letter-spacing:.02em;
  color:var(--teach-type-color);
  background:var(--teach-type-tint);
}

body.teaching-page .teaching-section + .teaching-section{
  margin-top:7rem;
}

body.teaching-page .teach-item strong{
  display:inline;
  font-weight:800;
  line-height:1.35;

  letter-spacing:0;
  text-transform:none;

  color:#222;

  white-space:normal;
  word-break:normal;
}

body.teaching-page .teach-year{
  color:#777;

  opacity:1;
  font-weight:600;

  white-space:nowrap;
}

body.teaching-page .teach-tags{
  margin-top:.45rem;
  margin-bottom:.35rem;
  line-height:1.4;

  font-style:italic;
  color:#9A5A35;

  opacity:.92;
}

body.teaching-page .teach-tag{
  display:inline;

  background:none;
  border:0;
  border-radius:0;

  padding:0;
  margin:0;

  font-size:inherit;
  font-style:inherit;
  font-weight:500;
  color:inherit;

  letter-spacing:0;
}

body.teaching-page .teach-tag:not(:last-child)::after{
  content:" · ";
  opacity:.7;
}

body.teaching-page .teach-levels{
  margin-top:.42rem;
  line-height:1.45;

  color:#555;

  opacity:1;
  font-style:normal;
}

body.teaching-page .teach-item.is-hidden{
  display:none !important;
}

/* ============================================================
   12) CV / Home
============================================================ */

body.cv-page .quarto-title-block,
body.cv-page #title-block-header{
  display:none !important;
}

.cv-hero{
  background:var(--pub-accent-strong);
  color:white;
  padding:2.2rem 0;
  margin-bottom:1.5rem;
}

.cv-hero-inner{
  max-width:1100px;
  margin:0 auto;
  padding:0 1.2rem;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:1rem;
}

.cv-hero-title{
  margin:0;
  font-size:2.2rem;
  font-weight:800;
  letter-spacing:.02em;
}

.cv-hero-actions{
  display:flex;
  flex-direction:column;
  gap:.6rem;
  align-items:flex-end;
}

.cv-hero-btn{
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.35);
  padding:.35rem .65rem;
  border-radius:6px;
  color:white;
  text-decoration:none;
  font-weight:600;
  font-size:.85rem;
}

.cv-hero-btn:hover{
  background:rgba(255,255,255,.24);
}

.cv-hero-link{
  color:rgba(255,255,255,.9);
  text-decoration:none;
  font-size:.85rem;
  font-weight:600;
}

.cv-hero-link:hover{
  text-decoration:underline;
}

.cv-wrap{
  max-width:1100px;
  margin:0 auto;
  padding:0 1.2rem 2rem 1.2rem;
}

.cv-grid{
  display:grid;
  grid-template-columns:320px 1fr;
  gap:1.6rem;
  align-items:start;
}

.cv-photo{
  width:100%;
  border-radius:10px;
  box-shadow:var(--shadow-soft);
  margin-bottom:.9rem;
}

.cv-card{
  background:rgba(0,0,0,.02);
  border:1px solid rgba(0,0,0,.06);
  border-radius:10px;
  padding:.9rem 1rem;
}

.cv-pdf{
  margin-top:2rem;
}

.cv-pdf iframe{
  width:100%;
  height:80vh;
  border:1px solid rgba(0,0,0,.08);
  border-radius:10px;
  background:white;
}

.cv-hero-full{
  width:100vw;
  margin-left:calc(50% - 50vw);
  background:var(--pub-accent-strong);
  color:white;
  position:relative;
  overflow:visible;
  padding:2.6rem 0 60px 0;
  margin-bottom:80px;
}

.cv-hero-full .cv-hero-inner{
  max-width:1100px;
  margin:0 auto;
  padding:0 1.2rem;
  display:grid;
  grid-template-columns:1.3fr .7fr;
  gap:2rem;
  align-items:center;
}

.cv-hero-full .cv-hero-title{
  margin:0 0 .4rem 0;
  font-size:2.4rem;
  font-weight:800;
  letter-spacing:.02em;
}

.cv-hero-sub{
  font-size:1.05rem;
  opacity:.9;
  margin-bottom:1rem;
}

.cv-btn{
  background:rgba(255,255,255,.15);
  border:1px solid rgba(255,255,255,.35);
  padding:.38rem .7rem;
  border-radius:6px;
  color:white;
  text-decoration:none;
  font-weight:600;
  font-size:.85rem;
}

.cv-btn:hover{
  background:rgba(255,255,255,.25);
}

.cv-link{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  color:rgba(255,255,255,.9);
  text-decoration:none;
  font-weight:600;
  font-size:.85rem;
}

.cv-link:hover{
  text-decoration:underline;
}

.cv-photo-overlap{
  position:absolute;
  right:15rem;
  top:50%;
  transform:translateY(-40%);
  width:240px;
  border-radius:16px;
  box-shadow:var(--shadow-soft);
  z-index:2;
}

.cv-text{
  font-size:1.02rem;
  line-height:1.75;
  max-width:760px;
}

.cv-text p{
  margin-bottom:1.1rem;
  text-align:justify;
  hyphens:auto;
}

.cv-icon{
  height:.9em;
  width:.9em;
}

.quarto-dark .cv-icon,
.cv-hero-actions .cv-icon{
  filter:brightness(0) invert(1);
}

/* ============================================================
   13) Responsive
============================================================ */

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

@media (max-width:900px){
  .cv-grid{
    grid-template-columns:1fr;
  }

  .cv-pdf iframe{
    height:72vh;
  }
}

@media (max-width:768px){
  .navbar-nav .nav-link{
    font-size:.9rem;
  }

  .teaching-nav-wrap{
    top:52px;
  }
}

@media (max-width:700px){
  .talks-grid,
  body.teaching-page .teaching-list{
    grid-template-columns:1fr !important;
    column-gap:0 !important;
  }
}

.pub-nav-wrap{
  position:sticky;
  top:56px;
  z-index:20;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(8px);
  border-bottom:1px solid rgba(0,0,0,.08);
  margin-bottom:2rem;
  padding:.7rem 0 .8rem 0;
}

.pub-topnav,
.pub-catnav{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:.45rem;
}

.pub-topnav{
  margin-bottom:.45rem;
}

.pub-topnav span,
.pub-catnav span{
  order:99;
  margin-left:.7rem;
  font-size:.62rem;
  font-weight:800;
  letter-spacing:.10em;
  text-transform:uppercase;
  color:#777;
}

.pub-topnav a{
  border:1px solid rgba(0,0,0,.08);
  border-radius:999px;
  padding:.18rem .58rem;
  background:transparent;
  color:#555;
  text-decoration:none;
  font-size:.68rem;
  font-weight:700;
}

.pub-topnav a:hover{
  background:rgba(0,0,0,.045);
  color:#222;
}

.pub-cat-btn{
  border:0;
  border-radius:999px;
  padding:.18rem .52rem;
  background:rgba(0,0,0,.045);
  color:#555;
  font-size:.68rem;
  font-weight:700;
  cursor:pointer;
}

.pub-cat-btn:hover,
.pub-cat-btn.is-active{
  background:rgba(255,177,98,.22);
  color:var(--pub-accent-strong);
}

.pub-row.is-hidden{
  display:none !important;
}

/* ============================================================
   PUBLICATIONS LEFT TOC — refined
============================================================ */

body.publications-page #TOC{
  font-size:.86rem;
}

body.publications-page #TOC > ul{
  border-left:1px solid rgba(224,122,31,.22);
  padding-left:.85rem;
}

body.publications-page #TOC a{
  display:block;
  padding:.18rem 0;
  color:#555;
  text-decoration:none;
}

body.publications-page #TOC a:hover,
body.publications-page #TOC a.active{
  color:var(--pub-accent-strong);
  font-weight:700;
}

/* Categorías como mini panel (compartido por Publicaciones, Investigación y Colegio) */
body.publications-page .pub-categories,
body.research-page .pub-categories,
body.institucional-page .pub-categories{
  margin-top:0;
  padding:1rem .9rem;
  border:1px solid rgba(107,69,112,.14);
  border-radius:12px;
  background:rgba(107,69,112,.06);
}

body.publications-page .pub-categories h3,
body.research-page .pub-categories h3,
body.institucional-page .pub-categories h3{
  margin:0 0 .7rem 0;
  font-size:.62rem;
  font-weight:800;
  letter-spacing:.10em;
  text-transform:uppercase;
  color:#6B4570;
  opacity:1;
}

body.publications-page .pub-categories ul,
body.research-page .pub-categories ul,
body.institucional-page .pub-categories ul{
  list-style:none;
  margin:0;
  padding:0;
}

body.publications-page .pub-categories li,
body.research-page .pub-categories li,
body.institucional-page .pub-categories li{
  margin:0 0 .35rem 0;
}

body.publications-page .pub-categories .cat-link,
body.research-page .pub-categories .cat-link,
body.institucional-page .pub-categories .cat-link{
  display:block;
  width:100%;
  padding:.18rem 0;

  border:0;
  background:transparent;

  color:#555;
  font-size:.78rem;
  line-height:1.2;
  text-align:left;

  cursor:pointer;
}

body.publications-page .pub-categories .cat-link:hover,
body.publications-page .pub-categories .cat-link.is-active,
body.research-page .pub-categories .cat-link:hover,
body.research-page .pub-categories .cat-link.is-active,
body.institucional-page .pub-categories .cat-link:hover,
body.institucional-page .pub-categories .cat-link.is-active{
  color:#6B4570;
  font-weight:700;
}

@media (max-width:700px){
  .conf-item{
    grid-template-columns: 1fr;
    gap: .25rem;
  }
}

/* ============================================================
   CONFERENCES PAGE
============================================================ */

.conf-filter{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:.5rem;
  margin-bottom:2rem;
}

.conf-filter-pill{
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.72rem;
  font-weight:700;
  border:1px solid var(--pill-color, #333);
  color:var(--pill-color, #333);
  background:transparent;
  padding:.28rem .85rem;
  border-radius:999px;
  cursor:pointer;
}

.conf-filter-pill.is-active{
  background:var(--pill-color, #333);
  color:#fff;
}

.conf-item[hidden]{
  display:none !important;
}

.conf-year-group[hidden]{
  display:none !important;
}

.conf-layout{
  display:grid;
  grid-template-columns:420px 1fr;
  gap:3.5rem;
  align-items:start;
}

.conf-map-col{
  position:sticky;
  top:6rem;
}

#conference-map{
  height:520px;
  width:100%;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 12px 32px rgba(0,0,0,.08);
  border:1px solid rgba(0,0,0,.06);
}

.conf-list{
  width:100%;
}

.conf-year-group{
  margin-bottom:2rem;
}

.conf-year-heading{
  text-align:right;
  color:var(--pub-accent-strong);
  font-weight:800;
  letter-spacing:.04em;
  margin:0 0 .75rem 0;
  padding-bottom:.25rem;
  border-bottom:1px solid rgba(224,122,31,.18);
}

.conf-item{
  border-left:3px solid var(--pub-accent-strong);
}

.conf-role-badge{
  display:inline-block;
  margin-bottom:.35rem;
  padding:.1rem .5rem;
  border-radius:999px;
  font-family:var(--bs-body-font-family, sans-serif);
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.conf-title{
  font-weight:800;
  line-height:1.3;
}

.conf-meta{
  margin-top:.12rem;
  color:#666;
  font-style:italic;
}

.conf-link{
  display:inline-block;
  margin-top:.35rem;
  font-weight:700;
  text-decoration:none;
}

.conf-link:hover{
  text-decoration:underline;
}

.leaflet-popup-content{
  font-family:Georgia, "Times New Roman", Times, serif;
  font-size:.78rem;
  line-height:1.35;
}

@media (max-width:900px){
  .conf-layout{
    grid-template-columns:1fr;
  }

  .conf-map-col{
    position:static;
  }

  #conference-map{
    height:380px;
  }
}

.conf-papers {
  margin: 4px 0 0 0;
  padding-left: 18px;
  font-size: 0.9em;
  color: #555;
}

/* ============================================================
   Diferenciación visual por tipo de publicación — ahora se aplica
   con estilos inline directos desde R (pub_type_color()), no con
   variables CSS en cascada. Solo queda el estilo base del badge.
============================================================ */

.pub-badge{
  display:inline-block;
  margin-bottom:.35rem;
  padding:.1rem .5rem;
  border-radius:999px;
  font-size:.62rem;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}

/* Enlace de descarga .bib dentro del panel de Citation */
.pub-download-bib{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  margin-top:.4rem;
  font-size:.74rem;
  font-weight:600;
  color:var(--pub-accent-strong);
  text-decoration:none;
}

.pub-download-bib:hover{
  text-decoration:underline;
}

/* ============================================================
   Publications page
============================================================ */

body.publications-page main{
  padding-left:1rem;
  padding-right:1rem;
}

body.research-page main{
  padding-left:1rem;
  padding-right:1rem;
}

body.publications-page #quarto-document-content,
body.publications-page .page-columns,
body.publications-page .quarto-container{
  display:block !important;
  grid-template-columns:none !important;
  max-width:1000px !important;
  width:100% !important;
  margin-left:auto !important;
  margin-right:auto !important;
  padding-left:0 !important;
  padding-right:0 !important;
}

body.research-page #quarto-document-content,
body.research-page .page-columns,
body.research-page .quarto-container{
  display:block !important;
  grid-template-columns:none !important;
  max-width:1400px !important;
  width:100% !important;
  margin-left:auto !important;
  margin-right:auto !important;
  padding-left:0 !important;
  padding-right:0 !important;
}

/* --- Fila de filtros: pastillas de tipo + desplegable de categorías --- */

.pub-filters-row{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:1.5rem;
  margin-bottom:2rem;
  padding-bottom:1.2rem;
  border-bottom:1px solid rgba(0,0,0,.08);
}

.pub-type-pills{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  justify-content:center;
}

.pub-type-pill{
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.72rem;
  font-weight:700;
  border:1px solid var(--pill-color, #333);
  color:var(--pill-color, #333);
  background:transparent;
  padding:.28rem .8rem;
  border-radius:999px;
  cursor:pointer;
}

.pub-type-pill.is-active{
  background:var(--pill-color, #333);
  color:#fff;
}

.pub-type-pill:first-child{
  --pill-color:#333;
}

.pub-pill-count{
  font-weight:600;
  opacity:.65;
  font-size:.9em;
}

/* --- Desplegable de categorías: morado, icono de etiqueta, panel en
   varias columnas -- deliberadamente distinto del desplegable de área
   que usa Docencia, aunque comparten el mismo mecanismo. --- */

.pub-cat-dropdown{
  position:relative;
}

.pub-cat-trigger{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.72rem;
  font-weight:700;
  color:#6B4570;
  border:1px solid rgba(107,69,112,.35);
  background:rgba(107,69,112,.05);
  padding:.32rem .85rem;
  border-radius:999px;
  cursor:pointer;
}

.pub-cat-trigger:hover{
  background:rgba(107,69,112,.10);
}

.pub-cat-trigger.has-filter{
  background:#6B4570;
  color:#fff;
}

.pub-cat-panel{
  position:absolute;
  top:100%;
  left:50%;
  transform:translateX(-50%);
  margin-top:.5rem;
  background:#FBF9FC;
  border:0.5px solid rgba(107,69,112,.22);
  border-radius:12px;
  padding:.8rem 1.2rem;
  columns:3;
  column-gap:24px;
  width:600px;
  max-width:90vw;
  box-shadow:0 12px 32px rgba(0,0,0,.14);
  z-index:20;
}

.pub-cat-panel[hidden]{
  display:none;
}

.pub-cat-panel .cat-link{
  display:block;
  width:100%;
  break-inside:avoid;
  border:0;
  background:transparent;
  color:#555;
  font-size:.78rem;
  line-height:1.4;
  padding:.3rem 0;
  text-align:left;
  cursor:pointer;
  white-space:normal;
}

.pub-cat-panel .cat-link:hover,
.pub-cat-panel .cat-link.is-active{
  color:#6B4570;
  font-weight:700;
}

@media (max-width:700px){
  .pub-cat-panel{
    columns:2;
  }
}

/* ============================================================
   Research page — stats bar + filter pills + result cards
============================================================ */

.research-stats{
  display:flex;
  justify-content:center;
  gap:2.2rem;
  padding:1.2rem 0;
  margin-bottom:1rem;
  border-bottom:0.5px solid rgba(0,0,0,.08);
}

.research-stat{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.2rem;
}

.research-stat-n{
  font-size:1.4rem;
  font-weight:700;
  color:#333;
}

.research-stat-label{
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.68rem;
  color:#999;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.research-filterbar{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:.5rem;
  margin-bottom:2rem;
}

.research-pill{
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.72rem;
  font-weight:700;
  border:1px solid var(--pill-color, #333);
  color:var(--pill-color, #333);
  background:transparent;
  padding:.32rem .85rem;
  border-radius:999px;
  cursor:pointer;
}

.research-pill.is-active{
  background:var(--pill-color, #333);
  color:#fff;
}

.research-list{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:1.25rem;
  align-items:start;
}

.research-card{
  border:0.5px solid rgba(0,0,0,.09);
  border-radius:14px;
  display:flex;
  flex-direction:column;
}

.research-card.is-hidden{
  display:none !important;
}

.research-row-main{
  display:flex;
  align-items:flex-start;
  gap:16px;
  flex:1;
}

.research-logo{
  width:56px;
  height:56px;
  border-radius:12px;
  flex-shrink:0;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:14px;
  font-weight:700;
  color:#fff;
}

.research-logo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.research-info{
  flex:1;
  min-width:0;
}

.research-title-line{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
}

.research-title{
  font-weight:700;
  line-height:1.3;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.research-title.is-expanded{
  -webkit-line-clamp:unset;
  overflow:visible;
}

.research-title-toggle{
  display:inline-block;
  margin-top:.3rem;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.72rem;
  font-weight:700;
  color:var(--pub-accent-strong);
  background:transparent;
  border:0;
  padding:0;
  cursor:pointer;
}

.research-title-toggle:hover{
  opacity:.75;
}

.research-badges{
  display:flex;
  align-items:center;
  gap:.4rem;
  flex-shrink:0;
}

.research-ip-badge{
  display:inline-flex;
  align-items:center;
  gap:.3rem;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.62rem;
  font-weight:800;
  letter-spacing:.04em;
  color:#8A6A00;
  background:rgba(255,193,7,.18);
  padding:.18rem .55rem;
  border-radius:999px;
  white-space:nowrap;
}

.research-ip-badge .bi{
  font-size:.65rem;
}

.research-badge{
  flex-shrink:0;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.62rem;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  padding:.18rem .6rem;
  border-radius:999px;
  white-space:nowrap;
}

.research-source{
  color:#888;
  font-style:italic;
  margin-top:.25rem;
  line-height:1.4;
}

.research-desc{
  color:var(--text-secondary, #555);
  line-height:1.55;
  margin-top:.6rem;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.research-desc.is-expanded{
  -webkit-line-clamp:unset;
  overflow:visible;
}

.research-desc-toggle{
  display:inline-block;
  margin-top:.35rem;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.74rem;
  font-weight:700;
  color:var(--pub-accent-strong);
  background:transparent;
  border:0;
  padding:0;
  cursor:pointer;
}

.research-desc-toggle:hover{
  opacity:.75;
}

.research-keywords{
  display:flex;
  flex-wrap:wrap;
  gap:.4rem;
  margin-top:.55rem;
}

.research-keyword{
  display:inline-flex;
  align-items:center;
  gap:.3rem;
  font-family:var(--bs-body-font-family, sans-serif);
  font-weight:700;
  color:#3D6B8C;
  background:rgba(61,107,140,.09);
  border:1px solid rgba(61,107,140,.28);
  border-radius:999px;
}

.research-keyword .bi{
  font-size:.62rem;
}

.research-results{
  display:flex;
  flex-wrap:wrap;
  gap:1rem;
  margin:1rem 0 0 72px;
  padding-top:.85rem;
  border-top:0.5px solid rgba(0,0,0,.06);
  min-height:2.4rem;
}

.research-link{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.74rem;
  font-weight:700;
  color:var(--pub-accent-strong);
  text-decoration:none;
}

.research-link:hover{
  opacity:.75;
}

.research-empty{
  padding:2rem 0;
  color:#888;
  font-style:italic;
}

@media (max-width:900px){
  .research-list{
    grid-template-columns:1fr;
  }
}

@media (max-width:600px){
  .research-stats{
    flex-wrap:wrap;
    gap:1.2rem;
  }
  .research-title-line{
    flex-direction:column;
    align-items:flex-start;
    gap:.3rem;
  }
  .research-results{
    margin-left:0;
  }
}

/* ============================================================
   Docencia — puntos por año académico
============================================================ */

body.teaching-page .teach-yeardots{
  display:flex;
  align-items:center;
  gap:5px;
  margin:.4rem 0 0 0;
  flex-wrap:wrap;
}

body.teaching-page .teach-yearlabel{
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.68rem;
  color:#999;
  flex-shrink:0;
}

body.teaching-page .teach-yeardot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--teach-type-color, var(--pub-accent-strong));
  flex-shrink:0;
}

body.teaching-page .teach-yeardot.is-gap{
  background:rgba(0,0,0,.10);
}

body.teaching-page .teach-yearcount{
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.68rem;
  color:#999;
  margin-left:.5rem;
  white-space:nowrap;
}

/* ============================================================
   Docencia — línea de tiempo cronológica
============================================================ */

body.teaching-page .teach-timeline{
  position:relative;
  max-width:760px;
  margin:0 auto;
  padding-left:26px;
}

body.teaching-page .teach-timeline::before{
  content:"";
  position:absolute;
  left:5px;
  top:6px;
  bottom:6px;
  width:2px;
  background:rgba(0,0,0,.08);
}

body.teaching-page .teach-entry{
  position:relative;
  padding-bottom:1.8rem;
  margin-bottom:1.8rem;
  border-bottom:0.5px solid rgba(0,0,0,.07);

  --teach-type-color: var(--pub-accent-strong);
  --teach-type-tint: rgba(224,122,31,.12);
}

body.teaching-page .teach-entry:last-child{
  border-bottom:0;
  margin-bottom:0;
  padding-bottom:0;
}

body.teaching-page .teach-entry.is-hidden{
  display:none !important;
}

body.teaching-page .teach-entry[data-type="posgrado"]{
  --teach-type-color: #2C3B4D;
  --teach-type-tint: rgba(44,59,77,.10);
}
body.teaching-page .teach-entry[data-type="cursos"]{
  --teach-type-color: #3D8B7D;
  --teach-type-tint: rgba(61,139,125,.12);
}
body.teaching-page .teach-entry[data-type="innovacion-docente"]{
  --teach-type-color: #9A5A35;
  --teach-type-tint: rgba(154,90,53,.12);
}
body.teaching-page .teach-entry[data-type="material-docente"]{
  --teach-type-color: #6B4570;
  --teach-type-tint: rgba(107,69,112,.12);
}

body.teaching-page .teach-entry-dot{
  position:absolute;
  left:-26px;
  top:5px;
  width:12px;
  height:12px;
  border-radius:50%;
  background:var(--teach-type-color);
  border:2px solid #fff;
  box-shadow:0 0 0 1px rgba(0,0,0,.08);
}

body.teaching-page .teach-entry-head{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:.5rem;
  margin-bottom:.3rem;
}

body.teaching-page .teach-entry-center{
  display:inline-flex;
  align-items:center;
  gap:.3rem;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.7rem;
  font-weight:700;
  color:#555;
}

body.teaching-page .teach-entry-title{
  font-weight:700;
  font-size:1.02rem;
  line-height:1.35;
  margin-bottom:.35rem;
}

/* ============================================================
   Medios — mosaico, lista de revisor, filas de prensa
============================================================ */

body.media-page main{
  max-width:1200px;
  padding-left:1rem;
  padding-right:1rem;
}

body.media-page #quarto-document-content,
body.media-page .page-columns,
body.media-page .quarto-container{
  display:block !important;
  grid-template-columns:none !important;
  max-width:1200px !important;
  width:100% !important;
  margin-left:auto !important;
  margin-right:auto !important;
  padding-left:0 !important;
  padding-right:0 !important;
}

body.media-page .media-heading{
  display:flex;
  align-items:baseline;
  gap:.6rem;
  margin:2.8rem 0 1.4rem 0;
  border-bottom:1px solid rgba(0,0,0,.10);
}

body.media-page .media-heading:first-of-type{
  margin-top:0;
}

body.media-page .media-heading-icon{
  font-size:1.1rem;
  color:var(--pub-accent-strong);
  align-self:center;
}

body.media-page .media-heading h2{
  margin:0;
  padding:0;
  border:0;
  font-size:1.55rem;
}

body.media-page .media-heading-count{
  margin-left:auto;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.76rem;
  color:#999;
  white-space:nowrap;
}

/* --- Bloque 1: apariciones agrupadas por formato --- */

.medios-group-heading{
  display:flex;
  align-items:baseline;
  gap:.4rem;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.72rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
  border-bottom:1px solid;
  padding-bottom:.5rem;
  margin:1.8rem 0 1rem 0;
}

h2 + .medios-group-heading{
  margin-top:0;
}

.medios-group-heading span{
  font-weight:600;
  opacity:.7;
}

.medios-mosaic{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:1.1rem;
  margin-bottom:.75rem;
}

.medios-card{
  display:block;
  border:0.5px solid rgba(0,0,0,.09);
  border-radius:12px;
  overflow:hidden;
  text-decoration:none;
  color:inherit;
  transition:box-shadow .15s ease, transform .15s ease;
}

.medios-card[hidden]{
  display:none !important;
}

.medios-card:hover{
  box-shadow:0 8px 20px rgba(0,0,0,.08);
  transform:translateY(-2px);
}

.medios-rows{
  display:flex;
  flex-direction:column;
  margin-bottom:.75rem;
}

.medios-row{
  display:flex;
  align-items:center;
  gap:14px;
  padding:.6rem 0;
  border-bottom:0.5px solid rgba(0,0,0,.06);
}

.medios-row[hidden]{
  display:none !important;
}

.medios-row-logo{
  width:80px;
  height:56px;
  flex-shrink:0;

  display:flex;
  align-items:center;
  justify-content:center;

  overflow:hidden;
  padding:4px;
  box-sizing:border-box;
}

.medios-row-logo img{
  width:100%;
  height:100%;
  object-fit:contain !important;
  object-position:center;
  display:block;
}

.medios-row-body{
  flex:1;
  min-width:0;
}

.medios-row-meta{
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.72rem;
  color:#999;
}

.medios-rol-badge{
  display:inline-block;
  margin-top:.4rem;
  padding:.08rem .5rem;
  border-radius:999px;
  font-family:var(--bs-body-font-family, sans-serif);
  font-weight:800;
  letter-spacing:.03em;
  text-transform:uppercase;
  font-size:.62rem;
}

.medios-row-title{
  display:block;
  font-size:.92rem;
  font-weight:700;
  color:#222;
  text-decoration:none;
  margin-top:.15rem;
}

a.medios-row-title:hover{
  color:var(--pub-accent-strong);
}

.medios-group-toggle{
  display:inline-block;
  margin:0 0 .5rem 0;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.76rem;
  font-weight:700;
  color:var(--pub-accent-strong);
  background:transparent;
  border:0;
  padding:0;
  cursor:pointer;
}

.medios-toggle:hover{
  opacity:.75;
}

@media (max-width:900px){
  .medios-mosaic{
    grid-template-columns:repeat(2, 1fr);
  }
}

@media (max-width:600px){
  .medios-mosaic{
    grid-template-columns:1fr;
  }
}

.medios-card-img{
  aspect-ratio:16/10;
  width:100%;
  display:block;
}

.medios-card-img img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.medios-card-img--fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-family:var(--bs-body-font-family, sans-serif);
  font-weight:700;
  font-size:1.4rem;
  letter-spacing:.04em;
}

.medios-card-body{
  padding:.85rem 1rem 1rem;
}

.medios-card-meta{
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.66rem;
  font-weight:700;
  color:#999;
  text-transform:uppercase;
  letter-spacing:.03em;
}

.medios-card-title{
  font-size:.92rem;
  font-weight:700;
  line-height:1.35;
  margin-top:.3rem;
}

.medios-card-date{
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.7rem;
  color:#999;
  margin-top:.4rem;
}

/* --- Bloque 2: revisor de papers --- */

.revisor-list{
  max-width:640px;
}

.revisor-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:.6rem 0;
  border-bottom:0.5px dashed rgba(0,0,0,.10);
}

.revisor-logo{
  width:34px;
  height:34px;
  border-radius:50%;
  border:1px solid rgba(0,0,0,.08);
  flex-shrink:0;
  overflow:hidden;
}

.revisor-logo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.revisor-logo--fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-family:var(--bs-body-font-family, sans-serif);
  font-weight:700;
  font-size:.62rem;
}

.revisor-body{
  flex:1;
  min-width:0;
  display:flex;
  align-items:baseline;
  gap:.5rem;
  flex-wrap:wrap;
}

.revisor-name{
  font-size:.92rem;
  font-weight:600;
  color:#222;
  text-decoration:none;
}

a.revisor-name:hover{
  color:var(--pub-accent-strong);
}

.revisor-since{
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.7rem;
  color:#999;
  margin-top:0;
}

/* --- Bloque 3: colaboración con periódicos --- */

.prensa-list{
  max-width:720px;
}

.prensa-item{
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:.9rem 0;
  border-bottom:0.5px solid rgba(0,0,0,.06);
}

.prensa-logo{
  width:44px;
  height:44px;
  border-radius:10px;
  flex-shrink:0;
  overflow:hidden;
}

.prensa-logo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.prensa-logo--fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-family:var(--bs-body-font-family, sans-serif);
  font-weight:700;
  font-size:.78rem;
}

.prensa-body{
  flex:1;
  min-width:0;
}

.prensa-title-line{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:.5rem;
}

.prensa-title{
  font-size:1rem;
  font-weight:700;
  color:#222;
  text-decoration:none;
}

a.prensa-title:hover{
  color:var(--pub-accent-strong);
}

.prensa-badge{
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.62rem;
  font-weight:800;
  letter-spacing:.04em;
  padding:.14rem .55rem;
  border-radius:999px;
  white-space:nowrap;
}

.prensa-meta{
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.78rem;
  color:#888;
  font-style:italic;
  margin-top:.25rem;
}

.prensa-toggle{
  display:inline-block;
  margin-top:1rem;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.78rem;
  font-weight:700;
  color:var(--pub-accent-strong);
  background:transparent;
  border:0;
  padding:0;
  cursor:pointer;
}

.prensa-toggle:hover{
  opacity:.75;
}

@media (max-width:600px){
  .medios-card{
    flex-basis:220px;
  }
}

/* ============================================================
   Colegio — cabecera institucional + actividad
============================================================ */

body.institucional-page main{
  max-width:900px;
  padding-left:1rem;
  padding-right:1rem;
}

body.institucional-page #quarto-document-content,
body.institucional-page .page-columns,
body.institucional-page .quarto-container{
  display:block !important;
  grid-template-columns:none !important;
  max-width:900px !important;
  width:100% !important;
  margin-left:auto !important;
  margin-right:auto !important;
  padding-left:0 !important;
  padding-right:0 !important;
}

body.institucional-page h2{
  font-size:1.45rem;
  font-weight:700;
  margin:0;
  padding:0;
  border:0;
}

.actividad-heading-row{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  flex-wrap:wrap;
  gap:.75rem;
  margin-bottom:1.4rem;
  padding-bottom:.4rem;
  border-bottom:1px solid rgba(0,0,0,.10);
}

.actividad-year-filter{
  display:flex;
  gap:.4rem;
  flex-wrap:wrap;
}

.year-pill{
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.72rem;
  font-weight:700;
  border:1px solid rgba(0,0,0,.15);
  color:#666;
  background:transparent;
  padding:.22rem .65rem;
  border-radius:999px;
  cursor:pointer;
}

.year-pill:hover{
  border-color:#E07A1F;
  color:#E07A1F;
}

.year-pill.is-active{
  background:#E07A1F;
  border-color:#E07A1F;
  color:#fff;
}

/* --- Cabecera institucional --- */

.institucion-header{
  border:0.5px solid rgba(224,122,31,.22);
  border-radius:16px;
  background:rgba(224,122,31,.045);
  padding:1.5rem 1.75rem;
  margin-bottom:2.5rem;
}

.institucion-header-main{
  display:flex;
  gap:18px;
  align-items:center;
}

.institucion-logo{
  width:96px;
  height:96px;
  border-radius:14px;
  flex-shrink:0;
  overflow:hidden;
}

.institucion-logo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.institucion-logo--fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#E07A1F;
  color:#fff;
  font-family:var(--bs-body-font-family, sans-serif);
  font-weight:700;
  font-size:1.5rem;
}

.institucion-role{
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.72rem;
  font-weight:800;
  color:#E07A1F;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.institucion-nombre{
  font-size:1.25rem;
  font-weight:700;
  margin:.25rem 0 .4rem 0;
  max-width:none;
}

.institucion-desc{
  font-size:.88rem;
  color:#555;
  line-height:1.5;
  max-width:none;
  text-align:justify;
  hyphens:auto;
}

.institucion-footer{
  margin-top:1rem;
  padding-top:.9rem;
  border-top:0.5px solid rgba(224,122,31,.18);
}

.institucion-link{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.76rem;
  font-weight:700;
  color:#E07A1F;
  text-decoration:none;
}

.institucion-link:hover{
  opacity:.75;
}

/* --- Actividad institucional --- */

.actividad-list{
  display:flex;
  flex-direction:column;
  gap:2.1rem;
}

.actividad-item{
  display:flex;
  gap:14px;
  align-items:flex-start;
  border-left:3px solid;
  padding:.35rem 0 .35rem 1rem;
}

.actividad-item.is-hidden{
  display:none !important;
}

.actividad-photo{
  width:72px;
  height:72px;
  border-radius:8px;
  overflow:hidden;
  flex-shrink:0;
}

.actividad-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.actividad-body{
  flex:1;
  min-width:0;
}

.actividad-eyebrow{
  display:block;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.68rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
  margin-bottom:.3rem;
}

.actividad-title{
  display:block;
  font-size:1.05rem;
  font-weight:700;
  color:#222;
  text-decoration:none;
  line-height:1.35;
}

a.actividad-title:hover{
  color:var(--pub-accent-strong);
}

.actividad-entidad{
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.76rem;
  color:#888;
  font-style:italic;
  margin-top:.2rem;
}

.actividad-desc{
  font-size:.88rem;
  color:#555;
  line-height:1.5;
  margin-top:.4rem;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.actividad-desc.is-expanded{
  -webkit-line-clamp:unset;
  overflow:visible;
}

.actividad-desc-toggle{
  display:inline-block;
  margin-top:.35rem;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.76rem;
  font-weight:700;
  color:#E07A1F;
  background:transparent;
  border:0;
  padding:0;
  cursor:pointer;
}

.actividad-desc-toggle:hover{
  opacity:.75;
}

@media (max-width:600px){
  .institucion-header-main{
    flex-direction:column;
    align-items:flex-start;
  }
  .actividad-item--photo{
    flex-direction:column;
  }
  .actividad-photo{
    width:100%;
    height:140px;
  }
}

/* ============================================================
   Medios — buscador y filtros
============================================================ */
body.media-page .media-filterbar{
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  background:rgba(0,0,0,.018);
  font-family:var(--bs-body-font-family, sans-serif);
}
body.media-page .media-search-wrap{
  position:relative;
  margin-bottom:.8rem;
}
body.media-page .media-search-wrap .bi{
  position:absolute;
  left:.8rem;
  top:50%;
  transform:translateY(-50%);
  color:#999;
  font-size:.8rem;
  pointer-events:none;
}
body.media-page #media-search{
  width:100%;
  border:1px solid rgba(0,0,0,.13);
  border-radius:999px;
  background:#fff;
  padding:.48rem .9rem .48rem 2.15rem;
  font-size:.78rem;
  outline:none;
}
body.media-page #media-search:focus{
  border-color:rgba(224,122,31,.55);
  box-shadow:0 0 0 3px rgba(224,122,31,.08);
}
body.media-page .media-format-filters{
  display:flex;
  flex-wrap:wrap;
  gap:.4rem;
}
body.media-page .media-format-btn{
  border:1px solid rgba(0,0,0,.12);
  border-radius:999px;
  background:transparent;
  font-weight:700;
  cursor:pointer;
}
body.media-page .media-format-btn:hover{
  border-color:rgba(224,122,31,.35);
  color:var(--pub-accent-strong);
}
body.media-page .media-format-btn.is-active{
  background:var(--pub-accent-strong);
}
body.media-page .media-filter-bottom{
  display:flex;
  align-items:center;
  gap:.5rem;
}
body.media-page .media-year-label{
  font-size:.66rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}
body.media-page #media-year{
  border:1px solid rgba(0,0,0,.12);
  border-radius:999px;
  background:#fff;
}
body.media-page #media-results-count{
  margin-left:auto;
  white-space:nowrap;
}
body.media-page .medios-group-heading[hidden],
body.media-page .medios-mosaic[hidden],
body.media-page .medios-rows[hidden],
body.media-page .medios-group-toggle[hidden]{
  display:none !important;
}
body.media-page .medios-group-toggle:hover{
  opacity:.75;
}
@media (max-width:600px){
  body.media-page .media-filterbar{ padding:.85rem; }
  body.media-page .media-search-wrap{ max-width:none; }
  body.media-page .media-filter-bottom{ flex-wrap:wrap; }
  body.media-page #media-results-count{ width:100%; margin-left:0; }
}

/* ============================================================
   ACTIVIDAD — CABECERA + FILTROS STICKY
   ============================================================ */

body.media-page .media-heading {
  position: sticky;
  top: 2.65rem;
  z-index: 102;

  background: #fff;

  margin-top: 0 !important;
  margin-bottom: 0 !important;

  padding-top: 0.85rem;
  padding-bottom: 0.65rem;

  border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}

body.media-page .media-filterbar {
  position: sticky;
  top: 6.55rem;
  z-index: 101;

  margin-top: -1px !important;

  background: #fff;

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

body.media-page .media-heading::after {
  content: "";
  position: absolute;

  left: 0;
  right: 0;
  bottom: -3px;

  height: 4px;

  background: #fff;
}

body.media-page [data-group-heading] {
  scroll-margin-top: 14rem;
}

/* ============================================================
   ACTIVIDAD — RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {

  body.media-page .media-heading {
    top: 2.5rem;

    padding-top: 0.65rem;
    padding-bottom: 0.55rem;
  }

  body.media-page .media-heading h2 {
    font-size: 1.3rem;
  }

  body.media-page .media-filterbar {
    top: 6rem;
  }
}

/* ============================================================
   Navbar — sección activa (línea naranja bajo la opción elegida)
   El script nav-active.html añade .active también a Docencia y
   Congresos, que usan output-file y Quarto no marca por sí solo.
   Para cambiar el color: --nav-active-line.
============================================================ */

:root{
  --nav-active-line:#E07A1F;
}

.navbar .navbar-nav .nav-link{
  position:relative;
}

.navbar .navbar-nav .nav-link.active,
.navbar .navbar-nav .nav-link[aria-current="page"]{
  color:#fff !important;
  font-weight:700;
}

.navbar .navbar-nav .nav-link.active::after,
.navbar .navbar-nav .nav-link[aria-current="page"]::after{
  content:"";
  position:absolute;
  left:4px;
  right:4px;
  bottom:5px;
  height:2px;
  border-radius:2px;
  background:var(--nav-active-line);
}

/* ============================================================
   Publicaciones — fila de filtros fija bajo la navbar
============================================================ */

body.publications-page .pub-filters-row{
  position:sticky;
  top:56px;
  z-index:35;
  background:rgba(255,255,255,.97);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  padding-top:.8rem;
  margin-top:0;
}

@media (max-width:768px){
  body.publications-page .pub-filters-row{ top:52px; }
}

/* ============================================================
   Portada
============================================================ */

body.home-page main{
  max-width:1040px;
  padding-left:1.25rem;
  padding-right:1.25rem;
}

body.home-page #quarto-document-content,
body.home-page .page-columns,
body.home-page .quarto-container{
  display:block !important;
  grid-template-columns:none !important;
  max-width:1040px !important;
  width:100% !important;
  margin-left:auto !important;
  margin-right:auto !important;
  padding-left:0 !important;
  padding-right:0 !important;
}

.home-intro{
  display:grid;
  grid-template-columns:minmax(0,1fr) 250px;
  gap:3rem;
  align-items:center;
  margin:clamp(2rem,5vw,4rem) 0 clamp(2.5rem,5vw,3.5rem);
}

.home-name{
  font-size:2.3rem;
  font-weight:800;
  line-height:1.1;
  letter-spacing:-.005em;
  color:#222;
}

.home-role{
  margin:.45rem 0 1.2rem;
  font-size:1rem;
  font-style:italic;
  color:#777;
}

.home-bio{
  margin:0;
  font-size:.98rem;
  line-height:1.65;
  color:#333;
  text-align:justify;
  hyphens:auto;
  max-width:36rem;
}

.home-interests{
  margin:1.3rem 0 0;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.74rem;
  letter-spacing:.03em;
  color:#888;
}

.home-interests span{
  margin:0 .55rem;
  color:var(--pub-accent-strong);
}

.home-photo{
  width:100%;
  aspect-ratio:4 / 5;
  object-fit:cover;
  object-position:center top;
  border-radius:4px;
  display:block;
  box-shadow:0 10px 30px rgba(0,0,0,.10);
}

.home-areas{
  border-top:1px solid rgba(0,0,0,.10);
  padding-top:1.6rem;
  margin-bottom:clamp(3rem,7vw,5rem);
}

.home-areas-kicker{
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#888;
  margin-bottom:1.8rem;
}

.home-areas-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  column-gap:4rem;
  row-gap:2.6rem;
}

.home-area{
  --area-color:#E07A1F;
  text-decoration:none;
  color:inherit;
}

.home-area--research{    --area-color:#6B4570; }
.home-area--publications{--area-color:#2C3B4D; }
.home-area--teaching{    --area-color:#E07A1F; }
.home-area--conferences{ --area-color:#3D8B7D; }
.home-area--media{       --area-color:#C24A2E; }
.home-area--colegio{     --area-color:#C9822F; }

.home-area-line{
  display:block;
  width:34px;
  height:3px;
  border-radius:2px;
  background:var(--area-color);
  margin-bottom:.8rem;
  transition:width .2s ease;
}

.home-area-name{
  display:block;
  font-size:1.3rem;
  font-weight:800;
  color:#222;
  line-height:1.2;
}

.home-area-desc{
  display:block;
  margin-top:.4rem;
  font-size:.92rem;
  line-height:1.5;
  color:#666;
}

.home-area-go{
  display:inline-block;
  margin-top:.7rem;
  font-family:var(--bs-body-font-family, sans-serif);
  font-size:.76rem;
  font-weight:700;
  color:var(--area-color);
}

.home-area:hover .home-area-line{ width:64px; }
.home-area:hover .home-area-name{ color:var(--area-color); }

@media (max-width:760px){
  .home-intro{
    grid-template-columns:1fr;
    gap:1.5rem;
  }
  .home-photo{
    width:170px;
    order:-1;
  }
  .home-name{ font-size:1.9rem; }
  .home-areas-grid{
    grid-template-columns:1fr;
    row-gap:2rem;
  }
}

/* ============================================================
   V8 — portada compacta + filtros de Investigación + Congresos
============================================================ */

/* Inicio: misma composición de V7, más compacta para verla de un vistazo */
body.home-page .home-intro{
  grid-template-columns:minmax(0,1fr) 205px;
  gap:2.4rem;
  margin:1.55rem 0 1.65rem;
}
body.home-page .home-name{ font-size:2.05rem; }
body.home-page .home-role{ margin:.35rem 0 .8rem; font-size:.94rem; }
body.home-page .home-bio{
  font-size:.91rem;
  line-height:1.52;
  max-width:42rem;
}
body.home-page .home-interests{ margin:.85rem 0 0; }
body.home-page .home-photo{ max-height:238px; }
body.home-page .home-areas{
  padding-top:1rem;
  margin-bottom:2.25rem;
}
body.home-page .home-areas-kicker{ margin-bottom:.9rem; }
body.home-page .home-areas-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
  column-gap:2.5rem;
  row-gap:1.35rem;
}
body.home-page .home-area-line{ margin-bottom:.55rem; }
body.home-page .home-area-name{ font-size:1.08rem; }
body.home-page .home-area-desc{
  font-size:.82rem;
  line-height:1.38;
}
body.home-page .home-area-go{ font-size:.71rem; }

/* Investigación: categorías + temas siempre accesibles bajo la navbar */
body.research-page .research-filter-wrap{
  position:sticky;
  top:56px;
  z-index:35;
  margin:0 0 1.35rem;
  padding:.65rem .25rem .72rem;
  background:rgba(255,255,255,.97);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border-bottom:1px solid rgba(0,0,0,.08);
}
body.research-page .research-filterbar{
  gap:.42rem;
}
body.research-page .research-filter-label{
  display:inline-flex;
  align-items:center;
  align-self:center;
  margin-right:.15rem;
  font-family:var(--bs-body-font-family,sans-serif);
  font-size:.66rem;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#92979c;
}
body.research-page .research-tag-filter{
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:.38rem;
  margin-top:.5rem;
}
body.research-page .research-tag-pill{
  font-family:var(--bs-body-font-family,sans-serif);
  font-size:.66rem;
  font-weight:650;
  line-height:1;
  border:1px solid rgba(107,69,112,.28);
  color:#6B4570;
  background:rgba(107,69,112,.035);
  padding:.28rem .62rem;
  border-radius:999px;
  cursor:pointer;
}
body.research-page .research-tag-pill span{
  margin-left:.22rem;
  opacity:.58;
  font-size:.9em;
}
body.research-page .research-tag-pill:hover{
  background:rgba(107,69,112,.09);
}
body.research-page .research-tag-pill.is-active{
  color:#fff;
  background:#6B4570;
  border-color:#6B4570;
}

/* Congresos: pills más suaves/redondeados y algo más generosos */
body.conferences-page .conf-filter-pill{
  border-radius:999px !important;
  padding:.36rem .95rem;
  line-height:1.1;
  box-shadow:none;
}

/* Los logos reales de Investigación conservan transparencia y color original */

body.research-page .research-logo img{
  filter:none !important;
  opacity:1 !important;
  background:transparent !important;
}

@media(max-width:900px){
  body.home-page .home-areas-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:768px){
  body.home-page .home-intro{
    grid-template-columns:1fr 120px;
    gap:1.25rem;
    margin-top:1rem;
  }
  body.home-page .home-photo{ max-height:150px; }
  body.home-page .home-areas-grid{ grid-template-columns:1fr; row-gap:1.15rem; }
  body.research-page .research-filter-wrap{
    top:52px;
    margin-left:-.5rem;
    margin-right:-.5rem;
    padding-left:.5rem;
    padding-right:.5rem;
  }
  body.research-page .research-filterbar,
  body.research-page .research-tag-filter{
    justify-content:flex-start;
    flex-wrap:nowrap;
    overflow-x:auto;
    scrollbar-width:none;
    padding-bottom:.12rem;
  }
  body.research-page .research-filterbar::-webkit-scrollbar,
  body.research-page .research-tag-filter::-webkit-scrollbar{ display:none; }
  body.research-page .research-pill,
  body.research-page .research-tag-pill,
  body.research-page .research-filter-label{ flex:0 0 auto; }
}

/* =========================================================
   V9 — SISTEMA UNIFICADO DE FILTROS
   Publicaciones es la referencia visual.
   ========================================================= */
:root{
  --filter-h: 34px;
  --filter-radius: 8px;
  --filter-border: #cfd5da;
  --filter-text: #45515c;
  --filter-muted: #717b84;
  --filter-bg: #fff;
  --filter-hover: #f4f6f7;
  --filter-active-bg: #2C3B4D;
  --filter-active-text: #fff;
}

/* Chips/pills: mismo tamaño, tipografía, radio y estados */
.pub-type-pill,
.pub-chip,
.research-pill,
.research-tag-pill,
.conf-filter-pill,
.year-pill,
.media-format-pill,
.media-filter-pill {
  min-height: var(--filter-h) !important;
  padding: .38rem .72rem !important;
  border: 1px solid var(--filter-border) !important;
  border-radius: var(--filter-radius) !important;
  background: var(--filter-bg) !important;
  color: var(--filter-text) !important;
  box-shadow: none !important;
  font-family: var(--bs-font-sans-serif) !important;
  font-size: .78rem !important;
  font-weight: 600 !important;
  line-height: 1.15 !important;
  letter-spacing: .005em !important;
  transition: background .15s ease, border-color .15s ease, color .15s ease !important;
}
.pub-type-pill:hover,.pub-chip:hover,.research-pill:hover,.research-tag-pill:hover,
.conf-filter-pill:hover,.year-pill:hover,.media-format-pill:hover,.media-filter-pill:hover {
  background: var(--filter-hover) !important;
  border-color: #aeb7bf !important;
}
.pub-type-pill.is-active,.pub-chip.is-active,.research-pill.is-active,.research-tag-pill.is-active,
.conf-filter-pill.is-active,.year-pill.is-active,.media-format-pill.is-active,.media-filter-pill.is-active,
.pub-type-pill[aria-pressed="true"],.research-pill[aria-pressed="true"],
.research-tag-pill[aria-pressed="true"],.conf-filter-pill[aria-pressed="true"],
.year-pill[aria-pressed="true"] {
  background: var(--filter-active-bg) !important;
  border-color: var(--filter-active-bg) !important;
  color: var(--filter-active-text) !important;
}

/* Desplegables/triggers: misma familia que los chips */
.pub-cat-trigger,
.teach-area-trigger,
.media-cat-trigger,
.media-filter-trigger,
select.pub-category-select,
select.teaching-select {
  min-height: var(--filter-h) !important;
  border: 1px solid var(--filter-border) !important;
  border-radius: var(--filter-radius) !important;
  background-color: #fff !important;
  color: var(--filter-text) !important;
  box-shadow: none !important;
  font-family: var(--bs-font-sans-serif) !important;
  font-size: .78rem !important;
  font-weight: 600 !important;
}
.pub-cat-trigger:hover,.teach-area-trigger:hover,.media-cat-trigger:hover,.media-filter-trigger:hover {
  border-color:#aeb7bf !important;
  background-color:var(--filter-hover) !important;
}
.pub-cat-trigger.has-filter,.teach-area-trigger.has-filter,
.media-cat-trigger.has-filter,.media-filter-trigger.has-filter {
  border-color:#7f8b95 !important;
  background:#f1f3f4 !important;
  color:#263746 !important;
}

/* Etiquetas funcionales discretas y coherentes */
.research-filter-label,
.pub-filter-label,
.teaching-filter-label,
.conf-filter-label,
.media-filter-label {
  font-family:var(--bs-font-sans-serif) !important;
  font-size:.67rem !important;
  font-weight:700 !important;
  letter-spacing:.08em !important;
  text-transform:uppercase !important;
  color:var(--filter-muted) !important;
}

/* Separación consistente entre grupos sin hacerlos parecer formularios distintos */
body.research-page .research-filterbar,
body.publications-page .pub-filters-row,
.teaching-nav-wrap,
.conf-filter,
body.media-page .media-filterbar {
  gap:.55rem !important;
}

/* V9 HOME — línea bajo el título + acción a la derecha */
.home-area-accent {
  margin:.55rem 0 .75rem !important;
  width:42px !important;
  height:3px !important;
}
.home-area h2 { margin-bottom:0 !important; }
.home-area {
  position:relative;
  display:flex !important;
  flex-direction:column;
}
.home-area p { margin-bottom:.65rem !important; }
.home-area-link {
  display:block !important;
  margin-top:auto !important;
  text-align:right !important;
  width:100%;
}
.home-area:hover .home-area-accent { width:64px !important; }

/* =========================================================
   V10 — SISTEMA DE FILTROS COHERENTE (referencia: Publicaciones)
   ========================================================= */
:root{
  --ui-filter-h:34px;
  --ui-filter-radius:9px;
  --ui-filter-border:#cbd3da;
  --ui-filter-text:#465360;
  --ui-filter-active:#2C3B4D;
  --ui-filter-hover:#f4f6f7;
  --ui-panel-border:#d9dde1;
}

/* 1. Chips de primer nivel */
.pub-type-pill,
.research-pill,
.teaching-topnav .teach-type-btn,
.conf-filter-pill,
body.media-page .media-format-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:.3rem !important;
  border:1px solid var(--ui-filter-border) !important;
  border-radius:var(--ui-filter-radius) !important;
  background:#fff !important;
  color:var(--ui-filter-text) !important;
  box-shadow:none !important;
  font-family:var(--bs-body-font-family,sans-serif) !important;
  font-size:.73rem !important;
  font-weight:700 !important;
  line-height:1 !important;
}
.pub-type-pill:hover,.research-pill:hover,.teaching-topnav .teach-type-btn:hover,
.conf-filter-pill:hover,body.media-page .media-format-btn:hover{
  background:var(--ui-filter-hover) !important;
  border-color:#aab4bc !important;
  color:#2f3d49 !important;
}
.pub-type-pill.is-active,.research-pill.is-active,.teaching-topnav .teach-type-btn.is-active,
.conf-filter-pill.is-active,body.media-page .media-format-btn.is-active{
  background:var(--ui-filter-active) !important;
  border-color:var(--ui-filter-active) !important;
  color:#fff !important;
}
.teaching-topnav .teach-type-dot{display:none !important;}
.filter-count,.pub-pill-count{font-size:.9em;font-weight:650;opacity:.62;}

/* 2. Trigger de segundo nivel: Categorías / Temas / Áreas */
.pub-cat-trigger,.research-tag-trigger,.teach-area-trigger{
  min-height:var(--ui-filter-h) !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:.42rem !important;
  padding:.38rem .78rem !important;
  border:1px solid var(--ui-filter-border) !important;
  border-radius:var(--ui-filter-radius) !important;
  background:#fff !important;
  color:var(--ui-filter-text) !important;
  box-shadow:none !important;
  font-family:var(--bs-body-font-family,sans-serif) !important;
  font-size:.73rem !important;
  font-weight:700 !important;
  line-height:1 !important;
}
.pub-cat-trigger:hover,.research-tag-trigger:hover,.teach-area-trigger:hover{
  background:var(--ui-filter-hover) !important;border-color:#aab4bc !important;
}
.pub-cat-trigger.has-filter,.research-tag-trigger.has-filter,.teach-area-trigger.has-filter{
  background:#eef1f3 !important;border-color:#9ca7b0 !important;color:#253746 !important;
}

/* 3. Paneles desplegables: mismo lenguaje */
.pub-cat-panel,.research-tag-panel,.teach-area-panel{
  background:#fff !important;
  border:1px solid var(--ui-panel-border) !important;
  border-radius:12px !important;
  box-shadow:0 12px 30px rgba(27,38,50,.10) !important;
  padding:.75rem !important;
  z-index:80 !important;
}
.research-tag-dropdown,.pub-cat-dropdown,.teach-area-dropdown{position:relative;}
.research-tag-panel{
  position:absolute; top:calc(100% + .5rem); right:0;
  width:min(620px,calc(100vw - 2rem));
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.12rem .8rem;
}
.research-tag-panel[hidden]{display:none !important;}
.research-tag-pill,.pub-cat-panel .cat-link,.teach-area-btn{
  width:100%; min-height:30px; padding:.34rem .45rem !important;
  border:0 !important; border-radius:6px !important; background:transparent !important;
  color:#4b535b !important; text-align:left !important;
  font-family:Georgia,serif !important; font-size:.82rem !important; font-weight:400 !important;
  cursor:pointer;
}
.research-tag-pill:hover,.pub-cat-panel .cat-link:hover,.teach-area-btn:hover{
  background:#f4f5f6 !important;color:#2C3B4D !important;
}
.research-tag-pill.is-active,.pub-cat-panel .cat-link.is-active,.teach-area-btn.is-active{
  background:transparent !important;color:#6B4570 !important;font-weight:700 !important;
}

/* 4. Composición de cada barra: clasificación corta + taxonomía larga */
body.publications-page .pub-filters-row,
body.research-page .research-filter-wrap,
body.teaching-page .teaching-nav-wrap{
  display:flex !important; align-items:center !important; justify-content:center !important;
  flex-wrap:wrap !important; gap:.55rem !important;
}
body.research-page .research-filterbar{margin:0 !important;gap:.45rem !important;}
body.research-page .research-tag-filter{display:none !important;}
body.research-page .research-tag-dropdown{display:flex;align-items:center;}
body.teaching-page .teaching-topnav{margin:0 !important;gap:.45rem !important;}
body.teaching-page .teach-area-dropdown{margin:0 !important;}

/* Actividad: búsqueda + chips + año, misma geometría */
body.media-page #media-search{
  border:1px solid var(--ui-filter-border) !important;border-radius:var(--ui-filter-radius) !important;
  min-height:var(--ui-filter-h);box-shadow:none !important;
}
body.media-page #media-year{border:1px solid var(--ui-filter-border) !important;
  border-radius:var(--ui-filter-radius) !important;font-weight:650;
}

/* HOME V10: título, línea debajo y Explorar a la derecha */
body.home-page .home-area{display:flex !important;flex-direction:column !important;}
body.home-page .home-area-name{order:1;}
body.home-page .home-area-line{order:2;}
body.home-page .home-area-desc{order:3;}
body.home-page .home-area-go{
  order:4;display:block !important;width:100% !important;padding-top:.38rem;
}

@media(max-width:768px){
  .research-tag-panel{left:0;right:auto;grid-template-columns:1fr 1fr;width:min(520px,calc(100vw - 1rem));}
  body.publications-page .pub-filters-row,
  body.research-page .research-filter-wrap,
  body.teaching-page .teaching-nav-wrap{justify-content:flex-start !important;}
}

/* =========================================================
   V11 — COLOR FUNCIONAL + AJUSTES SOLICITADOS
   ========================================================= */

/* HOME: barra cromática vertical a la izquierda */
body.home-page .home-area{
  position:relative;
  padding-left:1rem !important;
}
body.home-page .home-area-line{
  position:absolute !important;
  left:0 !important;
  top:.12rem !important;
  bottom:.15rem !important;
  width:3px !important;
  height:auto !important;
  margin:0 !important;
  border-radius:3px !important;
  background:var(--area-color) !important;
}
body.home-page .home-area-name{order:1 !important;}
body.home-page .home-area-desc{order:2 !important;margin-top:.42rem !important;}
body.home-page .home-area-go{order:3 !important;margin-top:auto !important;text-align:right !important;}
body.home-page .home-area:hover .home-area-line{width:4px !important;}

/* CONGRESOS: filtros siempre visibles bajo navbar */
body.conferences-page .conf-filter{
  position:sticky !important;
  top:var(--navbar-height, 56px) !important;
  z-index:1030 !important;
  padding:.72rem 0 !important;
  margin-bottom:1.1rem !important;
  background:rgba(255,255,255,.96) !important;
  backdrop-filter:blur(8px);
  border-bottom:1px solid #e3e6e8;
}

/* Recuperar color de los filtros sin cambiar su geometría */
.teaching-topnav .teach-type-btn[data-type="grado"]{--filter-local:#E07A1F;}
.teaching-topnav .teach-type-btn[data-type="posgrado"]{--filter-local:#2C3B4D;}
.teaching-topnav .teach-type-btn[data-type="cursos"]{--filter-local:#3D8B7D;}
.teaching-topnav .teach-type-btn[data-type="innovacion-docente"]{--filter-local:#9A5A35;}
.teaching-topnav .teach-type-btn[data-type="material-docente"]{--filter-local:#6B4570;}
.teaching-topnav .teach-type-btn:not(.is-active)[data-type]{
  color:var(--filter-local) !important;
  border-color:color-mix(in srgb,var(--filter-local) 35%,white) !important;
  background:color-mix(in srgb,var(--filter-local) 7%,white) !important;
}
.teaching-topnav .teach-type-btn.is-active[data-type]{
  color:#fff !important;background:var(--filter-local) !important;border-color:var(--filter-local) !important;
}

/* Research category colors */
body.research-page .research-pill[data-category="Nacional"],
body.research-page .research-pill[data-category="nacional"]{--filter-local:#E07A1F;}
body.research-page .research-pill[data-category="H2020"],
body.research-page .research-pill[data-category="h2020"]{--filter-local:#2C3B4D;}
body.research-page .research-pill[data-category="Internacional"],
body.research-page .research-pill[data-category="internacional"]{--filter-local:#6B4570;}
body.research-page .research-pill[data-category]:not(.is-active){
 color:var(--filter-local,var(--filter-text)) !important;
 border-color:color-mix(in srgb,var(--filter-local,#7b8791) 35%,white) !important;
 background:color-mix(in srgb,var(--filter-local,#7b8791) 7%,white) !important;
}
body.research-page .research-pill.is-active[data-category]{
 color:#fff !important;background:var(--filter-local,#2C3B4D) !important;border-color:var(--filter-local,#2C3B4D) !important;
}

/* Conference filter colors */
body.conferences-page .conf-filter-pill[data-tipo="nacional"]{--filter-local:#E07A1F;}
body.conferences-page .conf-filter-pill[data-tipo="internacional"]{--filter-local:#3D8B7D;}
body.conferences-page .conf-filter-pill[data-tipo]:not(.is-active){
 color:var(--filter-local,var(--filter-text)) !important;
 border-color:color-mix(in srgb,var(--filter-local,#7b8791) 38%,white) !important;
 background:color-mix(in srgb,var(--filter-local,#7b8791) 8%,white) !important;
}
body.conferences-page .conf-filter-pill.is-active[data-tipo]{
 color:#fff !important;background:var(--filter-local,#2C3B4D) !important;border-color:var(--filter-local,#2C3B4D) !important;
}

/* DOCENCIA: áreas en rejilla, no en una línea */
body.teaching-page .teach-area-panel{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(150px,1fr)) !important;
  gap:.25rem .7rem !important;
  min-width:min(680px,calc(100vw - 2rem)) !important;
  padding:1rem !important;
}
body.teaching-page .teach-area-panel[hidden]{display:none !important;}
body.teaching-page .teach-area-btn{
  width:100% !important;
  white-space:normal !important;
  border:0 !important;
  background:transparent !important;
  padding:.48rem .55rem !important;
  border-radius:6px !important;
}
body.teaching-page .teach-area-btn:hover{background:#f4f2f5 !important;}
body.teaching-page .teach-area-btn.is-active{color:#6B4570 !important;background:#f4eef5 !important;font-weight:700 !important;}

/* Conference entry category as filled chip */
body.conferences-page .conf-role-badge{
  display:inline-flex !important;
  align-items:center !important;
  border-radius:999px !important;
  font-family:var(--bs-font-sans-serif) !important;
  letter-spacing:.045em !important;
  text-transform:uppercase !important;
}
/* Renderer currently supplies its category color inline; make the tint visibly filled. */
body.conferences-page .conf-item[data-tipo="nacional"] .conf-role-badge{background:#FCE8D7 !important;border:1px solid #F4C79F !important;
}
body.conferences-page .conf-item[data-tipo="internacional"] .conf-role-badge{background:#E1F1ED !important;border:1px solid #B6DDD5 !important;
}

@media(max-width:760px){
 body.teaching-page .teach-area-panel{grid-template-columns:repeat(2,minmax(130px,1fr)) !important;min-width:min(94vw,520px) !important;}
}
@media(max-width:480px){
 body.teaching-page .teach-area-panel{grid-template-columns:1fr !important;}
}

body.conferences-page .conf-type-badge{align-items:center;padding:.26rem .62rem;border-radius:999px;
 font-family:var(--bs-font-sans-serif);font-size:.68rem;font-weight:750;letter-spacing:.045em;text-transform:uppercase;
 margin-bottom:.45rem;
}
body.conferences-page .conf-type-badge--nacional{color:#A94F08;background:#FCE8D7;border:1px solid #F4C79F;}
body.conferences-page .conf-type-badge--internacional{color:#286D62;background:#E1F1ED;border:1px solid #B6DDD5;}

/* =========================================================
   V12 — COLOR COHERENTE EN CABECERAS DE FILTRO
   ========================================================= */

/* PUBLICACIONES: recuperar sus colores de tipo */
body.publications-page .pub-type-pill[data-type="articulo"],
body.publications-page .pub-type-pill[data-type="artículo"]{--filter-local:#E07A1F;}
body.publications-page .pub-type-pill[data-type="libro"]{--filter-local:#9B3F55;}
body.publications-page .pub-type-pill[data-type="capitulo"],
body.publications-page .pub-type-pill[data-type="capítulo"]{--filter-local:#2C3B4D;}
body.publications-page .pub-type-pill[data-type="informe"]{--filter-local:#3D8B7D;}
body.publications-page .pub-type-pill[data-type]:not(.is-active){
 color:var(--filter-local,var(--filter-text)) !important;
 border-color:color-mix(in srgb,var(--filter-local,#7b8791) 36%,white) !important;
 background:color-mix(in srgb,var(--filter-local,#7b8791) 7%,white) !important;
}
body.publications-page .pub-type-pill.is-active[data-type]{
 color:#fff !important;background:var(--filter-local,#2C3B4D) !important;border-color:var(--filter-local,#2C3B4D) !important;
}

/* INVESTIGACIÓN: selectors reales alternativos */
body.research-page .research-pill[data-cat="nacional"],
body.research-page .research-pill[data-type="nacional"]{--filter-local:#E07A1F;}
body.research-page .research-pill[data-cat="h2020"],
body.research-page .research-pill[data-type="h2020"]{--filter-local:#2C3B4D;}
body.research-page .research-pill[data-cat="internacional"],
body.research-page .research-pill[data-type="internacional"]{--filter-local:#6B4570;}
body.research-page .research-pill[style*="--pill-color"]{
 color:var(--pill-color) !important;
 border-color:color-mix(in srgb,var(--pill-color) 38%,white) !important;
 background:color-mix(in srgb,var(--pill-color) 7%,white) !important;
}
body.research-page .research-pill.is-active[style*="--pill-color"]{
 color:#fff !important;background:var(--pill-color) !important;border-color:var(--pill-color) !important;
}

/* CONGRESOS: use renderer --pill-color whenever present */
body.conferences-page .conf-filter-pill[style*="--pill-color"]:not(.is-active){
 color:var(--pill-color) !important;
 border-color:color-mix(in srgb,var(--pill-color) 38%,white) !important;
 background:color-mix(in srgb,var(--pill-color) 8%,white) !important;
}
body.conferences-page .conf-filter-pill[style*="--pill-color"].is-active{
 color:#fff !important;background:var(--pill-color) !important;border-color:var(--pill-color) !important;
}

/* ACTIVIDAD: preservar el color propio de cada formato */
body.media-page .media-format-btn[style*="--"],
body.media-page .media-format-btn[data-color]{
 color:var(--format-color,var(--media-color,var(--filter-text))) !important;
}

/* DOCENCIA: Área alineada a la izquierda como Temas en Investigación */
body.teaching-page .teaching-topnav{
 justify-content:flex-start !important;
}
body.teaching-page .teach-area-dropdown{
 position:relative !important;
 align-self:flex-start !important;
}
body.teaching-page .teach-area-trigger{
 display:inline-flex !important;
 justify-content:flex-start !important;
 align-items:center !important;
 gap:.45rem !important;
 text-align:left !important;
}
body.teaching-page .teach-area-panel{
 left:0 !important;
 right:auto !important;
 transform:none !important;
}

/* CONGRESOS: una sola etiqueta, más discreta */
body.conferences-page .conf-type-badge{display:none !important;}
body.conferences-page .conf-role-badge{
 min-height:20px !important;
 border-radius:6px !important;
 font-size:.61rem !important;
 letter-spacing:.035em !important;
 margin:0 .3rem .25rem 0 !important;
}
body.conferences-page .conf-item[data-tipo="nacional"] .conf-role-badge{background:#FBF0E6 !important;border:1px solid #F1D5BC !important;
}
body.conferences-page .conf-item[data-tipo="internacional"] .conf-role-badge{background:#EAF4F1 !important;border:1px solid #CCE3DD !important;
}

/* =========================================================
   V13 — HOME EDITORIAL / IDENTIDAD ACADÉMICA
   ========================================================= */

body.home-editorial .editorial-home{
  --eh-ink:#252e36;
  --eh-muted:#66717a;
  --eh-rule:#d9dde0;
  --eh-copper:#b9652c;
  --eh-paper:#faf9f6;
  padding:clamp(2.4rem,5vw,5rem) clamp(1.5rem,5vw,4.5rem) 3rem;
  color:var(--eh-ink);
}
.editorial-hero{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(230px,.62fr);
  gap:clamp(3rem,8vw,7rem);
  align-items:end;
  min-height:430px;
}
.editorial-identity{padding-bottom:.55rem;}
.editorial-eyebrow{
  font-family:var(--bs-font-sans-serif);
  font-size:.69rem;
  font-weight:700;
  letter-spacing:.13em;
  text-transform:uppercase;
  color:var(--eh-copper);
  margin-bottom:1.45rem;
}
.editorial-name{
  margin:0 !important;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(3.3rem,6.4vw,6.25rem) !important;
  line-height:.88 !important;
  letter-spacing:-.045em;
  font-weight:400 !important;
  color:var(--eh-ink) !important;
}
.editorial-name span{display:block;}
.editorial-name span:last-child{margin-left:clamp(1.3rem,5vw,4.6rem);color:#3c4852;}
.editorial-role{
  margin:1.65rem 0 .85rem !important;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.15rem;
  font-style:italic;
  color:#47535c;
}
.editorial-lead{
  max-width:42rem;
  margin:0 !important;
  font-size:.98rem;
  line-height:1.62;
  color:#4d5962;
}
.editorial-portrait{
  margin:0;
  position:relative;
  align-self:stretch;
  display:flex;
  align-items:flex-end;
}
.editorial-portrait::before{
  content:"";
  position:absolute;
  width:68%;
  height:78%;
  right:-1rem;
  top:-1rem;
  background:var(--eh-paper);
  border-top:3px solid var(--eh-copper);
  z-index:0;
}
.editorial-portrait img{
  position:relative;
  z-index:1;
  display:block;
  width:100%;
  max-height:410px;
  object-fit:cover;
  object-position:center top;
  filter:none !important;
  border-radius:0 !important;
  box-shadow:none !important;
}
.editorial-fields{
  margin-top:clamp(3rem,6vw,5.3rem);
  padding:1.4rem 0 1.55rem;
  border-top:1px solid var(--eh-rule);
  border-bottom:1px solid var(--eh-rule);
  display:grid;
  grid-template-columns:repeat(4,1fr);
}
.editorial-field{
  position:relative;
  min-height:76px;
  padding:.15rem 1.4rem .15rem 1.15rem;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(1.02rem,1.65vw,1.42rem);
  line-height:1.18;
  display:flex;
  align-items:center;
}
.editorial-field:first-child{padding-left:0;}
.editorial-field:not(:last-child){border-right:1px solid var(--eh-rule);}
.editorial-field::after{
  content:"";
  position:absolute;
  bottom:-1.58rem;
  left:1.15rem;
  width:28px;
  height:3px;
  background:var(--field-color);
}
.editorial-field:first-child::after{left:0;}
.editorial-field--1{--field-color:#6B4570;}
.editorial-field--2{--field-color:#C24A2E;}
.editorial-field--3{--field-color:#3D8B7D;}
.editorial-field--4{--field-color:#E07A1F;}
.editorial-about{
  display:grid;
  grid-template-columns:1fr 3fr;
  gap:2rem;
  padding:clamp(2.5rem,5vw,4.2rem) 0 1rem;
}
.editorial-about-label{
  font-family:var(--bs-font-sans-serif);
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--eh-copper);
  padding-top:.35rem;
}
.editorial-about-body p{
  max-width:50rem;
  margin:0 !important;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(1.15rem,2vw,1.55rem);
  line-height:1.48;
  color:#35414a;
}
.editorial-links{
  margin-top:1.65rem;
  display:flex;
  flex-wrap:wrap;
  gap:.65rem 1.5rem;
}
.editorial-links a{
  font-family:var(--bs-font-sans-serif);
  font-size:.74rem;
  font-weight:700;
  letter-spacing:.025em;
  color:#4b5862 !important;
  text-decoration:none !important;
  border-bottom:1px solid #bbc1c5;
  padding-bottom:.18rem;
}
.editorial-links a span{color:var(--eh-copper);margin-left:.18rem;}
.editorial-links a:hover{color:var(--eh-copper) !important;border-color:var(--eh-copper);}

@media(max-width:780px){
 
 .editorial-hero{grid-template-columns:1fr 190px;gap:2rem;min-height:0;align-items:center;}
 .editorial-name{font-size:clamp(2.8rem,9vw,4.6rem) !important;}
 .editorial-fields{grid-template-columns:repeat(2,1fr);}
 .editorial-field:nth-child(2){border-right:0;}
 .editorial-field:nth-child(-n+2){border-bottom:1px solid var(--eh-rule);}
 .editorial-field{padding:1rem;min-height:86px;}
 .editorial-field:first-child{padding-left:1rem;}
 .editorial-field::after,.editorial-field:first-child::after{display:none;}
 .editorial-about{grid-template-columns:1fr;gap:.8rem;}
}
@media(max-width:540px){
 .editorial-hero{display:flex;flex-direction:column;align-items:stretch;gap:2rem;}
 .editorial-portrait{width:58%;align-self:flex-end;}
 .editorial-name span:last-child{margin-left:1rem;}
 .editorial-lead{font-size:.92rem;}
 .editorial-fields{margin-top:2.7rem;}
 .editorial-field{font-size:1rem;}
}

/* =========================================================
   V14 — HOME COMPACTA + AJUSTES DE FILTROS
   ========================================================= */

/* HOME: toda la composición principal visible de una vez en escritorio */
@media(min-width:781px){
 body.home-editorial .editorial-home{
   padding-top:clamp(1.35rem,2.4vh,2.25rem) !important;
   padding-bottom:1.25rem !important;
 }
 body.home-editorial .editorial-hero{
   min-height:0 !important;
   height:min(43vh,360px) !important;
   gap:clamp(2.5rem,6vw,5.5rem) !important;
 }
 body.home-editorial .editorial-name{
   font-size:clamp(3rem,5.2vw,5.25rem) !important;
 }
 body.home-editorial .editorial-eyebrow{margin-bottom:.85rem !important;}
 body.home-editorial .editorial-role{margin:1rem 0 .55rem !important;}
 body.home-editorial .editorial-lead{font-size:.91rem !important;line-height:1.48 !important;}
 body.home-editorial .editorial-portrait img{max-height:min(40vh,345px) !important;}
 body.home-editorial .editorial-fields{
   margin-top:clamp(1.45rem,3vh,2.5rem) !important;
 }
 
 body.home-editorial .editorial-field::after{bottom:-.93rem !important;}
 body.home-editorial .editorial-about{
   padding:clamp(1.35rem,2.8vh,2.3rem) 0 .25rem !important;
 }
 body.home-editorial .editorial-about-body p{
   font-size:clamp(1rem,1.55vw,1.28rem) !important;
   line-height:1.38 !important;
 }
 body.home-editorial .editorial-links{margin-top:.9rem !important;}
}

/* DOCENCIA: chips principales centrados; sólo contenido del desplegable de áreas a la izquierda */
body.teaching-page .teaching-topnav{
 justify-content:center !important;
 text-align:center !important;
}
body.teaching-page .teach-area-dropdown{
 margin-left:0 !important;
 margin-right:0 !important;
 align-self:auto !important;
}
body.teaching-page .teach-area-panel{
 text-align:left !important;
}
body.teaching-page .teach-area-btn{
 text-align:left !important;
 justify-content:flex-start !important;
}

/* ACTIVIDAD: color visible también en la cabecera de filtros */
body.media-page .media-search-wrap{
 border-color:#d9c4b4 !important;
 background:#fcf8f4 !important;
}

body.media-page .media-format-btn[style*="--format-color"]:not(.is-active){
 color:var(--format-color) !important;
 border-color:color-mix(in srgb,var(--format-color) 35%,white) !important;
 background:color-mix(in srgb,var(--format-color) 8%,white) !important;
}
body.media-page .media-format-btn[style*="--format-color"].is-active{
 color:#fff !important;
 border-color:var(--format-color) !important;
 background:var(--format-color) !important;
}
body.media-page #media-year{
 background-color:#fcf8f4 !important;
}

/* CONGRESOS: línea y chip comparten color; badge sin borde y más ligero */
body.conferences-page .conf-role-badge{
 border:0 !important;
 box-shadow:none !important;
 padding:.14rem .4rem !important;
 font-weight:600 !important;
}
body.conferences-page .conf-item[data-tipo="nacional"]{
 border-left-color:#C9822F !important;
}
body.conferences-page .conf-item[data-tipo="nacional"] .conf-role-badge{
 color:#9B6221 !important;
 background:#F7EBDD !important;
 border:0 !important;
}
body.conferences-page .conf-item[data-tipo="internacional"]{
 border-left-color:#3D8B7D !important;
}
body.conferences-page .conf-item[data-tipo="internacional"] .conf-role-badge{
 color:#34776B !important;
 background:#E8F2EF !important;
 border:0 !important;
}

/* =========================================================
   V15 — JERARQUÍA HOME + COLOR/FILTROS
   ========================================================= */

/* HOME: Javier / Lorenzo Rodríguez; áreas secundarias más pequeñas y más aire */
body.home-editorial .editorial-name span:last-child{
  margin-left:clamp(1.2rem,3.4vw,3.2rem) !important;
}
@media(min-width:781px){
 body.home-editorial .editorial-home{
   padding-top:clamp(2rem,4vh,3.25rem) !important;
 }
 body.home-editorial .editorial-hero{
   height:min(44vh,370px) !important;
   align-items:center !important;
 }
 body.home-editorial .editorial-portrait{
   padding-top:1.2rem !important;
   align-items:center !important;
 }
 body.home-editorial .editorial-portrait::before{
   top:.25rem !important;
 }
 body.home-editorial .editorial-portrait img{
   max-height:min(38vh,330px) !important;
 }
 body.home-editorial .editorial-fields{
   margin-top:clamp(1.8rem,3.5vh,2.8rem) !important;
   padding:.7rem 0 .8rem !important;
 }
 body.home-editorial .editorial-field{
   min-height:48px !important;
   font-size:clamp(.86rem,1.2vw,1.05rem) !important;
   line-height:1.16 !important;
 }
 body.home-editorial .editorial-field::after{
   width:22px !important;height:2px !important;bottom:-.83rem !important;
 }
 body.home-editorial .editorial-about{
   padding:clamp(1.55rem,3vh,2.35rem) 0 .4rem !important;
 }
}

/* DOCENCIA: Innovación docente debe ser legible incluso si su color previo se pierde */
body.teaching-page .teaching-topnav .teach-type-btn[data-type="innovacion-docente"]{
 --filter-local:#777C82 !important;
 background:#F2F3F4 !important;
}
body.teaching-page .teaching-topnav .teach-type-btn[data-type="innovacion-docente"]:hover{
 background:#E8EAEC !important;
}
body.teaching-page .teaching-topnav .teach-type-btn[data-type="innovacion-docente"].is-active{
 background:#737980 !important;
}

/* INVESTIGACIÓN: usar data-cat real del renderer */
body.research-page .research-pill[data-cat="nacional"]{--filter-local:#C9822F !important;}
body.research-page .research-pill[data-cat="h2020"]{--filter-local:#6B4570 !important;}
body.research-page .research-pill[data-cat="internacional"]{--filter-local:#3D8B7D !important;}
body.research-page .research-pill[data-cat]:not([data-cat=""]):not(.is-active){
 color:var(--filter-local) !important;
 border-color:color-mix(in srgb,var(--filter-local) 38%,white) !important;
 background:color-mix(in srgb,var(--filter-local) 9%,white) !important;
}
body.research-page .research-pill[data-cat]:not([data-cat=""]).is-active{
 color:#fff !important;
 border-color:var(--filter-local) !important;
 background:var(--filter-local) !important;
}

/* PUBLICACIONES: temas dentro de cada entrada, deliberadamente pequeños */
body.publications-page .pub-cats.pub-cats-row{
 gap:.25rem .32rem !important;
 margin-top:.55rem !important;
}
body.publications-page .pub-cats .pub-chip{
 min-height:0 !important;
 padding:.12rem .38rem !important;
 border-radius:5px !important;
 font-size:.59rem !important;
 line-height:1.25 !important;
 font-weight:600 !important;
 letter-spacing:.01em !important;
 border-width:1px !important;
}

/* ACTIVIDAD: buscador como control editorial, no caja genérica */
body.media-page .media-search-wrap{
 position:relative !important;
 border:1px solid #D8DDE1 !important;
 border-radius:10px !important;
 background:#fff !important;
 box-shadow:0 2px 10px rgba(34,45,54,.055) !important;
 transition:border-color .18s ease,box-shadow .18s ease,background .18s ease !important;
 overflow:hidden !important;
}
body.media-page .media-search-wrap::before{
 content:"" !important;
 position:absolute !important;
 left:0 !important;top:0 !important;bottom:0 !important;
 width:3px !important;
 background:#C24A2E !important;
}
body.media-page .media-search-wrap > i{
 opacity:.9 !important;
}
body.media-page .media-search-wrap input{
 background:transparent !important;
 border:0 !important;
 box-shadow:none !important;
}

body.media-page .media-search-wrap:focus-within{
 background:#FFFCFA !important;
 box-shadow:0 3px 14px rgba(194,74,46,.10) !important;
}

/* =========================================================
   V16 — HOME FINAL + DOCENCIA + BUSCADOR ACTIVIDAD
   ========================================================= */

/* HOME */
body.home-editorial #quarto-content{padding:0!important;}
body.home-editorial main.content{max-width:none!important;padding:0!important;margin:0!important;}
body.home-editorial .page-columns{display:block!important;}
body.home-editorial .editorial-home{
 --home-ink:#252e36;--home-text:#4d5962;--home-rule:#d9dde0;
 --home-copper:#b9652c;--home-paper:#faf9f6;
 max-width:1180px;margin:0 auto;
 padding:clamp(2.8rem,5vh,4.2rem) clamp(1.5rem,5vw,4.5rem) 2rem;
 color:var(--home-ink);
}
body.home-editorial .editorial-hero{
 display:grid;grid-template-columns:minmax(0,1.55fr) minmax(230px,.60fr);
 gap:clamp(3rem,7vw,6rem);align-items:center;min-height:0;
}
body.home-editorial .editorial-eyebrow{
 margin-bottom:1.2rem;font-family:var(--bs-font-sans-serif);
 font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--home-copper);
}
body.home-editorial .editorial-name{
 margin:0!important;font-family:Georgia,"Times New Roman",serif;
 font-size:clamp(3.2rem,5.6vw,5.6rem)!important;line-height:.88!important;
 letter-spacing:-.045em;font-weight:400!important;color:var(--home-ink)!important;
}
body.home-editorial .editorial-name span{display:block;}
body.home-editorial .editorial-name .editorial-surname{
 white-space:nowrap;margin-left:clamp(1.2rem,3vw,3rem)!important;
 font-size:.82em;color:#3c4852;
}
body.home-editorial .editorial-role{
 margin:1.45rem 0 .75rem!important;font-family:Georgia,"Times New Roman",serif;font-style:italic;color:#47535c;
}
body.home-editorial .editorial-lead{margin:0!important;line-height:1.58!important;color:var(--home-text);
}
body.home-editorial .editorial-links{
 display:flex;flex-wrap:wrap;gap:.6rem 1.4rem;
}
body.home-editorial .editorial-links a{
 padding-bottom:.16rem;font-family:var(--bs-font-sans-serif);font-weight:700;
 letter-spacing:.025em;color:#4b5862!important;text-decoration:none!important;border-bottom:1px solid #bbc1c5;
}
body.home-editorial .editorial-links a span{margin-left:.15rem;color:var(--home-copper);}
body.home-editorial .editorial-links a:hover{color:var(--home-copper)!important;border-color:var(--home-copper);}
body.home-editorial .editorial-portrait{position:relative;display:flex;align-items:center;margin:0;padding-top:1.8rem;}
body.home-editorial .editorial-portrait::before{
 content:"";position:absolute;z-index:0;top:.6rem;right:-1rem;width:68%;height:78%;
 background:var(--home-paper);border-top:3px solid var(--home-copper);
}
body.home-editorial .editorial-portrait img{
 position:relative;z-index:1;display:block;width:100%;max-height:335px;object-fit:cover;object-position:center top;
 filter:none!important;border-radius:0!important;box-shadow:none!important;
}
body.home-editorial .editorial-fields{
 display:grid;grid-template-columns:repeat(4,1fr);margin-top:2.8rem;
 border-top:1px solid var(--home-rule);border-bottom:1px solid var(--home-rule);
}
body.home-editorial .editorial-field{
 --field-color:#6B4570;position:relative;display:flex;align-items:center;
 font-family:var(--bs-font-sans-serif);line-height:1.25;
 letter-spacing:.015em;
}

body.home-editorial .editorial-field:not(:last-child){border-right:1px solid var(--home-rule);}
body.home-editorial .editorial-field::after{
 content:"";position:absolute;left:1.25rem;bottom:-1.05rem;background:var(--field-color);
}
body.home-editorial .editorial-field:first-child::after{left:0;}
body.home-editorial .editorial-field--1{--field-color:#6B4570;}
body.home-editorial .editorial-field--2{--field-color:#C24A2E;}
body.home-editorial .editorial-field--3{--field-color:#3D8B7D;}
body.home-editorial .editorial-field--4{--field-color:#E07A1F;}
body.home-editorial .editorial-about,body.home-editorial .home-areas,body.home-editorial .home-intro{display:none!important;}

/* DOCENCIA — Innovación docente: ciruela/gris, más elegante y distinguible */
body.teaching-page .teaching-topnav .teach-type-btn[data-type="innovacion-docente"]{
 --filter-local:#786675!important;color:#685865!important;
 border-color:#D2C8D0!important;background:#F5F1F4!important;
}
body.teaching-page .teaching-topnav .teach-type-btn[data-type="innovacion-docente"]:hover{
 color:#5E4E5A!important;border-color:#BFAFBB!important;background:#EEE7EC!important;
}
body.teaching-page .teaching-topnav .teach-type-btn[data-type="innovacion-docente"].is-active{
 color:#fff!important;border-color:#786675!important;background:#786675!important;
}

/* ACTIVIDAD — buscador neutro/editorial; el color queda en los filtros */
body.media-page .media-search-wrap{
 position:relative!important;border:1px solid #D4D9DD!important;
 border-radius:8px!important;background:#F8F9F9!important;
 transition:border-color .16s ease,background .16s ease!important;overflow:hidden!important;
}

body.media-page .media-search-wrap > i{opacity:.8!important;
}
body.media-page .media-search-wrap input{
 font-family:var(--bs-font-sans-serif)!important;
}

body.media-page .media-search-wrap:focus-within{box-shadow:0 0 0 3px rgba(44,59,77,.055)!important;
}
body.media-page #media-year{
 border-color:#D4D9DD!important;background:#F8F9F9!important;
}

/* responsive home */
@media(max-width:780px){
 body.home-editorial .editorial-home{padding-top:2.5rem;}
 body.home-editorial .editorial-hero{grid-template-columns:minmax(0,1fr) 190px;gap:2rem;}
 body.home-editorial .editorial-name{font-size:clamp(2.7rem,8vw,4.4rem)!important;}
 body.home-editorial .editorial-name .editorial-surname{white-space:normal;margin-left:.8rem!important;}
 body.home-editorial .editorial-portrait{padding-top:1rem;}
 body.home-editorial .editorial-portrait img{max-height:300px;}
 body.home-editorial .editorial-fields{grid-template-columns:repeat(2,1fr);margin-top:2.2rem;}
 body.home-editorial .editorial-field{min-height:55px;padding:.75rem 1rem;}
 body.home-editorial .editorial-field:first-child{padding-left:1rem;}
 body.home-editorial .editorial-field:nth-child(2){border-right:0;}
 body.home-editorial .editorial-field:nth-child(-n+2){border-bottom:1px solid var(--home-rule);}
 body.home-editorial .editorial-field::after{display:none;}
}
@media(max-width:540px){
 body.home-editorial .editorial-home{padding:2rem 1.25rem 1.5rem;}
 body.home-editorial .editorial-hero{display:flex;flex-direction:column;align-items:stretch;gap:1.8rem;}
 body.home-editorial .editorial-name{font-size:clamp(2.8rem,13vw,4rem)!important;}
 body.home-editorial .editorial-name .editorial-surname{white-space:normal;margin-left:.6rem!important;font-size:.8em;}
 body.home-editorial .editorial-lead{font-size:.9rem!important;line-height:1.55!important;}
 body.home-editorial .editorial-portrait{width:58%;align-self:flex-end;padding-top:.8rem;}
 body.home-editorial .editorial-fields{grid-template-columns:repeat(2,1fr);margin-top:2rem;}
 body.home-editorial .editorial-field{font-size:.72rem!important;min-height:52px;}
}

/* =========================================================
   V17 — PORTADA CON MÁS AIRE + ÁREAS NEUTRAS
   ========================================================= */

/* Más respiración respecto a la navbar */
@media (min-width: 781px) {
  body.home-editorial .editorial-home {
    padding-top: clamp(4.4rem, 7.5vh, 6rem) !important;
    padding-bottom: 2.8rem !important;
  }

  body.home-editorial .editorial-hero {
    align-items: center !important;
  }

  /* La foto ya no arranca visualmente pegada al header */
  body.home-editorial .editorial-portrait {
    padding-top: 2.7rem !important;
  }

  body.home-editorial .editorial-portrait::before {
    top: 1.35rem !important;
  }

  /* Más separación interna entre los elementos del perfil */
  body.home-editorial .editorial-eyebrow {
    margin-bottom: 1.45rem !important;
  }

  body.home-editorial .editorial-role {
    margin-top: 1.8rem !important;
    margin-bottom: 1rem !important;
  }

  body.home-editorial .editorial-links {
    margin-top: 1.55rem !important;
  }

  /* Separar claramente el bloque de intereses del hero */
  body.home-editorial .editorial-fields {
    margin-top: 3.5rem !important;
  }
}

/* El bloque Perfil desaparece definitivamente */
body.home-editorial .editorial-about {
  display: none !important;
}

/* Áreas: cuatro cajas neutras, sin fondos cromáticos */
body.home-editorial .editorial-fields {
  gap: 1rem !important;
  padding: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
}

body.home-editorial .editorial-field {
  padding: 1rem 1.1rem !important;

  background: #f7f7f6 !important;
  border: 1px solid #e1e3e4 !important;
  border-radius: 8px !important;

  font-family: Georgia, "Times New Roman", serif !important;
  line-height: 1.25 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  color: #39454e !important;
}

/* Quitar los separadores verticales de la versión anterior */
body.home-editorial .editorial-field:not(:last-child) {
  border-right: 1px solid #e1e3e4 !important;
}

body.home-editorial .editorial-field:first-child {
  padding-left: 1.1rem !important;
}

/* El color queda reducido a un acento corto */
body.home-editorial .editorial-field::after {
  left: 1.1rem !important;
  top: 0 !important;
  bottom: auto !important;

  width: 30px !important;
  height: 3px !important;

  border-radius: 0 0 2px 2px;
  background: var(--field-color) !important;
}

/* Hover casi imperceptible: no son botones */
body.home-editorial .editorial-field {
  transition: background-color .15s ease, border-color .15s ease;
}

body.home-editorial .editorial-field:hover {
  background: #fafafa !important;
  border-color: #d6d9db !important;
}

/* DOCENCIA: Innovación docente visible al clicar */
body.teaching-page .teaching-topnav .teach-type-btn[data-type="innovacion-docente"].is-active,
body.teaching-page .teaching-topnav .teach-type-btn[data-type="innovacion_docente"].is-active,
body.teaching-page .teaching-topnav .teach-type-btn[data-type="innovación-docente"].is-active {
  color: #ffffff !important;
  background: #70767c !important;
  border-color: #70767c !important;
  box-shadow: none !important;
}

/* Por si el JS marca aria-pressed en vez de is-active */
body.teaching-page .teaching-topnav .teach-type-btn[data-type="innovacion-docente"][aria-pressed="true"],
body.teaching-page .teaching-topnav .teach-type-btn[data-type="innovacion_docente"][aria-pressed="true"] {
  color: #ffffff !important;
  background: #70767c !important;
  border-color: #70767c !important;
}

/* Tablet/móvil */
@media (max-width: 780px) {
  body.home-editorial .editorial-home {
    padding-top: 3.2rem !important;
  }

  body.home-editorial .editorial-fields {
    gap: .8rem !important;
    margin-top: 2.6rem !important;
  }

  body.home-editorial .editorial-field {
    min-height: 64px !important;
  }
}

@media (max-width: 540px) {
  body.home-editorial .editorial-home {
    padding-top: 2.6rem !important;
  }

  body.home-editorial .editorial-portrait {
    padding-top: 1.2rem !important;
  }
}

/* =========================================================
   V18 — ACTIVIDAD: BUSCADOR Y FILTROS NEUTROS
   ========================================================= */
body.media-page .media-search-wrap{
  padding:0 .9rem!important;
  background:#fff!important;
  border:1px solid #D5DADF!important;
  border-radius:7px!important;
  box-shadow:none!important;
}
body.media-page .media-search-wrap::before,
body.media-page .media-search-wrap::after{display:none!important;}
body.media-page .media-search-wrap > i{
  margin-right:.65rem!important;
  opacity:1!important;
}
body.media-page .media-search-wrap input{
  background:transparent!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  color:#35414A!important;
}
body.media-page .media-search-wrap input::placeholder{
  color:#8A939A!important;
  opacity:1!important;
}
body.media-page .media-search-wrap:focus-within{
  background:#fff!important;
  box-shadow:0 0 0 2px rgba(44,59,77,.05)!important;
}

/* Todos los chips de formato son neutros, incluso si el renderer conserva --format-color */
body.media-page .media-format-btn,
body.media-page .media-format-btn[style*="--format-color"],
body.media-page .media-format-btn[data-color]{
  color:#59646C!important;
  background:#F7F8F8!important;
  border-color:#D8DDE0!important;
  box-shadow:none!important;
}
body.media-page .media-format-btn:hover,
body.media-page .media-format-btn[style*="--format-color"]:hover{
  color:#35414A!important;
  background:#EEF0F1!important;
  border-color:#C5CBD0!important;
}
body.media-page .media-format-btn.is-active,
body.media-page .media-format-btn[style*="--format-color"].is-active,
body.media-page .media-format-btn[data-color].is-active{
  color:#fff!important;
  background:#68727A!important;
  border-color:#68727A!important;
  box-shadow:none!important;
}

/* =========================================================
   HOME — foto más grande y bloque desplazado a la derecha
   ========================================================= */

@media (min-width: 900px) {

  /* Desplaza conjuntamente foto + decoración */
  body.home-editorial .editorial-portrait {
    width: 420px !important;
    max-width: none !important;
    transform: translateX(150px) !important;
    justify-self: end !important;
  }

  /* Foto más grande */
  body.home-editorial .editorial-portrait img {
    width: 400px !important;
    max-width: none !important;
    max-height: 460px !important;
    object-fit: cover !important;

    position: relative !important;
    z-index: 2 !important;
  }

  /* Rectángulo decorativo de detrás */
  body.home-editorial .editorial-portrait::before {
    width: 270px !important;
    height: 370px !important;

    right: 0 !important;
    left: auto !important;

    z-index: 1 !important;
  }
}

@media (min-width: 900px) {
  body.home-editorial .editorial-identity {
    transform: translateX(-50px) !important;
  }
}

/* =========================================================
   FOOTER — cierre editorial con línea cobre
   ========================================================= */
/* Footer */
footer.footer {
  border-top: 0 !important;
  background: #ffffff !important;
}

.nav-footer {
  background: #ffffff !important;

  /* ÚNICA línea */
  border-top: 3px solid #b9652c !important;
  border-bottom: 0 !important;

  box-shadow: none !important;

  color: #6f777d !important;
}

.nav-footer::before,
.nav-footer::after {
  display: none !important;
}

.nav-footer a {
  color: #4d5962 !important;
  text-decoration: none !important;
}

.nav-footer a:hover {
  color: #b9652c !important;
}

body.home-editorial .editorial-links {
  margin-top: 2.2rem !important;
}

/* =========================================================
   NAVBAR — versión definitiva
   ========================================================= */

@media (min-width: 992px) {

  /* -------------------------------------------------------
     BARRA
     ------------------------------------------------------- */

  .navbar {
    min-height: 62px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .navbar .container,
  .navbar .container-fluid {
    min-height: 62px !important;
    align-items: center !important;
  }

  /* -------------------------------------------------------
     JLR
     ------------------------------------------------------- */

  .navbar-brand,
  .navbar-brand:visited {
    font-family: Georgia, "Times New Roman", serif !important;

    font-size: 1.22rem !important;
    font-weight: 700 !important;
    letter-spacing: .025em !important;

    margin-right: 1.5rem !important;

    padding-top: 0 !important;
    padding-bottom: 0 !important;

    line-height: 1 !important;

    /* JLR un poco más luminoso */
    color: rgba(255,255,255,.90) !important;
    opacity: 1 !important;
  }

  /* -------------------------------------------------------
     MENÚ PRINCIPAL
     ------------------------------------------------------- */

  .navbar-nav:not(.ms-auto) {
    display: flex !important;
    align-items: center !important;

    /* El espacio lo controlan los puntos */
    gap: 0 !important;
  }

  .navbar-nav:not(.ms-auto) .nav-item {
    display: flex !important;
    align-items: center !important;
  }

  /* -------------------------------------------------------
     ENLACES
     ------------------------------------------------------- */

  .navbar-nav:not(.ms-auto) .nav-link,
  .navbar-nav:not(.ms-auto) .nav-link:visited {

    font-family: "Inter", Arial, Helvetica, sans-serif !important;

    font-size: .75rem !important;
    font-weight: 600 !important;

    letter-spacing: .065em !important;

    text-transform: uppercase !important;
    white-space: nowrap !important;

    padding: 0 !important;
    margin: 0 !important;

    line-height: 1 !important;

    /* Blanco suavizado */
    color: rgba(255,255,255,.76) !important;

    opacity: 1 !important;

    transition: color .15s ease !important;
  }

  /* Hover */
  .navbar-nav:not(.ms-auto) .nav-link:hover {
    color: rgba(255,255,255,.96) !important;
  }

  /* -------------------------------------------------------
     PUNTOS SEPARADORES
     ------------------------------------------------------- */

  .navbar-nav:not(.ms-auto) .nav-item:not(:last-child)::after {
    content: "·" !important;

    /*
      Esto controla realmente la separación.
      Si quieres aún menos espacio: .50rem
    */
    margin-left: .65rem !important;
    margin-right: .65rem !important;

    color: rgba(255,255,255,.25) !important;

    font-family: Arial, Helvetica, sans-serif !important;
    font-size: .82rem !important;
    font-weight: 400 !important;

    line-height: 1 !important;
  }

  /* -------------------------------------------------------
     SECCIÓN ACTIVA
     ------------------------------------------------------- */

  .navbar-nav:not(.ms-auto) .nav-link.active,
  .navbar-nav:not(.ms-auto) .nav-link[aria-current="page"] {
    position: relative !important;

    /* Activa más clara, pero sin blanco agresivo */
    color: rgba(255,255,255,.96) !important;
  }

  /* Línea cobre bajo TODA la palabra */
  .navbar-nav:not(.ms-auto) .nav-link.active::after,
  .navbar-nav:not(.ms-auto) .nav-link[aria-current="page"]::after {

    content: "" !important;

    position: absolute !important;

    left: 0 !important;
    bottom: -11px !important;

    width: 100% !important;
    height: 3px !important;

    background: #b9652c !important;

    border-radius: 2px !important;

    transform: none !important;
  }

  /* -------------------------------------------------------
     ICONOS DE LA DERECHA
     ------------------------------------------------------- */

  .navbar .navbar-nav.ms-auto {
    display: flex !important;
    align-items: center !important;
    gap: .45rem !important;
  }
  .navbar .navbar-nav.ms-auto .nav-link,
  .navbar .navbar-nav.ms-auto .nav-link:visited {

    font-size: .86rem !important;

    letter-spacing: 0 !important;

    color: rgba(255,255,255,.78) !important;

    opacity: 1 !important;
  }

  .navbar .navbar-nav.ms-auto .nav-link:hover {
    color: rgba(255,255,255,.98) !important;
  }

}

/* ============================================================
   LEGIBILIDAD GENERAL — ESCALA TIPOGRÁFICA AMPLIADA
   No modifica el gran nombre de la portada
   ============================================================ */

:root {
  --read-body: 1.04rem;
  --read-small: .88rem;
  --read-meta: .84rem;
  --read-card-title: 1.08rem;
  --read-filter: .82rem;
}

/* ============================================================
   1. TEXTO GENERAL
   ============================================================ */

body {
  font-size: var(--read-body);
  line-height: 1.65;
}

/* ============================================================
   2. PORTADA
   El nombre Javier Lorenzo-Rodríguez NO se toca
   ============================================================ */

body.home-editorial .editorial-eyebrow {
  font-size: .76rem !important;
}

body.home-editorial .editorial-role {
  font-size: 1.22rem !important;
  line-height: 1.4 !important;
}

body.home-editorial .editorial-lead {
  font-size: 1.06rem !important;
  line-height: 1.68 !important;
  max-width: 48rem !important;
}

/* Scholar / ORCID / GitHub / CV */
body.home-editorial .editorial-links a {
  font-size: .82rem !important;
}

/* Áreas de investigación de la portada */
body.home-editorial .editorial-field {
  font-size: 1.02rem !important;
  line-height: 1.35 !important;
  min-height: 78px !important;
}

/* ============================================================
   3. FILTROS DE TODA LA WEB
   ============================================================ */

.pub-type-pill,
.research-pill,
.teaching-topnav .teach-type-btn,
.conf-filter-pill,
body.media-page .media-format-btn,
.pub-cat-trigger,
.teach-area-trigger,
body.media-page #media-year {
  font-size: var(--read-filter) !important;
}

/* Un poco más de superficie clicable */
.pub-type-pill,
.research-pill,
.teaching-topnav .teach-type-btn,
.conf-filter-pill,
body.media-page .media-format-btn {
  min-height: 38px !important;
  padding: .45rem .9rem !important;
}

/* ============================================================
   4. PUBLICACIONES
   ============================================================ */

body.publications-page main {
  max-width: 1120px !important;
}

.pub-row {
  padding: 1.35rem 1.5rem !important;
  margin-bottom: 1.4rem !important;
}

.pub-title {
  font-size: 1.08rem !important;
  line-height: 1.4 !important;
}

.pub-subtitle {
  font-size: .98rem !important;
  line-height: 1.45 !important;
}

.pub-source,
.pub-authors {
  font-size: .88rem !important;
  line-height: 1.5 !important;
}

.pub-actions a,
.pub-toggle,
.pub-download,
.pub-replication,
.pub-cite-link {
  font-size: .82rem !important;
}

.pub-abstract-body {
  font-size: .96rem !important;
  line-height: 1.6 !important;
}

/* Categorías pequeñas dentro de cada publicación */
.pub-cats-row .pub-chip {
  font-size: .76rem !important;
  padding: .18rem .48rem !important;
}

/* ============================================================
   5. INVESTIGACIÓN
   ============================================================ */

body.research-page main {
  max-width: 1450px !important;
}

.research-list {
  gap: 1.5rem !important;
}

.research-card {
  padding: 1.45rem 1.55rem !important;
  min-height: 250px !important;
}

.research-title {
  font-size: 1.08rem !important;
  line-height: 1.4 !important;
}

.research-source {
  font-size: .86rem !important;
  line-height: 1.5 !important;
}

.research-desc {
  font-size: .96rem !important;
  line-height: 1.65 !important;
}

.research-title-toggle,
.research-desc-toggle,
.research-link {
  font-size: .82rem !important;
}

.research-keyword {
  font-size: .76rem !important;
  padding: .2rem .58rem !important;
}

.research-badge,
.research-ip-badge {
  font-size: .7rem !important;
}

/* ============================================================
   6. DOCENCIA
   ============================================================ */

body.teaching-page main {
  max-width: 1400px !important;
}

body.teaching-page .teaching-list {
  column-gap: 1.7rem !important;
  row-gap: 1.7rem !important;
}

body.teaching-page .teach-item {
  padding: 1.4rem 1.5rem !important;
}

body.teaching-page .teach-item strong {
  font-size: 1.06rem !important;
  line-height: 1.45 !important;
}

body.teaching-page .teach-year {
  font-size: .88rem !important;
}

body.teaching-page .teach-tags {
  font-size: .84rem !important;
  line-height: 1.5 !important;
}

body.teaching-page .teach-levels {
  font-size: .9rem !important;
  line-height: 1.55 !important;
}

body.teaching-page .teach-badge {
  font-size: .74rem !important;
}

body.teaching-page .teach-center-title {
  font-size: .76rem !important;
}

/* ============================================================
   7. CONGRESOS
   ============================================================ */

body.conferences-page main {
  max-width: 1320px !important;
}

.conf-layout {
  grid-template-columns: 440px 1fr !important;
  gap: 4rem !important;
}

.conf-item {
  padding: .8rem 0 1.1rem 1.1rem !important;
  margin-bottom: 1.1rem !important;
}

.conf-year-heading {
  font-size: 1.12rem !important;
}

.conf-title {
  font-size: 1rem !important;
  line-height: 1.45 !important;
}

.conf-meta {
  font-size: .84rem !important;
  line-height: 1.5 !important;
}

.conf-link {
  font-size: .8rem !important;
}

.conf-role-badge {
  font-size: .7rem !important;
}

/* ============================================================
   8. ACTIVIDAD / MEDIOS
   ============================================================ */

body.media-page .media-search-wrap input {
  font-size: .9rem !important;
}

/*
   Las tarjetas de Actividad pueden tener distintos nombres
   según el renderer. Estas reglas cubren las clases habituales.
*/
body.media-page .media-title {
  font-size: 1.06rem !important;
  line-height: 1.45 !important;
}

body.media-page .media-meta,
body.media-page .media-date {
  font-size: .86rem !important;
  line-height: 1.5 !important;
}

body.media-page .media-description,
body.media-page .media-desc {
  font-size: .95rem !important;
  line-height: 1.6 !important;
}

/* ============================================================
   9. DESPLEGABLES
   ============================================================ */

.pub-cat-panel .cat-link,
.teach-area-btn {
  font-size: .82rem !important;
  line-height: 1.45 !important;
}

/* ============================================================
   10. RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {

  body {
    font-size: 1rem;
  }

  .conf-layout {
    grid-template-columns: 1fr !important;
  }

  body.home-editorial .editorial-lead {
    font-size: 1rem !important;
  }
}

/* ============================================================
   PUBLICACIONES — tipografía interior más legible
   ============================================================ */

/* Título de la publicación */
body.publications-page .pub-row .pub-title {
  font-size: 1.18rem !important;
  line-height: 1.38 !important;
  font-weight: 700 !important;
}

/* Revista / editorial / fuente */
body.publications-page .pub-row .pub-source {
  font-size: 1rem !important;
  line-height: 1.5 !important;
}

/* Autores */
body.publications-page .pub-row .pub-authors {
  font-size: 1rem !important;
  line-height: 1.5 !important;
  margin-top: .45rem !important;
}

/* Subtítulo, si alguna publicación lo tiene */
body.publications-page .pub-row .pub-subtitle {
  font-size: 1rem !important;
  line-height: 1.5 !important;
}

/* Badge ARTÍCULO / LIBRO / CAPÍTULO... */
body.publications-page .pub-row .pub-badge {
  font-size: .78rem !important;
  padding: .18rem .58rem !important;
}

/* Categorías: Migración, Participación, etc. */
body.publications-page .pub-row .pub-chip {
  font-size: .78rem !important;
  padding: .2rem .52rem !important;
}

/* Descargar / Citation / Replicación... */
body.publications-page .pub-row .pub-actions a,
body.publications-page .pub-row .pub-toggle,
body.publications-page .pub-row .pub-download,
body.publications-page .pub-row .pub-replication,
body.publications-page .pub-row .pub-cite-link {
  font-size: .92rem !important;
}

/* Iconos de las acciones */
body.publications-page .pub-row .pub-actions .bi {
  font-size: .92rem !important;
}

/* Abstract desplegado */
body.publications-page .pub-row .pub-abstract-body {
  font-size: 1rem !important;
  line-height: 1.65 !important;
}

/* BibTeX */
body.publications-page .pub-row .pub-bibtex {
  font-size: .86rem !important;
  line-height: 1.55 !important;
}

/* ============================================================
   CONGRESOS — mapa más ancho y panorámico
   ============================================================ */

@media (min-width: 992px) {

  /* Más espacio para la columna del mapa */
  body.conferences-page .conf-layout {
    grid-template-columns: 520px minmax(0, 1fr) !important;
    gap: 3.5rem !important;
  }

  /* Mapa más bajo */
  body.conferences-page .conf-map,
  body.conferences-page #conf-map {
    width: 100% !important;
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
  }
}

/* Logo JLR más discreto */
.navbar-brand {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  letter-spacing: .02em;
  margin-right: 1.5rem !important;
}

/* ============================================================
   FOOTER — cookies a la derecha, copyright a la izquierda
============================================================ */

body .nav-footer {
  display: flex !important;
  align-items: center;
  font-size: .72rem !important;
  padding: .7rem 1.5rem !important;
}

/* Contenedor interior de Quarto */
body .nav-footer .nav-footer-left,
body .nav-footer .nav-footer-center,
body .nav-footer .nav-footer-right {
  font-size: .72rem !important;
  flex: 0 0 auto !important;
  width: auto !important;
}

/* Copyright: lado izquierdo */
body .nav-footer .nav-footer-right {
  order: 1;
  margin-right: auto !important;
  margin-left: 0 !important;
  text-align: left !important;
}

/* Cookies: extremo derecho */
body .nav-footer .nav-footer-center {
  order: 3;
  margin-left: auto !important;
  margin-right: 0 !important;
  text-align: right !important;
}

/* Si existe columna izquierda */
body .nav-footer .nav-footer-left {
  order: 2;
}

/* Texto y enlaces */
body .nav-footer,
body .nav-footer a {
  font-size: .72rem !important;
  line-height: 1.4;
}

body .nav-footer a {
  opacity: .75;
  text-decoration: none;
}

body .nav-footer a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Móvil */
@media (max-width: 767px) {
  body .nav-footer {
    flex-direction: column !important;
    gap: .5rem;
  }

  body .nav-footer .nav-footer-left,
  body .nav-footer .nav-footer-center,
  body .nav-footer .nav-footer-right {
    margin: 0 !important;
    text-align: center !important;
  }
}

/* SOLO Docencia. No cambia tipografía, navbar ni estilos generales. */
.jlr-doc {--doc-ink:#1b2939;--doc-orange:#e07a1f;--doc-muted:#697581;max-width:1240px;margin:0 auto;padding:1rem 1.5rem 4rem;color:var(--doc-ink);font-family:inherit;}
.jlr-doc *{box-sizing:border-box;}
.jlr-doc-head h1{font-family:inherit;font-size:clamp(2rem,3vw,2.55rem);font-weight:700;line-height:1.2;margin:0 0 1.15rem;letter-spacing:-.025em;}
.jlr-doc-head h1:after{content:"";display:block;width:72px;height:4px;background:var(--doc-orange);border-radius:4px;margin-top:1rem;}
.jlr-doc-head p{font-size:1.12rem;color:#5e6873;margin:0 0 1.8rem;line-height:1.55;}
.jlr-doc-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:2rem;}
.jlr-doc-stats>div{background:#f5f6f7;border-radius:10px;display:flex;flex-direction:column;gap:.4rem;min-width:0;}
.jlr-doc-stats strong{font-family:inherit;font-size:1.9rem;line-height:1.2;letter-spacing:-.02em;}
.jlr-doc-stats span{font-size:.9rem;color:var(--doc-muted);letter-spacing:.015em;}
.jlr-doc-section{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:1.9rem 0 1.4rem;}
.jlr-doc-section h2{font-family:inherit;font-size:1.35rem;font-weight:600;margin:0;border:0;padding:0;}
.jlr-doc-section>span{color:#7e8790;font-size:.9rem;white-space:nowrap;}
.jlr-doc-areas{display:grid;grid-template-columns:1fr;gap:12px;}
.jlr-doc-card{border:1px solid #dfe4e8;border-radius:9px;background:transparent;overflow:hidden;min-width:0;}
.jlr-doc-card>summary{list-style:none;display:flex;align-items:center;gap:1.4rem;cursor:pointer;padding:1.25rem 1.3rem;min-height:105px;}
.jlr-doc-card>summary::-webkit-details-marker{display:none;}
.jlr-doc-num{color:var(--doc-ink);font-size:1.85rem;line-height:1;font-weight:650;letter-spacing:.02em;min-width:42px;align-self:center;position:relative;}
.jlr-doc-card:first-child .jlr-doc-num{color:var(--doc-orange);}
.jlr-doc-num:after{content:"";position:absolute;bottom:-23px;left:0;width:42px;height:3px;background:currentColor;border-radius:4px;}
.jlr-doc-cardtitle{display:flex;flex-direction:column;gap:.25rem;min-width:0;flex:1;}
.jlr-doc-cardtitle strong{font-size:1.2rem;line-height:1.3;font-weight:650;}
.jlr-doc-cardtitle small{font-size:.9rem;color:#7b858f;}
.jlr-doc-chevron{height:11px;width:11px;border-right:2px solid #8a96a0;border-bottom:2px solid #8a96a0;transform:rotate(45deg);transition:transform .2s;flex-shrink:0;margin-right:.3rem;}
.jlr-doc-card[open] .jlr-doc-chevron{transform:rotate(225deg);}
.jlr-doc-card[open]>summary{border-bottom:1px solid #e8ebee;}
.jlr-doc-entries{padding:0 1.4rem;max-height:410px;overflow-y:auto;overscroll-behavior:contain;}
.jlr-doc-entry{padding:1.15rem 0;border-bottom:1px solid #edf0f2;}
.jlr-doc-entry:last-child{border-bottom:0;}
.jlr-doc-meta{display:flex;justify-content:space-between;gap:1rem;color:#6b7783;font-size:.78rem;}
.jlr-doc-entry h3{font-family:inherit;font-size:1.02rem;font-weight:650;line-height:1.4;margin:.35rem 0;}
.jlr-doc-entry p{margin:.2rem 0;color:#64707b;font-size:.88rem;line-height:1.5;}
.jlr-doc-entry .jlr-doc-programs{font-size:.8rem;color:#7a858f;}
@media(max-width:700px){.jlr-doc{padding:1rem .75rem 3rem;}.jlr-doc-stats{gap:8px;}.jlr-doc-stats strong{font-size:1.4rem;}.jlr-doc-stats span{font-size:.72rem;}.jlr-doc-card>summary{padding:1.1rem .85rem;gap:.85rem;}.jlr-doc-cardtitle strong{font-size:1rem;}.jlr-doc-num{font-size:1.45rem;min-width:35px;}.jlr-doc-num:after{width:33px;}.jlr-doc-entries{padding:0 .9rem;}}

/* Ajustes solicitados: sin título duplicado, cifras sin tarjetas y acento cromático. */
body:has(.jlr-doc) #title-block-header {display:none;}
.jlr-doc-intro {font-size:1.12rem;line-height:1.55;color:inherit;opacity:.78;margin:0 0 1.9rem;}
.jlr-doc-stats {gap:clamp(1rem,3vw,3rem);margin:1.3rem 0 2.5rem;}
.jlr-doc-stats>div {background:transparent;border:0;border-radius:0;padding:.25rem 0 1rem;position:relative;}
.jlr-doc-stats>div::after {content:"";position:absolute;bottom:0;left:0;width:48px;height:3px;border-radius:2px;background:var(--doc-orange);}
.jlr-doc-stats>div:nth-child(2)::after {background:#2d687b;}
.jlr-doc-stats>div:nth-child(3)::after {background:#a35f40;}
.jlr-doc-stats>div:nth-child(1) strong {color:var(--doc-orange);}
.jlr-doc-stats>div:nth-child(2) strong {color:#2d687b;}
.jlr-doc-stats>div:nth-child(3) strong {color:#a35f40;}
.jlr-doc-stats strong {font-weight:700;font-size:clamp(1.5rem,2.6vw,2.1rem);}
.jlr-doc-card:nth-child(1) .jlr-doc-num {color:#e07a1f;}
.jlr-doc-card:nth-child(2) .jlr-doc-num {color:#294d6b;}
.jlr-doc-card:nth-child(3) .jlr-doc-num {color:#248477;}
.jlr-doc-card:nth-child(4) .jlr-doc-num {color:#a94963;}
.jlr-doc-card:nth-child(5) .jlr-doc-num {color:#765b90;}
.jlr-doc-card:nth-child(6) .jlr-doc-num {color:#a75e39;}
@media(max-width:700px){.jlr-doc-stats{gap:.75rem}.jlr-doc-stats>div{padding:.25rem 0 .8rem}.jlr-doc-stats>div::after{width:30px}}

/* ================================================
   DOCENCIA — INTERIOR DE LOS DESPLEGABLES
   Estilos exclusivos de la página Docencia
   ================================================ */

/* Contenedor de las actividades */

/* Cada actividad docente */
.jlr-doc .jlr-doc-entry {
  border-bottom: 1px solid #e8edf0;
}

.jlr-doc .jlr-doc-entry:last-child {
  border-bottom: none;
}

/* Fila superior: tipo de docencia y años */
.jlr-doc .jlr-doc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Etiqueta del tipo de docencia */
.jlr-doc .jlr-doc-meta span:first-child {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 5px;
  background: #fff1e5;
  line-height: 1.3;
  letter-spacing: 0.055em;
}

/* Años académicos */
.jlr-doc .jlr-doc-meta span:last-child {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Título de la asignatura */
.jlr-doc .jlr-doc-entry h3 {
  padding: 0;
  line-height: 1.4;
}

/* Universidad o centro docente */
.jlr-doc .jlr-doc-entry > p:first-of-type {
  border-left: 3px solid #294d6b;
  line-height: 1.5;
}

/* Titulaciones y programas */
.jlr-doc .jlr-doc-entry .jlr-doc-programs {
  line-height: 1.65;
}

/* Resaltado discreto al pasar el cursor */

/* Ajustes para móviles */
@media (max-width: 700px) {

  .jlr-doc .jlr-doc-meta span:last-child {
    font-size: 0.78rem;
  }
}

/* ==========================================
   DOCENCIA — INTERIOR COMPACTO Y DISCRETO
   ========================================== */

/* Espaciado general */
.jlr-doc .jlr-doc-entries {
  padding: 0 1.15rem;
}

.jlr-doc .jlr-doc-entry {
  padding: 0.7rem 0;
  border-bottom: 1px solid #edf0f2;
}

/* Tipo de docencia y años */
.jlr-doc .jlr-doc-meta {
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

/* Etiqueta pequeña y sin fondo */
.jlr-doc .jlr-doc-meta span:first-child {
  padding: 0;
  background: transparent;
  border-radius: 0;
  color: #a76b3d;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

/* Periodo docente */
.jlr-doc .jlr-doc-meta span:last-child {
  color: #89929a;
  font-size: 0.7rem;
  font-weight: 400;
}

/* Nombre de la asignatura */
.jlr-doc .jlr-doc-entry h3 {
  margin: 0 0 0.2rem;
  color: #263442;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Universidad: sin barra de color */
.jlr-doc .jlr-doc-entry > p:first-of-type {
  margin: 0.15rem 0 0.2rem;
  padding-left: 0;
  border-left: none;
  color: #687582;
  font-size: 0.79rem;
  font-weight: 500;
  line-height: 1.35;
}

/* Titulaciones */
.jlr-doc .jlr-doc-entry .jlr-doc-programs {
  margin: 0;
  color: #89929a;
  font-size: 0.73rem;
  font-weight: 400;
  line-height: 1.4;
}

/* Sin cambios de color al pasar el ratón */
@media (hover: hover) {
  .jlr-doc .jlr-doc-entry:hover h3 {
    color: #263442;
  }
}

/* Móviles */
@media (max-width: 700px) {
  .jlr-doc .jlr-doc-entries {
    padding: 0 0.65rem;
  }

  .jlr-doc .jlr-doc-entry {
    padding: 0.65rem 0;
  }

  .jlr-doc .jlr-doc-entry h3 {
    font-size: 0.88rem;
  }
}

/* ============================================================
   INVESTIGACIÓN · Chip «Consultoría»
   Ajuste específico: no afecta a otros filtros ni a la tipografía.
   ============================================================ */
body.research-page .research-pill[data-cat="consultoria"],
body.research-page .research-pill[data-cat="consultoría"],
body.research-page .research-pill[data-category="Consultoría"],
body.research-page .research-pill[data-category="consultoria"] {
  --filter-local: #737980 !important;
  --pill-color: #737980;
  background-color: #eceff1 !important;
  border-color: #cfd4d8 !important;
  color: #4b5563 !important;
}

body.research-page .research-pill[data-cat="consultoria"]:hover,
body.research-page .research-pill[data-cat="consultoría"]:hover,
body.research-page .research-pill[data-category="Consultoría"]:hover,
body.research-page .research-pill[data-category="consultoria"]:hover {
  background-color: #d9dee2 !important;
  border-color: #b9c1c7 !important;
}

body.research-page .research-pill[data-cat="consultoria"].is-active,
body.research-page .research-pill[data-cat="consultoría"].is-active,
body.research-page .research-pill[data-category="Consultoría"].is-active,
body.research-page .research-pill[data-category="consultoria"].is-active,
body.research-page .research-pill[data-cat="consultoria"][aria-pressed="true"],
body.research-page .research-pill[data-cat="consultoría"][aria-pressed="true"],
body.research-page .research-pill[data-category="Consultoría"][aria-pressed="true"],
body.research-page .research-pill[data-category="consultoria"][aria-pressed="true"] {
  background-color: #bfc6cc !important;
  border-color: #aab3ba !important;
  color: #263442 !important;
}

/* ============================================================
   LOGOS · Tamaño visual equilibrado sin recortes
   Conserva los contenedores originales de cada sección.
   ============================================================ */
.research-logo img,
.medios-row-logo img,
.revisor-logo img,
.prensa-logo img,
.institucion-logo img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain !important;
  object-position: center;
  display: block;
}

.research-logo:has(img),
.revisor-logo:has(img),
.prensa-logo:has(img),
.institucion-logo:has(img) {
  padding: 5px;
  box-sizing: border-box;
}

/* Los logotipos se muestran sin fondos añadidos. */
body.research-page .research-logo:has(img) {
  background: transparent !important;
}

/* ============================================================
   INVESTIGACIÓN — Actividad académica (bloque agrupado)
============================================================ */
body.research-page .academic-activity{margin:3.5rem 0 2rem;padding-top:1.5rem;border-top:1px solid rgba(0,0,0,.10)}
body.research-page .academic-activity-title{font-size:1.65rem;margin-bottom:1.5rem}
body.research-page .academic-section{margin-bottom:2.5rem}
body.research-page .academic-section h3{font-size:1.05rem;font-weight:700;margin:0 0 1rem;color:#2C3B4D}
body.research-page .academic-section h3 .bi{color:var(--pub-accent-strong);margin-right:.45rem}
body.research-page .academic-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
body.research-page .academic-card{padding:1rem 1.2rem;border:1px solid rgba(0,0,0,.09);border-radius:12px;background:#fff}
body.research-page .academic-card h4{font-size:.96rem;font-weight:700;line-height:1.35;margin:0 0 .35rem}
body.research-page .academic-card h4 a{color:inherit;text-decoration:none}
body.research-page .academic-card h4 a:hover{color:var(--pub-accent-strong)}
body.research-page .academic-role{font-size:.82rem;margin:0 0 .25rem;color:#555}
body.research-page .academic-meta{font-size:.75rem;color:#777;margin:0 0 .2rem}
body.research-page .academic-status{display:inline-block;margin-top:.45rem;font-size:.65rem;color:#7b5d30;background:rgba(224,122,31,.10);padding:.14rem .5rem;border-radius:999px}
@media(max-width:700px){body.research-page .academic-grid{grid-template-columns:1fr}}

/* ============================================================
   INVESTIGACIÓN — Pestañas principales
   Independientes de los filtros de categorías y temas.
============================================================ */
body.research-page .research-main-tabs{gap:.65rem;padding-bottom:1rem;border-bottom:1px solid #dce3e9}
body.research-page .research-main-tab{gap:.45rem;border:1px solid #d5dde5;border-radius:999px;background:#fff;line-height:1.3;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
body.research-page .research-main-tab:hover{background:#f2f5f8;border-color:#8e9baa}
body.research-page .research-main-tab.is-active{background:#2c3b4d;border-color:#2c3b4d;}
body.research-page .research-main-tab:focus-visible{outline-offset:3px}
body.research-page .research-main-panel[hidden]{display:none!important}
body.research-page .research-main-panel{min-width:0}
body.research-page .research-main-panel .academic-activity{margin:0 0 2rem;border-top:0}
body.research-page .research-main-panel .academic-section{margin:0 0 2rem}
body.research-page .research-main-panel .academic-section h3{font-size:1.22rem;margin:0 0 1.1rem}
@media(max-width:600px){body.research-page .research-main-tabs{gap:.45rem}body.research-page .research-main-tab{font-size:.8rem;padding:.55rem .75rem}}

/* ============================================================
   V2 — Navegación persistente y estilos diferenciados
   Los filtros internos de proyectos permanecen sin cambios.
============================================================ */
body.research-page { --research-sticky-offset: 65px; }
body.research-page .research-main-tabs {
  position: sticky;
  top: var(--research-sticky-offset);
  z-index: 100;
  background: rgba(250, 252, 254, .97);
  border: 1px solid #dce3e9;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(27, 38, 50, .09);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
body.research-page .research-main-tab {white-space:nowrap}
body.research-page .research-main-panel {scroll-margin-top: 150px}
/* Evaluación: listado editorial, compacto, con banda lateral */
body.research-page .academic-section--evaluacion_cientifica .academic-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}
body.research-page .academic-section--evaluacion_cientifica .academic-card {
  border-radius: 5px 12px 12px 5px;
  border-left: 4px solid #8b3d4e;
  background: #fff;
  box-shadow: 0 2px 9px rgba(27,38,50,.035);
}
body.research-page .academic-section--evaluacion_cientifica h3 .bi {color:#8b3d4e}
body.research-page .academic-section--evaluacion_cientifica .academic-role {font-weight:650;color:#8b3d4e}
/* Asociaciones: mosaico de membresías, fondo suave y acento azul */
body.research-page .academic-section--asociaciones_academicas .academic-grid {grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
body.research-page .academic-section--asociaciones_academicas .academic-card {
  border:1px solid #dbe6ed;
  border-top:4px solid #377c91;
  border-radius:16px;
  background:linear-gradient(160deg,#f2f8fa 0%,#fff 75%);
  padding:1.3rem 1.2rem;
}
body.research-page .academic-section--asociaciones_academicas .academic-card h4 {font-size:1rem;color:#24596c}
body.research-page .academic-section--asociaciones_academicas h3 .bi {color:#377c91}
/* Grupos: fichas anchas con jerarquía de responsabilidades */
body.research-page .academic-section--grupos_investigacion .academic-grid {grid-template-columns:1fr;gap:1rem}
body.research-page .academic-section--grupos_investigacion .academic-card {
  position:relative;
  border:1px solid #dce5dc;
  border-radius:14px;
  background:linear-gradient(90deg,#f3f8f1,#fff 60%);
  padding:1.35rem 1.55rem;
}
body.research-page .academic-section--grupos_investigacion .academic-card h4 {font-size:1.1rem;color:#335f47}
body.research-page .academic-section--grupos_investigacion .academic-role {font-weight:700;color:#427452}
body.research-page .academic-section--grupos_investigacion h3 .bi {color:#427452}
body.research-page .academic-card {transition:transform .18s ease,box-shadow .18s ease}
@media (hover:hover){body.research-page .academic-card:hover {transform:translateY(-2px);box-shadow:0 8px 24px rgba(27,38,50,.09)}}
@media(max-width:950px){body.research-page .academic-section--asociaciones_academicas .academic-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){
  body.research-page {--research-sticky-offset: 55px}
  body.research-page .research-main-tabs {border-radius:0;}
  
  body.research-page .academic-section--evaluacion_cientifica .academic-grid,
  body.research-page .academic-section--asociaciones_academicas .academic-grid{grid-template-columns:1fr}
}

/* ============================================================
   V3 — Barra de secciones premium y filtros de proyectos fijos
   Jerarquía: navbar > secciones > categorías/temas.
============================================================ */
body.research-page {
  --research-main-tabs-height: 72px;
  --research-sticky-gap: 8px;
}
body.research-page .research-main-tabs {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  border:1px solid #d9e2eb;
  border-radius:18px;
  background:rgba(246,249,252,.98);
  box-shadow:0 8px 26px rgba(27,38,50,.10);
  margin:0 0 1.25rem;
  isolation:isolate;
  z-index:105;
}
body.research-page .research-main-tab {
  --tab-accent:#2c3b4d;
  position:relative;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:.55rem;
  border:1px solid transparent;
  border-radius:13px;
  background:transparent;
  color:#526273;
  padding:.77rem 1.08rem;
  font-size:.86rem;
  font-weight:650;
  letter-spacing:.005em;
  box-shadow:none;
  transition:background .2s,border-color .2s,color .2s,box-shadow .2s,transform .2s;
}
body.research-page .research-main-tab[data-panel="proyectos"]{--tab-accent:#2c3b4d}
body.research-page .research-main-tab[data-panel="evaluacion"]{--tab-accent:#8b3d4e}
body.research-page .research-main-tab[data-panel="asociaciones"]{--tab-accent:#377c91}
body.research-page .research-main-tab[data-panel="grupos"]{--tab-accent:#427452}
body.research-page .research-main-tab .bi {font-size:1.03rem;color:var(--tab-accent)}
body.research-page .research-main-tab:hover:not(.is-active){background:#fff;color:#263647}
body.research-page .research-main-tab.is-active{
  color:#fff;
  background:var(--tab-accent);
  border-color:var(--tab-accent);
  box-shadow:0 4px 12px rgba(27,38,50,.15);
}
body.research-page .research-main-tab.is-active .bi{color:#fff}
body.research-page .research-main-tab:focus-visible{outline:3px solid #e07a1f;outline-offset:2px}

/* Filtros propios de Proyectos: permanecen visibles debajo de las pestañas. */
body.research-page #panel-proyectos .research-filter-wrap {
  position:sticky;
  top:calc(var(--research-sticky-offset) + var(--research-main-tabs-height) + var(--research-sticky-gap));
  z-index:101;
  padding:.8rem 1rem;
  margin:0 0 1.3rem;
  background:rgba(255,255,255,.98);
  border:1px solid #e0e6ec;
  border-radius:14px;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
body.research-page #panel-proyectos .research-filterbar{margin-bottom:0}
body.research-page #panel-proyectos .research-filter-wrap .research-tag-dropdown{position:relative}
@media(max-width:700px){
  body.research-page .research-main-tabs{
    flex-wrap:nowrap;
    justify-content:flex-start;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    scrollbar-width:thin;
    border-radius:14px;
    margin-left:0;
    margin-right:0;
    padding:.4rem;
  }
  body.research-page .research-main-tab{flex-shrink:0;padding:.7rem .9rem;font-size:.8rem}
  body.research-page #panel-proyectos .research-filter-wrap{padding:.65rem .5rem;border-radius:11px}
  body.research-page #panel-proyectos .research-filterbar{gap:.35rem}
}
@media(prefers-reduced-motion:reduce){
  body.research-page .research-main-tab{transition:none}
}

/* ============================================================
   INVESTIGACIÓN · Unión visual de las dos barras sticky
   Pestañas principales + filtros de proyectos sin separación.
   ============================================================ */
body.research-page {
  --research-sticky-gap: 0px;
}
body.research-page .research-main-tabs {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: 0;
  box-shadow: none;
}
body.research-page #panel-proyectos {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
body.research-page #panel-proyectos .research-filter-wrap {
  margin-top: 0 !important;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  box-shadow: 0 5px 18px rgba(27,38,50,.075);
}
@media (max-width: 700px) {
  body.research-page .research-main-tabs {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  body.research-page #panel-proyectos .research-filter-wrap {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
}

/* INVESTIGACIÓN: ocultar encabezados repetidos de pestañas académicas
   y separar las tarjetas de la navegación principal. */
body.research-page .research-main-panel .academic-section > h3 {
  display: none !important;
}
body.research-page .research-main-panel .academic-activity {
  padding-top: 28px !important;
}
@media (max-width: 600px) {
  body.research-page .research-main-panel .academic-activity {
    padding-top: 20px !important;
  }
}

/* V4: pestañas sobre fondo blanco y línea azul inferior */
body.research-page .research-main-tabs {
  background: #fff !important;
  border: 0 !important;
  border-bottom: 2px solid #377c91 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: .5rem .65rem .7rem !important;
  margin-bottom: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
/* Mantener los chips diferenciados y el bloque de filtros contiguo */
body.research-page #panel-proyectos .research-filter-wrap {
  border-top: 0 !important;
}
@media (max-width:700px) {
  body.research-page .research-main-tabs {
    border-radius: 0 !important;
    padding: .4rem .25rem .65rem !important;
  }
}

/* ============================================================
   MEDIOS — Buscador y filtros, versión refinada (octubre 2026)
   Ajustes exclusivamente visuales: se mantienen IDs y JS.
   ============================================================ */
body.media-page .media-filterbar {
  background:#fff !important;
  border:1px solid #e0e7ed !important;
  border-top:2px solid #377c91 !important;
  border-radius:14px !important;
  padding:1.15rem 1.3rem 1rem !important;
  box-shadow:0 7px 26px rgba(31,53,71,.055) !important;
  margin:0 0 1.9rem !important;
}
body.media-page .media-search-wrap {
  max-width:none !important;
  width:100% !important;
  min-height:52px !important;
  margin:0 0 1rem !important;
  border:1px solid #cbd9e3 !important;
  border-radius:11px !important;
  background:#f9fbfd !important;
  box-shadow:none !important;
  overflow:visible !important;
}
body.media-page .media-search-wrap::before {display:none !important;content:none !important;}
body.media-page .media-search-wrap > i {
  left:1rem !important;
  margin-left:0 !important;
  color:#377c91 !important;
  font-size:1rem !important;
  opacity:1 !important;
}
body.media-page #media-search,
body.media-page .media-search-wrap input {
  width:100% !important;
  min-height:50px !important;
  padding:.78rem 1.05rem .78rem 2.8rem !important;
  border:0 !important;
  border-radius:11px !important;
  background:transparent !important;
  color:#263747 !important;
  font-size:.91rem !important;
  font-weight:450 !important;
  box-shadow:none !important;
  outline:0 !important;
}
body.media-page #media-search::placeholder {color:#83919d !important;opacity:1;}
body.media-page .media-search-wrap:focus-within {
  border-color:#377c91 !important;
  background:#fff !important;
  box-shadow:0 0 0 3px rgba(55,124,145,.13) !important;
}
body.media-page .media-format-filters {
  gap:.48rem !important;
  margin-bottom:.95rem !important;
}
body.media-page .media-format-btn {
  min-height:34px !important;
  padding:.4rem .83rem !important;
  border:1px solid #d9e2e9 !important;
  border-radius:9px !important;
  background:#fff !important;
  color:#526373 !important;
  font-size:.73rem !important;
  font-weight:650 !important;
  line-height:1.25 !important;
  transition:background .18s,border-color .18s,color .18s !important;
}
body.media-page .media-format-btn:hover:not(.is-active) {
  background:#f2f7f9 !important;
  border-color:#9ebcc8 !important;
  color:#2b6174 !important;
}
body.media-page .media-format-btn.is-active {
  background:#2c3b4d !important;
  border-color:#2c3b4d !important;
  color:#fff !important;
}
body.media-page .media-format-btn:focus-visible,
body.media-page #media-year:focus-visible {
  outline:2px solid #377c91 !important;
  outline-offset:2px !important;
}
body.media-page .media-filter-bottom {
  padding-top:.85rem !important;
  border-top:1px solid #edf0f3 !important;
  gap:.7rem !important;
}
body.media-page .media-year-label {color:#596d7a !important;}
body.media-page #media-year {
  min-height:35px !important;
  border:1px solid #d5e0e7 !important;
  border-radius:8px !important;
  background:#fff !important;
  color:#34495a !important;
  padding:.35rem 1.9rem .35rem .7rem !important;
  font-size:.76rem !important;
}
body.media-page #media-results-count {
  color:#647787 !important;
  font-size:.75rem !important;
  font-weight:600 !important;
}
@media(max-width:600px) {
  body.media-page .media-filterbar {padding:.85rem !important;}
  body.media-page .media-search-wrap {min-height:48px !important;}
  body.media-page #media-search {min-height:46px !important;font-size:.85rem !important;}
  body.media-page .media-format-btn {min-height:32px !important;padding:.36rem .68rem !important;}
  body.media-page #media-results-count {width:auto !important;margin-left:auto !important;}
}

/* MEDIOS: barra de filtros pegada a la navegación al hacer scroll.
   El desplazamiento coincide con el alto de la cabecera, no con 6.55rem. */
body.media-page .media-filterbar {
  top: 65px !important;
}
@media (max-width: 700px) {
  body.media-page .media-filterbar {
    top: 55px !important;
  }
}

/* INSTITUCIONAL — trayectoria editorial, coherente con el resto de la web. */
body.institucional-page .trayectoria-institucional {
  width: min(100% - 2rem, 900px);
  max-width: 900px;
  margin: 1.8rem auto 3.5rem;
  padding: 0;
}
body.institucional-page .trayectoria-institucional h2 {
  color: #2C3B4D;
  font-size: clamp(1.5rem, 2.4vw, 1.8rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .01em;
  border: 0;
}
body.institucional-page .trayectoria-institucional h2::before {
  content: "";
  display: block;
  border-radius: 2px;
  background: var(--pub-accent-strong, #E07A1F);
}
body.institucional-page .trayectoria-intro {
  line-height: 1.55;
}
body.institucional-page .trayectoria-list {
  display: block !important;
  width: 100%;
  border-top: 1px solid #e6e9ed;
}
body.institucional-page .trayectoria-list > article.trayectoria-item {
  display: grid !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  grid-template-columns: 145px minmax(0, 1fr) !important;
  grid-template-areas: 'fecha contenido';
  column-gap: 1.6rem;
  align-items: start;
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #e6e9ed !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
body.institucional-page .trayectoria-item > .trayectoria-periodo {
  grid-area: fecha;
  display: block;
  width: auto;
  margin: .18rem 0 0;
  padding: 0;
  font-family: var(--bs-font-sans-serif, sans-serif);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
body.institucional-page .trayectoria-item > .trayectoria-body {
  grid-area: contenido;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
}
body.institucional-page .trayectoria-item .trayectoria-cargo {
  margin: 0 0 .4rem;
  color: #2C3B4D;
  font-weight: 700;
}
body.institucional-page .trayectoria-item .trayectoria-institucion {
  display: flex;
  flex-wrap: nowrap;
  gap: .65rem;
  align-items: center;
  width: 100%;
}
body.institucional-page .trayectoria-item img.trayectoria-logo {
  display: block;
  flex: 0 0 30px;
  border: 0;
  padding: 0;
  background: transparent;
}
body.institucional-page .trayectoria-item .trayectoria-entidad {
  min-width: 0;
  color: #64717d;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
body.institucional-page .trayectoria-categoria {
  margin: 0 0 .35rem;
  color: #a94f08;
  font-family: var(--bs-font-sans-serif, sans-serif);
  font-size: .68rem;
  font-weight: 650;
  line-height: 1.4;
}
body.institucional-page .trayectoria-descripcion {
  margin: .65rem 0 0;
  color: #64717d;
  font-size: .86rem;
  line-height: 1.55;
}
@media (max-width: 640px) {
  body.institucional-page .trayectoria-institucional {
    margin-top: 1.4rem;
    margin-bottom: 2.5rem;
  }
  body.institucional-page .trayectoria-list > article.trayectoria-item {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: 'fecha' 'contenido';
    row-gap: .45rem;
    padding: 1.15rem 0 !important;
  }
  body.institucional-page .trayectoria-item > .trayectoria-periodo {
    margin: 0;
    font-size: .72rem;
  }
  body.institucional-page .trayectoria-item .trayectoria-cargo {
    font-size: 1rem;
  }
}

/* ============================================================
   Ajuste: Investigación naranja y aire vertical en filtros
   El padding pertenece a la barra sticky y permanece al hacer scroll.
============================================================ */
body.research-page .research-main-tab[data-panel] {
  --tab-accent: var(--pub-accent-strong, #E07A1F);
}
body.research-page .research-main-tabs {
  border-bottom-color: var(--pub-accent-strong, #E07A1F) !important;
}
body.research-page .research-main-tab:hover:not(.is-active) {
  color: var(--pub-accent-strong, #E07A1F);
  background: #fff5eb;
  border-color: #f1c69e;
}

body.research-page .research-filter-wrap,
body.research-page #panel-proyectos .research-filter-wrap,
body.publications-page .pub-filters-row,
body.conferences-page .conf-filter {
  padding-top: 1.35rem !important;
  padding-bottom: 1.35rem !important;
  background: #fff !important;
}

@media (max-width: 700px) {
  body.research-page .research-filter-wrap,
  body.research-page #panel-proyectos .research-filter-wrap,
  body.publications-page .pub-filters-row,
  body.conferences-page .conf-filter {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
}

/* ============================================================
   MÓVIL Y TABLETA — navegación, filtros y lectura (30/10/2026)
   Escritorio conserva su composición a partir de 992 px.
============================================================ */
:root { --site-navbar-height: 64px; }
@media (max-width: 991.98px) {
  html { scroll-padding-top: calc(var(--site-navbar-height) + 1rem); }
  .navbar { min-height: 64px; padding: .45rem 0; }
  .navbar > .navbar-container {
    display: flex !important; flex-wrap: wrap; align-items: center;
    padding-left: 1rem; padding-right: 1rem;
  }
  .navbar .navbar-brand-container {
    order: 0; margin: 0 auto 0 0 !important;
  }
  .navbar #quarto-search { order: 1; margin: 0 .6rem 0 0; }
  .navbar .navbar-toggler {
    order: 2; min-width: 44px; min-height: 44px;
    margin: 0; border: 1px solid rgba(255,255,255,.22);
    border-radius: 10px;
  }
  .navbar #navbarCollapse {
    order: 3; flex-basis: 100%;
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px);
    overflow-y: auto; overscroll-behavior-y: contain;
  }
  .navbar #navbarCollapse > .navbar-nav {
    max-height: none; overflow: visible;
  }
  .navbar #navbarCollapse > .navbar-nav:not(.ms-auto) {
    display: flex; flex-direction: column; align-items: stretch;
    gap: .15rem; margin: .65rem 0 .8rem !important;
  }
  .navbar #navbarCollapse > .navbar-nav:not(.ms-auto) > .nav-item { width: 100%; }
  .navbar #navbarCollapse > .navbar-nav:not(.ms-auto) .nav-link {
    justify-content: flex-start; height: auto; min-height: 44px;
    padding: .65rem .85rem !important; border-radius: 8px;
    font-family: var(--bs-font-sans-serif, sans-serif);
    font-size: .87rem; letter-spacing: .025em;
  }
  .navbar #navbarCollapse .nav-item::after,
  .navbar #navbarCollapse .nav-link::after { display: none !important; }
  .navbar #navbarCollapse .nav-link.active {
    background: rgba(255,177,98,.13);
    box-shadow: inset 3px 0 0 var(--pub-accent, #FFB162);
  }
  .navbar #navbarCollapse > .navbar-nav.ms-auto {
    display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .35rem; padding: .85rem 0 .6rem;
    margin: 0 !important; border-top: 1px solid rgba(255,255,255,.16);
  }
  .navbar #navbarCollapse > .navbar-nav.ms-auto > .nav-item { width: 100%; }
  .navbar #navbarCollapse > .navbar-nav.ms-auto .nav-link {
    width: 100%; min-height: 44px; height: 44px;
    padding: .5rem !important; border-radius: 9px;
    background: rgba(255,255,255,.055);
  }
  .navbar #navbarCollapse .navicon { width: 19px !important; height: 19px !important; }
  .navbar #navbarCollapse .bi { font-size: 1.1rem !important; }
  .navbar a:focus-visible, .navbar button:focus-visible {
    outline: 2px solid #FFB162; outline-offset: 2px;
  }

  /* En móvil, las cuatro pestañas de Investigación ocupan dos filas. */
  body.research-page .research-main-tabs {
    position: static; display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
    gap: .4rem; overflow: visible; margin: 0 0 1rem !important;
    padding: .75rem .5rem !important;
  }
  body.research-page .research-main-tab {
    min-width: 0; min-height: 48px; white-space: normal;
    padding: .65rem .5rem; font-size: .77rem; line-height: 1.3;
    text-align: center;
  }
  body.research-page .research-main-tab .bi { flex-shrink: 0; }
  body.research-page .research-filter-wrap,
  body.research-page #panel-proyectos .research-filter-wrap,
  body.publications-page .pub-filters-row {
    position: sticky; top: var(--site-navbar-height) !important;
    z-index: 40; box-sizing: border-box; width: 100%; min-width: 0;
    display: flex !important; flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: .5rem !important; padding: .8rem .65rem !important;
    background: #fff !important; border-radius: 0 0 12px 12px;
    box-shadow: 0 5px 16px rgba(27,38,50,.06);
  }
  body.research-page .research-filterbar,
  body.publications-page .pub-type-pills,
  body.media-page .media-format-filters {
    display: flex !important; flex-wrap: nowrap !important;
    justify-content: flex-start !important; width: 100%; max-width: 100%; min-width: 0;
    overflow-x: auto; overscroll-behavior-x: contain;
    gap: .45rem !important; padding: 2px 2px 6px !important; margin: 0 !important;
    scrollbar-width: thin; scroll-padding-inline: .3rem;
  }
  .research-pill, .pub-type-pill, .media-format-btn { flex: 0 0 auto; }
  body.research-page .research-pill,
  body.publications-page .pub-type-pill,
  body.conferences-page .conf-filter-pill,
  body.media-page .media-format-btn,
  body.research-page .research-tag-trigger,
  body.publications-page .pub-cat-trigger {
    min-height: 44px !important; padding: .6rem .8rem !important;
    font-size: .76rem !important; white-space: nowrap;
  }
  body.research-page .research-tag-dropdown,
  body.publications-page .pub-cat-dropdown { position: static; margin: 0; }
  body.research-page .research-tag-panel,
  body.publications-page .pub-cat-panel {
    position: absolute; top: 100%; left: .5rem !important; right: .5rem !important;
    transform: none !important; width: auto !important; min-width: 0 !important;
    max-width: none !important; max-height: min(48vh, 360px);
    overflow-y: auto; overscroll-behavior-y: contain;
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    z-index: 60; padding: .6rem !important;
  }
  body.research-page .research-tag-pill,
  body.publications-page .pub-cat-panel .cat-link {
    min-height: 44px; white-space: normal; overflow-wrap: anywhere;
  }
  body.research-page .research-main-panel { scroll-margin-top: calc(var(--site-navbar-height) + 150px); }

  /* En pantallas estrechas, el buscador de Medios se desplaza con la página. */
  body.media-page .media-filterbar {
    position: static !important; padding: .9rem !important; margin: 1rem 0 1.4rem !important;
  }
  body.media-page .media-heading { position: static !important; }
  body.media-page .media-filter-bottom { flex-wrap: wrap; }
  body.media-page #media-year { min-height: 44px !important; font-size: 16px !important; }
  body.media-page #media-search { font-size: 16px !important; }
  body.media-page #media-results-count { margin-left: auto !important; }

  body.conferences-page .conf-filter {
    top: var(--site-navbar-height) !important; padding: .8rem .4rem !important;
    display: flex; flex-wrap: wrap; justify-content: center; z-index: 40 !important;
  }
  body.conferences-page .conf-layout { grid-template-columns: minmax(0,1fr) !important; gap: 1.5rem !important; }
  body.conferences-page .conf-map-col { position: static !important; min-width: 0; }
  body.conferences-page #conference-map {
    width: 100% !important; height: 240px !important;
    min-height: 240px !important; max-height: 240px !important;
  }
  body.conferences-page .conf-item { overflow-wrap: anywhere; }

  body.publications-page .pub-row { padding: 1rem !important; }
  body.publications-page .pub-row-main { gap: .75rem; }
  body.publications-page .pub-info { min-width: 0; }
  body.publications-page .pub-title { font-size: 1.08rem !important; line-height: 1.4 !important; }
  body.publications-page .pub-authors { font-size: .88rem !important; line-height: 1.6 !important; }
  body.publications-page .pub-icon { width: 34px; height: 34px; flex-basis: 34px; }
  body.publications-page .pub-actions { gap: .4rem .8rem; }
  body.publications-page .pub-actions a,
  body.publications-page .pub-toggle { min-height: 44px; align-items: center; }
  body.publications-page .pub-bibtex { max-width: 100%; }
  body.publications-page .pub-bibtex pre { white-space: pre-wrap; overflow-wrap: anywhere; }

  body.research-page .research-grid { grid-template-columns: minmax(0,1fr) !important; }
  body.research-page .research-card { min-width: 0; padding: 1.1rem !important; }
  body.research-page .research-title { font-size: 1.08rem !important; line-height: 1.4 !important; }
  body.research-page .research-desc { font-size: .9rem !important; line-height: 1.6 !important; }
  body.research-page .research-desc-toggle,
  body.research-page .research-title-toggle,
  body.research-page .research-link { min-height: 44px; display: inline-flex; align-items: center; }

  /* En móvil, los cursos abiertos se leen con el scroll de la página. */
  .jlr-doc { padding: 1rem .3rem 2.5rem; }
  .jlr-doc .jlr-doc-stats { margin-bottom: 1.5rem; gap: .65rem; }
  .jlr-doc .jlr-doc-stats strong { font-size: 1.45rem; }
  .jlr-doc .jlr-doc-stats span { font-size: .73rem; }
  .jlr-doc .jlr-doc-card > summary { min-height: 88px; padding: 1rem; gap: .75rem; }
  .jlr-doc .jlr-doc-cardtitle strong { font-size: 1rem; }
  .jlr-doc .jlr-doc-entries { max-height: none; overflow: visible; padding: 0 1rem; }
  .jlr-doc .jlr-doc-meta { flex-wrap: wrap; gap: .35rem .75rem; }
  .jlr-doc .jlr-doc-entry { overflow-wrap: anywhere; }

  /* En móvil, las acciones del CV se colocan debajo del texto. */
  body.cv-page .cv-hero-full { margin-bottom: 1.5rem; padding: 1.6rem 0; }
  body.cv-page .cv-hero-full .cv-hero-inner { grid-template-columns: minmax(0,1fr); gap: 1rem; }
  body.cv-page .cv-hero-full .cv-hero-title { font-size: clamp(1.75rem,6vw,2.4rem); line-height: 1.2; }
  body.cv-page .cv-hero-sub { font-size: .95rem; line-height: 1.55; margin-bottom: 0; }
  body.cv-page .cv-hero-actions { justify-content: flex-start; flex-direction: row; gap: .6rem 1rem; }
  body.cv-page .cv-btn, body.cv-page .cv-link { min-height: 44px; display: inline-flex; align-items: center; }
  body.cv-page .cv-pdf { margin-top: 1.25rem; }
  body.cv-page .cv-pdf iframe { height: 65vh; height: 65dvh; }

  body.home-editorial .editorial-name { font-size: clamp(2.2rem, 9vw, 3.7rem) !important; }
  body.home-editorial .editorial-name .editorial-surname { margin-left: 0 !important; overflow-wrap: anywhere; }
  body.home-editorial .editorial-portrait {
    width: min(100%, 360px) !important; max-width: 100% !important;
    align-self: center; justify-self: center; margin: 1rem auto 0 !important;
    transform: none !important;
  }
  body.home-editorial .editorial-portrait img {
    width: 100% !important; max-width: 100% !important; height: auto !important;
    max-height: 380px !important; object-fit: contain !important;
  }
  body.home-editorial .editorial-portrait::before { max-width: 90%; right: 0 !important; }
  body.home-editorial .editorial-links { gap: .5rem 1rem; }
  body.home-editorial .editorial-links a { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (min-width: 600px) and (max-width: 991.98px) {
  .navbar #navbarCollapse > .navbar-nav.ms-auto { grid-template-columns: repeat(8, minmax(0,1fr)); }
}
@media (max-width: 380px) {
  body.research-page .research-tag-panel,
  body.publications-page .pub-cat-panel { grid-template-columns: minmax(0,1fr) !important; }
}

/* INSTITUCIONAL — cabecera cálida y línea de trayectoria */
body.institucional-page .trayectoria-institucional {
  --inst-accent: var(--pub-accent-strong, #E07A1F);
  --inst-ink: #2C3B4D; --inst-warm: #FFF7EF;
}
body.institucional-page .trayectoria-institucional h2 {
  margin: 0; padding: 1.5rem 1.6rem .65rem;
  border-radius: 14px 14px 0 0; background: var(--inst-warm);
  color: var(--inst-ink); font-size: clamp(1.65rem,3vw,2.1rem); line-height: 1.2;
}
body.institucional-page .trayectoria-institucional h2::before {
  width: 48px; height: 4px; margin-bottom: .85rem; background: var(--inst-accent);
}
body.institucional-page .trayectoria-intro {
  box-sizing: border-box; width: 100%; max-width: none;
  margin: 0 0 2rem; padding: 0 1.6rem 1.5rem;
  border-radius: 0 0 14px 14px; background: var(--inst-warm);
  color: #68717B; font-size: .92rem; line-height: 1.6;
}
body.institucional-page .trayectoria-list { position: relative; border-top: 0; }
body.institucional-page .trayectoria-list::before {
  content: ""; position: absolute; top: 1.65rem; bottom: 1.65rem;
  left: 155px; width: 2px; background: #F0D8C2; pointer-events: none;
}
body.institucional-page .trayectoria-list > article.trayectoria-item {
  position: relative; grid-template-columns: 135px minmax(0,1fr) !important;
  column-gap: 2.65rem; padding: 1.5rem 0 !important;
}
body.institucional-page .trayectoria-item::before {
  content: ""; position: absolute; top: 1.78rem; left: 151px;
  box-sizing: border-box; width: 10px; height: 10px;
  border: 2px solid var(--inst-accent); border-radius: 50%;
  background: #FFF; box-shadow: 0 0 0 4px #FFF;
  transition: background .18s ease,box-shadow .18s ease;
}
body.institucional-page .trayectoria-item > .trayectoria-periodo { color: #A94F08; font-size: .76rem; font-weight: 700; }
body.institucional-page .trayectoria-item .trayectoria-cargo { margin-bottom: .5rem; color: var(--inst-ink); font-size: 1.12rem; line-height: 1.4; }
body.institucional-page .trayectoria-item .trayectoria-institucion { gap: .8rem; }
body.institucional-page .trayectoria-item img.trayectoria-logo { flex: 0 0 42px; width: 42px; height: 42px; object-fit: contain; }
body.institucional-page .trayectoria-item .trayectoria-entidad { font-size: .9rem; line-height: 1.55; }
@media (hover:hover) {
  body.institucional-page .trayectoria-item:hover::before { background: var(--inst-accent); box-shadow: 0 0 0 4px #FFF0E0; }
  body.institucional-page .trayectoria-item:hover .trayectoria-cargo { color: #A94F08; }
}
@media (max-width:640px) {
  body.institucional-page .trayectoria-institucional h2 { padding: 1.2rem 1.1rem .65rem; font-size: 1.65rem; }
  body.institucional-page .trayectoria-intro { padding: 0 1.1rem 1.2rem; margin-bottom: 1.25rem; font-size: .87rem; }
  body.institucional-page .trayectoria-list::before { left: 5px; top: 1.4rem; bottom: 1.4rem; }
  body.institucional-page .trayectoria-list > article.trayectoria-item {
    grid-template-columns: minmax(0,1fr) !important; grid-template-areas: 'fecha' 'contenido';
    row-gap: .45rem; padding: 1.2rem 0 1.2rem 28px !important;
  }
  body.institucional-page .trayectoria-item::before { left: 1px; top: 1.42rem; }
  body.institucional-page .trayectoria-item .trayectoria-cargo { font-size: 1.04rem; }
  body.institucional-page .trayectoria-item img.trayectoria-logo { flex-basis: 36px; width: 36px; height: 36px; }
}
@media (prefers-reduced-motion:reduce) { body.institucional-page .trayectoria-item::before { transition: none; } }

/* Ajustes tras la comprobación de menús y desplegables reales. */
@media (max-width:991.98px) {
  .navbar .navbar-brand-container { flex: 1 1 auto; }
  .navbar #quarto-search:empty, .navbar .quarto-navbar-tools:empty { display: none; }
  body.research-page #panel-proyectos .research-filter-wrap .research-tag-dropdown,
  body.publications-page .pub-filters-row .pub-cat-dropdown { position: static !important; }
  body.research-page .research-stats {
    display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 1rem .4rem; padding: 1rem .5rem !important; margin: 0 0 1rem !important;
  }
  body.research-page .research-stat { min-width: 0; padding: 0 !important; }
  body.research-page .research-stat-label { font-size: .62rem; overflow-wrap: anywhere; }
  body.research-page .research-main-tab { gap: .4rem; }
  body.cv-page .cv-hero-actions .cv-btn { white-space: nowrap; }
  body.cv-page .cv-hero-actions { display: flex; flex-wrap: wrap; }
}
@media (max-width: 991.98px) {
  .navbar .quarto-navbar-tools:not(:has(*)) { display: none; }
  .cv-mobile-note { margin: 0 0 .8rem; font-size: .85rem; }
  .cv-mobile-note a { display: inline-flex; min-height: 44px; align-items: center; }
}
@media (min-width: 992px) { .cv-mobile-note { display: none; } }
@media (max-width: 991.98px) {
  body.home-editorial .editorial-hero {
    display: grid !important; grid-template-columns: minmax(0,1fr) !important;
    gap: 1.5rem !important;
  }
  body.home-editorial .editorial-identity { min-width: 0; max-width: 100%; }
}
@media (min-width: 600px) and (max-width: 991.98px) {
  body.research-page .research-main-tabs { grid-template-columns: repeat(4,minmax(0,1fr)); }
  body.research-page .research-stats { grid-template-columns: repeat(5,minmax(0,1fr)); }
}

/* ============================================================
   INVESTIGACIÓN — evaluación, asociaciones y grupos (01/11/2026)
   Recursos y contenido opcionales en actividad_academica.yml.
============================================================ */
body.research-page .academic-showcase {
  --academic-accent: #8b3d4e;
  --academic-tint: #fbf5f6;
  --academic-ink: #2c3b4d;
  padding-top: 1.7rem !important;
}
body.research-page .academic-showcase .academic-section--association { --academic-accent: #377c91; --academic-tint: #f2f8fa; }
body.research-page .academic-showcase .academic-section--group { --academic-accent: #427452; --academic-tint: #f2f7f3; }
body.research-page .academic-showcase .academic-section-header { margin: 0 0 1.5rem; max-width: 48rem; }
body.research-page .academic-showcase .academic-section-kicker {
  display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem;
  color: var(--academic-accent); font-family: var(--bs-font-sans-serif,sans-serif);
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
body.research-page .academic-showcase .academic-section-header h3 {
  display: block !important; margin: 0 0 .55rem; color: var(--academic-ink);
  font-size: clamp(1.45rem,2.4vw,1.9rem); line-height: 1.25; font-weight: 700;
}
body.research-page .academic-showcase .academic-section-header > p { margin: 0; color: #697581; font-size: .94rem; line-height: 1.6; }
body.research-page .academic-showcase .academic-grid { display: grid; gap: 1rem; }
body.research-page .academic-showcase .academic-section--review .academic-grid { grid-template-columns: minmax(0,1fr); }
body.research-page .academic-showcase .academic-section--association .academic-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.25rem; }
body.research-page .academic-showcase .academic-section--group .academic-grid { grid-template-columns: minmax(0,1fr); gap: 1.4rem; }
body.research-page .academic-showcase .academic-card {
  display: grid; min-width: 0; overflow: hidden; margin: 0;
  padding: 0; border: 1px solid #e1e6ea; border-radius: 14px;
  background: #fff; box-shadow: 0 3px 14px rgba(27,38,50,.035);
  transition: border-color .18s ease, box-shadow .18s ease;
}
body.research-page .academic-showcase .academic-card--review {
  grid-template-columns: 112px minmax(0,1fr);
  border-left: 3px solid var(--academic-accent);
}
body.research-page .academic-showcase .academic-card--association { grid-template-rows: 128px 1fr; border-top: 3px solid var(--academic-accent); }
body.research-page .academic-showcase .academic-card--group { grid-template-columns: minmax(180px,28%) minmax(0,1fr); border-left: 0; border-top: 3px solid var(--academic-accent); }
body.research-page .academic-showcase .academic-visual {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-width: 0; min-height: 112px; padding: 1rem; background: var(--academic-tint);
}
body.research-page .academic-showcase .academic-card--review .academic-visual { background: #faf9f8; border-right: 1px solid #edf0f2; }
body.research-page .academic-showcase .academic-card--association .academic-visual { border-bottom: 1px solid #e8eef1; }
body.research-page .academic-showcase .academic-card--group .academic-visual {
  background: linear-gradient(145deg,#e8f1eb,#f6f9f6);
}
body.research-page .academic-showcase .academic-monogram {
  display: flex; align-items: center; justify-content: center;
  min-width: 60px; min-height: 60px; padding: .6rem;
  border: 1px solid currentColor; border-radius: 12px;
  color: var(--academic-accent); background: rgba(255,255,255,.7);
  font-family: var(--bs-font-sans-serif,sans-serif); font-weight: 750;
  font-size: 1rem; letter-spacing: .04em;
}
body.research-page .academic-showcase .academic-card--group .academic-monogram { font-size: 1.12rem; }
body.research-page .academic-showcase .academic-logo-wrap { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; min-width: 0; }
body.research-page .academic-showcase img.academic-logo {
  display: block; width: 100%; height: 88px; max-width: 150px;
  object-fit: contain; object-position: center; border: 0; border-radius: 0;
  padding: 0; margin: 0; background: transparent;
}

body.research-page .academic-showcase .academic-card--image .academic-visual { padding: 0; }
body.research-page .academic-showcase img.academic-cover { display: block; width: 100%; height: 100%; min-height: 128px; object-fit: cover; }
body.research-page .academic-showcase .academic-card--review img.academic-cover { object-fit: contain; height: 154px; padding: .55rem; }
body.research-page .academic-showcase .academic-card--image .academic-logo-wrap {
  position: absolute; bottom: .8rem; left: .8rem; width: 60px; height: 60px;
  padding: .4rem; background: #fff; border: 1px solid #e1e6ea; border-radius: 9px;
}
body.research-page .academic-showcase .academic-card--image .academic-logo-wrap img { width: 100%; height: 100%; }
body.research-page .academic-showcase .academic-card-content { display: flex; flex-direction: column; min-width: 0; padding: 1.25rem 1.4rem; }

body.research-page .academic-showcase .academic-card h4 {
  margin: 0 0 .65rem; font-size: 1.1rem; font-weight: 700; line-height: 1.4;
  color: var(--academic-ink); overflow-wrap: anywhere;
}
body.research-page .academic-showcase .academic-card--group h4 { font-size: 1.3rem; }
body.research-page .academic-showcase .academic-card .academic-role {
  margin: 0 0 .4rem; color: var(--academic-accent);
  font-family: var(--bs-font-sans-serif,sans-serif); font-size: .72rem; font-weight: 650; line-height: 1.5;
}
body.research-page .academic-showcase .academic-institution { margin: 0 0 .5rem; color: #596774; font-size: .9rem; line-height: 1.5; }
body.research-page .academic-showcase .academic-detail,
body.research-page .academic-showcase .academic-description { margin: 0 0 .75rem; color: #697581; font-size: .89rem; line-height: 1.6; }
body.research-page .academic-showcase .academic-topics { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: .2rem 0 .85rem; }
body.research-page .academic-showcase .academic-topics li { padding: .2rem .6rem; border-radius: 6px; background: var(--academic-tint); color: var(--academic-accent); font-size: .74rem; line-height: 1.4; }
body.research-page .academic-showcase .academic-card-footer {
  display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem;
  margin-top: auto; padding-top: .75rem; border-top: 1px solid #edf0f2;
}
body.research-page .academic-showcase .academic-period { display: inline-flex; align-items: center; gap: .4rem; color: #697581; font-family: var(--bs-font-sans-serif,sans-serif); font-size: .7rem; }
body.research-page .academic-showcase .academic-status { margin: 0; padding: .2rem .5rem; background: #faf4e9; color: #806337; border: 1px solid #eee1c8; border-radius: 5px; font-size: .66rem; }
body.research-page .academic-showcase .academic-visit {
  display: inline-flex; align-items: center; gap: .4rem; margin-left: auto;
  min-height: 44px; color: var(--academic-accent); font-family: var(--bs-font-sans-serif,sans-serif);
  font-size: .76rem; font-weight: 650; text-decoration: none;
}
body.research-page .academic-showcase .academic-visit:hover { text-decoration: underline; }
body.research-page .academic-showcase .academic-visit:focus-visible { outline: 2px solid var(--academic-accent); outline-offset: 4px; border-radius: 3px; }
@media (hover:hover) {
  body.research-page .academic-showcase .academic-card:hover { transform: none; border-color: var(--academic-accent); box-shadow: 0 7px 24px rgba(27,38,50,.07); }
}
@media (max-width:1100px) { body.research-page .academic-showcase .academic-section--association .academic-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:640px) {
  body.research-page .academic-showcase { padding-top: 1.2rem !important; }
  body.research-page .academic-showcase .academic-section-header { padding: 0 .4rem; margin-bottom: 1.2rem; }
  body.research-page .academic-showcase .academic-section-header > p { font-size: .88rem; }
  body.research-page .academic-showcase .academic-card--review { grid-template-columns: 82px minmax(0,1fr); }
  body.research-page .academic-showcase .academic-card--review .academic-visual { padding: .55rem; }
  
  body.research-page .academic-showcase .academic-card-content,
  body.research-page .academic-showcase .academic-card--group .academic-card-content { padding: 1rem; }
  body.research-page .academic-showcase .academic-card h4 { font-size: 1rem; }
  body.research-page .academic-showcase .academic-section--association .academic-grid { grid-template-columns: minmax(0,1fr); }
  body.research-page .academic-showcase .academic-card--association { grid-template-rows: 110px 1fr; }
  body.research-page .academic-showcase .academic-card--group { grid-template-columns: minmax(0,1fr); }
  body.research-page .academic-showcase .academic-card--group .academic-visual { max-height: 210px; }
  body.research-page .academic-showcase .academic-card--group img.academic-cover { height: 210px; }
  body.research-page .academic-showcase .academic-card--group .academic-monogram { min-height: 76px; }
  body.research-page .academic-showcase .academic-card--review .academic-monogram { min-width: 0; width: 100%; min-height: 50px; padding: .35rem; font-size: .8rem; }
  body.research-page .academic-showcase .academic-card-footer { gap: .5rem; }
  body.research-page .academic-showcase .academic-visit { margin-left: 0; }
}
@media (prefers-reduced-motion:reduce) { body.research-page .academic-showcase .academic-card { transition: none; } }

body.research-page .research-main-panel .academic-showcase {
  box-sizing: border-box; max-width: 1180px; margin: 0 auto 2rem;
  padding-left: 1rem; padding-right: 1rem;
}
body.research-page .academic-showcase .academic-monogram .bi { font-size: 1.8rem; }
@media (max-width:640px) {
  body.research-page .research-main-panel .academic-showcase { padding-left: .6rem; padding-right: .6rem; }
}

/* ============================================================
   ACTIVIDAD ACADÉMICA — tres composiciones distintas (03/11/2026)
============================================================ */
/* Evaluación: directorio editorial, sin cajas ni fondos de tarjeta. */
body.research-page .academic-showcase .academic-section--review .academic-grid {
  display: block; border-top: 1px solid #dfe4e8;
}
body.research-page .academic-showcase .academic-card--review,
body.research-page .academic-showcase .academic-card--review:hover {
  grid-template-columns: 98px minmax(0,1fr); border-bottom: 1px solid #dfe4e8;
  overflow: visible;
}
body.research-page .academic-showcase .academic-card--review .academic-visual {
  border: 0; background: transparent;
}
body.research-page .academic-showcase .academic-card--review .academic-card-content { padding: 0; }
body.research-page .academic-showcase .academic-card--review h4 { margin: 0 0 .3rem; font-size: 1.12rem; }
body.research-page .academic-showcase .academic-card--review .academic-role { font-weight: 500; color: #697581; margin-bottom: .25rem; }
body.research-page .academic-showcase .academic-card--review .academic-card-footer {
  border: 0; padding-top: .25rem; margin-top: 0; gap: .45rem 1rem;
}
body.research-page .academic-showcase .academic-card--review .academic-status {
  border: 0; padding: 0; background: transparent; color: #82715b;
}
body.research-page .academic-showcase .academic-card--review .academic-monogram {
  border: 0; background: transparent; color: #8b3d4e;
}
/* Asociaciones: único apartado que conserva un mosaico de tarjetas. */
body.research-page .academic-showcase .academic-card--association { border-radius: 10px; }
body.research-page .academic-showcase .academic-card--association .academic-visual { background: #f5f9fa; }
body.research-page .academic-showcase .academic-card--association .academic-monogram {
  border: 0; border-radius: 0; background: transparent; font-size: 1.85rem;
  letter-spacing: .06em;
}
/* Grupos: apertura editorial con imagen o identidad a toda anchura. */
body.research-page .academic-showcase .academic-card--group,
body.research-page .academic-showcase .academic-card--group:hover { overflow: visible;
}
body.research-page .academic-showcase .academic-card--group .academic-visual {
  min-height: 190px; border-radius: 0; padding: 2rem;
  justify-content: flex-start;
  background: linear-gradient(115deg,#eaf2ed,#f7faf8);
  border-left: 4px solid #427452;
}
body.research-page .academic-showcase .academic-card--group .academic-monogram {
  border: 0; background: transparent; padding: 0; min-height: 0; min-width: 0;
  color: #427452; font-size: clamp(2rem,5vw,3.7rem); letter-spacing: -.03em;
}

body.research-page .academic-showcase .academic-card--group h4 {
  font-size: clamp(1.4rem,2.6vw,2rem); line-height: 1.25; margin: .15rem 0 .7rem;
}

body.research-page .academic-showcase .academic-card--group .academic-logo-wrap { justify-content: flex-start; }
body.research-page .academic-showcase .academic-card--group .academic-logo { max-width: 240px; height: 110px; }
/* Líneas: bloque de texto independiente, no se presenta como otro grupo. */
body.research-page .academic-showcase .academic-card--line,
body.research-page .academic-showcase .academic-card--line:hover {
  display: block; border-top: 1px solid #dfe4e8;
}
body.research-page .academic-showcase .academic-card--line:not(.academic-card--image):not(.academic-card--logo) .academic-visual { display: none; }
body.research-page .academic-showcase .academic-card--line .academic-card-content { padding: 0; max-width: 50rem; }
body.research-page .academic-showcase .academic-card--line h4.academic-lines-title {
  color: #427452; font-size: 1.25rem; margin-bottom: .7rem;
}
body.research-page .academic-showcase .academic-line-title { line-height: 1.6; margin: 0 0 1rem; }
body.research-page .academic-showcase .academic-card--line .academic-card-footer { border: 0; margin: 0; padding-top: .4rem; }
body.research-page .academic-showcase .academic-card--line .academic-status { padding: 0; border: 0; background: transparent; color: #697581; }
@media (max-width:640px) {
  body.research-page .academic-showcase .academic-card--review { grid-template-columns: 66px minmax(0,1fr); gap: .8rem; }
  body.research-page .academic-showcase .academic-card--review img.academic-logo { height: 76px; max-width: 62px; }
  body.research-page .academic-showcase .academic-card--review h4 { font-size: 1rem; }
  body.research-page .academic-showcase .academic-card--review .academic-visit { margin-left: 0; }
  body.research-page .academic-showcase .academic-card--group .academic-visual { min-height: 140px; padding: 1.3rem; }
  body.research-page .academic-showcase .academic-card--group .academic-card-content { padding: 1.2rem 0 1.4rem; }
  body.research-page .academic-showcase .academic-card--group.academic-card--image .academic-visual,
  body.research-page .academic-showcase .academic-card--group.academic-card--image img.academic-cover { height: 190px; max-height: none; }
  body.research-page .academic-showcase .academic-line-title { font-size: 1rem; }
}

/* ============================================================
   ACTIVIDAD ACADÉMICA — directorios y composición tipográfica
============================================================ */
/* Evaluación: bloques por función y filas de revista / periodo. */
body.research-page .academic-showcase .academic-section--review .academic-grid { border-top: 0; }
body.research-page .academic-showcase .academic-role-heading {
  border-top: 2px solid #8b3d4e; background: #faf6f7;
  font-family: var(--bs-font-sans-serif,sans-serif); font-weight: 650; line-height: 1.5;
}
body.research-page .academic-showcase .academic-role-heading:first-child { margin-top: 0; }
body.research-page .academic-showcase .academic-card--review,
body.research-page .academic-showcase .academic-card--review:hover {
  grid-template-columns: 42px minmax(0,1fr); gap: .9rem; align-items: center;
}
body.research-page .academic-showcase .academic-card--review:not(.academic-card--logo):not(.academic-card--image) { grid-template-columns: minmax(0,1fr); }
body.research-page .academic-showcase .academic-card--review:not(.academic-card--logo):not(.academic-card--image) .academic-visual { display: none; }
body.research-page .academic-showcase .academic-card--review .academic-visual { min-height: 44px; padding: 0; }

body.research-page .academic-showcase .academic-card--review .academic-card-content {
  display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: .3rem 1rem; align-items: center;
}
body.research-page .academic-showcase .academic-card--review .academic-role { display: none; }
body.research-page .academic-showcase .academic-card--review .academic-name {
  grid-column: 1; grid-row: 1; margin: 0; color: #2c3b4d;
  font-family: Georgia,serif; font-weight: 600; line-height: 1.5;
  overflow-wrap: anywhere;
}
body.research-page .academic-showcase .academic-card--review .academic-card-footer {
  grid-column: 2; grid-row: 1 / span 6; gap: .3rem .75rem; padding: 0; margin: 0;
}
body.research-page .academic-showcase .academic-card--review .academic-description,
body.research-page .academic-showcase .academic-card--review .academic-detail,
body.research-page .academic-showcase .academic-card--review .academic-institution,
body.research-page .academic-showcase .academic-card--review .academic-topics { grid-column: 1; margin: 0; }
body.research-page .academic-showcase .academic-card--review .academic-visit { min-height: 44px; }
/* Asociaciones: presencia secundaria, sin mosaico ni grandes siglas. */
body.research-page .academic-showcase .academic-section--association .academic-section-header { margin-bottom: 1rem; }
body.research-page .academic-showcase .academic-section--association .academic-section-header h3 { font-size: 1.4rem; }
body.research-page .academic-showcase .academic-section--association .academic-section-header > p { font-size: .86rem; }
body.research-page .academic-showcase .academic-section--association .academic-grid { display: block; max-width: 900px; }
body.research-page .academic-showcase .academic-card--association,
body.research-page .academic-showcase .academic-card--association:hover {
  display: grid; grid-template-columns: 32px minmax(0,1fr); gap: .8rem;
  border: 0; border-bottom: 1px solid #edf0f2; border-radius: 0;
  padding: .9rem 0; background: transparent; box-shadow: none; align-items: start;
}
body.research-page .academic-showcase .academic-card--association:not(.academic-card--logo):not(.academic-card--image) { grid-template-columns: minmax(0,1fr); }
body.research-page .academic-showcase .academic-card--association:not(.academic-card--logo):not(.academic-card--image) .academic-visual { display: none; }
body.research-page .academic-showcase .academic-card--association .academic-visual { min-height: 32px; height: 32px; padding: 0; background: transparent; border: 0; }
body.research-page .academic-showcase .academic-card--association img.academic-logo,
body.research-page .academic-showcase .academic-card--association img.academic-cover { width: 32px; height: 32px; min-height: 0; object-fit: contain; }
body.research-page .academic-showcase .academic-card--association .academic-card-content { padding: 0; }
body.research-page .academic-showcase .academic-card--association .academic-name { order: 0; margin: 0 0 .2rem; font-size: .98rem; line-height: 1.5; font-weight: 600; }
body.research-page .academic-showcase .academic-card--association .academic-role { order: 1; color: #697581; font-weight: 400; font-size: .76rem; margin: 0; }
body.research-page .academic-showcase .academic-card--association .academic-institution,
body.research-page .academic-showcase .academic-card--association .academic-detail,
body.research-page .academic-showcase .academic-card--association .academic-description,
body.research-page .academic-showcase .academic-card--association .academic-topics { order: 2; margin: .2rem 0 0; font-size: .83rem; }
body.research-page .academic-showcase .academic-card--association .academic-card-footer { order: 3; border: 0; margin: .25rem 0 0; padding: 0; }
body.research-page .academic-showcase .academic-card--association .academic-status { padding: 0; border: 0; background: transparent; color: #7b858d; font-size: .68rem; }
body.research-page .academic-showcase .academic-card--association .academic-visit-label { display: none; }
body.research-page .academic-showcase .academic-card--association .academic-visit { min-width: 44px; justify-content: center; }
/* Grupos: ficha editorial tipográfica, función y fechas en un margen. */
body.research-page .academic-showcase .academic-card--group .academic-visual { display: none; }
body.research-page .academic-showcase .academic-card--group.academic-card--image .academic-visual,
body.research-page .academic-showcase .academic-card--group.academic-card--logo .academic-visual {
  display: flex; min-height: 0; height: auto; padding: 0; border: 0; background: transparent; margin-bottom: 1.5rem;
}
body.research-page .academic-showcase .academic-card--group.academic-card--logo:not(.academic-card--image) img.academic-logo { height: 64px; width: auto; max-width: 200px; }
body.research-page .academic-showcase .academic-card--group .academic-card-content { grid-template-columns: 180px minmax(0,1fr); gap: .5rem 2rem; border-top: 3px solid #427452;
}
body.research-page .academic-showcase .academic-card--group .academic-role {
  grid-column: 1; grid-row: 1; padding-top: .25rem; line-height: 1.6;
}
body.research-page .academic-showcase .academic-card--group .academic-name {
  grid-column: 2; grid-row: 1; font-size: clamp(1.3rem,2.3vw,1.75rem); line-height: 1.35;
}
body.research-page .academic-showcase .academic-card--group .academic-institution { grid-column: 2; grid-row: 2; }
body.research-page .academic-showcase .academic-card--group .academic-description,
body.research-page .academic-showcase .academic-card--group .academic-detail,
body.research-page .academic-showcase .academic-card--group .academic-topics { grid-column: 2; }
body.research-page .academic-showcase .academic-card--group .academic-card-footer {
  grid-column: 1; grid-row: 2 / span 5; flex-direction: column;
  align-items: flex-start; gap: .5rem; border: 0;
}
body.research-page .academic-showcase .academic-card--group .academic-status { padding: 0; background: transparent; border: 0; color: #7b858d; }
body.research-page .academic-showcase .academic-card--group .academic-visit { margin: 0; }

@media(max-width:700px) {
  body.research-page .academic-showcase .academic-card--review .academic-card-content { grid-template-columns: minmax(0,1fr); }
  body.research-page .academic-showcase .academic-card--review .academic-card-footer { grid-column: 1; grid-row: auto; }
  
  body.research-page .academic-showcase .academic-card--group .academic-card-content { grid-template-columns: minmax(0,1fr); gap: .65rem; }
  body.research-page .academic-showcase .academic-card--group .academic-card-content > * { grid-column: 1; grid-row: auto; }
  body.research-page .academic-showcase .academic-card--group .academic-card-footer { flex-direction: row; align-items: center; }
  body.research-page .academic-showcase .academic-card--line { margin-left: 0; }
}
body.research-page .academic-showcase .academic-card--association {
  grid-template-rows: auto !important;
}

/* INVESTIGACIÓN — evaluación legible y grupos con foto y texto. */
body.research-page .academic-showcase .academic-card--review,
body.research-page .academic-showcase .academic-card--review:hover {
  grid-template-columns: 80px minmax(0,1fr); gap: 1.25rem;
}
body.research-page .academic-showcase .academic-card--review:not(.academic-card--logo):not(.academic-card--image) { padding-left: 6.65rem; }
body.research-page .academic-showcase .academic-card--review img.academic-logo { max-width: 76px; height: 76px; }
body.research-page .academic-showcase .academic-card--review .academic-name { font-size: 1.16rem; line-height: 1.45; }

body.research-page .academic-showcase .academic-card--review .academic-period,
body.research-page .academic-showcase .academic-card--review .academic-status { font-size: .76rem; }
body.research-page .academic-showcase .academic-card--review .academic-visit { font-size: .83rem; }
/* Grupos: la imagen se muestra solo cuando se ha indicado un recurso. */
body.research-page .academic-showcase .academic-card--group,
body.research-page .academic-showcase .academic-card--group:hover { grid-template-columns: minmax(0,1fr); gap: 0;
}
body.research-page .academic-showcase .academic-card--group.academic-card--image {
  grid-template-columns: minmax(0,.85fr) minmax(0,1.3fr); gap: 2rem;
}
body.research-page .academic-showcase .academic-card--group.academic-card--image .academic-visual {
  display: flex; height: 100%; min-height: 270px; max-height: none;
  margin: 0; padding: 0; border: 0; border-radius: 10px; overflow: hidden;
}
body.research-page .academic-showcase .academic-card--group.academic-card--image img.academic-cover {
  width: 100%; height: 100%; min-height: 270px; max-height: 440px; object-fit: cover;
}
body.research-page .academic-showcase .academic-card--group .academic-card-content {
  display: flex; flex-direction: column; gap: 0; padding: .3rem 0 0;
  border: 0; max-width: 52rem;
}
body.research-page .academic-showcase .academic-card--group .academic-card-content > * { grid-column: auto; grid-row: auto; }
body.research-page .academic-showcase .academic-card--group .academic-role { margin: 0 0 .5rem; padding: 0; font-size: .78rem; }
body.research-page .academic-showcase .academic-card--group .academic-name { font-size: clamp(1.4rem,2.4vw,1.9rem); margin: 0 0 .75rem; }
body.research-page .academic-showcase .academic-card--group .academic-institution { margin: 0 0 .85rem; font-size: 1rem; }
body.research-page .academic-showcase .academic-card--group .academic-description { margin-bottom: 1rem; font-size: .96rem; line-height: 1.7; }
body.research-page .academic-showcase .academic-card--group .academic-card-footer {
  display: flex; flex-direction: row; align-items: center; gap: .65rem 1rem;
  margin: .5rem 0 0; padding: .75rem 0 0; border-top: 1px solid #e5e9e7;
}
body.research-page .academic-showcase .academic-card--group.academic-card--logo:not(.academic-card--image) .academic-visual { margin-bottom: 1rem; }
body.research-page .academic-showcase .academic-card--line { margin-left: 0; }
@media(max-width:700px) {
  body.research-page .academic-showcase .academic-card--review,
  body.research-page .academic-showcase .academic-card--review:hover { grid-template-columns: 62px minmax(0,1fr); gap: .8rem; padding: 1rem .3rem; }
  body.research-page .academic-showcase .academic-card--review:not(.academic-card--logo):not(.academic-card--image) { grid-template-columns: minmax(0,1fr); padding-left: 4.1rem; }
  body.research-page .academic-showcase .academic-card--review img.academic-logo { max-width: 62px; height: 68px; }
  body.research-page .academic-showcase .academic-card--review .academic-name { font-size: 1.06rem; }
  body.research-page .academic-showcase .academic-card--group.academic-card--image { grid-template-columns: minmax(0,1fr); gap: 1.2rem; }
  body.research-page .academic-showcase .academic-card--group.academic-card--image .academic-visual { height: 220px; min-height: 0; }
  body.research-page .academic-showcase .academic-card--group.academic-card--image img.academic-cover { height: 220px; min-height: 0; }
}

/* ============================================================
   NUEVA PROPUESTA — pegar al final de styles.css
   Evaluación: listado de revistas en una columna.
   Grupos: bloque azul oscuro con información clara.
   Asociaciones conserva su diseño actual.
============================================================ */

/* EVALUACIÓN CIENTÍFICA */

body.research-page .academic-showcase
.academic-section--review .academic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border: 0;
  text-align: left;
}

body.research-page .academic-showcase .academic-role-heading {
  grid-column: 1 / -1;
  margin: 1.5rem 0 .5rem;
  padding: .6rem 0;
  border: 0;
  border-bottom: 2px solid #8b3d4e;
  background: transparent;
  color: #8b3d4e;
  font-size: .85rem;
}

body.research-page .academic-showcase .academic-card--review,
body.research-page .academic-showcase .academic-card--review:hover {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  padding: 1.3rem 0;
  border: 0;
  border-bottom: 1px solid #e5e8eb;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.research-page .academic-showcase
.academic-card--review:not(.academic-card--logo):not(.academic-card--image) {
  grid-template-columns: minmax(0, 1fr);
  padding-left: 0;
}

body.research-page .academic-showcase
.academic-card--review .academic-visual {
  padding: 0;
  min-height: 90px;
  background: transparent;
  border: 0;
}

body.research-page .academic-showcase
.academic-card--review img.academic-logo {
  width: 90px;
  max-width: 90px;
  height: 100px;
  object-fit: contain;
}

body.research-page .academic-showcase
.academic-card--review .academic-card-content {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 0;
}

body.research-page .academic-showcase
.academic-card--review .academic-name {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.4;
  color: #2c3b4d;
}

body.research-page .academic-showcase
.academic-card--review .academic-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .8rem;
  margin: 0;
  padding: 0;
  border: 0;
}

body.research-page .academic-showcase
.academic-card--review .academic-visit {
  flex-basis: 100%;
  min-height: 44px;
}

/* GRUPOS — bloque de identidad, sin grandes siglas */

body.research-page .academic-showcase .academic-card--group,
body.research-page .academic-showcase .academic-card--group:hover {
  border-radius: 12px;
  background: #2c3b4d;
}

body.research-page .academic-showcase
.academic-card--group .academic-visual {
  display: none;
}

body.research-page .academic-showcase
.academic-card--group.academic-card--image .academic-visual {
  display: block;
  height: 230px;
  min-height: 0;
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
  border-radius: 7px;
  overflow: hidden;
}

body.research-page .academic-showcase
.academic-card--group.academic-card--image img.academic-cover {
  width: 100%;
  height: 230px;
  min-height: 0;
  object-fit: cover;
}

body.research-page .academic-showcase
.academic-card--group .academic-role {
  margin: 0 0 .8rem;
  padding: 0;
}

body.research-page .academic-showcase
.academic-card--group .academic-name {
  line-height: 1.3;
}

body.research-page .academic-showcase
.academic-card--group .academic-institution {
  margin: 0 0 1rem;
  color: #d8e1e9;
  font-size: 1rem;
}

body.research-page .academic-showcase
.academic-card--group .academic-description,
body.research-page .academic-showcase
.academic-card--group .academic-detail {
  color: #e1e7ed;
  font-size: .95rem;
  line-height: 1.7;
}

body.research-page .academic-showcase
.academic-card--group .academic-card-footer {
  align-items: center;
  gap: .7rem 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, .2);
}

body.research-page .academic-showcase
.academic-card--group .academic-topics li {
  background: rgba(255, 255, 255, .1);
}

/* Líneas de investigación: texto sobre fondo blanco */

body.research-page .academic-showcase .academic-card--line,
body.research-page .academic-showcase .academic-card--line:hover {
  border-left: 3px solid #e07a1f;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.research-page .academic-showcase .academic-line-title {
  line-height: 1.65;
}

/* MÓVIL Y TABLETA */

@media (max-width: 480px) {
  body.research-page .academic-showcase .academic-card--review,
  body.research-page .academic-showcase .academic-card--review:hover {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: .85rem;
  }

  body.research-page .academic-showcase
  .academic-card--review:not(.academic-card--logo):not(.academic-card--image) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.research-page .academic-showcase
  .academic-card--review img.academic-logo {
    width: 70px;
    max-width: 70px;
    height: 85px;
  }

  body.research-page .academic-showcase
  .academic-card--review .academic-name {
    font-size: 1.05rem;
  }

  body.research-page .academic-showcase
  .academic-card--group .academic-visit {
    margin-left: 0;
  }

  body.research-page .academic-showcase
  .academic-card--group.academic-card--image .academic-visual,
  body.research-page .academic-showcase
  .academic-card--group.academic-card--image img.academic-cover {
    height: 190px;
  }
}

/* EVALUACIÓN — alineación a la izquierda */

body.research-page .academic-showcase
.academic-section--review {
  text-align: left;
}

body.research-page .academic-showcase
.academic-card--review .academic-visual,
body.research-page .academic-showcase
.academic-card--review .academic-logo-wrap {
  justify-content: flex-start;
}

body.research-page .academic-showcase
.academic-card--review .academic-card-content {
  align-items: flex-start;
  text-align: left;
}

body.research-page .academic-showcase
.academic-card--review .academic-card-footer {
  justify-content: flex-start;
  width: 100%;
}

body.research-page .academic-showcase
.academic-card--review .academic-visit {
  margin-left: 0;
  justify-content: flex-start;
}

/* GRUPOS — fondo blanco y jerarquía discreta */

body.research-page .academic-showcase
.academic-card--group .academic-role {
  color: #697581;
  font-size: .76rem;
  font-weight: 400;
}

body.research-page .academic-showcase
.academic-card--group .academic-institution,
body.research-page .academic-showcase
.academic-card--group .academic-description,
body.research-page .academic-showcase
.academic-card--group .academic-detail {
  color: #697581;
  font-size: .9rem;
  line-height: 1.6;
}

body.research-page .academic-showcase
.academic-card--group .academic-card-footer {
  margin-top: .5rem;
  padding-top: .5rem;
}

body.research-page .academic-showcase
.academic-card--group .academic-topics li {
  background: #f2f5f3;
  color: #52695b;
}

/* Líneas de investigación sin acento destacado */

body.research-page .academic-showcase .academic-card--line,
body.research-page .academic-showcase .academic-card--line:hover {
  margin: 1rem 0 0;
  padding: 1.2rem 0;
  border: 0;
  border-top: 1px solid #e5e8eb;
}

body.research-page .academic-showcase
.academic-card--line h4.academic-lines-title {
  color: #2c3b4d;
  font-size: 1.15rem;
}

body.research-page .academic-showcase .academic-line-title {
  font-size: .95rem;
  color: #697581;
}

/* GRUPOS — listado compacto con detalles desplegables */

body.research-page .academic-showcase .academic-card--group,
body.research-page .academic-showcase .academic-card--group:hover {
  display: block;
  margin: 0;
  padding: 1.1rem 0;
  border: 0;
  border-bottom: 1px solid #e5e8eb;
  border-radius: 0;
  background: transparent;
  color: #2c3b4d;
  box-shadow: none;
}

body.research-page .academic-showcase
.academic-card--group .academic-card-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: none;
  padding: 0;
  border: 0;
}

body.research-page .academic-showcase
.academic-card--group .academic-name {
  margin: 0 0 .35rem;
  color: #2c3b4d;
  font-size: 1.08rem;
  line-height: 1.45;
}

body.research-page .academic-showcase
.academic-card--group .academic-role,
body.research-page .academic-showcase
.academic-card--group .academic-institution {
  margin: 0 0 .3rem;
  color: #697581;
  font-size: .84rem;
  line-height: 1.5;
}

body.research-page .academic-showcase
.academic-card--group .academic-card-footer {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin: .25rem 0;
  padding: 0;
  border: 0;
}

body.research-page .academic-showcase
.academic-card--group .academic-period,
body.research-page .academic-showcase
.academic-card--group .academic-status {
  padding: 0;
  border: 0;
  background: transparent;
  color: #7b858d;
  font-size: .73rem;
}

body.research-page .academic-showcase
.academic-card--group .academic-visit {
  margin-left: 0;
  color: #526273;
}

body.research-page .academic-showcase .academic-expand {
  margin-top: .5rem;
}

body.research-page .academic-showcase .academic-expand > summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: fit-content;
  min-height: 44px;
  padding: .35rem 0;
  list-style: none;
  cursor: pointer;
  color: #526273;
  font-family: var(--bs-font-sans-serif, sans-serif);
  font-size: .78rem;
}

body.research-page .academic-showcase
.academic-expand > summary::-webkit-details-marker {
  display: none;
}

body.research-page .academic-showcase
.academic-expand > summary::after {
  content: "+";
  font-size: 1.1rem;
  line-height: 1;
}

body.research-page .academic-showcase
.academic-expand[open] > summary::after {
  content: "−";
}

body.research-page .academic-showcase
.academic-expand > summary:focus-visible {
  outline: 2px solid #e07a1f;
  outline-offset: 4px;
}

body.research-page .academic-showcase .academic-expand-body {
  max-width: 48rem;
  padding: .65rem 0 .4rem;
  color: #697581;
  font-size: .9rem;
  line-height: 1.65;
}

body.research-page .academic-showcase
.academic-expand-body .academic-visual {
  display: flex !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  background: transparent;
}

body.research-page .academic-showcase
.academic-expand-body img.academic-cover {
  display: block;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  max-height: 320px;
  object-fit: contain;
}

body.research-page .academic-showcase
.academic-expand-body .academic-description,
body.research-page .academic-showcase
.academic-expand-body .academic-detail {
  color: #697581;
  font-size: .9rem;
  line-height: 1.65;
}
