/* TEXT */

  h2 {
    font-family: "sloop-script-one";
    font-weight: 400;
    font-style: normal;
  }

  hr {
    margin-top: 20px;
    margin-bottom: 20px;
  }

/* FULL SCREEN LIGHTBOX */
#fullscreenViewer {
  position: fixed;
  inset: 0;
  background: rgb(40, 36, 38);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#fullscreenViewer.active {
  opacity: 1;
  pointer-events: auto;
}

#fullscreenViewer img,
#fullscreenViewer video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
  
/* SIDEBAR (DESKTOP DEFAULT) */
  
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
  
    width: 50vw;
    height: 100vh;
  
    background: rgb(40, 36, 38);
    color: white;
  
    display: flex;
    flex-direction: column;
  
    padding: 20px;
    box-sizing: border-box;
  
    z-index: 9999;
  
    transform: translateX(-100%);
    transition: transform 0.35s ease;
  
    overflow: hidden;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  .title-author {
    display: flex;
    align-items: flex-start; /* aligns items to the top */
    gap: 12px;               /* space between title and author */
    flex-direction: column;
}
.essay-author {
    flex: 1;                  /* fills remaining space */
}  
#siteList {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.site-list.grid-mode #siteList {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.site-list.detail-mode #siteList {
  display: block; /* or flex column */
}
#siteList.collapsed {
    display: none;
} 
.site-list {
  position: fixed;
  width: calc(100% - 140px);
  height: 85vh;
  top: 60px;
  left: 70px;

  z-index: 1000;
  background: transparent;
  padding: 0px 30px 10px 10px;
  font-size: 24px;
  overflow-y: scroll;
}
.essay-card {
  padding: 16px;
  border-radius: 8px;
  background: rgb(80, 60, 60);
  cursor: pointer;

  display: flex;
  flex-direction: column;
  gap: 8px; /* space between image and title */
  box-sizing: border-box;
}
.essay-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}
.essay-title {
  flex: 0 0 auto; 
  font-family: 'Sloop-script-one';
  margin-top: 6px;
  font-size: 24px;
  line-height: 1;
  font-weight: 200;
  text-align: center;
  color: white;
}

figure figcaption{
  font-size: 12px;
  text-align: center;
  line-height: 1.2;
}
figure figcaption i{
  font-size: 12px;
}

  /* SCROLL AREA */
  .scrollable {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }
  
  /* SIDEBAR TOGGLE */
  .sidebar-toggle {
    position: absolute;
    left: 40px;
    top: 45%;
    transform: translateY(-45%);
  
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
  
    z-index: 999999;
    cursor: pointer;

    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .toggle-text {
    display: inline-block;
    transform: rotate(90deg);
    transform-origin: left center;
  
    border: 1px solid white;
    width: 100px;
    padding: 2px 8px 4px 8px;
    border-radius: 16px;
  
    color: white;
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
  }
  
  /* ESSAY CONTENT */
  .essay-text p {
    margin-bottom: 36px;
  }
  
  .essay-text img {
    width: 100%;
    height: auto;
    display: block;
    margin: 8px auto;
  }
  
  .essay-text strong {
    font-size: 20px;
    font-weight: 400;
  }
  
  a {
    color: white;
  }
  
  a:visited {
    color: white;
  }
  
  .title-author {
    display: flex;
    align-items: flex-start;
    gap: 12px;
  }
  
  /* FLOATING CARDS */
  .card-wrapper {
    position: absolute;
  }
  
  #floating-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    z-index: 9998;
    pointer-events: none;
  }

  .floating-card {
    width: 200px;
    cursor: pointer;
    pointer-events: auto;
    z-index: 100;
    --x: 0px;
    --y: -20px;
    --duration: 3s;
    --delay: 0s;
    animation: floatVar var(--duration) ease-in-out var(--delay) infinite;
    opacity: 0;
    transition: opacity 1.2s ease;
    position: absolute;
    /* box-shadow: 0 0 16px rgba(108, 172, 255, 0.5); */
    /* padding: 12px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px; */
    cursor: pointer;
    overflow: hidden;
  }

  .floating-card img,
  .floating-card video,
  .floating-card iframe {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0.9;
    padding: 0;
  }
  
  @keyframes floatVar {
    0%, 100% {
      transform: translate(0, 0);
    }
    50% {
      transform: translate(var(--x), var(--y));
    }
  }

  /* DESKTOP SCROLL CONTAINER */
  
  .site-list {
    position: fixed;
    width: calc(100% - 140px);
    height: 85vh;
    top: 60px;
    left: 70px;
  
    padding: 0 0 10px 10px;
    font-size: 14px;
  
    overflow-y: auto;
  }
  
  /* MOBILE */
  
  @media (max-width: 780px) {
  
    .sidebar {
      position: fixed;
      top: 0;
      left: 0;
  
      width: 100vw;
      height: 50vh;
  
      transform: translateY(-100%);
      border-bottom: 1.5px solid white;
    }
  
    .sidebar.open {
      transform: translateY(0);
    }
    #siteList {
      display: grid;
      grid-template-columns: repeat(1, 1fr);
      gap: 24px;
    }
    .site-list.grid-mode #siteList {
      grid-template-columns: repeat(1, 1fr);
    }
    .essay-thumb {
      width: 100%;
      aspect-ratio: 2 / 1;
      object-fit: cover;
      display: block;
      border-radius: 8px;
    }
    .site-list h4 {
        font-size: 20px;
    }
  
    .sidebar-toggle {
      position: fixed;
      top: 60px;
      left: 50%;
      transform: translateX(-50%);
    }

    body.panel-open .sidebar-toggle {
        top: calc(50vh + 12px);
      }
  
    .toggle-text {
      transform: none;
    }
  
    .scrollable {
      height: 100%;
      overflow-y: auto;
    }
  
    .site-list {
      position: fixed;
      height: 35vh;
      top: 60px;
      left: 0;
  
      width: 100%;
      padding: 0 30px 10px 30px;
    }
  
    .site-list h4 {
      font-size: 20px;
    }
  
    .leaflet-right {
      display: none;
    }
    #fixedBackButton{
        position: fixed !important;
        top: calc(-12px + 45vh) !important;
        bottom: auto !important;
        left: 16px !important;
        font-family: freight-macro-pro, sans-serif;
        z-index: 10000 !important;
        padding: 12px 16px !important;
        background: transparent;
        color: white;
        border-width: medium;
        border-style: none;
        border-color: currentcolor;
        border-image: initial;
        cursor: pointer;
        font-size: 16px;
    }

      
  .floating-card {
    width: 150px;
  }
  }