@font-face {
  font-family: 'Merriweather';
  src: url('https://dlib.biblhertz.it/fonts/Merriweather/Merriweather-Regular.eot?') format('eot'), url('https://dlib.biblhertz.it/fonts/Merriweather/Merriweather-Regular.woff') format('woff'), url('https://dlib.biblhertz.it/fonts/Merriweather/Merriweather-Regular.ttf') format('truetype');
}

body {
  background-color: rgb(230, 230, 230);
  background-image: url('https://biblhertz.github.io/rds/rsc/BH_LOGO_EN_3C_P_ORIZ.png');
  background-repeat: no-repeat;
  background-position-x: 60px;
  background-position-y: 40px;
  background-size: 500px;
}

body,
button,
input {
  font-family: "Roboto", "Tahoma", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5em;
  font-size: 16px;
}

/*here comes the search bar:*/
div [data-flex-layout*=row][data-flex-layout*=top-center]>div {
  width: clamp(280px, 60%, 100%);
  margin: 30px;
}

.Select--single>.Select-control .Select-value,
.Select-placeholder {
  color: gray;
}

div#volterra72,
div#biennale78,
div#gnam81 {
  margin-bottom: 1em;
  padding-top: 1em;
}

.page {
  padding-top: 20px;
  margin: 1em 0;
}

.panel-heading+.panel-body {
  padding: 0px;
}

.page .row {
  margin: 0 clamp(10px, 3vw, 50px);
}

.page .rows,
.page .columns {
  padding-top: 2em;
  border-top: thin groove lightgrey;
  border-bottom: thin groove lightgrey;
}

.page .columns {
  padding-bottom: 0;
}

#tabs .tab-content .tab-content {
  padding-left: 2%;
  padding-right: 2%;
  background-color: whitesmoke;
  padding-bottom: 2em;
}

.based {
  margin-left: 5%;
  margin-right: 5%;
}

.sig {
  text-align: right;
  font-style: italic;
}

.dyn-cols {
  column-count: 3;
  column-gap: 2em;
  column-width: 200px;
  column-rule: 1px inset var(--input-border-color, rgba(29, 9, 110, .13));
  color: black;
}

.dyn-cols p {
  font-size: clamp(1.1rem, 1.2vw + 0.8rem, 1.5rem);
}

p {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.15rem);
  line-height: 1.5;
  color: black;
  margin: 0;
}

p+p {
  text-indent: 1em;
}

.component-page-toolbar__btn_show_source,
.component-page-toolbar__btn_show_graph,
.component-page-toolbar__btn_show_diagram,
.component-page-toolbar__btn_copy_iri {
  display: none;
}

#intro,
#panels {
  margin-bottom: 3em
}

#dev,
#graphs {
  margin-top: 2em;
  margin-bottom: 2em;
}

.nav.nav-tabs>li>a {
  color: #8E1C15;
  letter-spacing: 0.125em;
}

nav.nav-tabs>li>a,
.nav.nav-tabs>li.active>a {
  color: #8E1C15 !important;
}

.nav.nav-tabs>li.active {
  box-shadow: inset 0 -3px 0 0 transparent;
}

.img-frame img {
  vertical-align: middle;
  max-width: 320px;
  max-height: 340px;
}

h2 {
  font-family: "Merriweather", serif;
  color: #8E1C15;
  margin-top: 1em;
  margin-bottom: -2em;
  padding: 0;
  font-weight: 600;
  font-size: 2em;
}

ol.page-breadcrumb>.active {
  color: #8E1C15;
}

.page__header.page__header--no-image {
  padding: 20px 24px;
  margin-left: 600px;
  display: block;
}

.base-breadcrumb,
div.page-breadcrumb,
ol.page-breadcrumb {
  margin-left: 610px;
  width: auto;
  box-shadow: none;
  background-color: transparent;
  font-size: 15px;
  height: var(--breadcrumb-height, 34px);
  position: relative !important;
}

.page__header.page__header--no-image h2 {
  margin: 0;
  padding: 0;
}

h3 {
  font-family: "Merriweather", serif;
  margin-top: 0;
  margin-bottom: 1em;
  font-size: clamp(1.15em, 2.5vw, 1.5em);
  font-weight: 500;
  color: #8E1C15;
  text-align: center;
  padding-top: 2em;
  letter-spacing: 0.05em;
}

#graph div {
  margin-bottom: 2em;
}

div#volterra72 div.col-md-6,
div#biennale78 div.col-md-6,
div#gnam81 div.col-md-6,
div#volterra72 div.col-sm-6,
div#biennale78 div.col-sm-6,
div#gnam81 div.col-sm-6 {
  width: 100%;
}

[data-flex-layout*=columns][data-flex-layout*=-center],
[data-flex-layout*=rows][data-flex-layout*=center-] {
  margin-top: 1em;
}

div#volterra72 [data-flex-layout*=column][data-flex-layout*=spread-],
div#volterra72 [data-flex-layout*=row][data-flex-layout*=-spread],
div#venezia78 [data-flex-layout*=column][data-flex-layout*=spread-],
div#venezia78 [data-flex-layout*=row][data-flex-layout*=-spread],
div#gnam81 [data-flex-layout*=column][data-flex-layout*=spread-],
div#gnam81 [data-flex-layout*=row][data-flex-layout*=-spread] {
  justify-content: center;
}

hr {
  border-bottom: 1px solid var(--input-border-color, rgba(29, 9, 110, .13));
}

h4 {
  color: #8E1C15;
  letter-spacing: 0.125em;
}

div#volterra72 [data-flex-layout*=row][data-flex-layout*=-spread],
div#biennale78 [data-flex-layout*=row][data-flex-layout*=-spread],
div#gnam81 [data-flex-layout*=row][data-flex-layout*=-spread] {
  justify-content: start;
}

.component-page-toolbar {
  position: absolute;
}

.page__header-navtabs {
  margin-top: 82px;
}

.page__header-body {
  float: none;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  position: absolute;
  top: 50px;
}

.page__header-thumbnail {
  display: none;
  visibility: hidden;
}

div #mp-popover {
  height: 40px;
}

.base-breadcrumb a,
div.page-breadcrumb a,
ol.page-breadcrumb a,
.base-breadcrumb li,
div.page-breadcrumb li,
ol.page-breadcrumb li {
  color: #8E1C15;
  text-decoration: none;
}

.component-page-toolbar .btn-group {
  font-size: 15px;
  text-decoration: none;
}

.D3Tree--root .node-cell>* {
  background-color: transparent;
  max-width: 300px !important;
}

.D3Tree--root .node-text {
  background-color: transparent;
  white-space: nowrap;
  width: min(400px, 90vw);
  text-overflow: ellipsis;
}

.panel-footer a,
.panel-footer a:hover {
  color: black;
  text-decoration: none;
}

.panel__uri {
  display: flex;
  align-items: center;
  font-size: 1.5em;
  letter-spacing: 0.125em;
}

.page__header--no-image a,
.panel__uri a {
  color: #8E1C15;
  text-decoration: none;
}

table a:not(.btn) {
  text-decoration: none;
}

.page__header--no-image {
  color: #8E1C15;
}

.page__header.page__header--no-image>div {
  font-size: 1.1em;
  margin-top: 0.25em;
}

.knowledge-pane__uri-copy-button {
  flex: 0 0 auto;
  opacity: 0;
  visibility: visible;
  transition: opacity 0.3s;
}

.panel__uri:hover .panel__uri-copy-button {
  opacity: 1;
  visibility: visible;
}

.panel__uri-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

div.react-sigma,
div.sigma-container {
  height: 99% !important;
  align-content: stretch;
  display: flex;
}

.react-sigma-controls.bottom-left {
  visibility: hidden
}

.react-sigma-controls.bottom-right {
  top: var(--sigma-controls-margin);
  right: var(--sigma-controls-margin);
  bottom: auto;
}

div.react-sigma {
  position: relative;
  border: thin groove lightgrey;
  border-radius: 6px;
  margin-top: 40px;
}

.form-group {
  visibility: hidden;
  display: none;
}

div[data-flex-layout] h1,
.page__header-body h1 {
  font-family: "Merriweather", serif;
  font-size: clamp(1.5em, 4vw, 2.75em);
  color: #8E1C15;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.3em;
}

div#tabs h1 {
  display: none;
  visibility: hidden;
}

.tab-pane {
  border-top: white;
  margin-right: 3px;
  margin-left: 1px;
}

.center-note {
  line-height: 1.5em;
  text-align: center;
}

.center-note ul {
  line-height: 1.5em;
  font-size: 1.5em;
}

#start-page-tabpane-Local {
  box-shadow: none;
  border: none;
}

ul.nav-tabs {
  margin-left: 0;
  border-bottom: 1px solid var(--input-border-color, rgba(29, 9, 110, .13));
  align-items: center;
  display: flex;
  justify-content: center;
  font-size: clamp(1em, 1.5vw, 1.25em);
  flex-wrap: wrap;
}

#tabs-pane-100 ul.nav-tabs,
#tabs-pane-200 ul.nav-tabs,
#tabs-pane-300 ul.nav-tabs {
  font-size: 1.15em;
  align-items: start;
  justify-content: left;
  margin-left: 11%;
  margin-top: -5px;
}

.nav-tabs>.nav-link.active,
.nav-tabs>.nav-link.active:focus,
.nav-tabs>.nav-link.active:hover,
.nav-tabs>.nav-link.hover {
  background-color: rgb(245, 245, 245);
  border-top: solid thin white;
  border-left: solid thin white;
  border-right: solid thin white;
  border-bottom: none;
  box-shadow: 0px -4px 10px 0px darkgray;
  margin-bottom: 0px;
}

.DataTable--table>thead>tr>th {
  background-color: transparent;
}

p.match b {
  color: #dc8a4b;
  font-weight: normal;
}

p.match b:after {
  content: " ";
}

.searchinput {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 15px;
}

.searchinput i {
  position: relative;
  left: 12px;
}

.searchinput .input {
  flex: 1;
  margin-left: -12px;
  box-shadow: 0px 0px 2px #4a9eba;
  border-color: #4a9eba;
}

.searchinput input {
  padding-left: 28px;
}

.searchinput .form-group {
  margin-bottom: 0;
}

.nav {
  flex-direction: row;
}

.vis-item {
  border-width: 0;
  border-color: #8ec7e38a;
  background-color: transparent;
}

.vis-item.vis-box {
  border: thin groove lightgrey;
  background-color: white;
  padding: 5px;
  width: 240px;
}

.SemanticTimeline--timeline {
  position: relative;
  margin-top: -10px;
}

.vis-active {
  box-shadow: none;
}

.vis-timeline {
  border-top: thin solid white
}

.vis-background {
  background-color: rgb(245, 245, 245);
}

.card .header {
  height: 80px;
  white-space: normal;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  font-family: "Roboto", "Tahoma", Arial, sans-serif !important;
}

.vis-item.vis-box.card {
  height: 100px;
  margin-top: 10px;
}

.col-sm-6 div[data-flex-self] {
  margin-right: 3em;
}

.panel-footer {
  padding: 10px 10px 15px;
  margin: auto;
  background-color: transparent;
  border: none;
  font-size: 14px;
}

.targets {
  border: none;
  background-color: transparent;
  padding: 0px 10px 10px 10px;
  margin: none;
}

/* Card grid: use CSS Grid so cards auto-fill rows */
[data-flex-layout]:has(> .grid-demo) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px 16px;
}

.grid-demo {
  margin: 0;
}

.grid-demo .panel-default {
  width: 100%;
}

.panel-default {
  border: thin groove lightgrey;
  box-shadow: none;
  margin: 0;
  background-color: white;
  width: 320px;
  max-width: 100%;
  min-height: 300px;
  height: auto;
}

[data-flex-layout*=columns][data-flex-layout*=-spread],
[data-flex-layout*=rows][data-flex-layout*=spread-] {
  margin-top: 2.75em;
}

.document_part_of,
.copy_epic {
  font-size: 1.25em;
  color: black !important;
  margin-top: 1.25em;
  margin-left: 1.35em;
}

.document_part_of a,
.copy_epic a {
  color: black !important;
}

.react-sigma-controls {
  border: thin groove lightgrey;
}

.special-page {
  font-family: "Roboto", "Tahoma", Arial, sans-serif !important;
  text-align: center;
  font-size: 1.5em;
  font-weight: 600;
  letter-spacing: 0.125em;
  color: #8E1C15;
  border-bottom: thin groove lightgrey;
  padding-bottom: 1em;
  margin-bottom: 1em;
}

.panel-default>.panel-heading {
  color: black;
  background-color: transparent;
  text-align: center;
  font-size: 14px;
  margin: 6px 0 0;
}

.panel-body {
  text-align: center;
  padding: 30px 0px 10px;
}

.panel-body+.panel-heading {
  padding: 10px 0px 10px;
}

.ita {
  font-style: italic;
}

.ol-popup {
  border: 1px groove lightgrey;
  border-radius: 4px;
}

.ol-viewport {
  margin-top: 2em;
  border: thin groove lightgrey;
}

.lk-place {
  color: black;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.panel-body img {
  max-height: 278px;
  max-width: 278px;
  object-fit: fill;
  margin: 0px 6px;
}

.footer-text {
  position: relative;
  border: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  text-align: center;
  color: darkslategrey;
}

.vis-item .vis-item-content {
  white-space: wordwrap;
}

.img-inset,
.floating {
  max-height: 278px;
  max-width: 278px;
  object-fit: fill;
  border: thin solid whitesmoke;
  border-radius: 6px;
}

div[data-flex-layout] {
  background-color: transparent;
}

img.floating {
  float: left;
  padding-right: 10px;
  width: 70px;
  height: 70px;
}

.timespan {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  font-family: "Roboto", "Tahoma", Arial, sans-serif !important;
}

.filler {
  margin-left: auto;
  margin-right: auto;
  margin-top: 5em;
}

.card {
  border: none;
  font-size: 95%;
  font-weight: 600;
}

footer {
  display: none;
  visibility: hidden;
}

.tab-content>.tabs-pane {
  background-color: whitesmoke;
}

.tab-pane {
  margin-bottom: 0;
  padding-bottom: 20px
}

button.SemanticTimeline--fitButton,
.btn-secondary:focus,
.btn-secondary:hover,
.btn-secondary.focus {
  background-color: white !important;
  color: #8E1C15;
  border: thin groove lightgrey;
  padding: 0px 8px 0px 8px;
  width: 6rem;
}

.fa-expand::before {
  font-family: "Roboto", "Tahoma", Arial, sans-serif !important;
  content: "▲ ▼";
  color: #999;
  font-weight: 500;
}

div:has(div.vis-active) .fa-expand::before {
  font-family: "Roboto", "Tahoma", Arial, sans-serif !important;
  content: "◀ ▶";
  color: #999;
  font-weight: 500;
}

bs-tab {
  margin-bottom: 50px;
}

.navbar,
.navbar-default,
.navbar-inverse,
.metaphacts-header-navbar.bg-primary {
  background-color: transparent !important;
  display: none;
  visibility: hidden;
  position: absolute;
}

.metaphacts-header-navbar.navbar.navbar-logo-name {
  display: none;
}

/* Graph container wrapper */
.graph-wrapper {
  height: 80vh;
}

.graph-wrapper--short {
  height: 60vh;
}

/* Ensure flex card grids wrap on all screens */
[data-flex-layout*="rows"] {
  flex-wrap: wrap;
}

/* Force Bootstrap columns to full width */
.col-md-6,
.col-sm-6 {
  width: 100%;
}

/* --- Responsive breakpoints --- */

@media only screen and (max-width: 2000px) and (min-width: 1300px) {
  body {
    background-image: url('https://biblhertz.github.io/rds/rsc/BH_LOGO_EN_3C_P_VERT.png');
    background-repeat: no-repeat;
    background-position-x: 60px;
    background-position-y: 20px;
    background-size: 250px;
  }

  .page__header.page__header--no-image {
    margin-left: 400px;
  }

  .base-breadcrumb,
  div.page-breadcrumb,
  ol.page-breadcrumb {
    margin-left: 400px;
  }
}

@media only screen and (max-width: 1300px) {
  body {
    background-image: url('https://biblhertz.github.io/rds/rsc/BH_LOGO_EN_3C_P_VERT.png');
    background-repeat: no-repeat;
    background-position-x: 60px;
    background-position-y: 40px;
    background-size: 200px;
  }

  .page__header.page__header--no-image {
    margin-left: 350px;
  }

  .base-breadcrumb,
  div.page-breadcrumb,
  ol.page-breadcrumb {
    margin-left: 350px;
  }
}

@media only screen and (max-width: 1100px) {
  body {
    background-image: url('https://biblhertz.github.io/rds/rsc/BH_LOGO_EN_3C_P_VERT.png');
    background-repeat: no-repeat;
    background-position-x: 60px;
    background-position-y: 60px;
    background-size: 150px;
  }

  .page__header.page__header--no-image {
    margin-left: 250px;
  }

  .base-breadcrumb,
  div.page-breadcrumb,
  ol.page-breadcrumb {
    margin-left: 250px;
  }
}

@media only screen and (max-width: 768px) {
  body {
    background-image: url('https://biblhertz.github.io/rds/rsc/BH_LOGO_EN_3C_P_VERT.png');
    background-size: 80px;
    background-position: center 8px;
    background-repeat: no-repeat;
  }

  .page {
    margin-top: 80px;
  }

  .page__header.page__header--no-image {
    margin-left: 0;
    padding: 10px 16px;
  }

  .base-breadcrumb,
  div.page-breadcrumb,
  ol.page-breadcrumb {
    margin-left: 0;
  }

  .page .row {
    margin: 0 10px;
  }

  .vis-item.vis-box {
    width: 160px;
  }

  .vis-item.vis-box.card {
    height: auto;
    min-height: 60px;
  }

  .graph-wrapper {
    height: 50vh;
  }

  #tabs-pane-100 ul.nav-tabs,
  #tabs-pane-200 ul.nav-tabs,
  #tabs-pane-300 ul.nav-tabs {
    margin-left: 0;
    justify-content: center;
  }
}

/* --- Scrollable results container for unit cards --- */
.staccioli-scroll-container {
  max-height: 60vh;
  overflow-y: auto;
  border-bottom: 2px solid lightgrey;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  box-shadow: inset 0 -10px 10px -10px rgba(0, 0, 0, 0.1);
}

/* Tab nav stays fixed; only the content area scrolls */
.staccioli-tabbed-gallery .tab-content {
  max-height: 60vh;
  overflow-y: auto;
  border-bottom: 2px solid lightgrey;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  box-shadow: inset 0 -10px 10px -10px rgba(0, 0, 0, 0.1);
}

/* Staccioli Info Panel Styles */
.staccioli-info-panel {
  background-color: #f8f9fa;
  padding: 15px 20px;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.staccioli-info-panel-title {
  margin-top: 0;
  color: #495057;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.staccioli-info-panel-title i {
  margin-right: 5px;
}

.staccioli-info-content {
  display: flex;
  gap: 20px;
  align-items: stretch;
  flex-wrap: wrap;
}

.staccioli-info-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 15px;
  margin-bottom: 0;
  align-items: center;
}

.staccioli-info-dl dt {
  color: #495057;
  text-align: right;
  margin: 0;
  font-weight: 600;
}

.staccioli-info-dl dd {
  margin: 0;
}

.staccioli-info-dd-flex {
  display: flex;
  align-items: center;
}

.staccioli-info-link {
  color: #007bff;
  font-weight: 500;
  text-decoration: underline;
}

.staccioli-epic-pill {
  font-family: monospace;
  background: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #cce5ff;
  color: #0056b3;
  text-decoration: none;
}

.staccioli-copy-btn {
  padding: 0 5px;
}

.staccioli-copy-btn i {
  color: #6c757d;
}

.staccioli-info-card {
  flex-shrink: 0;
}

/* --- Unit-card type tabs (nested inside scroll container) --- */
.staccioli-tabbed-gallery ul.nav-tabs {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 8px 0 0;
  border-bottom: 2px solid #8E1C15;
  font-size: 0.9em;
}

.staccioli-tabbed-gallery ul.nav-tabs > li > a {
  display: block;
  padding: 5px 12px;
  border-radius: 4px 4px 0 0;
  border: 1px solid #ccc;
  border-bottom: none;
  background-color: #e8e8e8;
  color: #555 !important;
  letter-spacing: 0.05em;
  transition: background-color 0.15s;
}

.staccioli-tabbed-gallery ul.nav-tabs > li > a:hover {
  background-color: #d8d8d8;
  color: #8E1C15 !important;
}

.staccioli-tabbed-gallery ul.nav-tabs > li.active > a,
.staccioli-tabbed-gallery ul.nav-tabs > li.active > a:focus,
.staccioli-tabbed-gallery ul.nav-tabs > li.active > a:hover {
  background-color: #fff;
  color: #8E1C15 !important;
  font-weight: 600;
  border-color: #8E1C15 #8E1C15 #fff;
  border-width: 2px 1px 2px;
  box-shadow: none;
  margin-bottom: -2px;
}