@font-face {
    font-family: 'GT Walsheim';
    src: url('fonts/GT-Walsheim-Pro-Trial-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
  }

  @font-face {
    font-family: 'Centra No2';
    src: url('fonts/CentraNo2-Book.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
  }

  @font-face {
    font-family: 'Centra No2' 'light';
    src: url('fonts/CentraNo2-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
  }

  @font-face {
    font-family: 'Centra No2' 'medium';
    src: url('fonts/CentraNo2-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
  }

  @font-face {
    font-family: 'Centra No2';
    src: url('fonts/CentraNo2-BookItalic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
  }
  
  
  * {
    font-family: 'Centra No2';
    font-weight: 400;
    color: #1e110b;
  }

  /* Text selection styles for all modern browsers including Safari */
  ::selection {
    background-color: #9BBDE0;
    color: #1e110b;
  }
  
  /* For Firefox */
  ::-moz-selection {
    background-color: #9BBDE0;
    color: #1e110b;
  }

  body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: hidden;
  }

  /* Header Styles */
  .header-container {
    padding: 20px;
    text-align: left;
    position: fixed;
    z-index: 1000;
    width: calc(100% - 40px);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    left: 0;
    margin-top: 0px;
  }

  .header-container h1 {
    font-size: 28px;
    margin: 0;
    margin-bottom: 12px;
  }

  .header-container p {
    font-size: 14px;
    margin: 0px;
  }

  .about-toggle-container,
  .contact-toggle-container {
    margin-top: 0px;
    pointer-events: auto;
  }

  .about-container,
  .contact-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }

  /* For desktop hover */
  @media (hover: hover) {
    .about-toggle:hover + .about-container,
    .about-container:hover,
    .contact-toggle:hover + .contact-container,
    .contact-container:hover {
        max-height: 300px;
    }
  }

  .contact-toggle-container {
    margin-top: -8px;  /* This will remove the gap between toggles */
  }

  .about-text,
  .contact-text {
    font-size: 14px !important;
    max-width: 400px;
    line-height: 1.4;
    margin-top: 8px;
    opacity: 0.85;
    padding-bottom: 20px;
  }

  /* Toggle buttons */
  .about-toggle,
  .contact-toggle {
    background: none;
    border: none;
    width: fit-content;
    font-size: 14px;
    cursor: pointer;
    padding: 5px 0;
    text-align: left;
    color: #000;
    pointer-events: auto;
    font-family: 'GT Walsheim';
  }

  .about-toggle:hover,
  .contact-toggle:hover {
    text-decoration: underline;
  }

  .about-container.expanded,
  .contact-container.expanded {
    max-height: 300px;
  }

  /* Map & Container Styles */
  .container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
  }

  #map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
  }

  /* Leaflet Popup Styles */
  .leaflet-popup-content {
  max-width: 200px;
    font-family: 'GT America Mono', monospace;
    margin: 16px;
  }

  .leaflet-popup-content p {
    margin: 0;
  }

  .leaflet-popup-content h3 {
    font-size: 1.2em;
    text-decoration: underline;
    margin: 0;
    margin-bottom: 4px;
  }

  .leaflet-popup-close-button {
    display: none !important;
  }

  .leaflet-popup-content-wrapper {
    border-radius: 8px;
  }
  .leaflet-popup-tip {
    border-radius: 2px; 
  }

  /* Cluster Marker Styles */
  .marker-cluster {
    background-clip: padding-box;
    border-radius: 15px;
    background-color: transparent !important;
    box-shadow: none !important;
  }

  .marker-cluster-small,
  .marker-cluster-medium,
  .marker-cluster-large {
    background-color: transparent !important;
  }

  .marker-cluster-small div,
  .marker-cluster-medium div,
  .marker-cluster-large div {
    background-color: #9BBDE0 !important; 
    color: #000 !important;
    border-radius: 50% !important;
    width: 30px !important;
    height: 30px !important;
    margin-left: 2px !important;
    margin-top: 2px !important;
    text-align: center !important;
    line-height: 30px !important;
    font-family: 'GT Walsheim' !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
  }

  .marker-cluster div span {
    font-family: 'GT Walsheim' !important;
    font-size: 13px !important;
    line-height: 1 !important;
    display: block !important;
  }

  @media screen and (max-width: 768px) {
    .marker-cluster div span {
      font-size: 16px !important;
    }
    
    .marker-cluster-small div,
    .marker-cluster-medium div,
    .marker-cluster-large div {
      width: 36px !important;
      height: 36px !important;
    }
  }

  /* Sidebar Styles */
  .sidebar {
    position: fixed;
    top: 0;
    height: 100vh;
    width: 400px;
    overflow-y: hidden;
    padding: 0;
    padding-left: 40px;
    padding-right: 20px;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    transition: right 0.5s ease;
  }

  .sidebar-toggle {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(180deg);
    width: 20px;
    height: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 15px;
    margin-left: 8px;
  }

  .sidebar-content {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-top: 0;
    padding-left: 0;
    padding-bottom: 60px;
    position: relative;
    scroll-padding-top: 30px;
  }

  /* Hide scrollbar for Chrome, Safari and Opera */
  .sidebar-content::-webkit-scrollbar {
    display: none;
  }

  /* Adjust h2 positioning */
  .sidebar-content h1 {
    margin-top: 20px;
  }

  /* Sidebar Category-Specific Styles */
  #sidebar-art { right: -370px; background: var(--art-color); z-index: 5; }
  #sidebar-water { right: -330px; background: var(--water-color); z-index: 4; }
  #sidebar-transport { right: -290px; background: var(--transport-color); z-index: 3; }
  #sidebar-urban { right: -250px; background: var(--urban-color); z-index: 2; }

  /* Sidebar Open States */
  #sidebar-art.open { right: 0px; }
  #sidebar-water.open { right: 70px; }
  #sidebar-transport.open { right: 110px; }
  #sidebar-urban.open { right: 145px; }

  /* Sidebar Hover States */
  #sidebar-art:not(.open):hover { right: -365px; }
  #sidebar-water:not(.open):hover { right: -325px; }
  #sidebar-transport:not(.open):hover { right: -285px; }
  #sidebar-urban:not(.open):hover { right: -245px; }

  /* Project Card Styles */
  .project-card {
    border: none;
    margin-bottom: 20px;
    padding: 15px;
    padding-right: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    background: #ffffff3c;
  }

  .project-card:hover {
    transform: translateY(-2px);
  }

  .project-card h2 {
    font-size: 16px !important;
    margin: 0 0 6px 0px;
    padding-bottom: 0px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-decoration: underline;
  }

  .project-details h3 {
    font-size: 15px;
    margin: 0 0 4px 0;
    font-weight: 300;
    line-height: 1.2;
  }

  .project-details p {
    font-size: 14px;
    margin: 16px 0 8px 0;
    line-height: 1.3;
  }

  .project-details a {
    font-size: 14px;
    text-decoration: none;
  }

  .project-details a:hover {
    text-decoration: underline;
  } 

  .project-card:last-child {
    margin-bottom: 60px;
  }

  /* Gallery Styles */
  .gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 4px;
  }

  .gallery-item {
    width: 80px;
    flex-shrink: 0;
    margin-bottom: -2px;
    margin-top: 0px;
    transition: transform 0.2s ease-in-out;
  }

  .gallery-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 0px;
  }

  .gallery-item:hover {
    transform: rotate(2deg);
  }

  .sl-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(5px); 
    backdrop-filter: blur(5px);
    will-change: backdrop-filter;
  }

  /* Welcome Overlay Styles */
  .welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    cursor: pointer;
    transition: opacity 0.5s ease;
  }

  .welcome-text {
    color: white;
    font-size: 18px;
    text-align: center;
    margin-right: 8rem;
    padding: 20px;
  }

  .nav-button {
    position: absolute;
    z-index: 2;
    padding: 10px 15px;
    background: none;
    cursor: pointer;
    font-family: 'GT Walsheim';
    font-size: 13px;
    border: none;
    transition: opacity 0.3s ease;
  }

  .nav-button:hover {
    text-decoration: underline;
  }

  #amsterdam-button {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
  }

  #capetown-button {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
  }

  /* Add these media queries after your existing CSS */
  @media screen and (max-width: 768px) {
    /* Map adjustments */
    #map {
      height: 100vh;
      width: 100vw;
      left: 0;
      margin-top: -18vh;
    }

    .marker-cluster {
    border-radius: 18px;
  }

    .header-container h1 {
      font-size: 24px;
    }

    .header-container p {
      font-size: 16px;
      margin-bottom: 0px;
    }

    .about-text,
    .contact-text {
        font-size: 16px;
        font-family: 'Centra No2' 'medium';
        max-width: 90%;
    }

    .about-toggle,
    .contact-toggle {
        font-size: 16px;
        text-decoration: underline;
    }

    .about-toggle {
      margin-top: -5px;
    }

    /* Sidebar adjustments */
    .sidebar {
      position: fixed;
      top: auto;
      left: 0;
      margin: 0;
      padding: 0;
      width: 100%;
      padding: 0;
      padding-bottom: 400px;
      transition: top 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      overflow-x: hidden;
      touch-action: none;
    }
            
    #sidebar-art { top: 82vh; }
    #sidebar-water { top: 75vh; }
    #sidebar-transport { top: 68vh; }
    #sidebar-urban { top: 61vh; }

    /* Remove hover states */
    #sidebar-art:not(.open):hover { right: 0; }
    #sidebar-water:not(.open):hover { right: 0; }
    #sidebar-transport:not(.open):hover { right: 0; }
    #sidebar-urban:not(.open):hover { right: 0; }

    /* Toggle button adjustments */
    .sidebar-toggle {
      position: sticky;
      top: 0;
      height: auto;
      width: 100%;
      writing-mode: horizontal-tb;
      transform: none;
      margin: 0;
      padding: 18px 20px;
      display: flex;
      justify-content: left;
      z-index: 1002;
      cursor: pointer;
      font-size: 17px !important;
      touch-action: none;
      user-select: none !important;
      -webkit-user-select: none !important;
      -moz-user-select: none !important;
      -ms-user-select: none !important;
      background: inherit;
    }

    
    .sidebar-content h1 {
        display: none; /* Hide category headings on mobile */
    }

    .sidebar {
        transition: top 0.3s ease-out; /* Smooth animation for opening/closing */
    }

    /* Project cards adjustments */
    .project-card {
      margin-bottom: 20px;
      max-width: 100%;
    }

    #sidebar-art .project-card:last-child{
      margin-bottom: 40vh; /* Changed from 250px to 40% viewport height */
    }
    #sidebar-water .project-card:last-child{
      margin-bottom: 45vh; /* Changed from 300px to 50% viewport height */
    }
    #sidebar-transport .project-card:last-child{
      margin-bottom: 55vh; /* Changed from 350px to 60% viewport height */
    }
    #sidebar-urban .project-card:last-child {
        margin-bottom: 65vh; /* Changed from 400px to 70% viewport height */
    }

    /* Gallery adjustments */
    .gallery {
      gap: 5px;
      justify-content: flex-start; /* Ensure items start from the left */
    }

    .gallery-item {
      width: 70px;
      margin-bottom: 5px; /* Smaller margin for mobile */
    }

    .gallery-item img {
      height: 70px;
    }


    /* Navigation button adjustments */
    .nav-button {
      font-size: 13px;
      padding: 8px 12px;
    }

    #amsterdam-button {
      top: 53vh;
    }

    #capetown-button {
      bottom: 40vh;
    }

    .welcome-text {
        font-size: 16px; /* Smaller text for mobile */
        padding: 20px;
        margin-top: -100px; /* Move text up */
        margin-right: 0px;
    }

    .leaflet-control-zoom {
        display: none; /* Hide zoom controls on mobile */
    }

    .sidebar-content {
        padding: 20px;
        padding-top: 0;
    }
  }
   

  /* Add styles for smaller phones */
  @media screen and (max-width: 375px) {
    .sidebar-toggle {
      font-size: 12px;
    }

    .gallery-item {
      width: 60px;
    }

    .gallery-item img {
      height: 60px;
    }
}