/* ── Mostra page layout ── */

.mostra-page {
  min-height: 100vh;
}

.mostra-page button,
.mostra-page a,
.mostra-page .isola-pin,
.mostra-page .legend-item,
.mostra-page .isola-nav-btn,
.mostra-page .isola-modal-close {
  cursor: none;
}

/* Static background — replaces animated aurora */
.mostra-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% 30%, rgba(211, 171, 243, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 75% 60%, rgba(128, 64, 245, 0.10), transparent 55%),
    radial-gradient(ellipse 50% 35% at 50% 10%, rgba(255, 69, 192, 0.06), transparent 50%),
    linear-gradient(180deg, #0c0918 0%, #120e26 50%, #0c0918 100%);
}

/* Header */
.mostra-header {
  padding: 140px 48px 48px;
  max-width: 900px;
  position: relative;
  z-index: 2;
}

.mostra-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1.05;
  margin: 16px 0 20px;
  color: var(--sand);
}

.mostra-title-accent {
  color: var(--accent-light);
}

.mostra-subtitle {
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: rgba(248, 244, 255, 0.45);
  max-width: 480px;
  letter-spacing: 0.04em;
  line-height: 1.8;
}

/* Map section */
.mostra-map-section {
  padding: 0 0 80px;
  position: relative;
  z-index: 2;
}

.mostra-map-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  cursor: none;
  background: #111111;
}

.mostra-map-img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  border: 1px solid rgba(200, 150, 255, 0.12);
}

.mostra-overlays {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Isle pins */
.isola-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: all;
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--accent-light);
  background: rgba(12, 9, 24, 0.85);
  color: var(--accent-light);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(4px);
  z-index: 10;
}

.isola-pin:hover,
.isola-pin.active {
  background: var(--accent);
  color: var(--sand);
  border-color: var(--accent);
  transform: translate(-50%, -50%) scale(1.18);
  box-shadow: 0 0 0 6px rgba(128, 64, 245, 0.25), 0 0 20px rgba(128, 64, 245, 0.4);
}

.isola-pin-num {
  display: block;
  line-height: 1;
  color: inherit;
  opacity: 1;
  font-variant-numeric: tabular-nums;
  text-rendering: geometricPrecision;
}

/* Legend */
.mostra-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 48px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border: 1px solid rgba(200, 150, 255, 0.15);
  border-radius: 999px;
  background: transparent;
  color: rgba(248, 244, 255, 0.5);
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.04em;
  cursor: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.legend-item:hover,
.legend-item.active {
  border-color: var(--accent-light);
  color: var(--sand);
}

.legend-item.active {
  background: rgba(128, 64, 245, 0.09);
}

.legend-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.legend-name {
  white-space: nowrap;
}

/* ── Modal ── */

.isola-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.isola-modal[hidden] {
  display: none;
}

.isola-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 12, 0.88);
  backdrop-filter: blur(10px);
}

.isola-modal-panel {
  position: relative;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(200, 150, 255, 0.06), rgba(200, 150, 255, 0.02)),
    rgba(12, 8, 28, 0.97);
  border: 1px solid rgba(200, 150, 255, 0.18);
  border-radius: 4px;
  width: min(640px, calc(100vw - 40px));
  max-height: calc(100vh - 80px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(128, 64, 245, 0.08);
}

.isola-modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 48px;
}

.isola-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(200, 150, 255, 0.24);
  border-radius: 50%;
  background: rgb(12, 8, 28);
  color: var(--accent-light);
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}

.isola-modal-close svg {
  pointer-events: none;
}

.isola-modal-close:hover {
  color: var(--sand);
  border-color: var(--accent-light);
}

.isola-modal-kicker {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-light);
  opacity: 0.7;
  margin: 0 0 12px;
}

.isola-modal-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  font-style: italic;
  color: var(--sand);
  margin: 0 0 8px;
  line-height: 1.2;
}

.isola-modal-subtitle {
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: rgba(248, 244, 255, 0.4);
  margin: 0 0 32px;
  letter-spacing: 0.04em;
}

.isola-modal-content {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.9;
  opacity: 0.78;
  letter-spacing: 0.04em;
  color: var(--sand);
}

.isola-modal-content p {
  margin: 0 0 16px;
}

.isola-modal-content p:last-child {
  margin-bottom: 0;
}

.isola-modal-content strong {
  color: var(--sand);
  opacity: 1;
  font-weight: 500;
}

.isola-empty {
  opacity: 0.35;
  font-style: italic;
}

/* ── Instrument list inside section modal ── */

.strumenti-list {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(200, 150, 255, 0.1);
}

.strumenti-list-title {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-light);
  opacity: 0.7;
  margin: 0 0 14px;
}

.strumenti-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.strumento-list-btn {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent-light);
  background: transparent;
  border: 1px solid rgba(200, 150, 255, 0.22);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.strumento-list-btn:hover {
  color: var(--sand);
  border-color: var(--accent-light);
  background: rgba(128, 64, 245, 0.09);
}

.strumento-list-name {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(248, 244, 255, 0.3);
  border: 1px solid rgba(200, 150, 255, 0.08);
  border-radius: 999px;
  padding: 6px 14px;
  font-style: italic;
}

/* ── Strumento detail modal ── */

.strumento-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.strumento-modal[hidden] {
  display: none;
}

.strumento-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 12, 0.6);
  backdrop-filter: blur(6px);
}

.strumento-modal-panel {
  position: relative;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(200, 150, 255, 0.06), rgba(200, 150, 255, 0.02)),
    rgba(12, 8, 28, 0.98);
  border: 1px solid rgba(200, 150, 255, 0.18);
  border-radius: 4px;
  width: min(560px, calc(100vw - 40px));
  max-height: calc(100vh - 60px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.8), 0 0 60px rgba(128, 64, 245, 0.1);
}

.strumento-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(200, 150, 255, 0.24);
  border-radius: 50%;
  background: rgb(12, 8, 28);
  color: var(--accent-light);
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}

.strumento-modal-close svg {
  pointer-events: none;
}

.strumento-modal-close:hover {
  color: var(--sand);
  border-color: var(--accent-light);
}

.strumento-modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 40px 40px 40px;
}

.strumento-modal-year {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-light);
  opacity: 0.65;
  margin: 0 0 8px;
}

.strumento-modal-title {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 400;
  font-style: italic;
  color: var(--sand);
  margin: 0 0 24px;
  line-height: 1.2;
}

.strumento-modal-carousel {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0e0b1e;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid rgba(200, 150, 255, 0.08);
}

.strumento-carousel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.25s;
}

.strumento-carousel-img.active {
  opacity: 1;
}

.strumento-carousel-prev,
.strumento-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(12, 8, 28, 0.72);
  border: 1px solid rgba(200, 150, 255, 0.22);
  color: var(--accent-light);
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.strumento-carousel-prev svg,
.strumento-carousel-next svg {
  pointer-events: none;
}

.strumento-carousel-prev { left: 8px; }
.strumento-carousel-next { right: 8px; }

.strumento-carousel-prev:hover,
.strumento-carousel-next:hover {
  background: rgba(128, 64, 245, 0.28);
  border-color: var(--accent-light);
  color: var(--sand);
}

.strumento-carousel-nav {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.strumento-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(248, 244, 255, 0.25);
  border: none;
  padding: 0;
  cursor: none;
  transition: background 0.2s;
}

.strumento-carousel-dot.active {
  background: var(--accent-light);
}

.strumento-modal-content {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.9;
  opacity: 0.78;
  letter-spacing: 0.04em;
  color: var(--sand);
}

.strumento-modal-content p {
  margin: 0 0 16px;
}

.strumento-modal-content p:last-child {
  margin-bottom: 0;
}



.isola-modal-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(200, 150, 255, 0.1);
  gap: 12px;
}

.isola-nav-btn {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: transparent;
  border: 1px solid rgba(200, 150, 255, 0.2);
  border-radius: 999px;
  padding: 10px 18px;
  cursor: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.isola-nav-btn:hover:not(:disabled) {
  color: var(--sand);
  border-color: var(--accent-light);
  background: rgba(128, 64, 245, 0.09);
}

.isola-nav-btn:disabled {
  opacity: 0.2;
  cursor: default;
}

/* ── Orari ── */
.orari-section {
  padding: 80px 48px;
  max-width: 900px;
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(200, 150, 255, 0.1);
}

.orari-soon {
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: rgba(248, 244, 255, 0.35);
  font-style: italic;
  margin-top: 40px;
}

.orari-soon a {
  color: inherit;
  transition: color 0.3s ease;
}

.orari-soon a:hover {
  color: #fff;
}

.orari-grid {
  display: flex;
  flex-direction: column;
  margin-top: 40px;
}

.orari-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(200, 150, 255, 0.07);
}

.orari-row:first-child {
  border-top: 1px solid rgba(200, 150, 255, 0.07);
}

.orari-day {
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--sand);
  opacity: 0.85;
}

.orari-time {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--accent-light);
  white-space: nowrap;
}

/* Body lock when modal open */
body.modal-open {
  overflow: hidden;
}

/* Debug overlay */
.debug-coords {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(5, 3, 12, 0.9);
  border: 1px solid var(--accent-light);
  color: var(--accent-light);
  font-family: monospace;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 4px;
  z-index: 9999;
  pointer-events: none;
}

@media (max-width: 768px) {
  /* Header & legend */
  .mostra-header {
    padding: 110px 24px 32px;
  }

  .mostra-legend {
    padding: 16px 24px 0;
  }

  .legend-name {
    white-space: normal;
  }

  /* Map pins */
  .isola-pin {
    width: 26px;
    height: 26px;
    font-size: 0.7rem;
  }

  .isola-pin:hover,
  .isola-pin.active {
    transform: translate(-50%, -50%) scale(1.12);
  }

  /* Isola modal — bottom sheet */
  .isola-modal {
    align-items: flex-end;
  }

  .isola-modal-panel {
    align-self: flex-end;
    border-radius: 12px 12px 0 0;
    height: 95vh;
    max-height: 95vh;
    width: 100%;
  }

  .isola-modal-scroll {
    padding: 32px 24px;
  }

  /* Instrument chips — larger tap target */
  .strumento-list-btn,
  .strumento-list-name {
    padding: 9px 14px;
    font-size: 14px;
  }

  /* Strumento modal — bottom sheet */
  .strumento-modal {
    align-items: flex-end;
  }

  .strumento-modal-panel {
    align-self: flex-end;
    border-radius: 12px 12px 0 0;
    height: 95vh;
    max-height: 95vh;
    width: 100%;
  }

  .strumento-modal-scroll {
    padding: 32px 24px;
  }

  /* Carousel arrows — larger tap target on touch */
  .strumento-carousel-prev,
  .strumento-carousel-next {
    width: 40px;
    height: 40px;
  }

  /* Orari */
  .orari-section {
    padding: 60px 24px;
  }

  .orari-row {
    flex-direction: column;
    gap: 4px;
  }
}

@media (pointer: coarse), (hover: none) {
  .mostra-page button,
  .mostra-page a,
  .mostra-page .isola-pin,
  .mostra-page .legend-item,
  .mostra-page .isola-nav-btn,
  .mostra-page .isola-modal-close,
  .mostra-page .strumento-modal-close,
  .mostra-page .strumento-list-btn,
  .mostra-page .strumento-carousel-prev,
  .mostra-page .strumento-carousel-next,
  .mostra-page .strumento-carousel-dot {
    cursor: pointer;
  }

  .mostra-map-container {
    cursor: auto;
  }
}
