/* =========================================================
   REPOSITORIO DIGITAL DCSH - PORTADA
   ========================================================= */

.repodig-home-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 70px 24px 90px;
}

.repodig-hero {
  text-align: center;
  padding: 70px 20px 55px;
}

.repodig-kicker,
.repodig-section-label,
.repodig-item-kicker {
  color: #006bb6;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
}

.repodig-hero h1,
.repodig-section-head h2,
.repodig-item-hero h1 {
  color: #003b71;
  font-weight: 800;
}

.repodig-hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.12;
}

.repodig-lead {
  max-width: 720px;
  margin: 0 auto;
  color: #5f6670;
  font-size: 18px;
  line-height: 1.8;
}

.repodig-actions {
  margin-top: 34px;
}

.repodig-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #005eb8;
  color: #fff !important;
  padding: 15px 32px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 12px 30px rgba(0,94,184,.22);
}

.repodig-search-box {
  background: #fff;
  border-radius: 24px;
  padding: 42px;
  margin: 20px auto 70px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0,0,0,.07);
  border: 1px solid rgba(0,59,113,.08);
}

.repodig-search-form {
  max-width: 850px;
  margin: 25px auto 0;
  display: flex;
  gap: 12px;
}

.repodig-search-form input {
  flex: 1;
  min-height: 56px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  padding: 0 18px;
}

.repodig-search-form button {
  min-height: 56px;
  border: none;
  border-radius: 10px;
  background: #003b71;
  color: #fff;
  padding: 0 30px;
  font-weight: 800;
}

.repodig-section {
  margin-top: 70px;
}

.repodig-section-head {
  text-align: center;
  margin-bottom: 34px;
}

.repodig-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
}

.repodig-card,
.repodig-access-item,
.repodig-publication-card {
  background: #fff;
  border: 1px solid rgba(0,59,113,.08);
  box-shadow: 0 14px 35px rgba(0,0,0,.06);
}

.repodig-card {
  border-radius: 18px;
  padding: 34px 24px;
  text-align: center;
  min-height: 300px;
}

.repodig-card h3,
.repodig-access-item strong,
.repodig-publication-card h3 {
  color: #003b71;
  font-weight: 800;
}

.repodig-card h3 {
  font-size: 22px;
}

.repodig-card p {
  color: #68717d;
  font-size: 15px;
  line-height: 1.7;
}

.repodig-card a,
.repodig-publication-card a {
  color: #005eb8;
  font-weight: 800;
  text-decoration: none;
}

.repodig-icon {
  font-size: 38px;
  margin-bottom: 20px;
}

.repodig-stats {
  margin-top: 80px;
  background: #003b71;
  border-radius: 24px;
  padding: 34px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  color: #fff;
  box-shadow: 0 20px 45px rgba(0,59,113,.20);
}

.repodig-stat-item {
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.18);
}

.repodig-stat-item:last-child {
  border-right: none;
}

.repodig-stat-item strong {
  display: block;
  font-size: 34px;
  color: #fff;
}

.repodig-access-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.repodig-access-item {
  border-radius: 16px;
  padding: 26px 24px;
}

.repodig-latest {
  margin-top: 110px !important;
  position: relative;
  z-index: 1;
}

.repodig-latest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.repodig-publication-card {
  border-radius: 18px;
  padding: 34px 30px;
  border-left: 5px solid #005eb8;
}

.repodig-about {
  max-width: 980px;
  margin: 90px auto 70px;
  background: #fff;
  border-radius: 24px;
  padding: 46px 50px;
  display: flex;
  justify-content: space-between;
  gap: 36px;
  border: 1px solid rgba(0,59,113,.08);
  box-shadow: 0 18px 45px rgba(0,0,0,.06);
}

.repodig-about h2 {
  color: #003b71;
  font-size: 30px;
  font-weight: 800;
}

/* =========================================================
   PUBLICACIÓN INDIVIDUAL
   ========================================================= */

.repodig-item-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 70px 24px 90px;
}

.repodig-item-hero h1 {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.15;
  max-width: 980px;
}

.repodig-download-panel,
.repodig-item-cover,
.repodig-meta-card,
.repodig-summary-card,
.repodig-keywords-card {
  background: #fff;
  border-radius: 24px;
  border: 1px solid rgba(0,59,113,.08);
  box-shadow: 0 18px 45px rgba(0,0,0,.06);
}

.repodig-download-panel {
  padding: 22px 24px;
  margin: 24px 0 34px;
}

.repodig-item-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 36px;
}

.repodig-item-cover {
  padding: 26px;
}

.repodig-item-cover img {
  width: 100%;
  border-radius: 12px;
}

.repodig-meta-card,
.repodig-summary-card,
.repodig-keywords-card {
  padding: 32px 36px;
  margin-bottom: 26px;
}

.repodig-meta-card h2,
.repodig-summary-card h2,
.repodig-keywords-card h2 {
  color: #003b71;
  font-size: 26px;
  font-weight: 800;
}

.repodig-meta-row {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,59,113,.08);
}

.repodig-meta-row strong {
  color: #68717d;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

/* Ocultar listado automático inferior de FLEXIContent */
#flexicontent > form#adminForm,
#flexicontent > .fcitems,
#flexicontent > .pagination,
#flexicontent > .display-limit,
#flexicontent > .counter,
#flexicontent > .fc_ordering {
  display: none !important;
}

/* Responsive */
@media (max-width: 900px) {
  .repodig-grid,
  .repodig-latest-grid,
  .repodig-stats,
  .repodig-access-grid,
  .repodig-item-layout {
    grid-template-columns: 1fr;
  }

  .repodig-search-form,
  .repodig-about {
    flex-direction: column;
  }

  .repodig-item-page,
  .repodig-home-wrap {
    padding-left: 18px;
    padding-right: 18px;
  }
}





/* Ocultar listado automático inferior SOLO en la portada */
#flexicontent:has(.repodig-home-wrap) .fcitems,
#flexicontent:has(.repodig-home-wrap) .fc_item,
#flexicontent:has(.repodig-home-wrap) .fc_item_list,
#flexicontent:has(.repodig-home-wrap) .items-row,
#flexicontent:has(.repodig-home-wrap) .pagination,
#flexicontent:has(.repodig-home-wrap) .display-limit,
#flexicontent:has(.repodig-home-wrap) .counter,
#flexicontent:has(.repodig-home-wrap) .fc_ordering,
#flexicontent:has(.repodig-home-wrap) select[name="limit"],
#flexicontent:has(.repodig-home-wrap) select[name="orderby"] {
  display: none !important;
}



/* Ocultar Print solo en portada Repositorio Digital */
body.itemid-118 .icons,
body.itemid-118 .article-info,
body.itemid-118 .btn-group.float-end,
body.itemid-118 .float-end a,
body.itemid-118 .float-end button,
body.itemid-118 a[onclick*="print"],
body.itemid-118 a[href*="print"],
body.itemid-118 a[href*="tmpl=component"],
body.itemid-118 .fa-print,
body.itemid-118 .icon-print {
  display: none !important;
}



body.itemid-118 main .float-end,
body.itemid-118 main .pull-right,
body.itemid-118 main .article-can-edit,
body.itemid-118 main .page-header + .float-end {
  display: none !important;
}







/* Ocultar Print en la portada del repositorio */
body.com_flexicontent.view-category .fc_print,
body.com_flexicontent.view-category .print-icon,
body.com_flexicontent.view-category .icons,
body.com_flexicontent.view-category a[href*="print"],
body.com_flexicontent.view-category a[href*="tmpl=component"],
body.com_flexicontent.view-category [onclick*="print"] {
  display: none !important;
}







/* Barra de acciones ficha libro */
.repodig-actions-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 14px !important;
  margin: 28px 0 28px !important;
}

.repodig-actions-bar .repodig-action-btn {
  display: inline-flex !important;
  align-items: center !important;
  background: #ffffff !important;
  color: #003b71 !important;
  border: 1px solid rgba(0,94,184,.25) !important;
  border-radius: 999px !important;
  padding: 12px 20px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow: 0 10px 25px rgba(0,0,0,.06) !important;
}

.repodig-actions-bar .repodig-action-btn:hover {
  background: #005eb8 !important;
  color: #ffffff !important;
  border-color: #005eb8 !important;
}




/* Forzar estilo de botones Resumen / Cómo citar / Palabras clave */
.repodig-item-page a[href="#resumen"],
.repodig-item-page a[href="#como-citar"],
.repodig-item-page a[href="#palabras-clave"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #ffffff !important;
  color: #003b71 !important;
  border: 1px solid rgba(0,94,184,.28) !important;
  border-radius: 999px !important;
  padding: 12px 22px !important;
  margin: 0 10px 18px 0 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  box-shadow: 0 10px 25px rgba(0,0,0,.07) !important;
}

.repodig-item-page a[href="#resumen"]:hover,
.repodig-item-page a[href="#como-citar"]:hover,
.repodig-item-page a[href="#palabras-clave"]:hover {
  background: #005eb8 !important;
  color: #ffffff !important;
  border-color: #005eb8 !important;
}








/* Mejorar bloque Archivo digital */
.repodig-download-panel {
  position: relative;
  overflow: hidden;
}

.repodig-download-title {
  color: #003b71 !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  margin-bottom: 18px !important;
}

.repodig-download-panel .alert-success,
.repodig-download-panel .fcfile_hits {
  border-radius: 12px !important;
  background: #dcefe7 !important;
  color: #0b4f36 !important;
  border: 1px solid #c6e2d6 !important;
  font-weight: 800 !important;
}

.repodig-download-panel .btn-success {
  background: #003b71 !important;
  border-color: #003b71 !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  padding: 10px 18px !important;
  font-weight: 900 !important;
  box-shadow: 0 10px 22px rgba(0,59,113,.18) !important;
}

.repodig-download-panel .btn-info {
  background: #ffffff !important;
  color: #003b71 !important;
  border: 1px solid #003b71 !important;
  border-radius: 999px !important;
  padding: 10px 18px !important;
  font-weight: 900 !important;
}

.repodig-download-panel .btn-success:hover,
.repodig-download-panel .btn-info:hover {
  transform: translateY(-1px);
}




/* Dar aire superior a la ficha del libro por menú fijo */
.repodig-item-page {
  padding-top: 130px !important;
}

/* Separar un poco la barra de acciones */
.repodig-actions-bar {
  margin-top: 34px !important;
  margin-bottom: 34px !important;
}




.repodig-summary-card {
  line-height: 1.9 !important;
}

.repodig-summary-card p,
.repodig-summary-card td,
.repodig-summary-card div {
  line-height: 1.9 !important;
}



/* Ajuste fino ficha libro */
.repodig-item-page {
  padding-top: 150px !important;
}

.repodig-actions-bar {
  background: #ffffff !important;
  border: 1px solid rgba(0,59,113,.08) !important;
  border-radius: 20px !important;
  padding: 18px 20px !important;
  box-shadow: 0 14px 35px rgba(0,0,0,.05) !important;
}





















/* ==========================================
   PORTADA DEL LIBRO - EFECTO LIBRO REAL
========================================== */

.repodig-item-layout {
  grid-template-columns: 360px 1fr !important;
  gap: 42px !important;
  align-items: start !important;
}

.repodig-item-cover {
  background: #ffffff !important;
  border-radius: 24px !important;
  padding: 34px !important;
  min-height: 430px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  box-shadow:
    0 25px 55px rgba(0,0,0,.08),
    0 10px 20px rgba(0,0,0,.05) !important;
  transition: transform .35s ease, box-shadow .35s ease !important;
}

.repodig-item-cover:hover {
  transform: translateY(-8px) !important;
  box-shadow:
    0 35px 75px rgba(0,0,0,.15),
    0 15px 35px rgba(0,0,0,.08) !important;
}

.repodig-cover-large img {
  display: block !important;
  width: 300px !important;
  max-width: 300px !important;
  height: auto !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  padding: 10px !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.20) !important;
  transition: transform .35s ease, box-shadow .35s ease !important;
}

.repodig-item-cover:hover img {
  transform: perspective(1200px) rotateY(-6deg) scale(1.04) !important;
}
















/* Archivo digital más elegante */
.repodig-download-panel {
  padding: 28px 30px !important;
}

.repodig-download-panel > * {
  position: relative;
  z-index: 1;
}

.repodig-download-title {
  font-size: 21px !important;
  margin-bottom: 18px !important;
}

.repodig-download-panel .btn-success,
.repodig-download-panel a.btn-success {
  background: #003b71 !important;
  border-color: #003b71 !important;
  color: #fff !important;
  border-radius: 999px !important;
  padding: 12px 22px !important;
}

.repodig-download-panel .btn-info,
.repodig-download-panel a.btn-info {
  background: #fff !important;
  color: #003b71 !important;
  border: 1px solid #003b71 !important;
  border-radius: 999px !important;
  padding: 12px 22px !important;
}

.repodig-download-panel .alert,
.repodig-download-panel .alert-success {
  border-radius: 14px !important;
  padding: 16px 18px !important;
  font-size: 15px !important;
}










/* Libros relacionados */
.repodig-related-section {
  margin-top: 70px;
}

.repodig-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.repodig-related-card {
  background: #ffffff;
  border: 1px solid rgba(0,59,113,.08);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 18px 45px rgba(0,0,0,.06);
  transition: transform .25s ease, box-shadow .25s ease;
}

.repodig-related-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(0,0,0,.10);
}

.repodig-related-cover {
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.repodig-related-cover img {
  max-height: 210px;
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
}

.repodig-related-placeholder {
  background: #f3f7fb;
  border-radius: 16px;
  font-size: 56px;
}

.repodig-related-body p {
  color: #006bb6;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}

.repodig-related-body h3 {
  color: #003b71;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
}

.repodig-related-body a {
  color: #005eb8;
  font-weight: 900;
  text-decoration: none;
}

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





/* Forzar diseño Libros relacionados */
.repodig-item-page .repodig-related-section {
  margin-top: 80px !important;
}

.repodig-item-page .repodig-related-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;
}

.repodig-item-page .repodig-related-card {
  display: block !important;
  background: #fff !important;
  border: 1px solid rgba(0,59,113,.08) !important;
  border-radius: 22px !important;
  padding: 24px !important;
  box-shadow: 0 18px 45px rgba(0,0,0,.06) !important;
}

.repodig-item-page .repodig-related-cover {
  height: 210px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 20px !important;
}

.repodig-item-page .repodig-related-cover img {
  max-height: 210px !important;
  max-width: 100% !important;
  border-radius: 10px !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.18) !important;
}

.repodig-item-page .repodig-related-body h3 {
  color: #003b71 !important;
  font-size: 20px !important;
  font-weight: 900 !important;
}














/* Corrección final libros relacionados */
.repodig-related-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;
  width: 100% !important;
}

.repodig-related-card {
  width: auto !important;
  min-width: 0 !important;
}





/* Barra informativa bajo título */
.repodig-info-strip {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin-top: 18px !important;
  margin-bottom: 26px !important;
}

.repodig-info-strip span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  background: #f3f7fb !important;
  color: #003b71 !important;
  border: 1px solid rgba(0,94,184,.15) !important;
  border-radius: 999px !important;
  padding: 9px 15px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}


/* Centrar libros relacionados cuando haya pocos resultados */
.repodig-related-grid {
  justify-content: center !important;
}

.repodig-related-card {
  max-width: 320px !important;
}




/* Libros relacionados: centrado inteligente */
.repodig-related-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 24px !important;
}

.repodig-related-card {
  flex: 0 1 320px !important;
  max-width: 320px !important;
}



/* Centrado final de libros relacionados */
.repodig-related-section .repodig-related-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 28px !important;
}

.repodig-related-section .repodig-related-card {
  flex: 0 1 320px !important;
  max-width: 320px !important;
}








/* Panel Editorial DCSH */
.repodig-editorial-panel {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
}

.repodig-editorial-hero {
  text-align: center;
  margin-bottom: 45px;
}

.repodig-editorial-hero p {
  color: #006bb6;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.repodig-editorial-hero h1 {
  color: #003b71;
  font-size: 46px;
  font-weight: 900;
}

.repodig-editorial-hero span {
  color: #65707c;
  font-size: 17px;
}

.repodig-editorial-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.repodig-editorial-card {
  background: #fff;
  border: 1px solid rgba(0,59,113,.08);
  border-radius: 24px;
  padding: 34px 26px;
  text-decoration: none !important;
  box-shadow: 0 18px 45px rgba(0,0,0,.06);
  transition: .25s;
}

.repodig-editorial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(0,0,0,.10);
}

.repodig-editorial-card div {
  font-size: 42px;
  margin-bottom: 18px;
}

.repodig-editorial-card h3 {
  color: #003b71;
  font-size: 22px;
  font-weight: 900;
}

.repodig-editorial-card p {
  color: #65707c;
  line-height: 1.6;
}

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




/* Ocultar iconos sociales en Panel Editorial */
body.itemid-126 .article-social-share,
body.itemid-126 .article-info,
body.itemid-126 .icons,
body.itemid-126 .float-end,
body.itemid-126 .btn-group {
  display: none !important;
}



.repodig-editorial-panel {
  padding-top: 35px !important;
}






/* Ocultar tercera pestaña y su contenido en el formulario de nueva publicación */
body form#adminForm > div ul li:nth-child(3),
body form#adminForm .nav li:nth-child(3),
body form#adminForm .tabs li:nth-child(3),
body form#adminForm .tab-pane:nth-child(3) {
  display: none !important;
}



/* Ocultar contenido técnico Blog Media / Displaying en formulario frontend */
body form#adminForm .tab-pane:has(.blog-media),
body form#adminForm .tab-pane:has([class*="blog"]),
body form#adminForm .tab-pane:has([id*="jform_images"]),
body form#adminForm .tab-pane:has([name*="images"]),
body form#adminForm div:has(> h2):has(.icon-image),
body form#adminForm div:has(> h2):has(.fa-image) {
  display: none !important;
}



/* Ocultar aviso duplicado de aprobacion en formulario de captura */
body form#adminForm .alert-info,
body form#adminForm .alert.alert-info,
body form#adminForm .fc-mssg-inline,
body form#adminForm .fc-info {
  display: none !important;
}
