/* -- Background -- */
body{
  background-image: url('https://images.inmatia.es/index/background.svg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: top left 15%;
}

/* -- Header INDEX -- */
#headerNavigationContainer > .container-fluid,
#headerNavigationContainer #nav-menu {
  background-color: #151227;
}

.navbar-default .nav > li > a {
  color: white;
  font-weight: bold;
}

.index-header,
.index-header * {
  box-sizing: border-box;
}

.index-header {
  position: relative;
  z-index: 10;
  width: 100%;
  color: #090909;
  background: #fff;
  border-bottom: 1px solid #e3e3e3;
}

/* Franja cromática tomada de la identidad visual de INDEX. */
.index-header::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg,
    #36358f 0 16.6%,
    #08a984 16.6% 33.2%,
    #ffdf00 33.2% 49.8%,
    #ef3340 49.8% 66.4%,
    #f7a33d 66.4% 83%,
    #16a9ce 83% 100%);
  content: "";
}

.index-header .hdr-wrap {
  display: grid;
  grid-template-columns: minmax(320px, 1.65fr) 1px minmax(230px, 1fr) auto;
  align-items: center;
  gap: clamp(22px, 3vw, 44px);
  width: min(100%, 1200px);
  min-height: 170px;
  margin: 0 auto;
  padding: 22px clamp(20px, 4vw, 54px) 26px;
}

.index-header a {
  color: inherit;
  text-decoration: none;
}

.index-header .brand-index,
.index-header .brand-puce {
  display: flex;
  align-items: center;
  min-width: 0;
  line-height: 0;
}

.index-header .brand-index img {
  display: block;
  width: min(100%, 500px);
  height: auto;
}

.index-header .brand-puce img {
  display: block;
  width: min(100%, 310px);
  height: auto;
}

.index-header .divider {
  display: block;
  width: 1px;
  height: 110px;
  background: #c9c9c9;
}

.index-header .meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 13px;
  min-width: max-content;
}

.index-header .header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Selector de idioma según el patrón de REMCB. */
.index-header .language-control {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  color: #111;
  background: #fafafa;
  border: 1px solid #d8d8d8;
}

.index-header .language-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.index-header .language-select {
  min-height: 32px;
  padding: 0 24px 0 2px;
  color: #111;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.index-header .language-select:focus-visible {
  outline: none;
  box-shadow: 0 2px 0 #111;
}

.index-header .login-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  color: #111;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  border-left: 1px solid #d8d8d8;
}

.index-header .login-link:hover,
.index-header .login-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.index-header .login-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.index-header .issn {
  color: #222;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .2px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .index-header .hdr-wrap {
    grid-template-columns: minmax(270px, 1.5fr) 1px minmax(210px, 1fr);
    gap: 22px;
  }

  .index-header .meta {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid #e6e6e6;
  }

  .index-header .header-tools {
    justify-content: center;
  }
}

@media (max-width: 620px) {
  .index-header .hdr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 19px;
    min-height: 0;
    padding: 22px 18px 24px;
  }

  .index-header .brand-index,
  .index-header .brand-puce {
    justify-content: center;
    width: 100%;
  }

  .index-header .brand-index img {
    width: min(100%, 430px);
  }

  .index-header .brand-puce img {
    width: min(78%, 290px);
  }

  .index-header .divider {
    width: min(82%, 360px);
    height: 1px;
  }

  .index-header .meta {
    justify-content: center;
    padding-top: 15px;
  }
}

/* -- Ocultar Header -- */
.pkp_page_article.pkp_op_view > header.index-header {
  display: none;
}

/* -- Body -- */
.btn-group .galley-link.btn.btn-primary {
  background-color: #195861;
}
.media-body {
  font-weight: bold;
}
.media-heading a {
  color: #195861;
}
.media-heading p {
  color: #5b5b5f;
}
.media-heading p>small {
  font-weight: bold;
}
.meta .authors {
  color: black;
}
.media-body .pages {
  color: #df3d2e;
}

/* -- SideBar -- */
.pkp_block.block_make_submission .content {
  background-color: #df3d2e !important;
  border-radius: 15px;
  display: flex;
  justify-content: center;
}
.pkp_block.block_make_submission .block_make_submission_link {
  background-color: #df3d2e;
}
.pkp_block.block_make_submission a {
  color: white;
  border-color: #df3d2e;
  padding: 4px;
  font-size: inherit;
}
.pkp_block .title {
  color: black;
  background-color: transparent;
  border-color: transparent;
  font-size: 1.9rem;
  font-weight: bold;
}
.pkp_structure_sidebar.left .pkp_block {
  background-color: #df3d2e1c;
  border-radius: 15px;
}
.pkp_structure_sidebar.left .pkp_block .content {
  background-color: transparent;
}
.pkp_structure_sidebar.left .pkp_block .content li {
  background-color: transparent;
  border-color: transparent;
}

/* -- Equipo Editorial -- */
:root{
  --bg-card: #df3d2e1c;   /* rosado claro */
  --txt: #1f2027;
  --muted: #6b6b6b;
  --brand: #005278;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(0,0,0,.08);
  --footer-bg: #f29023;              /* naranja base */
  --footer-fg: #fff;                 /* texto */
  --footer-maxw: 1200px;             /* ancho máximo del contenido */
  --footer-padY: clamp(10px, 2.4vw, 16px);
  --footer-padX: clamp(12px, 3vw, 28px);
 --hdr-maxw: 1200px;
  --padX: clamp(12px, 3vw, 28px);
  --padY: clamp(10px, 2.2vw, 18px);
  --divider: #166873;          /* verde azulado del mockup */
}

.team {
  color: var(--txt);
}
.team > h2 {
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 20px;
}
/* GRID responsive */
.cards{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(14px, 2vw, 28px);
}

/* CARD */
.card{
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  text-align: center;
}
.avatar{
  width: 120px; 
  height: 135px; margin: 0 auto 10px;
  border: 3px solid rgba(0,0,0,.25);
  border-radius: 8px;
  background:
    linear-gradient(#b7b7b7,#9b9b9b);
  mask:
    radial-gradient(40px 48px at 50% 45%, transparent 41px, #000 42px) top center / 100% 100% no-repeat;
}
.badges{
  display:flex; gap:8px; justify-content:center; margin:6px 0 10px;
}
.badge{
  display:inline-flex; align-items:center; justify-content:center;
  width:26px; height:26px; border-radius:8px;
  background:#76c043; color:#fff; font-weight:700; font-size:12px;
}
.badge.g{ background:#2d6cdf; }

.role{
  margin:.4rem 0 0; font-size:1.4rem;
}
.card h3{
  margin:.1rem 0 .4rem; font-weight:700; color:#333; font-size: 1.9rem;
}
.aff{ color:var(--muted); margin:.2rem 0 .4rem; }
.email a{
  color: var(--brand); text-decoration: none; font-weight: 600;
}
.desc{ color:#4a4a4a; line-height:1.45; }

/* Ajustes finos grandes pantallas (simula 2 columnas amplias) */
@media (min-width: 980px){
  .cards{ grid-template-columns: repeat(2, minmax(320px, 1fr)); }
}

/* Estilos para el Grid de Catálogos */
.catalogos-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas en escritorio */
    gap: 20px;
    max-width: 1200px; /* Ancho máximo opcional */
    margin: 3rem auto; /* Centrar el grid */
    padding: 20px; /* Espaciado interno opcional */
    background-color: #f5f5f5; /* Fondo opcional para el contenedor */
    border-radius: 8px; /* Bordes redondeados opcionales */
}

.catalogos-grid-item {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.catalogos-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.catalogos-grid-item a img {
    width: 90px;
    height: 50px;
    object-fit: contain;
    margin: 4px 0;
    transition: transform 0.3s;
}

.catalogos-grid-item a img:hover {
    transform: scale(1.1);
}

.catalogos-grid-item p {
    font-size: 14px;
    color: #333;
    margin-top: 10px;
    word-wrap: break-word; /* Para ajustar textos largos */
}

/* -- Footer -- */
.footer {
  background-color: #f29023 !important;
  padding: 0px !important;
}
.footer .col-md-2 {
  display: none;
}
.footer .col-md-10 {
  width: 100%;
}
.index-footer{
  color: var(--footer-fg);
  background-color: #f29023 !important;
  margin-top: 0px !important;
}

.index-footer .footer-wrap{
  max-width: var(--footer-maxw);
  padding: 0.75em;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
}

.index-footer .brand-left img{
  height: clamp(30px, 6vw, 44px);
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.06));
}

.index-footer .brand-right img{
  height: clamp(24px, 5vw, 38px);
  width: auto;
  display: block;
}

.index-footer .footer-text{
  margin: 0;
  line-height: 1.35;
  font-weight: 700;          /* como en la referencia */
  letter-spacing: .1px;
}

/* Hover accesible solo para punteros (no móviles) */
@media (hover:hover){
  .index-footer a:hover{ opacity: .92; }
}

/* Tablets y móviles: apilar y centrar */
@media (max-width: 820px){
  .index-footer .footer-wrap{
    grid-template-columns: 1fr;
    text-align: center;
  }
  .index-footer .brand-left,
  .index-footer .brand-right{ justify-self: center; }
  .index-footer .footer-text{
    order: 2;    /* texto al medio */
    font-weight: 600;
  }
}

/* Opción: bordes superiores sutiles (descomenta si quieres una “línea” arriba) */
.index-footer{ box-shadow: inset 0 2px 0 rgba(255,255,255,.25); }
