.projects-page {
  width: 100%;
}

.projects-gallery {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  gap: 20px;
   padding-top: 180px;
   padding-left: 20px;
   padding-right: 20px;
  box-sizing: border-box;
  white-space: nowrap;
  scroll-behavior: smooth;
  width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
  isolation: isolate;
  position: relative;
}

.projects-gallery::-webkit-scrollbar {
  display: none;
}

.projects-gallery a {
  scroll-snap-align: start;
  flex: 0 0 auto;
  text-decoration: none;
  min-width: 0;
  position: relative;
  display: inline-block;
  border-radius: 35px;
  overflow: hidden;
}

.projects-gallery img {
  will-change: transform;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  height: clamp(480px, 70vh, 820px);
  width: auto;
  max-width: none;
  object-fit: cover;
  display: block;
  border: none;
  border-radius: 35px;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
 justify-content: flex-end;
  align-items: center;   /* center text horizontally */
  text-align: center;
  padding: 20px 20px 22px;
  color: #fff;
  border-radius: 35px;
  pointer-events: none;

  opacity: 0;
 transform: translateY(8px);
  transition:
    opacity 0.34s ease,
    transform 0.34s ease,
    background 0.34s ease;


  background:
    linear-gradient(to top, rgba(0,0,0,0.16), rgba(0,0,0,0) 42%),
    rgba(107, 90, 36, 0); /* 👈 no olive initially */
}
.scroll-cue {
  display: none !important;
}


@media (hover: hover) and (pointer: fine) {
.projects-gallery a:hover img {
  transform: scale(1.02);
}
.projects-gallery a:hover .gallery-overlay {
  opacity: 1;
  transform: translateY(0);
    background:
    linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0) 22%),
    rgba(107, 90, 36, 0.19); /* 👈 olive fades in */
  }

}



.gallery-title {
  font-weight: 400;
 letter-spacing: 0.02em;
  font-size: 32px;
  opacity: .97;
  margin: 0 3px 8px 0;
  color: var(--text-strong);
}

.gallery-sub {
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 0.07em;
  margin: 0 0 18px 0;
  opacity: .95;
  user-select: none;
  color: var(--text-body);
}

@media (min-width: 769px) {
  .projects-gallery:hover,
  .projects-gallery:hover * {
    cursor: none !important;
  }
}

.custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2147483647;
  opacity: 0;
  transition: opacity .12s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Barlow", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.3px;
  line-height: 1;
  color: #fff;
  background: transparent;
}

.custom-cursor .cursor-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 28px;
}

.custom-cursor .cursor-label {
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(0, 0, 0, .2), 0 0 10px rgba(0, 0, 0, .2);
}

.cursor--visible {
  opacity: 1;
}

@media (max-width: 1024px) {
 .projects-gallery {
    padding: 118px 20px 24px 20px;
    gap: 16px;
  }
.scroll-cue {
  display: none;
}
  .projects-gallery img {
    height: clamp(360px, 62vh, 680px);
  }
}

@media (max-width: 768px) {
  .projects-gallery {
    flex-direction: column;
    overflow-x: visible;
    overflow-y: visible;
    padding: 104px 20px 0 20px;
    gap: 32px;
    touch-action: pan-y;
    -webkit-overflow-scrolling: auto;
    scroll-behavior: auto;
  }

  .projects-gallery a {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .projects-gallery img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: cover;
    border-radius: 15px;
    display: block;
  }

  .gallery-overlay {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: none;
    background: none;
    padding: 10px 10px 6px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: visible;
    text-align: center;
  }

  .gallery-title {
    position: relative;
    display: inline-block;
    font-size: 19px;
    line-height: 1.1;
    margin: 0;
    padding-left: 0px;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    text-align: center;
    opacity: 0.94;
  }

  .gallery-title::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0.40em;
    width: 7px;
    height: 7px;
    background: #d15e14;
    border-radius: 50%;
    opacity: 0.77;
  }
  .gallery-title::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 0.40em;
    width: 7px;
    height: 7px;
    background: #d15e14;
    border-radius: 50%;
    opacity: 0.77;
  }

  .gallery-sub {
    font-size: 15px;
    line-height: 1.4;
    margin: 2px 0 0 0;
    opacity: 0.8;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    text-align: center;
  }

  .custom-cursor {
    display: none !important;
  }
 .projects-gallery a {
    opacity: 0;
    transform: translateY(34px);
    transition:
      opacity 0.7s ease,
      transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
  }

  .projects-gallery a.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
   .scroll-cue {
    display: flex !important;
    position: fixed;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    z-index: 999;
    opacity: 0.85;
    pointer-events: none;
    animation: scrollCueFloat 1.8s ease-in-out infinite;
    transition: opacity 0.4s ease;
  }

  .scroll-cue svg {
    width: 92px;
    height: auto;
    display: block;
    overflow: visible;
  }

  .scroll-cue path {
    fill: none !important;
    stroke: rgba(255,255,255,0.9);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .scroll-cue.is-hidden {
    opacity: 0;
  }

  @keyframes scrollCueFloat {
    0%, 100% {
      transform: translateX(-50%) translateY(0);
    }

    50% {
      transform: translateX(-50%) translateY(9px);
    }
  }
}
@media (hover: none) and (pointer: coarse) {
  .gallery-overlay {
    opacity: 1 !important;
    transform: none !important;
  }
  
}
