/* ======= LAYOUT ======= */
.project-section {
  display: flex;
  gap: 1.5rem;
  padding-left: 3rem;
  padding-right: 3rem;
  box-sizing: border-box;
  height: calc(100vh - 128px);
}

.left-column, .right-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

/* ======= PROJECT HEADER BOX ======= */
.project-header {
  background-color: black;
  color: white;
  padding: 2rem;
  border-radius: 25px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: auto; /* Manually override this using rem if needed */
  max-height: auto; /* Optional manual limit */
}

.align-middle{
  padding-left: 25px;
  padding-right: 25px;
  align-items: center;
  padding-bottom: -15px;
  color: #929292
}

.align-left{
  text-align: left;
  padding-bottom: -10px;
  color: #929292
}

.align-right {
  text-align: right;
  padding-bottom: -15px;
  color: #929292
}

.text-white {
  color: white;
  margin-bottom: 0px;
  padding: 0px;
}

.project-header-text {
  padding-top: 30px;
  padding-bottom: 30px;
  text-align: center;
}

.project-header h1 {
  font-size: 2rem;
  margin-bottom: 0rem;
  font-weight: 400
}

.project-header p {
  font-size: 1rem;
  color: #929292;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.project-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  font-size: 1.1rem;
}

/* ======= BACK BUTTON ======= */
.back-btn {
  font-family: Calibri;
  position: absolute;
  top: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  background: white;
  color: black;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: 0.3s;
}

.back-btn:hover {
  background-color: rgb(39, 39, 39);
  color: white;
}

/* ======= MAIN IMAGE ======= */
.main-image-wrapper {
  position: relative;
  width: 100%;
  flex: 1;
  overflow: hidden;
  border-radius: 25px;
  cursor: pointer
}

.main-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 25px;
}

.offer-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: rgba(255, 255, 255, 0.9);
  color: black;
  font-family: 'Oswald', sans-serif;
  border: none;
  border-radius: 30px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  font-size: 1rem;
  z-index: 2;
  text-decoration: none;
  transition: 0.3s;
}

.offer-btn:hover {
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
}

/* ======= GALLERY STRIP ======= */
.gallery-strip {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  height: 100%;
  align-items: stretch;
  scrollbar-width: thin;
  scrollbar-color: #000000 transparent;
  position: relative;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory; /* enable horizontal snap */
  -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
}

.gallery-strip::-webkit-scrollbar {
  height: 8px;
  background: transparent;
  transition: opacity 0.3s;
  opacity: 0;
  position: absolute;
}

.gallery-strip:hover::-webkit-scrollbar {
  opacity: 1;
}

.gallery-strip::-webkit-scrollbar-thumb {
  background: #aaa;
  border-radius: 4px;
}

.project-thumb {
  flex: 0 0 auto;
  width: calc(50% - 0.75rem);
  height: 100%;
  position: relative;
  border-radius: 25px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;     /* snap to the start of each image */
  object-fit: cover;            /* scale images nicely */
  border-radius: 8px;           /* optional styling */
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 25px;
}

.hover-tile {
  position: relative;
}

.hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/Overlay.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
  border-radius: 25px;
}

.hover-tile:hover .hover-overlay {
  opacity: 0.8;
}

project-thumb:hover {
  background-image: url('../images/Overlay.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 25px;
}

/* ======= CAROUSEL NAVIGATION BUTTONS ======= */
.right-column {
    position: relative;
}

.carousel-button {
    position: absolute;
    font-family: Calibri;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);;
    color: rgba(0, 0, 0, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
}

.carousel-button:hover {
  color: rgba(255, 255, 255, 0.9);;
  background: rgba(0, 0, 0, 0.9);
}

#carouselPrev {
    left: 10px;
}

#carouselNext {
    right: 10px;
}

/* ======= LIGHTBOX ======= */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox.show {
  display: flex;
}

.modal-content {
  max-width: 100%;
  max-height: 90%;
  border-radius: 15px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  color: white;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  z-index: 1001;
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
}


@media (max-width: 810px) {
  
  .header {
    position: relative; /* Ensure header stays in normal flow */
    z-index: 1000; /* Keep below lightbox */
  }
  
  .hamburger {
    z-index: 1001; /* Slightly higher than header */
  }

  /* Left and right gallery carousel buttons */
  .lightbox-prev {
    left: 10px !important; /* 15px from left edge */
    transform: translateY(-50%); /* Maintain vertical centering */
  }
  
  .lightbox-next {
    right: 10px !important; /* 15px from right edge */
    transform: translateY(-50%); /* Maintain vertical centering */
  }

  .lightbox-prev, 
  .lightbox-next {
    font-weight: 100;
    font-size: 3rem !important;
    padding: 0.5rem;
    padding-top: 1px;
    width: 20px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .project-section {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    padding-left: 2rem;
    padding-right: 2rem;
    gap: 2rem;
    border-radius: 10px;
  }


  .left-column, 
  .right-column {
    flex: none;
    width: 100%;
    height: auto;
    border-radius: 10px;
  }

  .left-column {
    gap: 2rem;
  }

  /* Project header - top section */
  .project-header {
    height: 25vh; /* 1/3 of viewport */
    padding: 2rem;
    border-radius: 10px;
  }

  .project-header h1 {
    font-size: 1.5rem;
    
  }

  .project-header p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .project-info {
    font-size: 0.9rem;
    gap: 0.5rem;
  }

  /* Hide back button on mobile */
  .back-btn {
    display: none;
  }

    /* Main image */
  .main-image-wrapper {
    height: 33vh !important; /* Force 1/3 height */
    min-height: 33vh; /* Ensure it doesn't collapse */
    border-radius: 10px !important; /* Correct border radius */
    overflow: hidden; /* Ensure content stays within */
  }

  /* Fix main image inside wrapper */
  .main-image-wrapper img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 10px !important; /* Match wrapper radius */
  }

  /* Fix offer button */
  .offer-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    transform: scale(0.9); /* Slightly smaller */
    transform-origin: bottom right;
  }

  /* Gallery strip - stack vertically */
  .gallery-strip {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    gap: 2rem;
  }

  .project-thumb {
    width: 100%;
    height: 33vh; /* 1/3 of viewport */
  }

  .project-thumb img {
    border-radius: 10px;
  }

  /* Adjust text alignment classes */
  .align-middle, 
  .align-left, 
  .align-right {
    padding: 5px;
    text-align: center;
  }

  .project-header-text {
    padding-top: 15px;
    padding-bottom: 15px;
  }

  /* Carousel X button */
  .lightbox-close {
    font-size: 4rem;
    font-weight: 100;
    top: -16px; /* Positioned below header */
    right: 22px;
  }
  
  .lightbox-prev {
    left: 5px;
  }
  
  .lightbox-next {
    right: 5px;
  }

  .carousel-button {
      display: none !important;
  }
}