/* Reusable collapsible tutorial sections */
.tutorial-section {
  margin: 1rem 0;
  overflow: hidden;
  border: 1px solid #cccccc;
  border-radius: 10px;
  background: #ffffff;
}

.tutorial-section summary {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 18px 56px 18px 20px;
  cursor: pointer;
  list-style: none;
  background: #f2f2f2;
}

.tutorial-section summary::-webkit-details-marker {
  display: none;
}

.tutorial-section summary:hover {
  background: #e8e8e8;
}

.tutorial-section summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 20px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: darkred;
  font-size: 1.6rem;
  line-height: 1;
  transform: translateY(-50%);
}

.tutorial-section[open] summary::after {
  content: "−";
}

.section-title {
  color: #222222;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
}

.section-description {
  color: #555555;
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.45;
}

.section-content {
  padding: 20px;
  border-top: 1px solid #cccccc;
}

.section-content > :first-child {
  margin-top: 0;
}

.section-content > :last-child {
  margin-bottom: 0;
}

/* Reusable interactive image component */
.interactive-image {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.8fr);
  gap: 24px;
  align-items: start;
  margin: 1.5rem 0;
}

.interactive-image__visual {
  position: relative;
  overflow: hidden;
  border: 1px solid #cccccc;
  border-radius: 10px;
  background: #ffffff;
}

.interactive-image__visual img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
}

.image-hotspot {
  position: absolute;
  top: var(--hotspot-y);
  left: var(--hotspot-x);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 3px solid rgb(255 255 255 / 75%);
  border-radius: 50%;
  background: darkred;
  box-shadow: 0 2px 8px rgb(0 0 0 / 25%);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.5;
  transform: translate(-50%, -50%);
  transition:
    opacity 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.image-hotspot:hover {
  opacity: 0.75;
  transform: translate(-50%, -50%) scale(1.08);
}

.image-hotspot:focus-visible {
  outline: 4px solid #1a73e8;
  outline-offset: 3px;
  opacity: 0.85;
}

.image-hotspot.is-active {
  opacity: 1;
  box-shadow:
    0 0 0 4px rgb(255 255 255 / 90%),
    0 0 0 7px darkred;
}

.interactive-image__information {
  min-height: 220px;
  padding: 22px;
  border: 1px solid #cccccc;
  border-radius: 10px;
  background: #f2f2f2;
}

.image-information-panel > :first-child {
  margin-top: 0;
}

.image-information-panel > :last-child {
  margin-bottom: 0;
}

.image-information-panel h3 {
  margin: 0 0 10px;
  color: darkred;
  font-size: 1.3rem;
}

.image-information-panel__number {
  margin: 0 0 5px;
  color: #555555;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .interactive-image {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .interactive-image__information {
    min-height: 0;
  }

  .image-hotspot {
    width: 34px;
    height: 34px;
    border-width: 2px;
    font-size: 0.9rem;
  }
}

@media print {
  .interactive-image {
    display: block;
  }

  .image-hotspot {
    display: none;
  }

  .interactive-image__information {
    margin-top: 1rem;
  }

  .image-information-panel[hidden] {
    display: block;
    margin-top: 1rem;
  }
}
