#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 2000;
  overflow: hidden;
}

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

.lightbox-track {
  display: flex;
  width: 300%;
  height: 85vh;
}

.lightbox-img {
  width: 100%;
  height: 85vh;
  object-fit: contain;
  flex-shrink: 0;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 32px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2;
}





/* ================= PROJECT HERO ================= */
.project-hero {
  display: flex;
  gap: 60px;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 60px;
  
  /* UPDATED LINE BELOW */
  /* Top: 80px | Right: auto | Bottom: 60px | Left: auto */
  margin: 80px auto 60px auto; 
  
  max-width: 1000px;
  justify-content: flex-start;
  text-align: left; /* Recommended to keep text flush with the body */
}

.hero-content {
  display: flex;
  flex-direction: column; /* Stacks H1, H3, and Status vertically */
  justify-content: flex-start;
  flex: 1; /* Allows the text box to grow to fill space */
  text-align: left;
}

#project-status-container {
  margin-top: bottom; /* This pushes the status to the very bottom of the flex container */
  padding-top: 60px; /* Optional: adds a small gap so it's not cramped */
}

.project-hero div {
  max-width: 500px; /* Adjust this value to control where the text wraps */
  text-align: left;  /* Optional: keeps text tidy if it wraps to multiple lines */
}

.project-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.project-hero h3 {
  font-size: 1.4rem;
  color: #555;
  margin-bottom: 20px;
}

.project-hero-image img,
.project-hero img {
  max-width: 400px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* ================= SECTIONS ================= */
.project-description,
.project-features,
.project-setbacks,
.project-video,
.project-external-links,
.project-gallery,
.project-links {
  max-width: 1000px;
  margin: 0 auto 60px auto;
  padding: 0 20px;
}

.project-description p {
  line-height: 1.7;
  margin-bottom: 20px;
  color: #333;
}

.project-features ul,
.project-setbacks ul {
  list-style-type: disc;
  padding-left: 20px;
  color: #333;
}


.project-external-links ul {
  list-style-type: disc;
  padding-left: 20px;
  color: #333;
}

.project-features li,
.project-setbacks li {
  margin-bottom: 8px;
}

/* ================= VIDEO ================= */
.project-video {
  margin-bottom: 60px;
}

.video-embed {
  position: relative;
  width: 300px;
  padding-top: 168px; /* 16:9 */
  margin-top: 15px;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  display: block;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .video-embed {
    width: 100%;
    padding-top: 56.25%;
  }
}

/* ================= GALLERY ================= */
.project-gallery {
  width: 100vw;
  max-width: 1200px;
  padding: 20px;
  box-sizing: border-box;
  margin-bottom: 60px;
}

.project-gallery h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  text-align: left;
}

.project-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  justify-items: start;
}

.project-images img {
  width: 100%;
  max-width: 300px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-images img:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

/* ================= LIGHTBOX ================= */

/*
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-image {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}

body.lightbox-open {
  overflow: hidden;
}

*/

/* ================= BUTTONS ================= */
.cta-button {
  display: inline-block;
  padding: 14px 30px;
  background-color: #0077cc;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
  background-color: #005fa3;
  transform: translateY(-2px);
}

.project-links {
  text-align: center;
  margin-top: 20px;
}

/* ================= BACK BUTTON ================= */
.back-button {
  margin-top: 40px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .project-hero {
    flex-direction: column;
  }
}
