.marker {
  position: absolute;
  width: 20px;
  background-color: rgb(0, 0, 0);
  height: 20px;
  border-radius: 30px;
  opacity: 0;

}

.mobile {
  display: none;
}

section.title {
  display: flex;

  flex-direction: column;
  margin-top: calc(var(--nav-height) + var(--bm));
  height: auto;
  z-index: 99;
  background-color: white !important;
  transition: all 0.3s ease;
  padding-bottom: var(--bm);
  grid-column: 1/9;

  h1 {
    font-weight: bold;
    width: 100%;
    font-size: 150%;
    line-height: 1.2;
  }
}

h2.section-title.left {
  width: 100%;
  grid-column: 1/9;
  top: 0;
}

h2.section-title {
  background-color: white;
  position: sticky;
  padding: var(--bm) 0;
  z-index: 80;
  /* top: calc((var(--nav-height) + var(--bm)) * -1); */
  top: 0;
}

section.right {

  /* padding-top: calc(var(--nav-height) + var(--bm)); */
  .invisible {
    opacity: 0;
    user-select: none;
    pointer-events: none;
  }
}

nav.hidden+main>section.title {
  margin-top: var(--bm);
}

.marker:hover+.caption,
.marker.active+.caption {
  opacity: 1;
}

body {
  /* height: auto;
    overflow-x: hidden; */
}

/* @keyframes loaded {
    from {

        transform: translateY(50vw);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

} */

nav {
  position: fixed;

  ul.quicknav {
    grid-row: 1;
  }

  h1 {
    grid-row: 1;
    opacity: 0;
    grid-column: 8 / span 5;
    animation: intro-2 var(--easing-d) 0.1s var(--easing) forwards;
  }
}

main {
  /* .animator {

        height: calc(50vh - var(--nav-height) - var(--bm) * 2);
        animation: intro var(--easing-d) 1.9s var(--easing) forwards;
    } */

  /* section.content {
        opacity: 1;
        animation: intro-2 var(--easing-d) 2.4s var(--easing) forwards;

    }

    h2 {
        opacity: 1;
        animation: intro-2 var(--easing-d) .6s var(--easing) forwards;
    } */
}

/* section.left::-webkit-scrollbar-track,
section.right::-webkit-scrollbar-track {
    border: 5px solid rgb(255, 255, 255);
    background-color: #F5F5F5;
    animation: intro-2 var(--easing-d) 0 var(--easing) forwards;

}

section.left::-webkit-scrollbar,
section.right::-webkit-scrollbar {
    width: 4px;
    background-color: #F5F5F5;
    animation: intro-2 var(--easing-d) 0 var(--easing) forwards;
}

section.left::-webkit-scrollbar-thumb,
section.right::-webkit-scrollbar-thumb {

    background-color: #000000;
    animation: intro-2 var(--easing-d) 0 var(--easing) forwards;
} */

/* @keyframes intro {
    from {
        height: calc(50vh - var(--nav-height) - var(--bm) * 2);
    }

    to {
        height: 0;
    }

}

@keyframes intro-2 {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

} */

/* body.is-loading {
    overflow: hidden;

    section {
        pointer-events: none;
    }
} */

main>.fixed-double {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 calc(var(--gutter) * 10);
  overflow: hidden;

  section.left,
  section.right {
    /* padding-top: calc(var(--nav-height) + var(--bm)); */
    overflow: overlay;

    /* width:
            calc(50vw - var(--gutter) * 2.5); */
    display: flex;
    flex-direction: column;
    gap: var(--gutter);
    padding-bottom: var(--bm);

    height: calc(100vh);

    img {
      width: 100%;
      height: auto;
      object-fit: cover;
    }
  }

  .right a.chapter {
    padding-top: calc(var(--nav-height) + var(--bm) / 2);
  }

  .left a.chapter {
    padding-top: calc(var(--nav-height) + var(--bm) / 2);
  }

  section.left,
  section.right {
    transition: all 0.3s ease;
    opacity: 1;
    /* padding-inline: 1rem; */
    box-sizing: border-box;
    padding-right: var(--bm);
    scroll-behavior: smooth;
  }


  section.no-scroll {
    /* scale: 0.98 !important;
    opacity: 0.2 !important; */
    overflow: hidden !important;
  }

  section.left {
    display: flex;
    flex-direction: column;
    display: flex;
    grid-column: 1/8;

    section.content {

      gap: calc(var(--gutter) * 2);
      grid-column: 1/-1;
      display: flex;

      flex-direction: column;
    }

    /* button {
            padding: var(--bm);

            background-color: var(--primary);
            border: none;
            height: fit-content;
            right: 0;
            cursor: pointer;
            top: calc(100% - var(--nav-height));
            grid-column: 5 / 7;
            position: sticky;


        } */

    div.map {
      display: block;

      position: relative;
      opacity: 1;

      width: 100%;

      img {
        width: 100%;
        height: auto;
        object-fit: cover;
      }

      &::backdrop {
        backdrop-filter: grayscale(1);
      }
    }
  }
}

section.right {
  grid-column: 8/-1;

  section.content {
    grid-column: 1/4;
    display: flex;
    gap: var(--gutter);
    flex-direction: column;
  }
}

section.informations {
  grid-column: 1/13;
  padding-top: 120px;
  /* background-color: red; */
  min-height: calc(100vh - var(--bm) * 2);

  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);

  section.general-infos {
    grid-column: 1/4;
  }

  section.text {
    grid-column: 5 / span 7;
    column-count: 2;
    column-gap: var(--gutter);

    p {
      margin-bottom: var(--bm);
    }
  }
}

.fullscreen {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.972);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 9999;
}

.fullscreen.open {
  opacity: 1;
  pointer-events: auto;
}

.fullscreen figure {
  max-width: 90svw;
  max-height: 90svh;
}

.fullscreen picture {
  transform: none !important;
  width: 90svw;
  height: 90svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--bm);
  box-sizing: border-box;
}

.fullscreen picture img {
  width: 100%;
  height: 100%;

  object-fit: contain;
}

.fullscreen figcaption {
  margin-top: 0.5rem;
  text-align: center;
}

.top {
  top: calc(100vh - var(--nav-height) - var(--bm) * 2);
  position: sticky;
  left: calc(100% - var(--bm) * 2);
  /* right: calc((var(--bm) * 3) ); */
}

@media (width<=968px) {
  nav {
    margin: 0;
    padding: calc(var(--bm) * 2);
    width: 100vw;
    top: 0;
  }

  .top {
    display: none;
  }

  body {
    overflow-x: hidden;
  }

  .title#top {
    margin-top: var(--nav-height);
  }

  /* #map {
    padding-top: var(--nav-height);
    margin-top: calc(var(--nav-height) * -1);
  } */

  /* #map .marker {
    transform: translateY(calc(var(--nav-height)));
  } */

  #map .button {
    /* transform: translate(-50%, calc(-100% + (var(--nav-height) * 1))); */
  }

  h2.section-title.left,
  h2.section-title {
    top: calc(var(--bm) * -5);
    margin-top: var(--nav-height);
    z-index: 80;
  }

  nav:not(.hidden)+main>section>section>h2.section-title {
    /* top: var(--nav-height); */
    /* z-index: 300; */
  }

  .right a.chapter {
    padding-top: calc(var(--nav-height) + var(--bm) / 2);
  }

  .left a.chapter {
    padding-top: calc(var(--nav-height) + var(--bm) / 2);
  }

  .right,
  .left {}

  figure {
    pointer-events: none;
  }

  main {
    /* overflow-x: hidden; */

    section.informations {

      margin: calc(var(--bm) * -1);
      padding-top: calc(var(--bm) * 2);
      margin-bottom: calc(--nav-height) !important;
      height: auto;
      display: flex;
      flex-direction: column;

      width: calc(100vw - var(--bm) * 8);

      section.text {
        columns: unset;
      }


      .no-scroll {
        scale: 1 !important;
        opacity: 1 !important;
      }


      s section.general-infos {
        padding-top: calc(var(--nav-height) + 1lh);
      }
    }
  }

  section.title {
    margin-top: 0;
    padding-top: 0;

    h1 {
      font-size: 200%;
    }
  }

  section.title.invisible {
    display: none;
  }

  section.no-scroll {
    scale: 1 !important;
    opacity: 1 !important;
  }

  main>.fixed-double {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: hidden;

    width: calc(100vw);

    /* background-color: thistle; */
    scroll-snap-type: x mandatory;
    height: 100vh;
    position: relative;
    left: calc(var(--bm) * -2);
    scroll-behavior: smooth;

    section.left {
      /* background-color: beige; */
      width: fit-content;
      scroll-behavior: smooth;
    }

    section.left,
    section.right {
      display: flex;

      width: calc(100vw);
      scroll-snap-align: center;
      grid-column: 1/2;
      /* margin: 0 calc(var(--bm) * 3); */
      height: auto;

      padding: var(--bm);
      padding-block: calc(var(--bm) * 5);
      overflow-y: scroll;
    }

    section.right {
      /* background: orangered; */
      grid-column: 2 / span 1;
    }
  }

  section.switch {
    overflow: scroll;
    z-index: 200;
    position: sticky;
    display: flex;
    transform: translateX(calc(var(--bm) * -3));
    bottom: 0;
    width: calc(100vw);
    margin: var(--bm);

    padding: var(--bm);
    flex-direction: row;
    gap: var(--bm);

    /* width: calc(100vw - var(--bm) * 3); */
  }
}