/* Наше творчество — уютная гостиная + pin-gate для команды */

.creativity-museum-section {
  overflow: hidden;
}

/* —— Carousel of 4 rooms —— */
.museum-carousel {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  outline: none;
}

.museum-carousel__meta {
  text-align: center;
  margin: 0 48px 16px;
}

.museum-carousel__country {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f766e;
}

.museum-carousel__title {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.5vw, 26px);
  color: var(--blue-dark, #1f2f3a);
  font-weight: 500;
}

.museum-carousel__blurb {
  margin: 0 auto;
  max-width: 520px;
  color: var(--muted, #6b6560);
  font-size: 14px;
  line-height: 1.5;
}

.museum-carousel__viewport {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(74, 58, 35, 0.16);
}

.museum-carousel__track {
  position: relative;
}

.museum-nav {
  position: absolute;
  top: 50%;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: 12px;
  border: 1px solid rgba(185, 144, 89, 0.4);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.94);
  color: #5c4a36;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(74, 58, 35, 0.16);
  transform: translateY(-50%);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.museum-nav:hover,
.museum-nav:focus-visible {
  background: #fff;
  border-color: #0f766e;
  color: #0f766e;
  outline: none;
  transform: translateY(-50%) scale(1.04);
}

.museum-nav--prev {
  left: 0;
}

.museum-nav--next {
  right: 0;
}

.museum-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.museum-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(185, 144, 89, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.museum-dot.is-active {
  background: #0f766e;
  transform: scale(1.2);
}

.museum-stage {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: #1a1510;
  aspect-ratio: 16 / 10;
}

.museum-stage[hidden] {
  display: none !important;
}

.museum-stage.is-active {
  display: block;
}

.museum-room {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  user-select: none;
  pointer-events: none;
}

.museum-hotspot {
  position: absolute;
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.22s ease, filter 0.22s ease;
  z-index: 2;
}

.museum-hotspot:hover,
.museum-hotspot:focus-visible {
  transform: translateY(-2px);
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.28));
  outline: none;
}

/* Keep open/closed images in the same box so layout does not jump */
.museum-hotspot .museum-state {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: bottom center;
  pointer-events: none;
  user-select: none;
}

.museum-hotspot .museum-state[hidden] {
  display: none !important;
}

/* Frames — on the walls */
.museum-frame {
  /* stacked natural height from image */
}

.museum-frame img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.22));
}

/* Left wall, mid-height */
.museum-frame--a {
  left: 10%;
  top: 16%;
  width: min(15%, 150px);
}

/* Right wall (before curtain), mid-height */
.museum-frame--b {
  right: 22%;
  top: 18%;
  width: min(13.5%, 132px);
}

/* Cabinet — against left wall, standing on the floor */
.museum-cabinet {
  left: 5%;
  bottom: 6%;
  width: min(30%, 270px);
}

/* Table — right side of room, on the floor */
.museum-table {
  right: 10%;
  bottom: 7%;
  width: min(20%, 180px);
}

/* Per-room placement tweaks (perspective / empty walls differ) */
[data-room-id="jp"] .museum-frame--a {
  left: 14%;
  top: 18%;
  width: min(14%, 132px);
}
[data-room-id="jp"] .museum-frame--b {
  right: 18%;
  top: 20%;
  width: min(12.5%, 120px);
}
[data-room-id="jp"] .museum-cabinet {
  left: 8%;
  bottom: 10%;
  width: min(28%, 240px);
}
[data-room-id="jp"] .museum-table {
  right: 14%;
  bottom: 12%;
  width: min(22%, 190px);
}

[data-room-id="fr"] .museum-frame--a {
  left: 12%;
  top: 20%;
  width: min(14%, 140px);
}
[data-room-id="fr"] .museum-frame--b {
  right: 28%;
  top: 22%;
  width: min(12.5%, 124px);
}
[data-room-id="fr"] .museum-cabinet {
  left: 6%;
  bottom: 8%;
  width: min(26%, 250px);
}
[data-room-id="fr"] .museum-table {
  right: 18%;
  bottom: 9%;
  width: min(18%, 168px);
}

[data-room-id="uk"] .museum-frame--a {
  left: 18%;
  top: 14%;
  width: min(13%, 128px);
}
[data-room-id="uk"] .museum-frame--b {
  right: 26%;
  top: 16%;
  width: min(12%, 118px);
}
[data-room-id="uk"] .museum-cabinet {
  left: 4%;
  bottom: 5%;
  width: min(28%, 255px);
}
[data-room-id="uk"] .museum-table {
  right: 8%;
  bottom: 6%;
  width: min(18%, 165px);
}

/* Soft integration: furniture sits in room light without hard cutout edges */
.museum-cabinet img,
.museum-table img {
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

.museum-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: 150px;
  max-width: 220px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(37, 33, 29, 0.9);
  color: #fff8ef;
  font-size: 0.78rem;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 3;
  white-space: normal;
}

.museum-hotspot:hover .museum-tooltip,
.museum-hotspot[aria-expanded="true"] .museum-tooltip,
.museum-hotspot:focus-visible .museum-tooltip {
  opacity: 1;
}

.museum-hint {
  text-align: center;
  margin: 16px 0 0;
  color: var(--muted, #6f665b);
  font-size: 0.95rem;
}

/* —— PIN gate (team only) —— */
html.creativity-pin-locked,
html.creativity-pin-locked body {
  overflow: hidden !important;
}

html.creativity-pin-locked body > *:not(.creativity-pin-gate) {
  visibility: hidden !important;
  pointer-events: none !important;
}

.creativity-pin-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(185, 144, 89, 0.18), transparent 55%),
    #f7f1e6;
  visibility: visible !important;
  pointer-events: auto !important;
}

.creativity-pin-panel {
  width: min(400px, 100%);
  padding: 28px 24px 24px;
  border-radius: 20px;
  background: #fffdf8;
  border: 1px solid rgba(185, 144, 89, 0.28);
  box-shadow: 0 24px 60px rgba(74, 58, 35, 0.14);
  text-align: center;
}

.creativity-pin-logo {
  display: block;
  height: 44px;
  width: auto;
  margin: 0 auto 14px;
  object-fit: contain;
}

.creativity-pin-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8b6a32;
}

.creativity-pin-title {
  margin: 0 0 10px;
  font-size: 24px;
  color: #1f2f3a;
}

.creativity-pin-text {
  margin: 0 0 18px;
  color: #6b6560;
  font-size: 14px;
  line-height: 1.5;
}

.creativity-pin-form {
  display: grid;
  gap: 10px;
  text-align: left;
}

.creativity-pin-label {
  font-size: 13px;
  color: #6b6560;
}

.creativity-pin-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(185, 144, 89, 0.35);
  border-radius: 12px;
  background: #f6f1e8;
  font: inherit;
  font-size: 18px;
  letter-spacing: 0.2em;
  text-align: center;
  box-sizing: border-box;
}

.creativity-pin-input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  border-color: #0f766e;
  background: #fff;
}

.creativity-pin-error {
  margin: 0;
  color: #9a4c39;
  font-size: 13px;
  text-align: center;
}

.creativity-pin-submit {
  width: 100%;
  margin-top: 4px;
}

.creativity-pin-back {
  display: inline-block;
  margin-top: 16px;
  color: #8b6a32;
  font-size: 14px;
  text-decoration: none;
}

.creativity-pin-back:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .museum-nav {
    width: 42px;
    height: 42px;
    font-size: 24px;
  }

  .museum-nav--prev {
    left: 6px;
  }

  .museum-nav--next {
    right: 6px;
  }

  .museum-carousel__meta {
    margin-left: 8px;
    margin-right: 8px;
  }
}

@media (max-width: 720px) {
  .museum-stage {
    aspect-ratio: 3 / 4;
  }

  .museum-frame--a {
    left: 6%;
    top: 14%;
    width: min(26%, 110px);
  }

  .museum-frame--b {
    right: 8%;
    top: 16%;
    width: min(24%, 100px);
  }

  .museum-cabinet {
    left: 3%;
    bottom: 5%;
    width: min(48%, 200px);
  }

  .museum-table {
    right: 4%;
    bottom: 6%;
    width: min(36%, 140px);
  }

  .museum-nav {
    top: auto;
    bottom: 12px;
    transform: none;
    margin-top: 0;
  }

  .museum-nav:hover,
  .museum-nav:focus-visible {
    transform: scale(1.04);
  }
}
