/*!This is a particular project style page*/

/*!OVERALL OVERRIDES**/
body {
    background: white;
    overflow-x: hidden !important; 
}
.static-footer {
  display: block;
  ;
}
.footer-wrapper {
  background-color: #f9f9f9;
  padding: 1rem 0 1rem 0; /* Add breathing room around the white footers */
}
.mini-footer {
  margin-bottom: 0;
}

:root { --headerH: 72px; }

/*!INTRODUCTION**/

.project-name .intro {
  flex: 1 1 auto;
  min-width: 0;
  
}

.project-title {
  
  position: relative;
  font-size: 10rem;
  font-weight: 500;
  line-height: 0.75;
  margin-bottom: 2rem;
  max-width: 8ch;
  color: transparent;
}

.project-name h4 {
  /* margin-top: 5rem; */
  line-height: 1.2;
  max-width: 50ch;
  text-align: justify;
}
.project-name .img-aside {
  flex: 0 0 auto;
  max-width: 60vw;
  width: 100%;
}
.project-name .img-aside img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transform: translateY(4rem);
}

.project-title::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  mix-blend-mode: screen; 
  color: #fff;                  
  pointer-events: none;      
}

.fullscreen-slideshow img { z-index: 0; }


/*!INTRODUCTION ADJUSTMENTS FOR SCREENS**/

@media (min-width:1981px) {
    .project-title {
    font-size: 12rem;}
}


@media (max-width: 1400px) {
    .project-name .img-aside {
      max-width: 50vw;
    }
    .project-name .img-aside img {
      transform: translateY(2rem);
    }
}

@media (max-width: 1000px) {
    .fullscreen-slideshow .project-name h1 {
      font-size: 6rem;
    }
    .project-name .img-aside {
      visibility: hidden;
    }
}

@media (max-width: 768px) { 
    .project-name {
      width:calc(100%-1rem);
      gap: 0rem;
    }

    .fullscreen-slideshow .project-name h1 {
      font-size: 4.5rem;
      margin-bottom: 1rem;}

    .project-name h4 {
      max-width: 40ch;
    }
}


@media (max-width: 400px) { 

      .fullscreen-slideshow .project-name h1 {
      font-size: 3.5rem;
      margin-bottom: 1rem;}

    .project-name h4 {
      max-width: 25ch;
    }
}
/*!SLIDESHOW**/
.fullscreen-slideshow {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  margin-top: -80px;
  isolation: isolate;
}

.fullscreen-slideshow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25); /* adjust opacity (0.25–0.5 range) */
  z-index: 1;
  pointer-events: none;
}

.fullscreen-slideshow img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}
.fullscreen-slideshow img.visible {
  opacity: 1;
  z-index: 0; 
}

.fullscreen-slideshow .project-name {
  position: absolute;
  bottom: 4rem;
  left: 2rem;
  width: calc(100% - 8rem);
  display: flex;
  align-items: flex-end;
  gap: 2rem;
  z-index: 2;
}

.fullscreen-slideshow .intro-box {
  background: rgba(255, 255, 255);
  padding: 1rem 1rem;
  border-radius: 1rem;
  display: inline-block;
  max-width: 60ch;
  margin-top: 2rem;
  display: none;
}

.fullscreen-slideshow .intro-box h4 {
  display: none;
  color: #000;
  margin: 0;
}

/*!SLIDESHOW ADJUSTMENTS FOR SCREENS**/


@media (max-width: 1000px) {
  .fullscreen-slideshow .project-name { 
    bottom: 3rem;
    left: 1rem;
  }
}

/*!SCROLL ARROW**/
.scroll-arrow {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  font-size: 2rem;
  color: white;
  mix-blend-mode: difference;
  z-index: 1000;
  pointer-events: none; /* ensures it's not clickable */
  opacity: 1;
  transition: opacity 0.4s ease;
  background: none;
  border-color: transparent;
}

/*!INFO BLOCK**/
.project-info {
  display: flex;
  gap: 8rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10rem 6rem;
  max-width: 1400px;
  margin: auto;
  background-color: #ffffff; 
  flex-wrap: wrap;
}
.project-info h2 {
  margin-bottom: 3rem;
  min-width: 12ch;
}
.info-block {
  flex: 1 1 40%;
  min-width: 280px;
}
.info-block table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.info-block td {
  padding: 0.5rem 0;
  vertical-align: top;
}
.info-block tr:not(:last-child) td {
  border-bottom: 1.5px solid #222;
}
.info-block td:first-child {
  font-weight: 500;
  padding-right: 2rem;
  white-space: nowrap;
}
.text-block {
  flex: 1 1 40%;
  min-width: 280px;
}
.text-block p {
  margin-bottom: 1rem;
  max-width: 60ch;
  text-align:justify;
}

/*!INFO ADJUSTMENTS FOR SCREENS**/
@media (max-width: 768px) {
  .project-info {
    padding: 5rem 3rem;
    gap: 6rem;
  }
  .project-info h2 {
  margin-bottom: 2rem;
  }
  .info-block {
  min-width: 100px;
  }
  .text-block p {
  max-width: 60ch;
  }
}
@media (max-width: 400px) {
  .project-info {
    padding: 5rem 1.5rem;
    gap: 6rem;
  }
  .text-block p {
  max-width: 55ch;
  }
}

/*TODO: Add a zoom in for fullscreen*/
.horizontal-gallery {
  cursor: grab;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  background: white;
  padding: 1rem 0;
  border-bottom: 1.5px solid black;
  margin-bottom: 7rem;
}

.horizontal-gallery.dragging {
  cursor: grabbing;
}



.gallery-track {
  display: flex;
  gap: 1rem;
  padding: 0 0 0 1rem;
}
.gallery-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  color: white;
}
.horizontal-gallery .gallery-item img { cursor: default; }
.gallery-item img {
  height: 600px; 
  width: auto;
  object-fit: cover;
  cursor: inherit;           /* no zoom-in */
  user-select: none;
  -webkit-user-drag: none;  
}

.gallery-item video {
  cursor: inherit;           /* no zoom-in */
  user-select: none;
  -webkit-user-drag: none;  
  height: 600px; 
  width: auto;
  object-fit: cover;
}

.gallery-item figcaption {
  margin-top: 1rem;
  color: black;
}

@media (max-width: 768px) {
  .gallery-item img {
  height: 300px; 
  width: auto;
  object-fit: cover;}

  .gallery-item video {
  height: 300px; }
}

@media (max-width: 400px) {
  .gallery-item img {
  height: 200px; 
  width: auto;
  object-fit: cover;}

  .gallery-item video {
  height: 200px; }

  .gallery-item figcaption {
    font-size: 0.8rem;
  }
}

/** Custom Scrollbar */
.horizontal-gallery::-webkit-scrollbar {
  height: 6px;
}
.horizontal-gallery::-webkit-scrollbar-track {
  background: transparent;
}
.horizontal-gallery::-webkit-scrollbar-thumb {
  background: black;
}
.horizontal-gallery::-webkit-scrollbar-thumb:hover {
  background: #888;
}

/* Lightbox (fullscreen) */
.lb[hidden] { display: none !important; }
.lb {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: grid;
  place-items: center;
  z-index: 9999;
}
.lb-media {
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

/* Buttons — minimalist, white icons only */
.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #ffffff;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  padding: .3rem .6rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.lb-btn:hover {
  opacity: 0.6;
}

.lb-prev { left: 24px; }
.lb-next { right: 24px; }
.lb-close {
  top: 24px;
  right: 24px;
  transform: none;
  font-size: 1.5rem;
  color: #ffffff;
}

/* Responsive layout for arrows under image on mobile/tablet */
@media (max-width: 1000px) {
  .lb {
    place-items: center;
    padding-bottom: 60px; /* space for arrows */
  }
  .lb-prev,
  .lb-next {
    top: auto;
    bottom: 70px;
    transform: none;
    position: fixed;
  }
  .lb-prev {
    left: 30%;
  }
  .lb-next {
    right: 30%;
  }
  .lb-close {
    top: 20px;
    right: 20px;
  }
}

body.no-scroll { overflow: hidden; }



/*!SUGGESTIONS**/
.related-projects {
  padding: 60px 20px;
  background-color: #f9f9f9;
  text-align: center;
}
.related-projects h2 {
  margin-bottom: 4rem;
  font-weight: 300;
}
.related-projects-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}
.related-project {
  width: 30%;
  min-width: 280px;
  text-align: left;
}

.related-project p,.related-project a {
  text-decoration: none;
  margin-top: 10px;
}
#relatedCategory {
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 0.3rem;
}
.related-project img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
}

.related-projects-container video {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
}

@media (max-width: 630px) {
  .related-projects {
  padding: 50px 1rem;
}
  .related-projects-container {
  gap: 24px;
}
  .related-project {
  width: 50%;
}
}


/*!ANIMATIONS**/
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.8s ease forwards;
}

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

.fade-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}