/* ===== Photos page ===== id377 */

.dm-photos{
  position:relative;
  min-height:100vh;
  overflow:hidden;
  padding:32px 0 130px;
  box-sizing:border-box;
}

.dm-photos .dm-bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  z-index:0;
  pointer-events:none;
}

.dm-photos::after{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(255,255,255,.18);
  z-index:1;
  pointer-events:none;
}

.dm-photos__wrap{
  position:relative;
  z-index:2;
  max-width:1180px;
  margin:0 auto;
  padding:0 20px 140px;
  box-sizing:border-box;
}

.dm-photos__card{
  background:#fff;
  color:#14213d;
  border:2px solid #1a3365;
  border-radius:14px;
  padding:24px;
  box-shadow:0 10px 26px rgba(26,51,101,.12);
  box-sizing:border-box;
}

.dm-photos__head{
  margin:0 0 26px;
  text-align:center;
}

.dm-photos__title{
  margin:0 0 12px;
  font-family:"Gunplay", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight:400;
  letter-spacing:.02em;
  font-size:clamp(30px, 3vw, 48px);
  line-height:1.05;
  color:#1a3365;
}

.dm-photos__lead{
  max-width:760px;
  margin:0 auto;
  font-size:18px;
  line-height:1.55;
  color:#14213d;
  opacity:.9;
}

/* ===== gallery ===== */

.dm-photos__grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  grid-auto-rows:180px;
  grid-auto-flow:dense;
  gap:16px;
}

.dm-photos__item{
  display:block;
  margin:0;
  overflow:hidden;
  border:2px solid #1a3365;
  border-radius:14px;
  background:#f2f4f8;
  box-shadow:0 8px 20px rgba(26,51,101,.08);
  text-decoration:none;
  color:inherit;
  cursor:pointer;
}

.dm-photos__item img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .25s ease;
}

.dm-photos__item--big{
  grid-column:span 2;
  grid-row:span 2;
}

.dm-photos__item--wide{
  grid-column:span 2;
  grid-row:span 1;
}

.dm-photos__item--tall{
  grid-column:span 1;
  grid-row:span 2;
}

/* закрывает нижний левый слот перед двумя wide-карточками */
.dm-photos__grid > .dm-photos__item:nth-child(16){
  grid-column:span 2;
  grid-row:span 1;
}

@media (hover:hover) and (pointer:fine){
  .dm-photos__item:hover img{
    transform:scale(1.035);
  }
}

/* ===== tablet ===== */
@media (max-width:1024px){
  .dm-photos{
    padding-top:24px;
    padding-bottom:110px;
  }

  .dm-photos__wrap{
    padding:0 20px 110px;
  }

  .dm-photos__grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    grid-auto-rows:190px;
    grid-auto-flow:dense;
    gap:14px;
  }

  .dm-photos__item--big,
  .dm-photos__item--wide,
  .dm-photos__grid > .dm-photos__item:nth-child(16){
    grid-column:span 2;
  }

  .dm-photos__item--tall{
    grid-column:span 1;
    grid-row:span 2;
  }
}

/* ===== mobile ===== */
@media (max-width:700px){
  .dm-photos{
    padding:18px 0 96px;
  }

  .dm-photos__wrap{
    padding:0 12px 96px;
  }

  .dm-photos__card{
    padding:14px;
    border-radius:14px;
  }

  .dm-photos__head{
    margin-bottom:18px;
  }

  .dm-photos__lead{
    font-size:15px;
    text-align:left;
  }

  .dm-photos__grid{
    grid-template-columns:1fr;
    grid-auto-rows:auto;
    gap:14px;
  }

  .dm-photos__item,
  .dm-photos__item--big,
  .dm-photos__item--wide,
  .dm-photos__item--tall,
  .dm-photos__grid > .dm-photos__item:nth-child(16){
    grid-column:auto;
    grid-row:auto;
    height:220px;
  }
}

/* ===== landscape phones ===== */
@media (max-width:1023px) and (orientation:landscape){
  .dm-photos{
    padding-top:14px;
    padding-bottom:80px;
  }

  .dm-photos__card{
    padding:14px;
  }

  .dm-photos__title{
    font-size:30px;
  }

  .dm-photos__lead{
    font-size:15px;
  }

  .dm-photos__grid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
    grid-auto-rows:150px;
    grid-auto-flow:dense;
    gap:12px;
  }

  .dm-photos__item--big,
  .dm-photos__item--wide,
  .dm-photos__grid > .dm-photos__item:nth-child(16){
    grid-column:span 2;
  }

  .dm-photos__item--tall{
    grid-column:span 1;
    grid-row:span 2;
  }
}

/* ===== Photos page scroll fix id377 ===== */

body.dm #page main.site-main:has(.dm-photos),
body.dm #page .site-main:has(.dm-photos){
  display:block !important;
  place-items:unset !important;
  overflow:visible !important;
  min-height:100dvh !important;
}

body.dm .dm-stage.dm-photos{
  width:100% !important;
  max-width:none !important;
  height:auto !important;
  min-height:100dvh !important;
  max-height:none !important;
  aspect-ratio:auto !important;
  overflow:visible !important;
  margin:0 !important;
}

.dm-stage.dm-photos::after{
  display:none !important;
}

.dm-photos .dm-bg{
  position:fixed !important;
  inset:0 !important;
  width:100vw !important;
  height:100dvh !important;
}

/* ===== Photos fixed footer ===== */

body.dm:has(.dm-photos) .dm-footer,
body.dm:has(.dm-photos) footer.site-footer{
  position:fixed !important;
  left:0 !important;
  right:0 !important;
  bottom:0 !important;
  z-index:9999 !important;
}

body.dm:has(.dm-photos) .dm-main{
  padding-bottom:140px !important;
}

@media (max-width:1400px){
  body.dm:has(.dm-photos) .dm-main{
    padding-bottom:110px !important;
  }
}

@media (max-width:1024px){
  body.dm:has(.dm-photos) .dm-main{
    padding-bottom:96px !important;
  }
}

/* ===== back button ===== */

.dm-photos__back{
  position:fixed;
  top:24px;
  right:24px;
  z-index:10000000;

  height:64px;
  min-width:180px;
  padding:0 24px;

  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;

  font-size:24px;
  line-height:1;
  text-decoration:none;
}

@media (max-width:1023px){
  .dm-photos__back{
    top:auto;
    right:auto;

    left:14px;
    bottom:calc(30px + env(safe-area-inset-bottom));

    height:69px;
    min-width:180px;
    padding:14px 20px;

    border-radius:16px !important;
    border-width:2px;

    font-size:22px;
    line-height:1;
  }
}

@media (max-width:1023px) and (orientation:landscape){
  .dm-photos__back{
    left:auto;
    right:calc(env(safe-area-inset-right) + 6px);
    bottom:calc(env(safe-area-inset-bottom) + 44px);

    width:96px;
    height:32px;
    min-width:96px;

    padding:6px 10px;

    font-size:12px;
    border-radius:10px !important;
  }
}

/* ===== Photos lightbox ===== */

.dm-photos-lightbox{
  position:fixed;
  inset:0;
  z-index:10000050;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  box-sizing:border-box;
  background:rgba(26,51,101,.72);
}

.dm-photos-lightbox.hidden{
  display:none !important;
}

.dm-photos-lightbox__img{
  display:block;
  max-width:min(96vw, 1600px);
  max-height:88vh;
  object-fit:contain;
  border:2px solid #1a3365;
  border-radius:14px;
  background:#fff;
  box-shadow:0 18px 60px rgba(26,51,101,.32);
}

.dm-photos-lightbox__close{
  position:fixed;
  top:18px;
  right:18px;
  width:58px;
  height:58px;
  border:2px solid #1a3365;
  border-radius:14px;
  background:#fff;
  color:#1a3365;
  cursor:pointer;
  font-family:"Gunplay",sans-serif;
  font-size:34px;
  line-height:1;
}

@media (max-width:700px){
  .dm-photos-lightbox{
    padding:12px;
  }

  .dm-photos-lightbox__close{
    top:10px;
    right:10px;
    width:50px;
    height:50px;
    font-size:28px;
  }
}

/* ===== id377 first photo: show full neon/cookie image, no crop ===== */
.dm-photos__grid > .dm-photos__item:first-child{
  background:#05070c !important;
}

.dm-photos__grid > .dm-photos__item:first-child img{
  object-fit:contain !important;
  object-position:center center !important;
}


/* ===== FINAL 2026-06-30: first photo smaller inside card ===== */
.dm-photos__grid > .dm-photos__item:first-child{
  background:#05070c !important;
  overflow:hidden !important;
}

.dm-photos__grid > .dm-photos__item:first-child img{
  object-fit:contain !important;
  object-position:center center !important;
  width:100% !important;
  height:100% !important;
  transform:scale(.86) !important;
  transform-origin:center center !important;
}

@media (max-width:700px){
  .dm-photos__grid > .dm-photos__item:first-child img{
    transform:scale(.82) !important;
  }
}

/* ===== FINAL FIX: About/Photo EXIT button same sign style as simple booking ===== */
.dm-about__back.wbc-auth-btn,
.dm-photos__back.wbc-auth-btn{
  background:#0065e7 !important;
  color:#fff !important;
  border:3px solid #142f68 !important;
  border-radius:16px !important;
  box-shadow:
    inset 0 0 0 5px rgba(255,255,255,.98),
    inset 0 0 0 7px rgba(20,47,104,.18),
    0 12px 30px rgba(0,101,231,.25) !important;
  text-shadow:
    -1.2px -1.2px 0 #142f68,
     1.2px -1.2px 0 #142f68,
    -1.2px  1.2px 0 #142f68,
     1.2px  1.2px 0 #142f68,
     0 2px 0 rgba(0,0,0,.24) !important;
  -webkit-text-stroke:.45px #142f68 !important;
  text-align:center !important;
  text-decoration:none !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  transform:none !important;
}

.dm-about__back.wbc-auth-btn:visited,
.dm-photos__back.wbc-auth-btn:visited{
  color:#fff !important;
}

@media (hover:hover) and (pointer:fine){
  .dm-about__back.wbc-auth-btn:hover,
  .dm-photos__back.wbc-auth-btn:hover{
    background:#005bd0 !important;
    color:#fff !important;
    border-color:#142f68 !important;
    box-shadow:
      inset 0 0 0 5px rgba(255,255,255,1),
      inset 0 0 0 7px rgba(20,47,104,.22),
      0 14px 34px rgba(0,101,231,.34),
      0 0 0 3px rgba(0,101,231,.12) !important;
    filter:brightness(1.04) !important;
    transform:none !important;
  }
}

/* ===== FINAL HARD OUTLINE: About/Photo EXIT visible inner border ===== */
body .dm-about__back.wbc-auth-btn,
body .dm-photos__back.wbc-auth-btn{
  position:fixed !important;
  isolation:isolate !important;
  overflow:hidden !important;
  background:#0065e7 !important;
  color:#fff !important;
  border:3px solid #142f68 !important;
  border-radius:16px !important;
  box-shadow:0 12px 30px rgba(0,101,231,.25) !important;
  text-shadow:
    -1.2px -1.2px 0 #142f68,
     1.2px -1.2px 0 #142f68,
    -1.2px  1.2px 0 #142f68,
     1.2px  1.2px 0 #142f68,
     0 2px 0 rgba(0,0,0,.24) !important;
  -webkit-text-stroke:.45px #142f68 !important;
}

body .dm-about__back.wbc-auth-btn::before,
body .dm-photos__back.wbc-auth-btn::before{
  content:"" !important;
  position:absolute !important;
  inset:5px !important;
  border-radius:11px !important;
  border:3px solid rgba(255,255,255,.98) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.75),
    0 0 0 1px rgba(20,47,104,.38) !important;
  pointer-events:none !important;
  z-index:0 !important;
}

body .dm-about__back.wbc-auth-btn::after,
body .dm-photos__back.wbc-auth-btn::after{
  content:"" !important;
  position:absolute !important;
  inset:0 !important;
  border-radius:13px !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18) !important;
  pointer-events:none !important;
  z-index:0 !important;
}

body .dm-about__back.wbc-auth-btn,
body .dm-photos__back.wbc-auth-btn{
  line-height:1 !important;
}

@media (hover:hover) and (pointer:fine){
  body .dm-about__back.wbc-auth-btn:hover,
  body .dm-photos__back.wbc-auth-btn:hover{
    background:#005bd0 !important;
    color:#fff !important;
    border-color:#142f68 !important;
    box-shadow:
      0 14px 34px rgba(0,101,231,.34),
      0 0 0 3px rgba(0,101,231,.12) !important;
    filter:brightness(1.04) !important;
    transform:none !important;
  }

  body .dm-about__back.wbc-auth-btn:hover::before,
  body .dm-photos__back.wbc-auth-btn:hover::before{
    border-color:#fff !important;
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,.9),
      0 0 0 1px rgba(20,47,104,.45) !important;
  }
}


/* ===== FINAL 2026-06-30: EXIT sign black outer border, same style everywhere ===== */
html body .dm-about__back.wbc-auth-btn,
html body .dm-photos__back.wbc-auth-btn,
html body .dm-rules__back.wbc-auth-btn,
html body .dm-events__back.wbc-auth-btn,
html body .dm-post__back.wbc-auth-btn,
html body .dm15-simple__back.wbc-auth-btn{
  position:relative !important;
  isolation:isolate !important;
  overflow:hidden !important;

  background:#0065e7 !important;
  color:#fff !important;

  border:2px solid #06101f !important;
  border-radius:10px !important;

  box-shadow:
    inset 0 0 0 4px #fff,
    inset 0 0 0 6px #0065e7,
    0 10px 24px rgba(0,101,231,.24) !important;

  text-shadow:
    -1px -1px 0 #06101f,
     1px -1px 0 #06101f,
    -1px  1px 0 #06101f,
     1px  1px 0 #06101f,
     0 2px 0 rgba(0,0,0,.22) !important;
  -webkit-text-stroke:.35px #06101f !important;

  text-align:center !important;
  text-decoration:none !important;
  white-space:nowrap !important;
  transform:none !important;
}

/* Keep fixed footer/layout buttons fixed while using the same visual skin */
html body .dm-about__back.wbc-auth-btn,
html body .dm-photos__back.wbc-auth-btn,
html body .dm-rules__back.wbc-auth-btn,
html body .dm-events__back.wbc-auth-btn,
html body .dm-post__back.wbc-auth-btn{
  position:fixed !important;
}

/* Disable older pseudo-outline layers if they were loaded before */
html body .dm-about__back.wbc-auth-btn::before,
html body .dm-about__back.wbc-auth-btn::after,
html body .dm-photos__back.wbc-auth-btn::before,
html body .dm-photos__back.wbc-auth-btn::after,
html body .dm-rules__back.wbc-auth-btn::before,
html body .dm-rules__back.wbc-auth-btn::after,
html body .dm-events__back.wbc-auth-btn::before,
html body .dm-events__back.wbc-auth-btn::after,
html body .dm-post__back.wbc-auth-btn::before,
html body .dm-post__back.wbc-auth-btn::after,
html body .dm15-simple__back.wbc-auth-btn::before,
html body .dm15-simple__back.wbc-auth-btn::after{
  content:none !important;
  display:none !important;
}

@media (hover:hover) and (pointer:fine){
  html body .dm-about__back.wbc-auth-btn:hover,
  html body .dm-photos__back.wbc-auth-btn:hover,
  html body .dm-rules__back.wbc-auth-btn:hover,
  html body .dm-events__back.wbc-auth-btn:hover,
  html body .dm-post__back.wbc-auth-btn:hover,
  html body .dm15-simple__back.wbc-auth-btn:hover{
    background:#005bd0 !important;
    color:#fff !important;
    border-color:#06101f !important;
    box-shadow:
      inset 0 0 0 4px #fff,
      inset 0 0 0 6px #005bd0,
      0 12px 28px rgba(0,101,231,.34),
      0 0 0 2px rgba(0,101,231,.12) !important;
    filter:brightness(1.04) !important;
    transform:none !important;
  }
}

/* ===== FINAL HARD 2: real EXIT sign border, no pseudo, no hidden inset ===== */
html body .dm-about__back.wbc-auth-btn,
html body .dm-photos__back.wbc-auth-btn,
html body .dm-rules__back.wbc-auth-btn,
html body .dm-events__back.wbc-auth-btn,
html body .dm-post__back.wbc-auth-btn,
html body .dm15-simple__back.wbc-auth-btn{
  background:#0065e7 !important;
  color:#fff !important;

  /* реальная внутренняя белая рамка */
  border:4px solid #fff !important;

  /* реальный внешний почти чёрный контур */
  outline:2px solid #06101f !important;
  outline-offset:-1px !important;

  /* дополнительная чёрная линия снаружи + тень */
  box-shadow:
    0 0 0 2px #06101f,
    0 10px 24px rgba(0,101,231,.24) !important;

  box-sizing:border-box !important;
  border-radius:10px !important;
  background-clip:padding-box !important;
  overflow:hidden !important;

  text-shadow:
    -1px -1px 0 #06101f,
     1px -1px 0 #06101f,
    -1px  1px 0 #06101f,
     1px  1px 0 #06101f,
     0 2px 0 rgba(0,0,0,.22) !important;
  -webkit-text-stroke:.35px #06101f !important;
}

html body .dm-about__back.wbc-auth-btn::before,
html body .dm-about__back.wbc-auth-btn::after,
html body .dm-photos__back.wbc-auth-btn::before,
html body .dm-photos__back.wbc-auth-btn::after,
html body .dm-rules__back.wbc-auth-btn::before,
html body .dm-rules__back.wbc-auth-btn::after,
html body .dm-events__back.wbc-auth-btn::before,
html body .dm-events__back.wbc-auth-btn::after,
html body .dm-post__back.wbc-auth-btn::before,
html body .dm-post__back.wbc-auth-btn::after,
html body .dm15-simple__back.wbc-auth-btn::before,
html body .dm15-simple__back.wbc-auth-btn::after{
  content:none !important;
  display:none !important;
}

@media (hover:hover) and (pointer:fine){
  html body .dm-about__back.wbc-auth-btn:hover,
  html body .dm-photos__back.wbc-auth-btn:hover,
  html body .dm-rules__back.wbc-auth-btn:hover,
  html body .dm-events__back.wbc-auth-btn:hover,
  html body .dm-post__back.wbc-auth-btn:hover,
  html body .dm15-simple__back.wbc-auth-btn:hover{
    background:#005bd0 !important;
    color:#fff !important;
    border-color:#fff !important;
    outline-color:#06101f !important;
    box-shadow:
      0 0 0 2px #06101f,
      0 12px 28px rgba(0,101,231,.34),
      0 0 0 5px rgba(0,101,231,.10) !important;
    filter:brightness(1.04) !important;
    transform:none !important;
  }
}

/* ===== FINAL ABSOLUTE: EXIT button 1:1 like simple booking mobile ===== */
html body .dm-about__back.wbc-auth-btn,
html body .dm-photos__back.wbc-auth-btn,
html body .dm-rules__back.wbc-auth-btn,
html body .dm-events__back.wbc-auth-btn,
html body .dm-post__back.wbc-auth-btn,
html body .dm15-simple__back.wbc-auth-btn{
  background:#0065e7 !important;
  color:#ffffff !important;

  /* внешний почти чёрный контур как у кнопки простой формы */
  border:2px solid #06101f !important;
  outline:none !important;

  /* внутренняя белая обводка, именно внутри кнопки */
  box-shadow:
    inset 0 0 0 4px #ffffff,
    inset 0 0 0 6px #0065e7,
    0 10px 24px rgba(0,101,231,.24) !important;

  border-radius:10px !important;
  background-clip:border-box !important;
  overflow:hidden !important;
  box-sizing:border-box !important;

  text-shadow:
    -1px -1px 0 #06101f,
     1px -1px 0 #06101f,
    -1px  1px 0 #06101f,
     1px  1px 0 #06101f,
     0 2px 0 rgba(0,0,0,.24) !important;
  -webkit-text-stroke:.35px #06101f !important;

  text-align:center !important;
  text-decoration:none !important;
  white-space:nowrap !important;
  transform:none !important;
}

/* не даём старым псевдо-рамкам ломать новый стиль */
html body .dm-about__back.wbc-auth-btn::before,
html body .dm-about__back.wbc-auth-btn::after,
html body .dm-photos__back.wbc-auth-btn::before,
html body .dm-photos__back.wbc-auth-btn::after,
html body .dm-rules__back.wbc-auth-btn::before,
html body .dm-rules__back.wbc-auth-btn::after,
html body .dm-events__back.wbc-auth-btn::before,
html body .dm-events__back.wbc-auth-btn::after,
html body .dm-post__back.wbc-auth-btn::before,
html body .dm-post__back.wbc-auth-btn::after,
html body .dm15-simple__back.wbc-auth-btn::before,
html body .dm15-simple__back.wbc-auth-btn::after{
  content:none !important;
  display:none !important;
}

@media (hover:hover) and (pointer:fine){
  html body .dm-about__back.wbc-auth-btn:hover,
  html body .dm-photos__back.wbc-auth-btn:hover,
  html body .dm-rules__back.wbc-auth-btn:hover,
  html body .dm-events__back.wbc-auth-btn:hover,
  html body .dm-post__back.wbc-auth-btn:hover,
  html body .dm15-simple__back.wbc-auth-btn:hover{
    background:#005bd0 !important;
    color:#ffffff !important;
    border-color:#06101f !important;
    box-shadow:
      inset 0 0 0 4px #ffffff,
      inset 0 0 0 6px #005bd0,
      0 12px 28px rgba(0,101,231,.34),
      0 0 0 3px rgba(0,101,231,.10) !important;
    filter:brightness(1.04) !important;
    transform:none !important;
  }
}
