:root{
  --umar-azul:#102f57;
  --umar-azul-2:#163f70;
  --umar-dorado:#c99a20;
  --umar-dorado-2:#e3b63e;
  --umar-claro:#eef4fa;
  --umar-texto:#10274a;
  --umar-borde:#dbe6f1;
  --umar-sombra:0 18px 44px rgba(16,47,87,.14);
}

/* Oculta buscadores/bloques nativos repetidos de la portada */
body.template-dir-search.template-name-home header form,
body.template-dir-search.template-name-home header .searchForm,
body.template-dir-search.template-name-home .navbar form,
body.template-dir-search.template-name-home .navbar .searchForm,
body.template-dir-search.template-name-home .container > form,
body.template-dir-search.template-name-home main > form,
body.template-dir-search.template-name-home .mainbody > form,
body.template-dir-search.template-name-home .searchHomeContent,
body.template-dir-search.template-name-home .searchHomeBrowse,
body.template-dir-search.template-name-home .home-content,
body.template-dir-search.template-name-home .browse,
body.template-dir-search.template-name-home .mainbody > .row:not(:has(#umar-home)),
body.template-dir-search.template-name-home .container > .row:not(:has(#umar-home)),
#umar-home ~ .row,
#umar-home + .row{
  display:none !important;
}

body.template-dir-search.template-name-home{
  background:linear-gradient(180deg,#f8fbff 0%,#edf4fb 100%);
}

body.template-dir-search.template-name-home .mainbody,
body.template-dir-search.template-name-home .container{
  max-width:none !important;
  width:100% !important;
  padding-left:0 !important;
  padding-right:0 !important;
}

#umar-home{
  width:100%;
  max-width:1360px;
  margin:0 auto;
  color:var(--umar-texto);
  font-family:inherit;
}

.umar-hero-banner{
  position:relative;
  min-height:560px;
  overflow:hidden;
  border-radius:0 0 34px 34px;
  padding:42px 48px 84px;
  background:
    linear-gradient(90deg,rgba(9,31,61,.94),rgba(9,31,61,.78),rgba(9,31,61,.42)),
    url('../images/banner-umar.jpg') center center/cover no-repeat;
  box-shadow:var(--umar-sombra);
}

.umar-hero-overlay{
  position:absolute;
  inset:0;
  background:radial-gradient(circle at 75% 20%,rgba(255,255,255,.18),transparent 34%),linear-gradient(180deg,rgba(7,25,48,.15),rgba(7,25,48,.55));
  pointer-events:none;
}

.umar-topbar,
.umar-hero-content{
  position:relative;
  z-index:2;
}

.umar-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  margin-bottom:60px;
}

.umar-brand-mini{
  display:flex;
  align-items:center;
  gap:10px;
}

.umar-brand-mini img{
  width:72px;
  height:72px;
  object-fit:contain;
  background:#fff;
  border-radius:18px;
  padding:8px;
  box-shadow:0 14px 26px rgba(0,0,0,.22);
}

.umar-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.umar-pill{
  border:1px solid rgba(255,255,255,.65);
  border-radius:999px;
  padding:12px 20px;
  color:#fff;
  font-weight:800;
  line-height:1;
  text-decoration:none !important;
  background:rgba(255,255,255,.12);
  backdrop-filter:blur(8px);
  cursor:pointer;
  transition:transform .18s ease, background .18s ease, border-color .18s ease;
}

.umar-pill:hover{
  color:#fff;
  transform:translateY(-2px);
  background:rgba(255,255,255,.20);
}

.umar-pill-gold{
  background:linear-gradient(135deg,var(--umar-dorado),var(--umar-dorado-2));
  border-color:transparent;
  color:#fff;
}

.umar-hero-content{
  max-width:760px;
}

.umar-label{
  display:inline-flex;
  align-items:center;
  border:1px solid rgba(255,255,255,.48);
  background:rgba(255,255,255,.10);
  color:#fff;
  border-radius:999px;
  padding:10px 18px;
  font-weight:800;
  margin-bottom:24px;
}

.umar-hero-content h1{
  color:#fff;
  margin:0;
  font-size:clamp(36px,4.8vw,64px);
  line-height:1.08;
  font-weight:900;
  letter-spacing:-1px;
  text-shadow:0 10px 30px rgba(0,0,0,.35);
}

.umar-hero-content p{
  margin:22px 0 0;
  color:#f1f6fb;
  font-size:19px;
  line-height:1.65;
  text-shadow:0 8px 20px rgba(0,0,0,.28);
}

.umar-search-panel{
  position:absolute;
  right:48px;
  bottom:82px;
  width:min(440px,calc(100% - 96px));
  padding:28px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(255,255,255,.75);
  border-radius:26px;
  box-shadow:0 24px 60px rgba(0,0,0,.28);
}

.umar-search-panel h2{
  margin:0 0 14px;
  color:var(--umar-texto);
  font-size:21px;
  font-weight:900;
}

.umar-search-panel form,
.umar-search-panel .searchForm{
  margin:0 !important;
  box-shadow:none !important;
  border:none !important;
  padding:0 !important;
  background:transparent !important;
}

.umar-search-panel input[type="text"],
.umar-search-panel .form-control,
.umar-search-panel select{
  border-radius:14px !important;
  border:1px solid #cbd8e8 !important;
}

.umar-search-panel button[type="submit"],
.umar-search-panel .btn-primary{
  background:var(--umar-dorado) !important;
  border-color:var(--umar-dorado) !important;
  border-radius:999px !important;
  font-weight:900 !important;
}

.umar-search-panel a.btn,
.umar-search-panel .btn-link{
  color:#fff !important;
  background:var(--umar-dorado) !important;
  border-radius:999px !important;
  font-weight:900 !important;
}

.umar-examples{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:18px;
  font-size:13px;
  color:#6b7c93;
}

.umar-examples a{
  padding:8px 13px;
  border-radius:999px;
  color:var(--umar-texto);
  background:#f0f4fa;
  font-weight:800;
  text-decoration:none !important;
}

.umar-feature-grid-clean{
  max-width:1130px;
  margin:-40px auto 46px;
  padding:0 24px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  position:relative;
  z-index:6;
}

.umar-feature{
  display:block;
  min-height:142px;
  background:#fff;
  border:1px solid var(--umar-borde);
  border-radius:18px;
  padding:22px;
  box-shadow:var(--umar-sombra);
  text-decoration:none !important;
  color:var(--umar-texto);
  transition:transform .18s ease, box-shadow .18s ease;
}

.umar-feature:hover{
  transform:translateY(-3px);
  box-shadow:0 24px 52px rgba(16,47,87,.18);
  color:var(--umar-texto);
}

.umar-feature-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:#edf3fb;
  margin-bottom:14px;
  font-size:21px;
}

.umar-feature h3{
  margin:0 0 8px;
  font-size:18px;
  font-weight:900;
  color:var(--umar-texto);
}

.umar-feature p{
  margin:0;
  color:#5c7190;
  line-height:1.5;
  font-size:14px;
}

.umar-academic-section{
  max-width:1130px;
  margin:0 auto 48px;
  padding:0 24px;
  text-align:center;
}

.umar-academic-section > span{
  color:var(--umar-dorado);
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:1.4px;
  font-size:13px;
}

.umar-academic-section h2{
  margin:12px 0 10px;
  color:var(--umar-texto);
  font-size:clamp(28px,3vw,38px);
  font-weight:900;
}

.umar-academic-section > p{
  margin:0 auto 28px;
  max-width:820px;
  color:#516985;
  font-size:16px;
}

.umar-source-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  text-align:left;
}

.umar-source-grid article{
  background:#fff;
  border:1px solid var(--umar-borde);
  border-radius:20px;
  padding:26px;
  box-shadow:0 14px 36px rgba(16,47,87,.10);
}

.umar-source-grid article div{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:#edf3fb;
  margin-bottom:18px;
  font-size:24px;
}

.umar-source-grid h3{
  margin:0 0 10px;
  color:var(--umar-texto);
  font-size:20px;
  font-weight:900;
}

.umar-source-grid p{
  margin:0;
  color:#425a78;
  line-height:1.55;
}

/* Footer limpio, institucional y sin soporte pegado */
.umar-footer-pro{
  max-width:1230px;
  margin:28px auto 32px;
  padding:24px 30px;
  border-radius:26px;
  background:linear-gradient(135deg,#102f57,#1d4f82);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  box-shadow:var(--umar-sombra);
}

.umar-footer-brand{
  display:flex;
  align-items:center;
  gap:14px;
}

.umar-footer-brand img{
  width:54px;
  height:54px;
  object-fit:contain;
  background:#fff;
  border-radius:14px;
  padding:6px;
}

.umar-footer-brand strong{
  display:block;
  font-size:16px;
  font-weight:900;
}

.umar-footer-brand span{
  display:block;
  color:#dce8f5;
  margin-top:3px;
  font-size:13px;
}

.umar-footer-meta{
  text-align:right;
}

.umar-footer-meta p{
  margin:8px 0 0;
  color:#dce8f5;
  font-size:13px;
  font-weight:700;
}

.umar-visit-counter{
  display:inline-flex;
  align-items:center;
  gap:12px;
  padding:10px 16px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.22);
}

.umar-visit-counter span{
  font-size:12px;
  color:#f3e3ad;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.7px;
}

.umar-visit-counter strong{
  font-size:22px;
  line-height:1;
  font-weight:900;
}

.umar-support-modal{
  border:none;
  border-radius:24px;
  overflow:hidden;
  background:linear-gradient(135deg,#102f57,#244d7e);
  color:#fff;
  box-shadow:0 24px 70px rgba(0,0,0,.35);
}

.umar-support-modal .modal-header{
  border-bottom:1px solid rgba(255,255,255,.18);
  padding:20px 24px;
}

.umar-support-modal .modal-title{
  font-weight:900;
}

.umar-support-modal .btn-close{
  filter:invert(1);
}

.umar-support-modal .modal-body{
  padding:28px;
}

.umar-support-label{
  display:block;
  color:#ffe27a;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:1px;
  font-weight:900;
  margin-bottom:12px;
}

.umar-support-modal h3{
  margin:0 0 14px;
  font-size:26px;
  line-height:1.05;
  font-weight:900;
}

.umar-support-modal p{
  margin:0 0 8px;
  color:#eef5fb;
  font-size:16px;
}

.umar-support-mails{
  display:grid;
  gap:10px;
  margin-top:22px;
}

.umar-support-mails a{
  display:block;
  background:#fff;
  color:#102f57;
  padding:13px 16px;
  border-radius:999px;
  font-weight:900;
  text-decoration:none !important;
}

/* Por si VuFind imprime específicamente las columnas viejas */
.umar-info-grid,
.umar-info-card{
  display:none !important;
}

@media(max-width:1120px){
  .umar-search-panel{
    position:relative;
    right:auto;
    bottom:auto;
    width:100%;
    margin-top:30px;
  }
  .umar-hero-content{max-width:100%;}
  .umar-feature-grid-clean,
  .umar-source-grid{grid-template-columns:1fr 1fr;}
}

@media(max-width:760px){
  .umar-hero-banner{padding:28px 20px 70px;border-radius:0 0 24px 24px;}
  .umar-topbar{align-items:flex-start;flex-direction:column;margin-bottom:36px;}
  .umar-brand-mini img{width:58px;height:58px;}
  .umar-actions{justify-content:flex-start;}
  .umar-feature-grid-clean,
  .umar-source-grid{grid-template-columns:1fr;}
  .umar-footer-pro{flex-direction:column;align-items:flex-start;text-align:left;}
  .umar-footer-meta{text-align:left;}
}
/* =========================================================
   RESULTADOS DE BÚSQUEDA - Diseño institucional UMAR
   ========================================================= */

body.template-dir-search.template-name-results{
  background:#f7fafc;
}

.template-dir-search.template-name-results .container,
.template-dir-search.template-name-results .mainbody{
  max-width:1280px;
}

.template-dir-search.template-name-results .searchForm,
.template-dir-search.template-name-results form.searchForm{
  background:#ffffff;
  border:1px solid #d9e4ee;
  border-radius:18px;
  padding:16px;
  box-shadow:0 12px 30px rgba(6,47,79,.10);
  margin-bottom:18px;
}

.template-dir-search.template-name-results .alert-info,
.template-dir-search.template-name-results .spellcheck,
.template-dir-search.template-name-results .suggestion{
  background:#eaf6fc !important;
  border:1px solid #cfe7f4 !important;
  color:#063f6a !important;
  border-radius:16px !important;
  box-shadow:0 8px 20px rgba(6,47,79,.06);
}

.template-dir-search.template-name-results .result,
.template-dir-search.template-name-results .record{
  background:#ffffff;
  border:1px solid #d9e4ee;
  border-radius:18px;
  box-shadow:0 12px 30px rgba(6,47,79,.10);
  padding:20px !important;
  margin-bottom:18px !important;
  transition:transform .18s ease, box-shadow .18s ease;
}

.template-dir-search.template-name-results .result:hover,
.template-dir-search.template-name-results .record:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 38px rgba(6,47,79,.14);
}

.template-dir-search.template-name-results .result a,
.template-dir-search.template-name-results .record a{
  color:#064b7a;
  font-weight:700;
}

.template-dir-search.template-name-results mark,
.template-dir-search.template-name-results .highlight{
  background:#fff2a8 !important;
  color:#1d3550 !important;
  border-radius:4px;
  padding:0 3px;
}

.template-dir-search.template-name-results .recordcover,
.template-dir-search.template-name-results img.recordcover,
.template-dir-search.template-name-results .cover-image,
.template-dir-search.template-name-results .result img{
  border-radius:12px;
  box-shadow:0 8px 20px rgba(6,47,79,.12);
  border:1px solid #d9e4ee;
  background:#ffffff;
  max-width:90px;
  height:auto;
}

.template-dir-search.template-name-results .format,
.template-dir-search.template-name-results .badge{
  background:#062f4f !important;
  color:#ffffff !important;
  border-radius:999px !important;
  padding:6px 10px !important;
  font-weight:700;
}

.template-dir-search.template-name-results .sidebar .facet-group,
.template-dir-search.template-name-results .facet-group{
  background:#ffffff;
  border:1px solid #d9e4ee;
  box-shadow:0 12px 30px rgba(6,47,79,.10);
  overflow:hidden;
  margin-bottom:18px;
  border-radius:18px;
}

.template-dir-search.template-name-results .facet-group h3,
.template-dir-search.template-name-results .facet-title,
.template-dir-search.template-name-results .list-group-item.active{
  background:#062f4f !important;
  color:#ffffff !important;
  border-color:#062f4f !important;
}

.template-dir-search.template-name-results .facet-group a,
.template-dir-search.template-name-results .sidebar a{
  color:#064b7a;
}

.template-dir-search.template-name-results .btn-primary,
.template-dir-search.template-name-results button[type="submit"]{
  background:#062f4f !important;
  border-color:#062f4f !important;
  border-radius:10px !important;
}

.template-dir-search.template-name-results .btn-primary:hover{
  background:#0a4068 !important;
}

.template-dir-search.template-name-results select,
.template-dir-search.template-name-results input[type="text"],
.template-dir-search.template-name-results .form-control{
  border-radius:10px !important;
}

/* Oculta texto del placeholder viejo si VuFind lo imprime debajo de la imagen */
.template-dir-search.template-name-results .recordcover + br,
.template-dir-search.template-name-results .recordcover + small{
  display:none !important;
}

/* =========================================================
   FICHA / DETALLE DEL REGISTRO - Diseño institucional UMAR
   ========================================================= */

body.template-dir-record,
body[class*="template-dir-record"]{
  background:#f7fafc;
}

.template-dir-record .container,
body[class*="template-dir-record"] .container{
  max-width:1280px;
}

/* Buscador superior */
.template-dir-record .searchForm,
body[class*="template-dir-record"] form.searchForm{
  background:#ffffff;
  border:1px solid #d9e4ee;
  border-radius:18px;
  padding:16px;
  box-shadow:0 12px 30px rgba(6,47,79,.10);
  margin-bottom:18px;
}

/* Breadcrumb */
.template-dir-record .breadcrumb,
body[class*="template-dir-record"] .breadcrumb{
  background:#eef4f8 !important;
  border:1px solid #d9e4ee;
  border-radius:14px;
  padding:14px 18px;
  color:#062f4f;
}

/* Botonera de acciones */
.template-dir-record .toolbar,
.template-dir-record .record-toolbar,
.template-dir-record .btn-toolbar,
body[class*="template-dir-record"] .toolbar,
body[class*="template-dir-record"] .record-toolbar,
body[class*="template-dir-record"] .btn-toolbar{
  background:#ffffff;
  border:1px solid #d9e4ee;
  border-radius:18px;
  padding:14px;
  box-shadow:0 12px 30px rgba(6,47,79,.08);
  margin-bottom:22px;
}

.template-dir-record .btn,
body[class*="template-dir-record"] .btn{
  border-radius:10px !important;
  font-weight:600;
}

.template-dir-record .btn-primary,
body[class*="template-dir-record"] .btn-primary{
  background:#062f4f !important;
  border-color:#062f4f !important;
}

/* Contenido principal del registro */
.template-dir-record .mainbody > .record,
.template-dir-record .record-core,
.template-dir-record .media,
body[class*="template-dir-record"] .mainbody > .record,
body[class*="template-dir-record"] .record-core,
body[class*="template-dir-record"] .media{
  background:#ffffff;
  border:1px solid #d9e4ee;
  border-radius:22px;
  box-shadow:0 16px 42px rgba(6,47,79,.11);
  padding:24px !important;
  margin-bottom:24px;
}

/* Imagen de portada */
.template-dir-record .recordcover,
.template-dir-record img.recordcover,
.template-dir-record .cover-image,
body[class*="template-dir-record"] .recordcover,
body[class*="template-dir-record"] img.recordcover,
body[class*="template-dir-record"] .cover-image{
  border-radius:16px !important;
  border:1px solid #d9e4ee !important;
  box-shadow:0 12px 26px rgba(6,47,79,.16) !important;
  background:#ffffff !important;
  max-width:115px !important;
  height:auto !important;
}

/* Metadatos de la ficha */
.template-dir-record table.citation,
.template-dir-record .recordDetails,
.template-dir-record .record-details,
body[class*="template-dir-record"] table.citation,
body[class*="template-dir-record"] .recordDetails,
body[class*="template-dir-record"] .record-details{
  background:#ffffff;
  border-radius:18px;
  overflow:hidden;
}

.template-dir-record table.citation th,
.template-dir-record table.citation td,
body[class*="template-dir-record"] table.citation th,
body[class*="template-dir-record"] table.citation td{
  border-bottom:1px solid #e6eef5 !important;
  padding:14px 16px !important;
}

.template-dir-record table.citation th,
body[class*="template-dir-record"] table.citation th{
  color:#062f4f;
  font-weight:800;
  width:190px;
  background:#f3f7fb;
}

.template-dir-record table.citation a,
body[class*="template-dir-record"] table.citation a{
  color:#064b7a;
  font-weight:700;
}

/* Tabs */
.template-dir-record .nav-tabs,
body[class*="template-dir-record"] .nav-tabs{
  border-bottom:0 !important;
  gap:8px;
}

.template-dir-record .nav-tabs .nav-link,
body[class*="template-dir-record"] .nav-tabs .nav-link{
  border:1px solid #d9e4ee !important;
  border-radius:14px 14px 0 0 !important;
  background:#eef4f8;
  color:#062f4f;
  font-weight:700;
  padding:14px 18px;
}

.template-dir-record .nav-tabs .nav-link.active,
body[class*="template-dir-record"] .nav-tabs .nav-link.active{
  background:#ffffff !important;
  color:#062f4f !important;
  border-bottom-color:#ffffff !important;
  box-shadow:0 -4px 18px rgba(6,47,79,.06);
}

/* Panel de contenido de tabs */
.template-dir-record .tab-content,
.template-dir-record .tab-pane,
body[class*="template-dir-record"] .tab-content,
body[class*="template-dir-record"] .tab-pane{
  background:#ffffff;
  border:1px solid #d9e4ee;
  border-radius:0 18px 18px 18px;
  padding:26px !important;
  box-shadow:0 14px 34px rgba(6,47,79,.08);
}

.template-dir-record h1,
.template-dir-record h2,
.template-dir-record h3,
body[class*="template-dir-record"] h1,
body[class*="template-dir-record"] h2,
body[class*="template-dir-record"] h3{
  color:#062f4f;
}

/* Sidebar ejemplares similares */
.template-dir-record .sidebar,
body[class*="template-dir-record"] .sidebar{
  background:#ffffff;
  border:1px solid #d9e4ee;
  border-radius:22px;
  box-shadow:0 16px 42px rgba(6,47,79,.10);
  padding:22px;
}

.template-dir-record .sidebar h2,
.template-dir-record .sidebar h3,
body[class*="template-dir-record"] .sidebar h2,
body[class*="template-dir-record"] .sidebar h3{
  color:#062f4f;
  font-weight:800;
  margin-top:0;
  padding-bottom:12px;
  border-bottom:3px solid #c9961a;
}

.template-dir-record .sidebar .list-group,
body[class*="template-dir-record"] .sidebar .list-group{
  border-radius:16px;
  overflow:hidden;
}

.template-dir-record .sidebar .list-group-item,
body[class*="template-dir-record"] .sidebar .list-group-item{
  border-color:#e1eaf2;
  padding:14px 16px;
}

.template-dir-record .sidebar a,
body[class*="template-dir-record"] .sidebar a{
  color:#064b7a;
  font-weight:700;
}

/* Enlace de acceso en línea como botón elegante */
.template-dir-record a[href*="http"],
body[class*="template-dir-record"] a[href*="http"]{
  word-break:break-word;
}

/* Responsive */
@media(max-width: 900px){
  .template-dir-record .sidebar,
  body[class*="template-dir-record"] .sidebar{
    margin-top:24px;
  }
}


/* =========================================================
   Eliminación forzada del bloque nativo de VuFind:
   Opciones de búsqueda / Buscar Más / ¿Necesita Ayuda?
   ========================================================= */
body.template-dir-search.template-name-home .search-home-links,
body.template-dir-search.template-name-home .search-home-options,
body.template-dir-search.template-name-home .home-search-options,
body.template-dir-search.template-name-home .home-search-links,
body.template-dir-search.template-name-home .home-facets,
body.template-dir-search.template-name-home .searchHomeBrowse,
body.template-dir-search.template-name-home .searchHomeContent,
body.template-dir-search.template-name-home .search-home-content,
body.template-dir-search.template-name-home #searchHomeContent,
body.template-dir-search.template-name-home #searchHomeLinks,
body.template-dir-search.template-name-home .mainbody .row.search-home,
body.template-dir-search.template-name-home .mainbody .row.home-content {
  display:none !important;
  height:0 !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
}

/* Si VuFind imprime ese bloque justo antes/después del home personalizado */
#umar-home ~ .searchHomeContent,
#umar-home ~ .searchHomeBrowse,
#umar-home ~ .home-content,
#umar-home ~ .search-home-links {
  display:none !important;
}


/* =========================================================
   AJUSTE FINAL HOME UMAR: corrige descuadre del banner
   ========================================================= */
body.template-dir-search.template-name-home #umar-home{
  max-width:1360px !important;
  margin:22px auto 0 !important;
  padding:0 18px !important;
  box-sizing:border-box;
}

body.template-dir-search.template-name-home .umar-hero-banner{
  min-height:650px !important;
  padding:42px 48px 76px !important;
  border-radius:0 0 34px 34px !important;
  box-sizing:border-box;
}

body.template-dir-search.template-name-home .umar-hero-content{
  max-width:none !important;
  display:grid !important;
  grid-template-columns:minmax(0, 1fr) minmax(360px, 440px) !important;
  grid-template-rows:auto auto auto !important;
  column-gap:44px !important;
  align-items:center !important;
}

body.template-dir-search.template-name-home .umar-hero-content .umar-label{
  grid-column:1 !important;
  grid-row:1 !important;
  justify-self:start !important;
}

body.template-dir-search.template-name-home .umar-hero-content h1{
  grid-column:1 !important;
  grid-row:2 !important;
  max-width:680px !important;
  font-size:clamp(36px,4.1vw,58px) !important;
  line-height:1.08 !important;
  overflow:visible !important;
}

body.template-dir-search.template-name-home .umar-hero-content p{
  grid-column:1 !important;
  grid-row:3 !important;
  max-width:760px !important;
}

body.template-dir-search.template-name-home .umar-search-panel{
  grid-column:2 !important;
  grid-row:1 / span 3 !important;
  position:relative !important;
  right:auto !important;
  bottom:auto !important;
  width:100% !important;
  max-width:440px !important;
  margin:0 !important;
  align-self:center !important;
  justify-self:end !important;
  z-index:4 !important;
}

body.template-dir-search.template-name-home .umar-feature-grid-clean{
  margin-top:-34px !important;
}

/* El bloque nativo de VuFind queda fuera, sin romper el banner. Sí, por fin. */
body.template-dir-search.template-name-home .mainbody > .row:not(:has(#umar-home)),
body.template-dir-search.template-name-home .container > .row:not(:has(#umar-home)),
body.template-dir-search.template-name-home .searchHomeContent,
body.template-dir-search.template-name-home .home-content,
body.template-dir-search.template-name-home .searchHomeBrowse{
  display:none !important;
}

@media(max-width:980px){
  body.template-dir-search.template-name-home #umar-home{
    padding:0 10px !important;
  }
  body.template-dir-search.template-name-home .umar-hero-banner{
    min-height:auto !important;
    padding:32px 24px 72px !important;
  }
  body.template-dir-search.template-name-home .umar-hero-content{
    display:block !important;
  }
  body.template-dir-search.template-name-home .umar-search-panel{
    max-width:none !important;
    margin-top:26px !important;
  }
  body.template-dir-search.template-name-home .umar-topbar{
    margin-bottom:38px !important;
  }
}

@media(max-width:640px){
  body.template-dir-search.template-name-home .umar-hero-content h1{
    font-size:34px !important;
  }
  body.template-dir-search.template-name-home .umar-actions{
    width:100%;
  }
  body.template-dir-search.template-name-home .umar-pill{
    padding:11px 15px;
    font-size:13px;
  }
}


/* =========================================================
   ENCABEZADO INSTITUCIONAL UMAR
   Cambia "VuFind" por "Descubridor Institucional UMAR"
   y ordena los enlaces superiores Entrar / Lenguaje.
   ========================================================= */
.navbar,
.navbar-default,
.navbar-light,
header .navbar,
#header,
.site-header{
  background:#ffffff !important;
  border:0 !important;
  border-bottom:1px solid #e6edf5 !important;
  box-shadow:0 6px 18px rgba(11,45,92,.06) !important;
  min-height:64px !important;
}

.navbar .container,
.navbar .container-fluid,
#header .container,
#header .container-fluid{
  min-height:64px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:20px !important;
}

.navbar-brand,
.navbar-header .navbar-brand,
header a.navbar-brand{
  color:transparent !important;
  font-size:0 !important;
  width:auto !important;
  max-width:none !important;
  text-decoration:none !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:10px !important;
  white-space:nowrap !important;
  margin:0 !important;
  padding:0 !important;
}

.navbar-brand::before,
.navbar-header .navbar-brand::before,
header a.navbar-brand::before{
  content:"Descubridor Institucional UMAR" !important;
  color:#0b2d5c !important;
  font-size:20px !important;
  font-weight:900 !important;
  letter-spacing:.2px !important;
  line-height:1 !important;
}

.navbar-brand::after,
.navbar-header .navbar-brand::after,
header a.navbar-brand::after{
  content:"Sistema Bibliotecario" !important;
  color:#c49a22 !important;
  font-size:11px !important;
  font-weight:800 !important;
  text-transform:uppercase !important;
  letter-spacing:.8px !important;
  padding:6px 10px !important;
  border-radius:999px !important;
  background:#fff7df !important;
  border:1px solid rgba(196,154,34,.25) !important;
}

.navbar-right,
ul.navbar-nav.navbar-right,
.navbar-collapse .navbar-right,
header .navbar-nav:last-child{
  margin-left:auto !important;
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  float:none !important;
}

.navbar-right > li,
.navbar-nav > li,
header .navbar-nav > li{
  display:flex !important;
  align-items:center !important;
}

.navbar-right a,
.navbar-nav a,
header .navbar a,
header .dropdown-toggle{
  color:#0b2d5c !important;
  font-weight:700 !important;
  text-decoration:none !important;
}

.navbar-right a,
.navbar-nav > li > a,
header .dropdown-toggle{
  padding:10px 14px !important;
  border-radius:999px !important;
}

.navbar-right a:hover,
.navbar-nav > li > a:hover,
header .dropdown-toggle:hover{
  background:#eef4fb !important;
  color:#c49a22 !important;
}

/* Si alguna plantilla imprime el enlace VuFind sin clase, al menos se ve ordenado */
body > a:first-child{
  font-weight:900 !important;
  color:#0b2d5c !important;
  text-decoration:none !important;
  font-size:18px !important;
}

@media(max-width:720px){
  .navbar .container,
  .navbar .container-fluid,
  #header .container,
  #header .container-fluid{
    min-height:auto !important;
    padding:14px !important;
    align-items:flex-start !important;
    flex-direction:column !important;
  }
  .navbar-brand::before,
  .navbar-header .navbar-brand::before,
  header a.navbar-brand::before{
    font-size:17px !important;
  }
  .navbar-brand::after,
  .navbar-header .navbar-brand::after,
  header a.navbar-brand::after{
    display:none !important;
  }
  .navbar-right,
  ul.navbar-nav.navbar-right,
  .navbar-collapse .navbar-right,
  header .navbar-nav:last-child{
    width:100% !important;
    justify-content:flex-start !important;
    flex-wrap:wrap !important;
  }
}

/* === Corrección UMAR: encabezado alineado con el banner principal === */
body.template-dir-search.template-name-home header,
body.template-dir-search.template-name-home .navbar,
body.template-dir-search.template-name-home nav.navbar{
  background:#fff !important;
  border-top:3px solid #1b2f4f !important;
  border-bottom:1px solid #d9e2ef !important;
  box-shadow:0 8px 22px rgba(16,47,87,.06) !important;
}

body.template-dir-search.template-name-home header > .container,
body.template-dir-search.template-name-home header > .container-fluid,
body.template-dir-search.template-name-home .navbar > .container,
body.template-dir-search.template-name-home .navbar > .container-fluid,
body.template-dir-search.template-name-home nav.navbar > .container,
body.template-dir-search.template-name-home nav.navbar > .container-fluid{
  max-width:1360px !important;
  width:100% !important;
  margin-left:auto !important;
  margin-right:auto !important;
  padding-left:48px !important;
  padding-right:48px !important;
  min-height:64px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
}

body.template-dir-search.template-name-home .navbar-brand,
body.template-dir-search.template-name-home .umar-fixed-brand-link{
  color:#0b2350 !important;
  font-weight:900 !important;
  font-size:21px !important;
  letter-spacing:-.35px !important;
  text-decoration:none !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:14px !important;
  margin:0 !important;
  padding:0 !important;
}

body.template-dir-search.template-name-home .umar-fixed-brand-link::after,
body.template-dir-search.template-name-home .navbar-brand::after{
  content:'Sistema Bibliotecario';
  display:inline-flex;
  align-items:center;
  height:28px;
  padding:0 13px;
  border-radius:999px;
  border:1px solid #e2c76d;
  background:#fff8dc;
  color:#ad8513;
  font-size:11px;
  font-weight:900;
  letter-spacing:.8px;
  text-transform:uppercase;
  white-space:nowrap;
}

body.template-dir-search.template-name-home .navbar-nav,
body.template-dir-search.template-name-home .nav.navbar-nav,
body.template-dir-search.template-name-home .navbar-right,
body.template-dir-search.template-name-home .navbar-collapse,
body.template-dir-search.template-name-home header ul.nav{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:22px !important;
  margin-left:auto !important;
}

body.template-dir-search.template-name-home header a,
body.template-dir-search.template-name-home .navbar a{
  color:#0b2350 !important;
  font-weight:800 !important;
  text-decoration:none !important;
}

body.template-dir-search.template-name-home header .dropdown-menu a,
body.template-dir-search.template-name-home .navbar .dropdown-menu a{
  color:#0b2350 !important;
}

@media (max-width: 900px){
  body.template-dir-search.template-name-home header > .container,
  body.template-dir-search.template-name-home header > .container-fluid,
  body.template-dir-search.template-name-home .navbar > .container,
  body.template-dir-search.template-name-home .navbar > .container-fluid,
  body.template-dir-search.template-name-home nav.navbar > .container,
  body.template-dir-search.template-name-home nav.navbar > .container-fluid{
    padding-left:18px !important;
    padding-right:18px !important;
  }

  body.template-dir-search.template-name-home .navbar-brand,
  body.template-dir-search.template-name-home .umar-fixed-brand-link{
    font-size:17px !important;
    flex-wrap:wrap !important;
  }

  body.template-dir-search.template-name-home .umar-fixed-brand-link::after,
  body.template-dir-search.template-name-home .navbar-brand::after{
    font-size:9px;
    height:24px;
  }
}

/* =========================================================
   CORRECCIÓN FINAL: evitar título duplicado en encabezado
   ========================================================= */
.navbar-brand::before,
.navbar-header .navbar-brand::before,
header a.navbar-brand::before,
.navbar-brand::after,
.navbar-header .navbar-brand::after,
header a.navbar-brand::after{
  content:none !important;
  display:none !important;
}

.navbar-brand.umar-fixed-brand-link,
.navbar-header .navbar-brand.umar-fixed-brand-link,
header a.navbar-brand.umar-fixed-brand-link,
a.umar-fixed-brand-link{
  color:#0b2d5c !important;
  font-size:20px !important;
  font-weight:900 !important;
  line-height:1 !important;
  text-decoration:none !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:12px !important;
  white-space:nowrap !important;
  padding:0 !important;
  margin:0 !important;
}

a.umar-fixed-brand-link::after{
  content:"Sistema Bibliotecario" !important;
  display:inline-flex !important;
  color:#c49a22 !important;
  font-size:11px !important;
  font-weight:800 !important;
  text-transform:uppercase !important;
  letter-spacing:.8px !important;
  padding:6px 10px !important;
  border-radius:999px !important;
  background:#fff7df !important;
  border:1px solid rgba(196,154,34,.25) !important;
}

@media (max-width: 768px){
  a.umar-fixed-brand-link{
    font-size:16px !important;
    flex-wrap:wrap !important;
  }
  a.umar-fixed-brand-link::after{
    font-size:9px !important;
    padding:5px 8px !important;
  }
}


/* =========================================================
   FOOTER GLOBAL PARA RESULTADOS Y PÁGINAS DE BÚSQUEDA
   ========================================================= */
.umar-global-footer{
  margin-top:48px !important;
  background:linear-gradient(135deg,#08284d 0%,#123b67 58%,#0a2748 100%) !important;
  color:#ffffff !important;
  border-top:5px solid #c49a22 !important;
  box-shadow:0 -18px 40px rgba(5,23,45,.12) !important;
  width:100% !important;
}

.umar-global-footer-inner{
  max-width:1180px !important;
  margin:0 auto !important;
  padding:30px 22px !important;
  display:grid !important;
  grid-template-columns:1.4fr .9fr 1fr !important;
  gap:24px !important;
  align-items:center !important;
}

.umar-global-footer-brand{
  display:flex !important;
  align-items:center !important;
  gap:14px !important;
}

.umar-global-footer-brand img{
  width:auto !important;
  height:54px !important;
  max-width:95px !important;
  object-fit:contain !important;
  background:#fff !important;
  border-radius:14px !important;
  padding:7px !important;
  box-shadow:0 10px 25px rgba(0,0,0,.16) !important;
}

.umar-global-footer-brand strong{
  display:block !important;
  color:#ffffff !important;
  font-size:16px !important;
  line-height:1.25 !important;
  font-weight:900 !important;
}

.umar-global-footer-brand span{
  display:block !important;
  margin-top:5px !important;
  color:#f3d47b !important;
  font-size:13px !important;
  font-weight:800 !important;
  text-transform:uppercase !important;
  letter-spacing:.6px !important;
}

.umar-global-footer-links{
  display:flex !important;
  flex-direction:column !important;
  gap:8px !important;
  align-items:flex-start !important;
}

.umar-global-footer-links a{
  color:#eaf2ff !important;
  text-decoration:none !important;
  font-weight:800 !important;
  font-size:14px !important;
  padding:4px 0 !important;
  border-bottom:1px solid transparent !important;
}

.umar-global-footer-links a:hover,
.umar-global-footer-links a:focus{
  color:#f3d47b !important;
  border-bottom-color:#f3d47b !important;
}

.umar-global-footer-meta{
  text-align:right !important;
  color:#dbe8f7 !important;
  font-size:13px !important;
  line-height:1.5 !important;
}

.umar-global-footer-meta span,
.umar-global-footer-meta small{
  display:block !important;
  color:#dbe8f7 !important;
}

.umar-global-footer-meta small{
  margin-top:6px !important;
  color:#ffffff !important;
  font-weight:800 !important;
}

@media (max-width: 850px){
  .umar-global-footer-inner{
    grid-template-columns:1fr !important;
    text-align:center !important;
  }
  .umar-global-footer-brand{
    justify-content:center !important;
    flex-wrap:wrap !important;
  }
  .umar-global-footer-links{
    align-items:center !important;
  }
  .umar-global-footer-meta{
    text-align:center !important;
  }
}

/* =========================================================
   FIX BUSQUEDA: mostrar marca Descubridor Institucional UMAR
   en resultados y páginas internas
   ========================================================= */
.navbar-brand,
.navbar-header .navbar-brand,
header a.navbar-brand,
a.umar-fixed-brand-link{
  color:#0b2350 !important;
  font-size:21px !important;
  font-weight:900 !important;
  letter-spacing:-.25px !important;
  text-decoration:none !important;
  display:inline-flex !important;
  align-items:center !important;
  min-height:64px !important;
  width:auto !important;
  max-width:none !important;
  opacity:1 !important;
  visibility:visible !important;
  white-space:nowrap !important;
}

.navbar-brand:empty::before,
.navbar-header .navbar-brand:empty::before,
header a.navbar-brand:empty::before{
  content:'Descubridor Institucional UMAR' !important;
  display:inline !important;
  color:#0b2350 !important;
  font-size:21px !important;
  font-weight:900 !important;
}

body:not(.template-dir-search.template-name-home) header,
body:not(.template-dir-search.template-name-home) .navbar,
body:not(.template-dir-search.template-name-home) nav.navbar{
  background:#fff !important;
  border-top:3px solid #1b2f4f !important;
  border-bottom:1px solid #d9e2ef !important;
  box-shadow:0 8px 22px rgba(16,47,87,.06) !important;
}

body:not(.template-dir-search.template-name-home) header > .container,
body:not(.template-dir-search.template-name-home) header > .container-fluid,
body:not(.template-dir-search.template-name-home) .navbar > .container,
body:not(.template-dir-search.template-name-home) .navbar > .container-fluid,
body:not(.template-dir-search.template-name-home) nav.navbar > .container,
body:not(.template-dir-search.template-name-home) nav.navbar > .container-fluid{
  max-width:1360px !important;
  width:100% !important;
  margin-left:auto !important;
  margin-right:auto !important;
  padding-left:48px !important;
  padding-right:48px !important;
  min-height:64px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
}

@media(max-width:720px){
  .navbar-brand,
  .navbar-header .navbar-brand,
  header a.navbar-brand,
  a.umar-fixed-brand-link{
    font-size:17px !important;
    min-height:44px !important;
    white-space:normal !important;
  }
  body:not(.template-dir-search.template-name-home) header > .container,
  body:not(.template-dir-search.template-name-home) header > .container-fluid,
  body:not(.template-dir-search.template-name-home) .navbar > .container,
  body:not(.template-dir-search.template-name-home) .navbar > .container-fluid,
  body:not(.template-dir-search.template-name-home) nav.navbar > .container,
  body:not(.template-dir-search.template-name-home) nav.navbar > .container-fluid{
    padding-left:18px !important;
    padding-right:18px !important;
  }
}
