/* ============================================================
   museum360.css — универсальный 360-вьювер для карточек музея
   Заменяет donbass360.css. Пространство имён .m360-*
   ============================================================ */

/* --- Бейдж "360°" на превью карточки --- */
.m360-badge{
  position:absolute; right:10px; bottom:10px;
  background:rgba(11,187,239,.92); color:#fff;
  font:600 13px/1 Arial,sans-serif;
  padding:7px 10px; border-radius:20px;
  letter-spacing:.5px; pointer-events:none;
}

/* --- Оверлей модального окна --- */
.m360-overlay{
  display:none; position:fixed; inset:0;
  background:rgba(0,0,0,.85); z-index:99999;
  opacity:0; transition:opacity .3s ease;
  padding:20px; box-sizing:border-box;
  align-items:center; justify-content:center;
}
.m360-overlay.active{ display:flex; opacity:1; }

/* --- Контент модалки --- */
.m360-content{
  background:#fff; border-radius:8px; padding:30px;
  max-width:1100px; width:100%; max-height:92vh;
  overflow-y:auto; position:relative;
  display:flex; flex-direction:column; gap:24px;
  box-sizing:border-box;
  font-family:var(--t-text-font,Arial),sans-serif;
}
@media(min-width:768px){
  .m360-content{ flex-direction:row; align-items:flex-start; }
}

.m360-close{
  position:absolute; top:12px; right:18px;
  font-size:34px; line-height:1; color:#888;
  cursor:pointer; z-index:10; user-select:none;
}
.m360-close:hover{ color:#1a3b5c; }

/* --- Левая колонка: сцена + слайдер --- */
.m360-viewer{
  flex:0 0 55%; min-width:0;
  display:flex; flex-direction:column; gap:12px;
}

.m360-stage{
  position:relative; user-select:none;
  touch-action:pan-y; cursor:grab;
  background:#f5f7f9; border-radius:6px;
  overflow:hidden; aspect-ratio:3/2;
}
.m360-stage.dragging{ cursor:grabbing; }
.m360-stage img{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:contain; opacity:0;
}
.m360-stage img.is-active{ opacity:1; }

.m360-hint{
  position:absolute; left:50%; bottom:10px;
  transform:translateX(-50%);
  background:rgba(26,59,92,.8); color:#fff;
  font-size:13px; padding:6px 12px; border-radius:16px;
  white-space:nowrap; transition:opacity .4s;
  pointer-events:none;
}

.m360-loader{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  background:#f5f7f9; color:#1a3b5c; font-size:15px; z-index:5;
}

/* --- Слайдер (ползунок) под сценой --- */
.m360-controls{
  display:flex; align-items:center; gap:12px;
}
.m360-range{
  -webkit-appearance:none; appearance:none;
  flex:1; height:4px; border-radius:2px;
  background:#d5dde5; outline:none; cursor:pointer;
  margin:0;
}
.m360-range::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none;
  width:18px; height:18px; border-radius:50%;
  background:#0bbbef; border:2px solid #fff;
  box-shadow:0 1px 4px rgba(0,0,0,.3); cursor:grab;
}
.m360-range::-moz-range-thumb{
  width:18px; height:18px; border-radius:50%;
  background:#0bbbef; border:2px solid #fff;
  box-shadow:0 1px 4px rgba(0,0,0,.3); cursor:grab;
}
.m360-range:focus-visible{ outline:2px solid #2015FF; outline-offset:3px; }

.m360-counter{
  font:600 13px/1 Arial,sans-serif; color:#1a3b5c;
  min-width:62px; text-align:right; white-space:nowrap;
}

/* --- Правая колонка: описание --- */
.m360-info{ flex:1; min-width:0; }
.m360-title{
  font-size:24px; color:#1a3b5c; font-weight:700;
  margin-bottom:15px; line-height:1.3;
}
.m360-descr{
  font-size:15px; line-height:1.55; color:#333; margin:0 0 15px;
}
.m360-table{
  width:100%; border-collapse:collapse; margin-top:15px;
  font-size:15px; line-height:1.4;
}
.m360-table th,.m360-table td{
  border:1px solid #e0e0e0; padding:10px 15px;
  text-align:left; vertical-align:top;
}
.m360-table th{
  background:#f5f7f9; color:#1a3b5c;
  width:35%; font-weight:600;
}

/* --- Мобильная адаптация --- */
@media(max-width:767px){
  .m360-content{ padding:20px; }
  .m360-viewer{ flex:none; width:100%; }
  .m360-title{ font-size:20px; }
  .m360-table th{ width:42%; }
}

/* --- Статичное изображение в модалке (без 360) --- */
.m360-static{
  flex:0 0 45%; min-width:0; text-align:center;
}
.m360-static img{
  max-width:100%; height:auto;
  border-radius:6px; max-height:460px;
  object-fit:contain; background:#f5f7f9;
}
@media(max-width:767px){
  .m360-static{ flex:none; width:100%; }
  .m360-static img{ max-height:320px; }
}

/* --- Галерея из нескольких статичных фото --- */
.m360-gallery{
  flex:0 0 48%; min-width:0;
  display:flex; flex-direction:column; gap:12px;
}
.m360-gallery-main{
  position:relative; background:#f5f7f9;
  border-radius:6px; overflow:hidden;
  aspect-ratio:4/3;
}
.m360-gallery-main img{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:contain; opacity:0;
  transition:opacity .25s ease;
}
.m360-gallery-main img.is-active{ opacity:1; }

.m360-nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:38px; height:38px; border:none; border-radius:50%;
  background:rgba(26,59,92,.75); color:#fff;
  font:400 20px/1 Arial,sans-serif; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:background .2s; z-index:3; padding:0;
}
.m360-nav:hover{ background:rgba(11,187,239,.95); }
.m360-nav-prev{ left:10px; }
.m360-nav-next{ right:10px; }

.m360-thumbs{
  display:flex; gap:10px; justify-content:center;
}
.m360-thumb{
  width:72px; height:54px; border-radius:4px;
  overflow:hidden; cursor:pointer; padding:0;
  border:2px solid transparent; background:#f5f7f9;
  transition:border-color .2s;
}
.m360-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.m360-thumb.is-active{ border-color:#0bbbef; }
.m360-thumb:hover{ border-color:#1a3b5c; }

@media(max-width:767px){
  .m360-gallery{ flex:none; width:100%; }
  .m360-thumb{ width:58px; height:44px; }
}