/*!* Bootstrap v3.1.0(http://getbootstrap.com) * Copyright 2011-2014 Twitter,Inc. * Licensed under MIT(https://github.com/twbs/bootstrap/blob/master/LICENSE) */
@font-face {
    font-family: OpenSansRegular;
    src: url('/themes/GENCAT/fonts/opensans-regular.woff') format('woff');
}

@font-face {
    font-family: OpenSansLight;
    src: url('/themes/GENCAT/fonts/opensans-light.woff') format('woff');
}

@font-face {
    font-family: OpenSansSemibold;
    src: url('/themes/GENCAT/fonts/opensans-semibold.woff') format('woff');
}

@font-face {
    font-family: OpenSansBold;
    src: url('/themes/GENCAT/fonts/opensans-bold.woff') format('woff');
}

/*!normalize.css v3.0.0 | MIT License | git.io/normalize */
html {
    font-family: 'OpenSansRegular';
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: 'OpenSansRegular';
}

/* Eliminar tooltips por defecto en toda la vista de ítem */
.item-summary-view-metadata *,
.item-summary-view-metadata *::before,
.item-summary-view-metadata *::after {
    pointer-events: none !important;
}

/* Permitir clicks en enlaces y botones */
.item-summary-view-metadata a,
.item-summary-view-metadata button,
.item-summary-view-metadata input,
.item-summary-view-metadata select,
.item-summary-view-metadata textarea {
    pointer-events: auto !important;
}

/* Re-habilitar pointer-events als visors (FlowPaper, OpenSeadragon, etc.) */
.item-summary-view-metadata .document,
.item-summary-view-metadata .document *,
.item-summary-view-metadata .document *::before,
.item-summary-view-metadata .document *::after {
    pointer-events: auto !important;
}

.icon-sidemenu {
    background-image: url(/themes/GENCAT/assets/side.svg);
    position: relative;
    width: 24px;
    height: 24px;
    background-repeat: no-repeat;
}

/* Ocultar icono sidemenu en desktop (>= 992px) donde el sidebar se muestra directamente */
@media (min-width: 992px){
    .icon-sidemenu{
        display: none;
    }
}

.icon-sidemenu.show {
    background-image: url(/themes/GENCAT/assets/icon-close.svg);
    background-size: 1.3rem;
    top: 0.6rem;
}

.enllacIdioma {
    text-transform: capitalize;
}

.text_negre, .text_negre h3, .text_negre p, .text_negre a, .text_negre a:hover {
    color: #000000 !important;
}

.llistat_destacat_color_cont .list-group-item .destacat_color_cont a {
    height: inherit;
    display: table-cell;
    vertical-align: middle;
}
.destacat_color_cont a {
    font-size: 1em;
    vertical-align: middle;
    display: table-cell;
    display: inline-block\9;
    color: #fff;
}
@media (min-width: 47.939em) {
    .destacat_color_cont a {
        font-size: 1.125em;
    }
}
@media (min-width: 62em) {
    .destacat_color_cont a {
        font-size: 1.500em;
    }
}

.fpca_peu_new .NG--flex75 a[href*="/"]:not([href*=".gencat.cat"]):not([href^="#"]):not([href^="/"]):not([href^=mailto]):not([href^=tel]):after, .fpca_peu_new .NG--flex75 a[href*="/"][target=_blank]:not([href^="#"]):after {
    width: 13px;
    height: 13px;
    top: 0.5px;
}

.cercador_vermell .btn, header .container .in form .form-group .buttonG.btn {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
    border-radius: 0;
    background: url(/themes/GENCAT/assets/NG_ico_lupa.png) no-repeat center center #BD0000;
    border-color: #BD0000;
    height: 100%;
    width: 3em;
}


.cercador_vermell .form-group .form-control {
    font-size: 1em;
    position: relative;
    padding: 0.4em 0 0.4em 2em;
    font-size: 15px;
    display: block;
    width: 100%;
    background: url(/themes/GENCAT/assets/NG_ico_cercador_mbl.png) no-repeat 0.467em center #FFFFFF;
    border-radius: 0;
    border: 1px solid #ddd;
    height: 2.667em;
    box-shadow: none;
    font-family: 'OpenSansRegular', Helvetica, Arial, sans-serif;
    color: #666;
    -webkit-appearance: none;
}

.cercador_vermell button.btn {
    border: none;
    height: 2.375em;
    position: absolute;
    top: 0.263em;
    width: 2.125em;
    right: 1px;
    border-radius: 0;
    background: url(/themes/GENCAT/assets/NG_ico_cercador_tancar.png) no-repeat center center #FFFFFF;
}
@media (min-width: 47.939em) {
    .cercador_vermell .form-group .form-control {
        background: #fff;
        padding: 6px 0 6px 10px;
        -webkit-appearance: none;
    }
}

.cercador_vermell .form-group {
    display: block;
    position: relative;
    margin-bottom: 0;
}

.sr-only {
    clip-path: inset(100%);
    clip: rect(1px 1px 1px 1px);
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}
.cerca-av{
    margin-right: 18px;
    margin-top: 8px;
}
.fpca_cercadorGencat .cerca-av button {
    font-size: 15px;
}

.btn-primary {
    color: #fff;
    background-color: #BD0000;
    border-color: #BD0000;
    border-radius: 0;
}

#main-container #sidebar {
    background-color: #fff
}

.bgGrey {
    background: #f5f5f5;
}




.recent-submission > ul > li, #aspect_discovery_SimpleSearch_div_search-results > div {
    border-bottom: 1px solid #ddd;
    width: 100%;
    padding: 0 20px;
    line-height: 1.700em;
    padding: 0 20px 10px 20px !important;
}
.recent-submission > ul > li:nth-child(1){
    margin-top: 0.7em;
}

#main-container .row-offcanvas {
    background-color: #fff;
}

.fpca_llista_quadriculaColors .llistat_destacat_color_cont .list-group-item .destacat_color_cont a{
    display: flex;
    font-size: 100%;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

#ds-options > div:not(:first-of-type):not(:empty) {
    margin: 0 0 1.25em 0;
    float: left;
    width: 100%;
    background: white;
    -webkit-box-shadow: 0 1px 5px 0 rgb(0 0 0 / 12%), 0 2px 2px 0 rgb(0 0 0 / 14%), 0 3px 1px -2px rgb(0 0 0 / 20%);
    box-shadow: 0 1px 5px 0 rgb(0 0 0 / 12%), 0 2px 2px 0 rgb(0 0 0 / 14%), 0 3px 1px -2px rgb(0 0 0 / 20%);
    border-top: 6px solid #c00;
    -webkit-transition: all .4s ease;
    transition: all .4s ease;
}

#ds-options .list-group:hover {
    -webkit-box-shadow: 0 3px 14px 2px rgb(0 0 0 / 12%), 0 8px 10px 1px rgb(0 0 0 / 14%), 0 5px 5px -3px rgb(0 0 0 / 20%);
    box-shadow: 0 3px 14px 2px rgb(0 0 0 / 12%), 0 8px 10px 1px rgb(0 0 0 / 14%), 0 5px 5px -3px rgb(0 0 0 / 20%);
    -webkit-transform: translateY(-5px);
    transform: translateY(-5px);
}

#aspect_discovery_Navigation_list_discovery:hover{
    -webkit-transform: translate(-5px);
    transform: translate(-5px);
}

#ds-options .list-group a.list-group-item.active  span{
    margin-bottom: 20px;
    font-family: "OpenSansSemibold";
    color: #333;
    font-size: 20px;
}

.list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus {
    z-index: 2;
    color: #fff;
    background-color: #fff;
    border-color: #fff;
}

#ds-options .list-group .list-group-item {
    border: 0;
    border-radius: 0;
    display: flex;
    align-items: flex-start;
    border-top: 1px solid #ddd;
    margin-bottom: 0px !important;
}

.documents {
    column-count: 1;
    column-gap: 20px;
}

.document {
    break-inside: avoid;
}

.document .single-document {
    flex: 0 1 30%;
    display: flex;
    justify-content: space-between;
    margin-right: 12px;
}
.document .single-document .doc-name {
    text-align: left;
    margin-top: 10px;
}

.document .single-document .doc-name .name {
    font-size: inherit;
    font-weight: 700;
    color: #C00000;
    overflow-wrap: break-word;
}

.document .single-document .doc-name .size {
    color: #C00000;
}

.document .single-document .download {
    flex: 1 1 30%;
    text-align: center;
    margin-top: 1rem;
    color: #C00000;
}

.document .single-document .download .circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #BD0000;
    border: none;
    border-radius: 50%;
    box-shadow: none;
    padding: 0;
    box-shadow: 0 2px 4px rgba(192,0,0,0.3);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.document .single-document .download .circle:hover {
    background: #9a0000;
    box-shadow: none;
}

.document .single-document .download .circle a {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.document .single-document .download .circle i {
    color: #fff;
    font-size: 1.1rem;
}

.openseadragon1 {
    width: 100%;
    height: 480px;
}
.toolbar {
    width: 100%;
    height: 33px;
    border: none;
    color: #333;
    padding: 4px;
    background-color: transparent;
}

.toolbar div{
    top: 0px !important;
}
.title-area .doc-nav {
    float: right;
    width: 11%;
    margin-top: 20px;
}

/* Fletxes navegació - estil gencat (gris per defecte, vermell al hover) */
.title-area .doc-nav .inav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid #999999;
    border-radius: 50%;
    padding: 0;
    color: #999999;
    background: transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

.title-area .doc-nav .inav:hover {
    border-color: #C00000;
    color: #C00000;
    background: transparent;
}

#title-document{
    width: 88%;
    display: inline-block;
    word-wrap: break-word;
}


@media (max-width: 576px) {
    .fpca_llista_quadriculaColors .llistat_destacat_color_cont .list-group-item > div {
        height: 100% !important;
    }
}

.openseadragon1{
    background-color: #333333;
}

/* Fletxes navegació visor - estil gencat */
.toolbar,
#toolbarDiv {
    position: relative !important;
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    margin-bottom: 8px;
    z-index: 100;
}

#toolbarDiv > div {
    display: inline-block;
}

.toolbar img,
#toolbarDiv img {
    width: 24px !important;
    height: 24px !important;
    padding: 4px;
    border: 1px solid #666 !important;
    border-radius: 50% !important;
    background: #fff !important;
    cursor: pointer;
    transition: border-color 0.2s ease;
    box-sizing: content-box;
}

.toolbar img:hover,
#toolbarDiv img:hover {
    border-color: #C00000 !important;
}

.title-area {
    position: relative;
}

.document {
    position: relative;
}
@media (min-width: 768px) and (max-width: 991px) {
  #main-container .horizontal-slider #sidebar {
    -webkit-box-shadow: inset 2px 2px 1px rgba(0, 0, 0, 0.05);
    box-shadow: inset 2px 2px 1px rgba(0, 0, 0, 0.05);
    border-right: 1px solid #e5e5e5;
    width: 100% !important;
  }
  }
   .simple-item-view-description {
     text-align: inherit !important;
   }

/* ============================================
   ESTILOS PARA CITACIÓN ISO - BOTÓN Y MODAL
   ============================================ */

/* Contenedor de botones de acción */
.citation-action-buttons {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

/* Botón de citación recomendada - moderno */
.citation-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #BD0000;
    border: none;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'OpenSansSemibold';
    cursor: pointer;
    box-shadow: none;
    transition: background-color 0.2s ease;
}

.citation-btn:hover {
    background: #9a0000;
    box-shadow: none;
}

.citation-btn i {
    color: #fff;
}

/* Overlay del modal */
.citation-modal-overlay {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 999999 !important;
    justify-content: center;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
}

.citation-modal-overlay.active {
    display: flex !important;
}

/* Modal */
.citation-modal {
    background-color: #fff;
    border: 1px solid #DDDDDD;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
}

/* Header del modal */
.citation-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #eee;
    background-color: #fafafa;
}

.citation-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    font-family: 'OpenSansSemibold', Helvetica, Arial, sans-serif;
}

/* Botó de tancar */
.citation-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #666666;
}

.citation-modal-close:hover {
    background-color: #F5F5F5;
    color: #333333;
}

/* Body del modal */
.citation-modal-body {
    padding: 1.5rem;
}

/* Selector de formato de citación en el modal */
.citation-modal-selector {
    margin-bottom: 1rem;
}
.citation-modal-selector label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.35rem;
}
.citation-modal-selector .citation-style-select,
.citation-modal-selector select.citation-style-select {
    width: 100%;
    max-width: 280px;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
}

/* Contenido de la citación */
.citation-text-content {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 4px solid #BD0000;
    border-radius: 4px;
    padding: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    font-style: normal;
}

/* Solo el título de la citación en cursiva */
.citation-text-content em {
    font-style: italic;
}

/* Footer del modal */
.citation-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    background-color: #fafafa;
}

/* Botó de copiar - estil gencat */
.citation-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background-color: #C00000;
    border: none;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'OpenSansSemibold';
    cursor: pointer;
}

.citation-copy-btn:hover {
    background-color: #990000;
}

.citation-copy-btn.copied {
    background-color: #666666;
}

.citation-copy-btn i {
    font-size: 0.85rem;
}

/* Nota de citación generada automáticamente (dentro del modal) */
.citation-auto-note-modal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.78rem;
    color: #999;
    line-height: 1.4;
}

.citation-auto-note-modal i {
    color: #000000;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* ============================================
   ESTADÍSTICAS DEL ÍTEM - ESTILO GENCAT
   ============================================ */
.simple-item-view-statistics {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.simple-item-view-statistics h5 {
    font-family: 'OpenSansSemibold';
    color: #333;
    font-size: 1rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.statistics-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.statistic-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #fafafa;
    border-radius: 4px;
}

.statistic-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #BD0000;
    border-radius: 50%;
    color: #fff;
}

.statistic-icon i {
    font-size: 0.9rem;
}

.statistic-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.statistic-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.statistic-value {
    font-size: 1.25rem;
    font-family: 'OpenSansSemibold';
    color: #333;
}

.statistic-value .stats-number {
    color: #BD0000;
}

.statistic-value .loading-stats {
    color: #999;
    font-size: 0.9rem;
}

.statistic-value .stats-error {
    color: #999;
    font-size: 0.85rem;
}

.statistics-link {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.statistics-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    color: #BD0000;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.statistics-link a:hover {
    background: #e9ecef;
    border-color: #BD0000;
    text-decoration: none;
}

.statistics-link a i {
    font-size: 0.9rem;
}

/* ============================================
   ALTMETRICS - ESTILO GENCAT
   ============================================ */
/* Altmetrics - diseño moderno y limpio */
#impact-altmetric {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Forzar que no aparezcan tooltips con CSS puro */
#impact-altmetric *,
#impact-altmetric *::before,
#impact-altmetric *::after {
    pointer-events: none !important;
}

#impact-altmetric a {
    pointer-events: auto !important;
}

#impact-altmetric h5 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1.25rem 0;
    padding: 0 0 0.75rem 0;
    border-bottom: 2px solid #d0d0d0 !important;
    text-align: left;
    letter-spacing: -0.01em;
}

#impact-altmetric .altmetric-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

/* Contenedor del badge */
#impact-altmetric .altmetric-badge-wrapper {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Badge de altmetric */
#impact-altmetric .altmetric-embed {
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto !important;
}

#impact-altmetric .altmetric-embed a {
    display: inline-block !important;
    text-decoration: none;
    line-height: 0;
    pointer-events: auto !important;
}

/* Tamaño del donut */
#impact-altmetric .altmetric-embed img {
    display: block !important;
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    border: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
}

/* Leyenda al lado del badge */
#impact-altmetric .altmetric-legend {
    flex: 1;
    text-align: left;
}

#impact-altmetric .altmetric-legend-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

#impact-altmetric .altmetric-legend-description {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* Responsive - en móvil poner en columna */
@media (max-width: 576px) {
    #impact-altmetric .altmetric-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    #impact-altmetric .altmetric-badge-wrapper {
        width: auto;
        height: auto;
    }
    
    #impact-altmetric .altmetric-legend {
        text-align: center;
    }
}

/* Ocultar el contenedor completo si no hay badge de altmetrics */
#impact-altmetric:not(:has(.altmetric-embed[data-badge-type])) {
    display: none;
}

/* Si el badge está vacío (sin menciones), ocultar todo el contenedor */
#impact-altmetric:has(.altmetric-embed:empty) {
    display: none;
}

/* Responsive */
@media (max-width: 576px) {
    .citation-modal {
        width: 95%;
        margin: 1rem;
    }

    .citation-modal-header {
        padding: 1rem;
    }

    .citation-modal-body {
        padding: 1rem;
    }

    .citation-modal-footer {
        padding: 0.75rem 1rem;
    }

    .citation-text-content {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

/* ============================================
   ESTILOS PARA LA VISTA DEL ITEM - GENCAT PDF
   ============================================ */

/* Estilos para la vista del item - diseño GENCAT PDF */
.item-summary-view-metadata > .row {
    margin-bottom: 20px;
}

.simple-item-view-files h3 {
    font-family: 'OpenSansSemibold';
    color: #333;
    font-size: 1.25em;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5em;
}

/* ============================================
   SECCIÓN DE ANCHO COMPLETO (Colecciones + Items Relacionados)
   ============================================ */
.full-width-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
    clear: both;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.full-width-section > div {
    margin-bottom: 1.5rem;
}

/* Col·leccions en secció d'amplada completa - estil bàner gencat */
.full-width-section .simple-item-view-collections-modern {
    background: #fff;
    border: none;
    border-top: 1px solid #e9ecef;
    padding: 1.25rem;
    max-width: 100%;
    margin: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.12);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.full-width-section .simple-item-view-collections-modern:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.full-width-section .simple-item-view-collections-modern .collection-heading {
    font-size: 0.95rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 0.75rem;
}

.full-width-section .simple-item-view-collections-modern .collection-item {
    padding: 0.25rem 0;
}

/* Items Relacionats - estil bàner gencat */
.simple-item-view-related-items {
    background: #fff;
    border: none;
    border-top: 1px solid #e9ecef;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.12);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.simple-item-view-related-items:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.simple-item-view-related-items h3 {
    font-family: 'OpenSansSemibold';
    color: #333333;
    font-size: 0.95rem;
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.simple-item-view-related-items .related-items-description {
    color: #666666;
    font-size: 0.85rem;
    margin: 0 0 1rem 0;
}

.related-items-list {
    display: block;
}

.related-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #fafafa;
    border: none;
    border-left: 3px solid #e9ecef;
    margin-bottom: 0.75rem;
    transition: background-color 0.2s ease;
}

.related-item:hover {
    background: #f0f0f0;
}

.related-item-thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 75px;
}

.related-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid #ddd;
}

.related-item-thumbnail .no-thumbnail {
    width: 100%;
    height: 100%;
    background: #eee;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 1.5rem;
}

.related-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.related-item-title {
    font-size: 0.85rem;
    font-family: 'OpenSansSemibold';
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-item-title a {
    color: #C00000;
    text-decoration: none;
}

.related-item-title a:hover {
    color: #8B0000;
    text-decoration: underline;
}

.related-item-authors {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-item-date {
    font-size: 0.7rem;
    color: #999;
    margin: 0.25rem 0 0 0;
}

/* ============================================
   Items Relacionados - Estil GENCAT
   ============================================ */
#aspect_discovery_RelatedItems_div_item-related-container {
    background: #fff;
    border: none;
    border-top: 1px solid #e9ecef;
    border-radius: 0;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.12);
    margin: 2rem 0 1.5rem 0;
}

#aspect_discovery_RelatedItems_div_item-related-container > h3 {
    font-family: 'OpenSansSemibold';
    color: #333;
    font-size: 1rem;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

#aspect_discovery_RelatedItems_div_item-related-container > p.ds-paragraph {
    color: #666;
    font-size: 0.85rem;
    margin: 0 0 1rem 0;
}

/* Contenedor interno - sense borde */
#aspect_discovery_RelatedItems_div_item-related-container > div {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Llista d'artifacts */
#aspect_discovery_RelatedItems_div_item-related-container .ds-artifact-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 1rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Items individuals - estil bàner GENCAT */
#aspect_discovery_RelatedItems_div_item-related-container .ds-artifact-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 1rem !important;
    padding: 1rem !important;
    background: #fff !important;
    border: none !important;
    border-top: 1px solid #e9ecef !important;
    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease !important;
}

/* Columnes Bootstrap dins dels items relacionats */
#aspect_discovery_RelatedItems_div_item-related-container .ds-artifact-item .col-sm-2 {
    flex: 0 0 80px !important;
    width: 80px !important;
    max-width: 80px !important;
    padding: 0 !important;
    margin-right: 1rem !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .ds-artifact-item .col-sm-10,
#aspect_discovery_RelatedItems_div_item-related-container .ds-artifact-item .col-sm-9 {
    flex: 1 !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .ds-artifact-item .item-wrapper {
    display: flex !important;
    flex-direction: row !important;
    gap: 1rem !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .ds-artifact-item .item-wrapper .row {
    display: flex !important;
    flex-direction: row !important;
    margin: 0 !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .ds-artifact-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
    transform: translateY(-2px) !important;
}

/* Thumbnail */
#aspect_discovery_RelatedItems_div_item-related-container .artifact-preview {
    flex-shrink: 0 !important;
    width: 70px !important;
    margin-right: 1rem !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .artifact-preview a {
    display: block;
}

#aspect_discovery_RelatedItems_div_item-related-container .artifact-preview img {
    width: 70px !important;
    height: 90px !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    border: 1px solid #ddd !important;
}

/* Info text */
#aspect_discovery_RelatedItems_div_item-related-container .artifact-info {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .artifact-title {
    font-size: 0.9rem !important;
    font-family: 'OpenSansSemibold' !important;
    margin: 0 0 0.25rem 0 !important;
    line-height: 1.3 !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .artifact-title a {
    color: #C00000 !important;
    text-decoration: none !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .artifact-title a:hover {
    text-decoration: underline !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .author,
#aspect_discovery_RelatedItems_div_item-related-container .publisher-date {
    font-size: 0.8rem !important;
    color: #666 !important;
    margin: 0.15rem 0 !important;
    line-height: 1.4 !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .date {
    font-size: 0.75rem !important;
    color: #888 !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .artifact-description {
    font-size: 0.8rem !important;
    color: #555 !important;
    margin-top: 0.5rem !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Metadatos en ambas columnas - espacio equilibrado entre bloques */
.item-page-field-wrapper.table,
.left-column-content > .item-page-field-wrapper,
.right-column-sidebar > .item-page-field-wrapper {
    margin-bottom: 2em !important;
}

.item-page-field-wrapper.table h5 {
    font-family: 'OpenSansSemibold';
    color: #333;
    font-size: 1em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.item-page-field-wrapper.table div {
    color: #666;
    line-height: 1.6;
}

/* Enlaces en metadatos - estil simple GENCAT */
.item-page-field-wrapper.table a {
    color: #C00000;
    text-decoration: none;
}

.item-page-field-wrapper.table a:hover {
    color: #990000;
    text-decoration: underline;
}

/* Eliminar pseudo-element ::after */
.item-page-field-wrapper.table a::after {
    display: none !important;
    content: none !important;
}

/* Sección de archivos en columna izquierda */


/* ============================================
   ESTILOS ITEM-VIEW - GUÍA WEB GENERALITAT
   Colores: #C00000 (vermell), #333333, #666666, #999999, #DDDDDD, #F5F5F5
   Tipografía: Open Sans
   Enlaces: vermell amb subratllat puntejat, hover subratllat
   ============================================ */

/* Títol de la pàgina - amb línia vermella separadora */
.first-page-header {
    color: #333333;
    font-family: 'OpenSansSemibold';
    font-size: 1.5em;
    border-bottom: 3px solid #d0d0d0;
    padding-bottom: 0.5em;
    margin-bottom: 0.5em;
    margin-left: 0;
    padding-left: 0;
}

/* Autors sota el títol */
.item-authors-header {
    font-size: 1em;
    color: #666666;
    margin-bottom: 0.8em;
    margin-left: 0;
    line-height: 1.6;
}

.item-authors-header .author-name {
    font-family: 'OpenSansRegular';
}

/* Data de publicació */
.item-date-header,
div.item-date-header,
.item-summary-view-metadata .item-date-header,
.left-column-content .item-date-header {
    font-size: 1em;
    color: #666666;
    margin-bottom: 0.5em;
    padding-bottom: 0;
    padding-left: 0;
    border: none;
    display: block;
    background: transparent;
}

.item-date-header .date-label {
    font-family: 'OpenSansSemibold';
    color: #333333;
}

/* Contenedor principal - flexbox pur, sense Bootstrap grid */
.main-content-row {
    display: flex;
    gap: 30px;
    margin-top: 2em;
}

/* Columna izquierda - contenido principal */
.left-column-content {
    flex: 1 1 0%;
    min-width: 0;
    background: #fff;
}

/* Columna derecha - sidebar con diseño moderno */
.right-column-sidebar {
    flex: 0 0 35%;
    max-width: 35%;
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Drets debajo de las columnas */
.item-summary-view-metadata .drets-row {
    margin-top: 3em;
    padding-top: 2em;
    border-top: 1px solid #e0e0e0;
}

/* Ocultar logo Creative Commons en la sección de drets de abajo */
.item-summary-view-metadata .drets-row img[src*="creativecommons"],
.item-summary-view-metadata .drets-row a[rel="license"] img,
.drets-row img[alt*="Creative Commons"] {
    display: none !important;
}

/* Ocultar también el enlace si solo contiene la imagen */
.item-summary-view-metadata .drets-row a[rel="license"]:has(img) {
    display: none !important;
}

/* Botó mostrar registre complet - veure estils finals consolidats */


/* Documents - estil bàner gencat */
.right-column-sidebar .documents,
.right-column-sidebar .simple-item-view-files {
    margin-bottom: 0.5em;
    width: 100%;
    padding: 0;
}

/* Contenedor de documentos - caja única con lista */
.right-column-sidebar .documents {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0;
    margin-bottom: 1rem;
}

/* Cada documento como ítem de lista horizontal */
.right-column-sidebar .documents .document {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    transition: background-color 0.2s ease;
}

.right-column-sidebar .documents .document:last-child {
    border-bottom: none;
}

.right-column-sidebar .documents .document:hover {
    background: #fafafa;
}

.right-column-sidebar .documents .document .thumbnail {
    text-align: center;
    margin-bottom: 0.75rem;
}

.right-column-sidebar .documents .document img {
    max-width: 100%;
    max-height: 150px;
    border: 1px solid #DDDDDD;
}

/* Información del documento - ocupa el espacio disponible */
.right-column-sidebar .documents .document .doc-name {
    flex: 1;
    min-width: 0;
}

.right-column-sidebar .documents .document .doc-name .name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.right-column-sidebar .documents .document .doc-name .name a {
    color: #333;
    text-decoration: none;
}

.right-column-sidebar .documents .document .doc-name .name a:hover {
    color: #BD0000;
    text-decoration: underline;
}

.right-column-sidebar .documents .document .doc-name .size {
    font-size: 0.8rem;
    color: #999;
}

/* Botón de descarga - alineado a la derecha */
.right-column-sidebar .documents .document .circle {
    flex-shrink: 0;
}

.right-column-sidebar .documents .document .circle a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #BD0000;
    color: #fff;
    border-radius: 50%;
    box-shadow: none;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.right-column-sidebar .documents .document .circle a:hover {
    background: #9a0000;
}

.right-column-sidebar .documents .document .circle i {
    font-size: 1rem;
}

/* Títols de secció en sidebar - estil gencat */
.right-column-sidebar h5,
.right-column-sidebar h3 {
    color: #333333;
    font-size: 0.95em;
    font-family: 'OpenSansSemibold';
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #DDDDDD;
}

/* Título de documentos per descarregar - SIN efecto hover ni clicable */
.right-column-sidebar .simple-item-view-files h3,
.item-page-field-wrapper.documents h3,
.simple-item-view-files h3,
h3.ds-heading {
    color: #333 !important;
    font-size: 1.15em !important;
    font-family: 'OpenSansSemibold';
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
    cursor: default !important;
    pointer-events: none !important;
    user-select: text !important;
}


/* Ocultar Creative Commons que aparece debajo (generado por page-structure) */
#aspect_artifactbrowser_ItemViewer_div_item-view > div.row:has(a[rel="license"][href*="creativecommons"]) {
    display: none !important;
}

/* Creative Commons / Drets - estil bàner gencat */
/* Igual que .documents .document per tenir el mateix ample */
.simple-item-view-cc-license {
    background: #fff;
    border: none;
    border-top: 1px solid #e9ecef;
    padding: 1rem;
    margin-bottom: 0;
    margin-top: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.12);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    width: 100%;
    box-sizing: border-box;
}

/* Ocultar etiqueta "Licencia" - ja tenim "Derechos" com a títol */
.simple-item-view-cc-license .cc-license-label,
p.cc-license-label {
    display: none !important;
}

.simple-item-view-cc-license:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.simple-item-view-cc-license h5 {
    color: #333333;
    font-size: 0.95rem;
    font-family: 'OpenSansSemibold';
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.simple-item-view-cc-license .cc-license-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.simple-item-view-cc-license .cc-license-img {
    width: 80px;
    height: auto;
}

.simple-item-view-cc-license .cc-license-text {
    color: #666666;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Col·leccions - estil bàner gencat */
.simple-item-view-collections-modern {
    background: #fff;
    border: none;
    border-top: 1px solid #e9ecef;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.12);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.simple-item-view-collections-modern:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.simple-item-view-collections-modern .collection-heading {
    color: #333333;
    font-size: 0.95rem;
    font-family: 'OpenSansSemibold';
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.simple-item-view-collections-modern .collections-list {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.simple-item-view-collections-modern .collection-item {
    padding: 0.4rem 0 !important;
    margin: 0 !important;
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    border: none !important;
    border-left: none !important;
}

.simple-item-view-collections-modern .collection-item:before {
    content: "\f07b";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: #C00000;
    font-size: 0.8rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.simple-item-view-collections-modern .collection-item a {
    color: #C00000;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color 0.2s ease, text-decoration 0.2s ease;
    display: inline;
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
}

.simple-item-view-collections-modern .collection-item a::after {
    display: none;
}

.simple-item-view-collections-modern .collection-item a:hover {
    color: #C00000 !important;
    background: none;
    transform: none;
    box-shadow: none;
    text-decoration: underline !important;
}

/* Ajustar toolbar del visor con scroll horizontal para que todo sea visible */
#toolbar_documentViewer_wrap {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 5px 0;
    -webkit-overflow-scrolling: touch;
}

#toolbar_documentViewer {
    transform-origin: center top;
    transform: scale(0.9);
    margin-left: auto !important;
    margin-right: auto !important;
    white-space: nowrap !important;
}

/* Asegurar que el visor se ajuste al contenedor */
.visor-imagenes,
.foto-content {
    max-width: 100%;
    overflow: hidden;
}

/* Scrollbar personalizada para el toolbar */
#toolbar_documentViewer_wrap::-webkit-scrollbar {
    height: 6px;
}

#toolbar_documentViewer_wrap::-webkit-scrollbar-track {
    background: rgba(42, 42, 42, 0.5);
    border-radius: 3px;
}

#toolbar_documentViewer_wrap::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 3px;
}

#toolbar_documentViewer_wrap::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* Para Firefox */
#toolbar_documentViewer_wrap {
    scrollbar-width: thin;
    scrollbar-color: #666 rgba(42, 42, 42, 0.5);
}

/* ============================================
   ESTILS GENCAT - ESTIL BÀNER CORPORATIU
   Fons blanc, border-top vermell, ombra subtil
   Hover: ombra més pronunciada (elevació)
   ============================================ */

/* ============================================
   CONTENIDORS INFORMATIUS (sense interacció)
   Estil simple: sense caixa ni separadors
   ============================================ */
.right-column-sidebar .item-page-field-wrapper,
.left-column-content .item-page-field-wrapper,
.item-page-field-wrapper.table {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 0.25rem;
    box-shadow: none;
}

/* Sense efecte hover per a contenidors informatius */
.right-column-sidebar .item-page-field-wrapper:hover,
.left-column-content .item-page-field-wrapper:hover,
.item-page-field-wrapper.table:hover {
    box-shadow: none;
    transform: none;
}

/* ============================================
   CONTENIDORS INTERACTIUS (amb enllaços/botons)
   Estil bàner: caixa blanca, border-top vermell
   ============================================ */
.simple-item-view-collections-modern,
.simple-item-view-cc-license,
.simple-item-view-related-items,
.simple-item-view-uri {
    background: #fff !important;
    border: none !important;
    border-top: 1px solid #e9ecef !important;
    border-bottom: none !important;
    padding: 1.25rem !important;
    margin-bottom: 1.25rem !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.12) !important;
    transition: box-shadow 0.25s ease, transform 0.25s ease !important;
}

.simple-item-view-collections-modern:hover,
.simple-item-view-cc-license:hover,
.simple-item-view-related-items:hover,
.simple-item-view-uri:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12) !important;
    transform: translateY(-2px) !important;
}

/* Títol "Documentos para descargar" - fora de la caixa */
.right-column-sidebar .simple-item-view-files.item-page-field-wrapper,
.simple-item-view-files,
.simple-item-view-files.item-page-field-wrapper {
    background: transparent !important;
    border: none !important;
    border-top: none !important;
    box-shadow: none !important;
    padding: 0.5rem 0 !important;
    margin-bottom: 0.5rem !important;
}

.simple-item-view-files h3 {
    color: #333333;
    font-family: 'OpenSansSemibold';
    font-size: 1rem;
    margin: 0;
}

/* ============================================
   ENLLAÇOS - ESTIL GENCAT ESTÀNDARD
   Color vermell #C00000, subratllat puntejat
   Hover: subratllat complet
   ============================================ */

/* Enllaços generals dins de metadades - sense subratllat per defecte */
.item-page-field-wrapper a[href],
.item-page-field-wrapper a[href]:link,
.item-page-field-wrapper a[href]:visited {
    color: #C00000;
    text-decoration: none;
}

.item-page-field-wrapper a[href]:hover {
    color: #C00000;
    text-decoration: underline;
    text-decoration-style: solid;
}

.item-page-field-wrapper a[href]:active {
    color: #990000;
}

/* Text normal sense subratllat - FORÇAT */
.item-page-field-wrapper div,
.item-page-field-wrapper span,
.item-page-field-wrapper p,
.item-page-field-wrapper.table div,
.item-page-field-wrapper.table span,
.item-page-field-wrapper.table div:not(:has(a)),
.left-column-content .item-page-field-wrapper div,
.right-column-sidebar .item-page-field-wrapper div {
    text-decoration: none !important;
    border-bottom: none !important;
}

/* ============================================
   LLISTES D'ENLLAÇOS - ESTIL GENCAT
   Llista amb pics (bullets) vermells
   ============================================ */

/* TOTS els enllaços dins de metadades - sense subratllat per defecte */
.item-page-field-wrapper.table a,
.item-page-field-wrapper.table div a,
.left-column-content .item-page-field-wrapper a:not([href*="show=full"]) {
    color: #C00000;
    text-decoration: none;
}

/* Hover: subratllat */
.item-page-field-wrapper.table a:hover,
.item-page-field-wrapper.table div a:hover,
.left-column-content .item-page-field-wrapper a:hover:not([href*="show=full"]) {
    color: #990000;
    text-decoration: underline;
}

a[href*="show=full"]:hover {
    background: #990000 !important;
}

/* Matèries (LEMAC) i Paraules clau - estil llista amb bullets */
.item-page-field-wrapper.table div a[href*="browse?type=subject"],
.item-page-field-wrapper.table div a[href*="browse?type=keyword"],
.item-page-field-wrapper a[href*="browse?type=subject"],
.item-page-field-wrapper a[href*="browse?type=keyword"] {
    display: block;
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.35rem;
    line-height: 1.4;
}

/* Punt vermell abans de cada matèria */
.item-page-field-wrapper.table div a[href*="browse?type=subject"]::before,
.item-page-field-wrapper.table div a[href*="browse?type=keyword"]::before,
.item-page-field-wrapper a[href*="browse?type=subject"]::before,
.item-page-field-wrapper a[href*="browse?type=keyword"]::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: #C00000;
    font-size: 1em;
}

/* Enllaços columna esquerra */
.left-column-content .item-page-field-wrapper.table div a,
.left-column-content .item-page-field-wrapper.table div a:link,
.left-column-content .item-page-field-wrapper.table div a:visited {
    color: #C00000;
    text-decoration: none;
    background: transparent;
}

.left-column-content .item-page-field-wrapper.table div a:hover {
    color: #C00000;
    text-decoration: underline;
    text-decoration-style: solid;
    background: transparent;
}

/* Documents - estil gencat estàndard (sense animacions) */


/* Secció de documents - estil gencat */
.simple-item-view-files.item-page-field-wrapper {
    margin-bottom: 0;
    padding-bottom: 0.5rem;
}

/* Contenedor de documentos - caja única con lista (general) */
.documents {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0;
    margin-top: 0;
}

/* Cada documento como ítem de lista horizontal (general) */
.documents .document {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    transition: background-color 0.2s ease;
}

.documents .document:last-child {
    border-bottom: none;
}

.documents .document:hover {
    background: #fafafa;
}

.documents .document .doc-name {
    flex: 1;
    min-width: 0;
}

.documents .document .doc-name .name {
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0 0 0.25rem 0;
}

.documents .document .doc-name .name a {
    color: #333;
    text-decoration: none;
}

.documents .document .doc-name .name a:hover {
    color: #BD0000;
    text-decoration: underline;
}

.documents .document .doc-name .size {
    font-size: 0.8rem;
    color: #999;
    margin: 0;
}

/* Botón de descarga - alineado a la derecha */
.documents .document .circle {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #BD0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.documents .document .circle:hover {
    background: #9a0000;
}

.documents .document .circle a {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.documents .document .circle i {
    color: #fff;
    font-size: 0.95rem;
}

/* URI - estil gencat estàndard */
.simple-item-view-uri {
    background: #F5F5F5;
    border: 1px solid #DDDDDD;
    border-left: 3px solid #e9ecef;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

/* Títols de secció */
.item-page-field-wrapper h5 {
    color: #333333;
    font-family: 'OpenSansSemibold';
    margin-bottom: 0.5rem;
}

/* Enllaços de col·leccions - estil gencat */
.collections-list .collection-item a {
    color: #C00000;
    text-decoration: none;
}

.collections-list .collection-item a:hover {
    text-decoration: underline;
}

/* Focus visible per accessibilitat */
*:focus-visible {
    outline: 2px solid #C00000;
    outline-offset: 2px;
}

/* ============================================
   RESPONSIVE - DISEÑO MÓVIL
   ============================================ */

/* Tablet y móvil grande */
@media (max-width: 991px) {
    .main-content-row {
        flex-direction: column;
        gap: 0;
    }

    .left-column-content,
    .right-column-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        display: contents;
    }

    /* URI first */
    .left-column-content > .simple-item-view-uri {
        order: 1 !important;
        width: 100%;
    }

    /* Visor section second */
    .left-column-content > .document {
        order: 2;
        width: 100%;
    }

    /* Downloads section right after visor */
    .right-column-sidebar > .simple-item-view-files,
    .right-column-sidebar > .documents {
        order: 3;
        width: 100%;
    }

    /* Rest of left-column content (description, language, etc.) */
    .left-column-content > .simple-item-view-description,
    .left-column-content > .item-page-field-wrapper {
        order: 4;
        width: 100%;
    }

    /* Rest of right-column content */
    .right-column-sidebar > .simple-item-view-cc-license,
    .right-column-sidebar > .simple-item-view-authors,
    .right-column-sidebar > .citation-action-buttons,
    .right-column-sidebar > .citation-modal-overlay,
    .right-column-sidebar > .item-page-field-wrapper,
    .right-column-sidebar > meta,
    .right-column-sidebar > script,
    .right-column-sidebar > .simple-item-view-show-full {
        order: 5;
        width: 100%;
    }

    /* Sidebar background as wrapper is now display:contents */
    .right-column-sidebar > .simple-item-view-files,
    .right-column-sidebar > .documents,
    .right-column-sidebar > .simple-item-view-cc-license,
    .right-column-sidebar > .simple-item-view-authors,
    .right-column-sidebar > .citation-action-buttons,
    .right-column-sidebar > .item-page-field-wrapper {
        background: #fff;
        padding: 0;
    }
}

/* Móvil */
@media (max-width: 768px) {
    /* Layout principal en una columna */
    .item-summary-view-metadata .row {
        display: flex;
        flex-direction: column;
    }

    .left-column-content,
    .right-column-sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Título principal */
    .first-page-header {
        font-size: 1.3rem;
        line-height: 1.3;
    }

    /* Autores */
    .item-authors-header {
        font-size: 1rem;
        line-height: 1.5;
    }

    /* Fecha */
    .item-date-header {
        font-size: 0.9rem;
        margin-bottom: 1.5em;
    }

    /* Metadatos - separación en móvil */
    .item-page-field-wrapper {
        margin-bottom: 0.5rem !important;
        padding: 0.25rem 0 !important;
    }

    .item-page-field-wrapper.table {
        margin-bottom: 1em !important;
    }

    .item-page-field-wrapper h5 {
        font-size: 0.9rem;
    }

    /* Visor/documentos */
    .visor-section,
    .visor-container {
        padding: 0;
    }

    /* Sección de documentos */
    .simple-item-view-files.item-page-field-wrapper {
        padding: 0.75rem 0 !important;
    }

    .documents .document {
        padding: 10px !important;
    }

    /* Botón de descarga en móvil */
    .documents .document .circle {
        width: 32px;
        height: 32px;
    }

    .documents .document .circle i {
        font-size: 0.85rem;
    }
    
    /* Ajustar padding de documentos en móvil */
    .documents .document {
        padding: 0.5rem 0.75rem;
        gap: 0.75rem;
    }
    
    .documents .document .doc-name .name {
        font-size: 0.85rem;
    }
    
    .documents .document .doc-name .size {
        font-size: 0.75rem;
    }

    /* Secció full-width - estil gencat */
    .full-width-section {
        margin-top: 1.5rem;
        padding-top: 1rem;
        margin-left: 0;
        margin-right: 0;
    }

    .full-width-section .simple-item-view-collections-modern {
        max-width: 100%;
        width: 100%;
        padding: 0.75rem;
        margin: 0;
        border: 1px solid #DDDDDD;
        border-left: 3px solid #e9ecef;
    }

    /* Items relacionats */
    #aspect_discovery_RelatedItems_div_item-related-container {
        padding: 0.75rem;
        margin: 1rem 0;
        background: #F5F5F5;
        border: 1px solid #DDDDDD;
    }

    /* Sense animacions en mòbil */
    .left-column-content,
    .right-column-sidebar {
        animation: none;
    }
}

/* Mòbil petit */
@media (max-width: 480px) {
    .first-page-header {
        font-size: 1.1rem;
    }
    
    .item-authors-header {
        font-size: 0.9rem;
    }
    
    .item-page-field-wrapper h5 {
        font-size: 0.85rem;
    }
}

/* Selección de texto - mejor legibilidad */
::selection {
    background: #C00000;
    color: #fff;
}

::-moz-selection {
    background: #C00000;
    color: #fff;
}

/* Selección sobre fondos oscuros/rojos */
.citation-btn::selection,
.citation-copy-btn::selection,
a[href*="show=full"]::selection,
.documents .document .circle a::selection,
.simple-item-view-collections-modern .collection-item a:hover::selection {
    background: #fff;
    color: #C00000;
}

/* Enlaces con fondo rojo - asegurar legibilidad */
a:active {
    background: transparent;
}

/* Evitar fondo rojo en selección de enlaces normales */
.item-page-field-wrapper a::selection,
.left-column-content a::selection {
    background: rgba(192, 0, 0, 0.2);
    color: #333;
}


/* ============================================
   ESTILS FINALS CONSOLIDATS - GENCAT
   ============================================ */

/* ----- BOTÓ MOSTRAR REGISTRE COMPLET ----- */
/* Contenidor del botó */
.simple-item-view-show-full,
.simple-item-view-show-full.item-page-field-wrapper,
.simple-item-view-show-full.item-page-field-wrapper.table {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
    margin-top: 3.5em !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Botó - mateix estil que citation-btn */
/* Sobrescriure .buttonpro que té display:table al SCSS */
.item-page-field-wrapper.table a.buttonpro,
.simple-item-view-show-full.item-page-field-wrapper.table a.buttonpro,
.simple-item-view-show-full a.buttonpro,
.simple-item-view-show-full a,
a.buttonpro[href*="show=full"],
a[href*="show=full"] {
    font-family: 'OpenSansSemibold', Arial, sans-serif !important;
    color: #fff !important;
    background: #BD0000 !important;
    background-color: #BD0000 !important;
    text-decoration: none !important;
    padding: 0.75rem 1.25rem !important;
    font-size: 0.9rem !important;
    display: inline-flex !important;
    align-items: center !important;
    box-shadow: none !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    width: auto !important;
    max-width: 220px !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 2px 4px rgba(192,0,0,0.3) !important;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
    margin-top: 0 !important;
}

.item-page-field-wrapper.table a.buttonpro:hover,
.simple-item-view-show-full.item-page-field-wrapper.table a.buttonpro:hover,
.simple-item-view-show-full a.buttonpro:hover,
.simple-item-view-show-full a:hover,
a.buttonpro[href*="show=full"]:hover,
a[href*="show=full"]:hover {
    font-family: 'OpenSansSemibold', Arial, sans-serif !important;
    color: #fff !important;
    background: #9a0000 !important;
    background-color: #9a0000 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

/* ----- COL·LECCIONS ----- */
.simple-item-view-collections-modern .collection-item a,
.collection-item a {
    color: #C00000 !important;
    text-decoration: none !important;
}

.simple-item-view-collections-modern .collection-item a:hover,
.collection-item a:hover {
    color: #C00000 !important;
    text-decoration: underline !important;
}

/* ----- URI ----- */
.simple-item-view-uri a {
    color: #C00000 !important;
    text-decoration: none !important;
}

.simple-item-view-uri a:hover {
    color: #C00000 !important;
    text-decoration: underline !important;
}

/* ----- ITEMS RELACIONATS - ESTIL BÀNER GENCAT ----- */
/* Caixa exterior: quadrada, línia vermella a dalt */
#aspect_discovery_RelatedItems_div_item-related-container {
    background: #fff !important;
    border: none !important;
    border-top: 1px solid #e9ecef !important;
    border-radius: 0 !important;
    padding: 1.25rem !important;
    margin: 1.5rem 0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.12) !important;
}

#aspect_discovery_RelatedItems_div_item-related-container:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12) !important;
    transform: translateY(-2px);
}

#aspect_discovery_RelatedItems_div_item-related-container > h3 {
    font-family: 'OpenSansSemibold', Arial, sans-serif !important;
    color: #333 !important;
    font-size: 1rem !important;
    margin: 0 0 0.75rem 0 !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 1px solid #eee !important;
}

/* Items individuals: quadrats, línia vermella a DALT */
#aspect_discovery_RelatedItems_div_item-related-container .ds-artifact-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 1.5rem !important;
    padding: 1rem !important;
    margin-bottom: 0 !important;
    background: #fff !important;
    border: none !important;
    border-top: 1px solid #e9ecef !important;
    border-radius: 0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .ds-artifact-item:hover {
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
    transform: translateY(-2px) !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .artifact-preview {
    flex-shrink: 0 !important;
    width: 70px !important;
    margin-right: 1rem !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .artifact-preview img {
    width: 70px !important;
    height: 90px !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    border: 1px solid #ddd !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .artifact-info {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .artifact-title {
    font-family: 'OpenSansSemibold', Arial, sans-serif !important;
    font-size: 0.9rem !important;
    margin: 0 0 0.25rem 0 !important;
    line-height: 1.3 !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .artifact-title a {
    color: #C00000 !important;
    text-decoration: none !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .artifact-title a:hover {
    text-decoration: underline !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .author,
#aspect_discovery_RelatedItems_div_item-related-container .publisher-date {
    font-size: 0.8rem !important;
    color: #666 !important;
    margin: 0.15rem 0 !important;
}

#aspect_discovery_RelatedItems_div_item-related-container .date {
    font-size: 0.75rem !important;
    color: #888 !important;
}

/* ============================================
   DRETS - TOTS ELS dc.rights
   ============================================ */
.rights-all-values {
    margin-top: 0.5rem;
}

.rights-value-item {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.25rem;
}

.rights-value-item a {
    color: #C00000;
    text-decoration: none;
    word-break: break-all;
}

.rights-value-item a:hover {
    text-decoration: underline;
}