/* memoryPath.css – Stile aggiornato moderno per Digital Adriatic */

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  background-color: #f5f7fa;
}

#tour-menu {
  background: linear-gradient(to right, #ffffff, #f4f4f4);
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  border-radius: 0 0 12px 12px;
}

#tourSelect {
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  background-color: white;
  width: 220px;
}


#progress {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 0.95rem;
  color: #333;
  width: 220px;
  position: relative;
}

.progress-text {
  font-weight: bold;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(to right, #00b4d8, #0077b6);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.4s ease-out;
}

#narrative {
  width: 40%;
  overflow-y: scroll;
  padding: 7rem 2.5rem 3rem 2.5rem;
  background: #ffffff;
  box-shadow: inset -1px 0 4px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}

#narrative::before {
  content: "📘 Storia selezionata";
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding: 0.5rem;
  color: #333;
  border-bottom: 1px solid #ddd;
}

.chapter {
  border-left: 4px solid #d0d0d0;
  padding: 4rem 3rem;
  margin-left: 0;
  margin-bottom: 5rem;
  background: transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
  min-height: 650px;
  transition: all 0.3s ease;
  position: relative;
}

.chapter::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 3rem;
  width: 12px;
  height: 12px;
  background-color: #d0d0d0;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #fff;
}

.chapter.active {
  border-left: 6px solid #0077b6;
  background: linear-gradient(to right, rgba(0, 119, 182, 0.04), transparent);
}

.chapter.active::before {
  background-color: #0077b6;
}




.chapter h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.chapter blockquote {
  font-style: italic;
  color: #555;
  margin: 0.5rem 0 1.5rem;
  padding-left: 1.5rem;
  border-left: 3px solid #ccc;
}

.chapter img {
  max-width: 100%;
  border-radius: 10px;
  margin-top: 2.5rem;
}

.chapter audio {
  width: 100%;
  margin-top: 2.5rem;
}

/* 🎩 Classic Numbered Markers */
.custom-div-icon .marker-number {
  background: #f5f5f5;
  color: #6a6a6a;
  font-weight: 500;
  font-family: 'Inter', -apple-system, sans-serif;
  border-radius: 50%;
  text-align: center;
  line-height: 36px;
  width: 36px;
  height: 36px;
  font-size: 0.95rem;
  border: 1px solid #e0e0e0;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.05);
  transition: 
    all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 🎯 Selected State - Color Shift */
.custom-div-icon .marker-number.active {
  background: #4a90e2;
  color: white;
  border-color: #3a7bc8;
  font-weight: 600;
  box-shadow:
    0 3px 8px rgba(74, 144, 226, 0.2);
}

/* ✨ Hover States */
.custom-div-icon .marker-number:hover:not(.active) {
  background: #eaeaea;
  color: #5a5a5a;
}

.custom-div-icon .marker-number.active:hover {
  background: #3a7bc8;
  box-shadow:
    0 4px 10px rgba(74, 144, 226, 0.3);
}



.chapter-number {
  color: #4a90e2;
  font-weight: bold;
  margin-right: 0.5rem;
}

#map {
  flex-grow: 1;
  margin: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.note-section {
  font-size: 0.85rem;
  color: #444;
  margin-top: 2rem;
  border-top: 1px solid #ccc;
  padding-top: 1rem;
  line-height: 1.5;
  font-style: normal;
}

.note-section h3,
.fonti-box h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.note-section ol,
.fonti-box ol {
  padding-left: 1.5rem;
  margin: 0;
}

.note-section li,
.fonti-box li {
  margin-bottom: 0.4rem;
  transition: background 0.5s;
}

.fonti-box li:target {
  background-color: rgba(255, 255, 0, 0.3);
  scroll-margin-top: 4rem;
}

/* Superscript note references */
sup[data-note] {
  font-size: 0.75rem;
  vertical-align: super;
  color: #0077b6;
  cursor: pointer;
  margin-left: 2px;
  font-weight: bold;
}

sup[data-note]:hover {
  text-decoration: underline;
}

/* Optional: style for emphasized text */
.descrizione-storica em {
  font-style: italic;
}

@media (max-width: 768px) {
  html, body {
    height: 100%;
    overflow: hidden;
  }

  #cv-container {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  #map {
    position: sticky;
    top: 70px;
    z-index: 500;
    width: 100%;
    height: 50vh;
    order: -1;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  #narrative {
    width: 100%;
    overflow-y: auto;
    height: 50vh;
    padding: 1rem;
    box-shadow: none;
    scroll-behavior: smooth;
  }

  .chapter {
    padding: 1.5rem 1rem;
    margin-bottom: 2rem;
    min-height: auto;
  }

  .chapter h2 {
    font-size: 1.3rem;
  }

  #narrative::before {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  #tour-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
  }
}


/* Move Leaflet Zoom Controls to the Right */
.leaflet-control-zoom {
  position: absolute !important;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.8));
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hide on Mobile */
@media (max-width: 640px) {
  .leaflet-control-zoom {
    display: none !important;
  }
}

.leaflet-control-zoom a {
  color: #f1f5f9;
  font-weight: 600;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  background-color: transparent;
  padding: 0.5rem 0.75rem;
  display: block;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.leaflet-control-zoom a:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.leaflet-control-zoom a:hover {
  background-color: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  transform: scale(1.08);
}

