@charset "UTF-8";

:where(html, body):has(dialog[open]) {
  overflow: clip;
}

section[data-type='list'] {
  padding-block: 129px 184px;

  @media not all and (width >=768px) {
    padding-block: 6vw 28vw;
    padding-inline: calc((100 / 750) * 40 * 1vw);
  }

  .local-nav {
    position: relative;
    display: grid;
    grid-template: 1fr / auto 1fr;
    grid-auto-flow: column;
    gap: 64px;
    align-items: flex-start;
    justify-content: flex-start;
    padding-block: 34px 36px;
    padding-inline: 29px;
    font-size: 14px;
    color: white;
    background: var(--blue);
    border-radius: 8px;

    @media not all and (width >=768px) {
      grid-template: auto / auto 1fr;
      gap: 3vw;
      align-items: center;
      padding-block: 3.2vw;
      padding-inline: 2.7vw;
      border-radius: calc((100 / 750) * 8 * 1vw);
    }

    & h2 {
      inline-size: fit-content;
      margin-block-start: 5px;
      font-size: 22px;
      line-height: 1;
      letter-spacing: unset;

      @media not all and (width >=768px) {
        margin-block: 0;
        font-size: calc((100 / 750) * 29 * 1vw);
      }
    }

    & ul {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      font-weight: bold;

      & button {
        display: grid;
        place-content: center;
        padding-block: 7px;
        padding-inline: 50px;
        line-height: 1;
        border: 1px solid white;
        border-radius: calc(infinity * 1px);
      }

      & button.active {
        color: var(--blue);
        background: white;
      }
    }
  }

  @media print, screen and (width >=768px) {
    .local-nav select {
      display: none;
    }
  }

  @media not all and (width >=768px) {
    .local-nav ul {
      display: none;
    }

    select {
      inline-size: 100%;
      padding-block: 2.9vw;
      padding-inline: 2vw;
      font-size: clamp(16px, calc((100 / 750) * 26 * 1vw), calc((100 / 750) * 26 * 1vw));
      color: inherit;
      color: #111;
      appearance: none;
      background-color: white;
      background-image: url('data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2223.616%22%20height%3D%2213.503%22%20viewBox%3D%220%200%2023.616%2013.503%22%3E%3Cpath%20fill%3D%22%2300698c%22%20id%3D%22Icon_ionic-ios-arrow-down%22%20d%3D%22M18%2C20.679l8.93-8.937a1.681%2C1.681%2C0%2C0%2C1%2C2.384%2C0%2C1.7%2C1.7%2C0%2C0%2C1%2C0%2C2.391L19.2%2C24.258a1.685%2C1.685%2C0%2C0%2C1-2.327.049L6.68%2C14.14a1.688%2C1.688%2C0%2C0%2C1%2C2.384-2.391Z%22%20transform%3D%22translate(-6.188%20-11.246)%22%2F%3E%3C%2Fsvg%3E');
      background-repeat: no-repeat;
      background-position: 96% center;
      background-size: 4.3vw 5.3vw;
      border: 1px solid #7d7e7f;
    }
  }

  .thumbnails {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-top: 40px;

    @media not all and (width >=768px) {
      grid-template-columns: repeat(3, 1fr);
      gap: 0.9vw;
      margin-top: 7.7vw;
    }

    & li {
      position: relative;
      block-size: 100%;
      aspect-ratio: 1 / 1;
      clip-path: inset(0);

      &::before {
        position: absolute;
        top: 50%;
        left: 50%;
        z-index: 2;
        display: block;
        inline-size: 100%;
        block-size: 100%;
        pointer-events: none;
        content: '';
        background: color-mix(in srgb, #000 100%, transparent 80%);
        opacity: 0;
        translate: -50% -50%;
        transition: all 250ms ease 0s;
      }

      &::after {
        position: absolute;
        right: 1em;
        bottom: 1em;
        z-index: 3;
        display: block;
        inline-size: 40px;
        aspect-ratio: 1 / 1;
        pointer-events: none;
        content: '';
        background-color: white;
        opacity: 0;
        mask-image: var(--icon-zoom);
        mask-repeat: no-repeat;
        mask-position: center;
        mask-size: contain;
        transition: all 250ms ease 0s;
      }

      @media not all and (width >=768px) {
        &::after {
          right: 1vw;
          bottom: 1vw;
          inline-size: calc((100 / 750) * 46 * 1vw);
          opacity: 1;
        }
      }

      & h3 {
        position: absolute;
        top: 50%;
        left: 50%;
        z-index: 2;
        font-size: 28px;
        font-weight: bold;
        color: white;
        text-align: center;
        pointer-events: none;
        opacity: 0;
        translate: -50% -50%;
        transition: all 250ms ease 0s;

        @media not all and (width >=768px) {
          inline-size: max-content;
          font-size: calc((100 / 750) * 26 * 1vw);
          line-height: 1.6;
        }

        span {
          display: block;
        }
      }

      @media (any-hover: hover) {
        &:hover {
          & h3 {
            opacity: 1;
          }

          &::before {
            opacity: 1;
          }

          &::after {
            opacity: 1;
          }

          & img {
            scale: 1.1;
          }
        }
      }

      @media not all and (width >=768px) {
        &:active {
          & h3 {
            opacity: 1;
          }

          &::before {
            opacity: 1;
          }

          &::after {
            opacity: 1;
          }

          & img {
            scale: 1.1;
          }
        }
      }
    }

    & img {
      aspect-ratio: 1 / 1;
      object-fit: cover;
      object-position: center;
      transition: all 600ms ease 0s;
    }

    & button {
      position: absolute;
      top: 0;
      left: 0;
      z-index: 1;
      inline-size: 100%;
      block-size: 100%;
    }
  }

  .thumbnails[data-id='facility'] {
    & li:not([data-id='facility']) {
      display: none;
    }
  }

  .thumbnails[data-id='apartment'] {
    & li:not([data-id='apartment']) {
      display: none;
    }
  }

  .thumbnails[data-id='hotel'] {
    & li:not([data-id='hotel']) {
      display: none;
    }
  }
}

/* =====================
  dialog
===================== */
dialog {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: grid;
  place-content: center;
  inline-size: 100%;
  block-size: 100%;
  outline: none;
  background: color-mix(in srgb, white 100%, transparent 100%);
  opacity: 0;

  @media not all and (width >=768px) {
    padding-block: 0;
    padding-inline: 0;
  }
}

dialog[open] {
  z-index: calc(infinity * 1);
  background: color-mix(in srgb, white 100%, transparent 10%);
  opacity: 1;
  transition: all 250ms ease 100ms;

  .inner {
    position: relative;
    inline-size: 930px;
    block-size: 100%;
    margin-inline: auto;

    @media not all and (width >=768px) {
      position: static;
      inline-size: 100%;
    }

    .swiper-items {
      img {
        display: block;
        inline-size: auto;
        max-inline-size: 880px;
        block-size: 550px;
        margin-inline: auto;
        pointer-events: none;
        user-select: none;
        object-fit: cover;

        @media not all and (width >=768px) {
          max-inline-size: 70vw;
          block-size: calc((100 / 750) * 550 * 1vw);
        }
      }
    }

    .swiper-thumb-item {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      padding-block: 4px;
      margin-block-start: 42px;

      @media not all and (width >=768px) {
        padding-block: calc((100 / 750) * 6 * 1vw);
        margin-block-start: calc((100 / 750) * 80 * 1vw);
      }

      .swiper-slide {
        width: fit-content;
        cursor: pointer;
      }

      .swiper-slide.swiper-slide-thumb-active {
        outline: 4px solid var(--blue);

        @media not all and (width >=768px) {
          outline: calc((100 / 750) * 6 * 1vw) solid var(--blue);
        }
      }

      & img {
        inline-size: 80px;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        object-position: center;

        @media not all and (width >=768px) {
          inline-size: calc((100 / 750) * 100 * 1vw);
        }
      }
    }
  }

  .swiper-container {
    overflow: hidden;

    @media not all and (width >=768px) {
      overflow: visible;
    }
  }

  .swiper-controller[hidden] {
    display: none;
  }

  .swiper-controller {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    inline-size: 100%;
    block-size: 56px;
    color: #535353;
    pointer-events: none;
    translate: 0 -50%;

    @media not all and (width >=768px) {
      top: 82vw;
      block-size: calc((100 / 750) * 84 * 1vw);
    }
  }

  .prev,
  .next {
    display: block;
    inline-size: 30px;
    aspect-ratio: 30 / 59;
    color: currentcolor;
    pointer-events: auto;
    outline: none;
    background-image: url('../img/common/arrow-slide.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    @media not all and (width >=768px) {
      inline-size: calc((100 / 750) * 45 * 1vw);
    }
  }

  .next {
    rotate: 0 0 1 180deg;
  }

  .close {
    position: absolute;
    top: -60px;
    right: 0;
    z-index: 2;
    display: block;
    inline-size: 33px;
    aspect-ratio: 1 / 1;
    font-size: 56px;
    outline: none;
    background-color: #535353;
    mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="35" height="36" viewBox="0 0 35 36" fill="none"><line x1="0.707168" y1="1.29289" x2="33.7072" y2="34.2929" stroke="currentColor" stroke-width="2"/><line x1="33.7071" y1="1.70711" x2="0.707107" y2="34.7071" stroke="currentColor" stroke-width="2"/></svg>');
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;

    @media not all and (width >=768px) {
      top: calc((100 / 750) * 30 * 1vw);
      right: calc((100 / 750) * 30 * 1vw);
      inline-size: calc((100 / 750) * 44 * 1vw);
    }
  }
}
