:root{
  --umar-azul:#062f4f;
  --umar-dorado:#c9961a;
  --umar-borde:#d9e4ee;
  --umar-sombra:0 14px 34px rgba(6,47,79,.11);
}

/* Oculta buscador superior original y bloques repetidos de VuFind */
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 .mainbody > .row,
body.template-dir-search.template-name-home .container > .row,
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,
#umar-home ~ .row,
#umar-home ~ .container,
#umar-home + .row{
  display:none !important;
}

/* Mantener visible únicamente el diseño institucional */
body.template-dir-search.template-name-home .mainbody > #umar-home,
body.template-dir-search.template-name-home .container #umar-home,
#umar-home{
  display:block !important;
}

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

#umar-home{
  width:100%;
  max-width:1280px;
  margin:0 auto;
  color:var(--umar-azul);
}

.umar-hero{
  position:relative;
  overflow:hidden;
  border-radius:0 0 22px 22px;
  padding:42px 54px 56px;
  background:
    linear-gradient(90deg,rgba(6,47,79,.98),rgba(6,47,79,.88),rgba(6,47,79,.70)),
    linear-gradient(135deg,#062f4f,#0a446f);
  box-shadow:var(--umar-sombra);
}

.umar-hero:after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg,transparent 0 55%,rgba(255,255,255,.06) 55% 56%,transparent 56%);
  pointer-events:none;
}

.umar-brand{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:20px;
}

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

.umar-brand-title{
  color:#fff;
  font-weight:800;
  line-height:1.15;
  font-size:19px;
}

.umar-brand-subtitle{
  display:block;
  color:#dcebf6;
  font-size:13px;
  font-weight:500;
  margin-top:3px;
}

.umar-hero h1{
  position:relative;
  z-index:1;
  margin:0;
  max-width:760px;
  color:#fff;
  font-size:clamp(34px,5vw,58px);
  line-height:1.03;
  font-weight:850;
}

.umar-hero p{
  position:relative;
  z-index:1;
  color:#e9f2fa;
  max-width:680px;
  margin:18px 0 0;
  font-size:18px;
}

.umar-search-card{
  position:relative;
  z-index:2;
  margin-top:28px;
  padding:16px;
  max-width:850px;
  border-radius:18px;
  background:rgba(255,255,255,.96);
  box-shadow:0 20px 40px rgba(0,0,0,.18);
}

.umar-search-card form{
  margin:0!important;
}

.umar-feature-grid{
  max-width:1180px;
  margin:-32px auto 44px;
  padding:0 24px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
  position:relative;
  z-index:4;
}

.umar-feature{
  background:#fff;
  border:1px solid var(--umar-borde);
  border-radius:16px;
  padding:22px;
  box-shadow:var(--umar-sombra);
  min-height:138px;
}

.umar-feature-icon{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  color:var(--umar-azul);
  border-radius:10px;
  background:#eef5fb;
  margin-bottom:10px;
  font-size:20px;
}

.umar-feature h3{
  margin:0 0 7px;
  color:var(--umar-azul);
  font-size:17px;
  font-weight:800;
}

.umar-feature p{
  margin:0;
  color:#375671;
  font-size:14px;
  line-height:1.45;
}

.umar-info-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(260px,1fr))!important;
  gap:30px!important;
  max-width:1100px!important;
  margin:40px auto 54px!important;
  padding:0 24px!important;
  align-items:stretch!important;
  justify-content:center!important;
}

.umar-info-card{
  background:#fff;
  border-radius:18px;
  padding:30px 34px;
  border:1px solid var(--umar-borde);
  box-shadow:var(--umar-sombra);
  min-height:230px;
  width:100%;
}

.umar-info-card h2{
  color:var(--umar-azul);
  margin:0 0 26px;
  font-size:21px;
  font-weight:800;
  position:relative;
  padding-bottom:14px;
}

.umar-info-card h2:after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:145px;
  height:3px;
  background:var(--umar-dorado);
  border-radius:99px;
}

.umar-info-card ul{
  margin:0;
  padding:0;
  list-style:none;
}

.umar-info-card li{
  margin:0 0 16px;
  color:#173f5f;
  font-size:15px;
}

.umar-info-card li:before{
  content:"›";
  color:var(--umar-dorado);
  font-weight:900;
  margin-right:10px;
}

.umar-info-card a{
  color:#063f6a;
  font-weight:600;
  text-decoration:none;
}

.umar-info-card a:hover{
  color:var(--umar-dorado);
  text-decoration:underline;
}

.umar-footer{
  margin:0 auto 28px;
  max-width:1180px;
  background:var(--umar-azul);
  color:#fff;
  padding:22px 28px;
  border-radius:16px;
  font-weight:700;
  box-shadow:var(--umar-sombra);
}

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

@media(max-width:900px){
  .umar-info-grid{grid-template-columns:1fr!important}
  .umar-hero{padding:38px 28px 48px;}
}

@media(max-width:640px){
  .umar-feature-grid{grid-template-columns:1fr}
  .umar-brand{align-items:flex-start}
  .umar-brand img{width:54px;height:54px;}
}

/* =========================================================
   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;
  }
}
