figcaption {
	max-width: 20rem;
	display: block;
	text-overflow: ellipsis;
	overflow: hidden;
	max-height: 5.2em;
	margin-top: 1rem;
	font-family: Nunito Sans,sans-serif;
	font-size: .9em;
	line-height: 1.3em;
	color: dimgray;
}

.description-field.thumbs {
  display: flex;
  flex-flow: column;
  align-items: flex-start !important;
	border-bottom: 1px solid #dcdcdc;
	border-top: 1px solid #dcdcdc;
}
.description-field.thumbs > .category {
  width: 100%;
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
}
.description-field.thumbs .value {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-flow: row wrap;
}
.description-field.thumbs .value > a {
  padding: 1rem;
  background-color: whitesmoke;
  border: 2px solid #ECECEC;
  border-radius: 3px;
  box-shadow: 3px 3px 15px -10px gray;
  transition: all .3s;
}
.description-field.thumbs .value > a:hover {
    border: 2px solid lightgray;
}

.description-field.thumbs .value img {
  width: 14rem;
  object-fit: contain;
  object-position: center;
  height: 14rem;
}
@media (max-width: 425px) {
  
  .description-field.thumbs .value > a {
	  width: 100%;
	  text-align: center;
  }
  .description-field.thumbs .value img {
    width: 100%;
    object-fit: contain;
    object-position: center;
    height: 14rem;
  }  
}

.external_link {
  font-weight: bold;
  color: #333;
}


.leaflet-marker-icon.marker-cluster {
	border-radius: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	background-color: #c92018;
	font-weight: bold;
	font-size: 1.3em;
  transition: all .3s;
}
.leaflet-marker-icon.marker-cluster:hover {
	background-color: red;
}

/* Stili per albero archivistico */
.work-page .ulist {
  list-style: none;
  margin: 0;
  padding: 0 0 0 20px;
}

.work-page .ulist li {
  position: relative;
  padding: 3px 0 3px 16px;
  margin: 2px 0;
}

.work-page .ulist li:before {
  content: "";
  position: absolute;
  left: -12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ccc;
}

.work-page .ulist li:after {
  content: "";
  position: absolute;
  left: -12px;
  top: 14px;
  width: 12px;
  height: 2px;
  background: #ccc;
}

.work-page .ulist li:last-child:before {
  height: 14px;
}

.work-page .ulist li a {
  color: #444;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  font-family: Nunito Sans, sans-serif;
}

.work-page .ulist li a:hover {
  color: #000;
  text-decoration: underline;
}

/* Stile per il primo livello */
.work-page > .ulist {
  padding-left: 0;
}

.work-page > .ulist > li:before,
.work-page > .ulist > li:after {
  display: none;
}

/* Stili per albero archivistico */
.work-page .ulist {
  list-style: none;
  margin: 0;
  padding: 0 0 0 20px;
}

.work-page .ulist li {
  position: relative;
  padding: 3px 0 3px 16px;
  margin: 2px 0;
}

.work-page .ulist li:before {
  content: "";
  position: absolute;
  left: -12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ccc;
}

.work-page .ulist li:after {
  content: "";
  position: absolute;
  left: -12px;
  top: 14px;
  width: 12px;
  height: 2px;
  background: #ccc;
}

.work-page .ulist li:last-child:before {
  height: 14px;
}

.work-page .ulist li a {
  color: #444;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  font-family: Nunito Sans, sans-serif;
}

.work-page .ulist li a:hover {
  color: #000;
  text-decoration: underline;
}

/* Stile per il primo livello */
.work-page > .ulist {
  padding-left: 0;
}

.work-page > .ulist > li:before,
.work-page > .ulist > li:after {
  display: none;
}

.cached-info {
  font-family: Nunito Sans, sans-serif;
  font-size: 12px;
  color: #666;
  margin-left: 10px;
  font-style: italic;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-authors-count {
  font-size: 15px;
  color: #444;
  margin-top: 15px;
  font-weight: 500;
  background: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: inline-block;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #444;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.progress-bar {
  width: 300px;
  height: 8px;
  background: linear-gradient(to right, #f0f0f0, #e0e0e0);
  border-radius: 4px;
  overflow: hidden;
  margin: 0 auto 12px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(to right, #666, #444);
  border-radius: 4px;
  transition: width 0.3s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.progress-text {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.loading-progress {
  margin: 20px 0;
  padding: 15px;
  background: #f8f8f8;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: opacity 0.3s ease;
}

.loading-progress.hide {
  opacity: 0;
  pointer-events: none;
}

.loading-info {
  font-size: 14px;
  color: #888;
  font-style: italic;
  margin: 12px 0;
}

.loading-text {
  font-family: Nunito Sans, sans-serif;
  font-size: 18px;
  color: #444;
  margin-bottom: 15px;
  min-height: 24px;
}

.loading-subtext {
  font-family: Nunito Sans, sans-serif;
  text-align: center;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-message {
  background: #fff1f0;
  border: 1px solid #ffa39e;
  color: #cf1322;
  padding: 15px 20px;
  border-radius: 4px;
  margin: 15px 0;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 2px 4px rgba(207, 19, 34, 0.1);
  position: relative;
  animation: fadeIn 0.3s ease;
}

.error-message::before {
  content: "⚠️";
  margin-right: 8px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading-overlay.error .loading-spinner {
  border-top-color: #cf1322;
  animation: none;
  transform: rotate(45deg);
}

.loading-overlay.error .loading-text {
  color: #cf1322;
}

.loading-overlay.error .progress-bar {
  opacity: 0.5;
}

.loading-overlay.complete .loading-spinner {
  border-top-color: #52c41a;
  animation: none;
  transform: rotate(360deg);
}

.loading-overlay.complete .loading-text {
  color: #52c41a;
}

.loading-overlay.complete .progress-fill {
  background: linear-gradient(to right, #52c41a, #389e0d);
  transition: width 0.5s ease-out;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
}

.breadcrumb img {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.bread-link {
  text-decoration: none;
}

.bread-link:hover {
  text-decoration: underline;
}

.head-container {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.refresh-cache {
  margin-left: auto;
}

.refresh-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f5f5f5;
  border-radius: 4px;
  text-decoration: none;
  color: #444;
  font-family: Nunito Sans, sans-serif;
  font-size: 14px;
  transition: all 0.2s ease;
}

.refresh-button:hover {
  background: #e8e8e8;
  color: #000;
}

.refresh-button img {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.refresh-button:hover img {
  opacity: 0.8;
}

/* Tooltip styles */
.tooltip-container {
  position: relative;
  display: inline-block;
}

.tooltip-image {
  display: none;
  position: absolute;
  z-index: 1000;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  background: white;
  padding: 4px;
}

.tooltip-container:hover .tooltip-image {
  display: block;
}

.tooltip-image img {
  max-width: 150px;
  height: auto;
  display: block;
}

/* Sorting controls styles */
.title-with-sort {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sort-controls {
  display: flex;
  gap: 0.5rem;
}

.sort-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: #f5f5f5;
  transition: all 0.2s ease;
}

.sort-link:hover {
  background: #e8e8e8;
}

.sort-link.active {
  background: #ddd;
}

.sort-link img {
  opacity: 0.6;
  transition: all 0.2s ease;
}

.sort-link:hover img,
.sort-link.active img {
  opacity: 1;
}

.sort-link.sort-desc img {
  transform: rotate(180deg);
}

.sort-link.active.sort-asc img {
  transform: rotate(0deg);
}

.sort-link.active.sort-desc img {
  transform: rotate(180deg);
}
