.hk-studio-gallery-section{
  position:relative;
  padding:0 24px 12px;
  background:var(--hk-surface);
}

.hk-studio-gallery{
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  grid-template-rows:repeat(2,minmax(160px,220px));
  gap:8px;
  overflow:hidden;
  border-radius:4px;
  background:#d8d8d4;
}

.hk-studio-gallery__item{
  margin:0;
  min-height:160px;
  position:relative;
  overflow:hidden;
  border-radius:4px;
  background:linear-gradient(135deg,rgba(255,255,255,.14),rgba(0,0,0,.08)),linear-gradient(135deg,#d6d5d0,#b8b5ad 45%,#e1dfd8);
  display:flex;
  align-items:flex-end;
  padding:0;
  color:#fff;
  font-weight:700;
  text-shadow:0 1px 12px rgba(0,0,0,.28);
  cursor:pointer;
}

.hk-studio-gallery__slide{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  transform:scale(1.01);
  transition:opacity 1100ms ease;
  z-index:0;
}

.hk-studio-gallery__slide.is-active{
  opacity:1;
  z-index:1;
}

.hk-studio-gallery__item--1{
  grid-row:1 / span 2;
  background:linear-gradient(135deg,#c5c2ba,#aaa59b 48%,#d7d4cc);
}

.hk-studio-gallery__item--2{background:linear-gradient(135deg,#e0dfdb,#bdbab3)}
.hk-studio-gallery__item--3{background:linear-gradient(135deg,#d6d9da,#a9afb2)}
.hk-studio-gallery__item--4{background:linear-gradient(135deg,#e4e0d7,#c8bda7)}
.hk-studio-gallery__item--5{background:linear-gradient(135deg,#e7e5df,#bbb7af)}

.hk-studio-gallery-page{
  width:100%;
  min-height:100vh;
  margin:0;
  padding:0 0 72px;
  background:var(--hk-surface);
}

body.hk-studio-page-active .entry-title,
body.hk-studio-page-active .wp-block-post-title,
body.hk-studio-page-active h1.entry-title,
body.hk-studio-page-active h1.wp-block-post-title,
body.hk-studio-page-active header.entry-header,
body.hk-studio-page-active .entry-header,
body.hk-studio-page-active .page-title{
  display:none !important;
}

body.hk-studio-page-active .entry-content > .hk-studio-gallery-page{
  margin-top:0 !important;
}

.hk-studio-gallery-page__topbar{
  position:relative;
  left:50%;
  width:100vw;
  max-width:100vw;
  min-height:0;
  margin:-32px 0 0 -50vw;
  padding:0 0 44px;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  background:var(--hk-surface);
}

.hk-studio-gallery-page__logo{
  display:inline-flex;
  align-items:flex-start;
  justify-content:center;
  margin:0;
  padding:0;
  line-height:0;
  text-decoration:none;
  outline:none;
  box-shadow:none;
}

.hk-studio-gallery-page__logo:focus,
.hk-studio-gallery-page__logo:focus-visible,
.hk-studio-gallery-page__logo:hover,
.hk-studio-gallery-page__logo:active{
  outline:none;
  box-shadow:none;
  text-decoration:none;
}

.hk-studio-gallery-page__logo img{
  display:block;
  width:130px;
  max-width:130px;
  height:auto;
  margin:0;
  padding:0;
  border:0;
  outline:none;
  box-shadow:none;
}

.hk-studio-gallery-page__back{
  position:absolute;
  left:45px;
  top:50%;
  transform:translateY(-50%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:30px;
  padding:0 13px;
  border:1px solid rgba(20,20,18,.18);
  border-radius:999px;
  background:#f7f7f5;
  color:#1f1f1d;
  font-size:13px;
  font-weight:500;
  letter-spacing:-0.02em;
  line-height:1;
  text-decoration:none;
  outline:none;
  box-shadow:none;
}

.hk-studio-gallery-page__back:focus,
.hk-studio-gallery-page__back:focus-visible,
.hk-studio-gallery-page__back:hover,
.hk-studio-gallery-page__back:active{
  outline:none;
  box-shadow:none;
  text-decoration:none;
}

.hk-studio-gallery-page__grid{
  position:relative;
  left:50%;
  width:calc(100vw - 90px);
  max-width:calc(100vw - 90px);
  margin:0 0 0 calc(-50vw + 45px);
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.hk-studio-gallery-page__item{
  position:relative;
  display:block;
  width:100%;
  aspect-ratio:4 / 3;
  margin:0;
  padding:0;
  overflow:hidden;
  border:0 !important;
  border-radius:0;
  background:#d8d8d4;
  cursor:pointer;
  outline:none !important;
  box-shadow:none !important;
  -webkit-tap-highlight-color:transparent;
}

.hk-studio-gallery-page__item::after{
  content:"";
  position:absolute;
  inset:0;
  border:1px solid rgba(255,255,255,0);
  pointer-events:none;
  z-index:2;
  transition:border-color .16s ease;
}

.hk-studio-gallery-page__item:hover::after,
.hk-studio-gallery-page__item:focus::after,
.hk-studio-gallery-page__item:focus-visible::after,
.hk-studio-gallery-page__item:active::after{
  border-color:rgba(255,255,255,.86);
}

.hk-studio-gallery-page__item:hover,
.hk-studio-gallery-page__item:focus,
.hk-studio-gallery-page__item:focus-visible,
.hk-studio-gallery-page__item:active{
  border:0 !important;
  outline:none !important;
  box-shadow:none !important;
}

.hk-studio-gallery-page__item img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.hk-studio-gallery-page__empty{
  max-width:1120px;
  margin:0 auto;
  padding:0 24px;
  color:#66645f;
}

/* Gallery fullscreen modal */
.hk-studio-gallery-modal[hidden]{
  display:none !important;
}

.hk-studio-gallery-modal{
  position:fixed;
  inset:0;
  z-index:99999;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#000;
  color:#fff;
  overflow:hidden;
  overscroll-behavior:contain;
}

.hk-studio-gallery-modal__backdrop{
  position:absolute;
  inset:0;
  border:0;
  padding:0;
  margin:0;
  background:#000;
  cursor:default;
}

.hk-studio-gallery-modal__stage{
  position:relative;
  z-index:1;
  width:100vw;
  height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:#000;
  touch-action:pan-y;
}

.hk-studio-gallery-modal__image{
  display:block;
  max-width:100vw;
  max-height:100vh;
  width:auto;
  height:auto;
  object-fit:contain;
  user-select:none;
  -webkit-user-select:none;
  -webkit-user-drag:none;
}

.hk-studio-gallery-modal__close{
  position:fixed;
  top:22px;
  right:24px;
  z-index:4;
  width:34px;
  height:34px;
  padding:0;
  border:0;
  background:transparent;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}

.hk-studio-gallery-modal__close::before,
.hk-studio-gallery-modal__close::after{
  content:"";
  position:absolute;
  left:8px;
  top:16px;
  width:18px;
  height:1.5px;
  background:#fff;
}

.hk-studio-gallery-modal__close::before{
  transform:rotate(45deg);
}

.hk-studio-gallery-modal__close::after{
  transform:rotate(-45deg);
}

.hk-studio-gallery-modal__nav{
  position:fixed;
  top:50%;
  z-index:4;
  transform:translateY(-50%);
  width:54px;
  height:72px;
  padding:0;
  border:0;
  background:rgba(0,0,0,.12);
  color:#fff;
  font-size:54px;
  font-weight:200;
  line-height:1;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}

.hk-studio-gallery-modal__nav--prev{
  left:22px;
}

.hk-studio-gallery-modal__nav--next{
  right:22px;
}

.hk-studio-gallery-modal__download{
  position:fixed;
  left:50%;
  bottom:24px;
  z-index:4;
  transform:translateX(-50%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:104px;
  height:38px;
  padding:0 16px;
  border:1px solid rgba(255,255,255,.42);
  border-radius:999px;
  background:rgba(0,0,0,.24);
  color:#fff;
  font-size:13px;
  font-weight:500;
  line-height:1;
  letter-spacing:-0.02em;
  text-decoration:none;
  box-sizing:border-box;
  -webkit-tap-highlight-color:transparent;
}

.hk-studio-gallery-modal__download:hover,
.hk-studio-gallery-modal__download:focus,
.hk-studio-gallery-modal__download:active,
.hk-studio-gallery-modal__close:hover,
.hk-studio-gallery-modal__close:focus,
.hk-studio-gallery-modal__close:active,
.hk-studio-gallery-modal__nav:hover,
.hk-studio-gallery-modal__nav:focus,
.hk-studio-gallery-modal__nav:active{
  outline:none;
  box-shadow:none;
  text-decoration:none;
}

body.hk-gallery-modal-open{
  overflow:hidden !important;
}

@media(max-width:760px){
  .hk-studio-gallery-page__topbar{
    left:50%;
    width:100vw;
    max-width:100vw;
    min-height:0;
    margin:6px 0 0 -50vw;
    padding:0 0 30px;
  }

  .hk-studio-gallery-page__logo{
    padding:0;
  }

  .hk-studio-gallery-page__logo img{
    width:130px;
    max-width:130px;
  }

  .hk-studio-gallery-page__back{
    left:36px;
    height:28px;
    padding:0 11px;
    font-size:12px;
  }

  .hk-studio-gallery-page__grid{
    left:50%;
    width:calc(100vw - 72px);
    max-width:calc(100vw - 72px);
    margin:0 0 0 calc(-50vw + 36px);
    grid-template-columns:1fr;
    gap:12px;
  }

  .hk-studio-gallery-modal__close{
    top:16px;
    right:16px;
  }

  .hk-studio-gallery-modal__nav{
    width:44px;
    height:64px;
    font-size:44px;
    background:transparent;
  }

  .hk-studio-gallery-modal__nav--prev{
    left:8px;
  }

  .hk-studio-gallery-modal__nav--next{
    right:8px;
  }

  .hk-studio-gallery-modal__download{
    bottom:18px;
    height:36px;
    font-size:12px;
  }
}

@media(max-width:980px){
  .hk-studio-gallery{
    grid-template-columns:1fr 1fr;
    grid-template-rows:none;
  }

  .hk-studio-gallery__item--1{
    grid-column:1 / -1;
    grid-row:auto;
    min-height:260px;
  }
}

@media(max-width:640px){
  .hk-studio-gallery-section{
    padding-left:16px;
    padding-right:16px;
  }

  .hk-studio-gallery{
    display:flex;
    overflow-x:auto;
    border-radius:4px;
    scroll-snap-type:x mandatory;
  }

  .hk-studio-gallery__item,
  .hk-studio-gallery__item--1{
    flex:0 0 84%;
    min-height:250px;
    scroll-snap-align:start;
  }
}


/* fullscreen-modal-admin-restored-v4-media-filename-thin-arrows overrides */
.hk-studio-gallery-modal__viewport{
  position:absolute;
  inset:0;
  z-index:2;
  width:100vw;
  height:100vh;
  overflow:hidden;
  background:#000;
}

.hk-studio-gallery-modal__track{
  position:absolute;
  left:0;
  top:0;
  width:300vw;
  height:100vh;
  display:flex;
  transform:translate3d(-100vw,0,0);
  transition:transform 560ms cubic-bezier(.22,1,.36,1);
  will-change:transform;
}

.hk-studio-gallery-modal__track.is-sliding-prev{
  transform:translate3d(0,0,0);
}

.hk-studio-gallery-modal__track.is-sliding-next{
  transform:translate3d(-200vw,0,0);
}

.hk-studio-gallery-modal__track.is-resetting{
  transition:none !important;
  transform:translate3d(-100vw,0,0) !important;
}

.hk-studio-gallery-modal__slide{
  flex:0 0 100vw;
  width:100vw;
  height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:#000;
}

.hk-studio-gallery-modal__image{
  display:block;
  max-width:100vw;
  max-height:100vh;
  width:auto;
  height:auto;
  object-fit:contain;
  user-select:none;
  -webkit-user-select:none;
  -webkit-user-drag:none;
}

.hk-studio-gallery-modal__nav{
  z-index:5;
  width:64px;
  height:96px;
  background:transparent;
  color:#fff;
  font-size:72px;
  font-family:Arial, Helvetica, sans-serif;
  font-weight:100;
  line-height:1;
  opacity:.86;
  text-shadow:0 0 18px rgba(0,0,0,.28);
}

.hk-studio-gallery-modal__nav--prev{
  left:24px;
}

.hk-studio-gallery-modal__nav--next{
  right:24px;
}

.hk-studio-gallery-modal__download{
  border:1px solid rgba(255,255,255,.42);
  appearance:none;
  -webkit-appearance:none;
  cursor:pointer;
}

.hk-studio-gallery-modal__download:disabled{
  opacity:.48;
  cursor:default;
}

@media(max-width:760px){
  .hk-studio-gallery-modal__nav{
    width:54px;
    height:84px;
    font-size:62px;
  }

  .hk-studio-gallery-modal__nav--prev{
    left:6px;
  }

  .hk-studio-gallery-modal__nav--next{
    right:6px;
  }
}


/* fullscreen-modal-admin-restored-v4-media-filename-thin-arrows */
/* 좌우 화살표 텍스트를 숨기고, 1px 라인만으로 아주 얇은 화살표를 그림 */
.hk-studio-gallery-modal__nav{
  width:74px !important;
  height:112px !important;
  font-size:0 !important;
  line-height:0 !important;
  color:transparent !important;
  background:transparent !important;
  opacity:.92 !important;
}

.hk-studio-gallery-modal__nav::before{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:34px;
  height:34px;
  border-color:rgba(255,255,255,.86);
  border-style:solid;
  border-width:0;
  transform-origin:center;
}

.hk-studio-gallery-modal__nav--prev::before{
  border-left-width:1px;
  border-bottom-width:1px;
  transform:translate(-38%,-50%) rotate(45deg);
}

.hk-studio-gallery-modal__nav--next::before{
  border-top-width:1px;
  border-right-width:1px;
  transform:translate(-62%,-50%) rotate(45deg);
}

.hk-studio-gallery-modal__nav:hover::before,
.hk-studio-gallery-modal__nav:focus::before,
.hk-studio-gallery-modal__nav:active::before{
  border-color:#fff;
}

@media(max-width:760px){
  .hk-studio-gallery-modal__nav{
    width:58px !important;
    height:96px !important;
  }

  .hk-studio-gallery-modal__nav::before{
    width:29px;
    height:29px;
  }
}
