/* ================================================
   LIGHTBOX.CSS
   BDS Construction & Development
   
   Link this file in every lightbox HTML page:
   <link rel="stylesheet" href="../CSS/lightbox.css" />
   
   Adjust the ../ prefix based on folder depth:
   - 1 level deep:  ../CSS/lightbox.css
   - 2 levels deep: ../../CSS/lightbox.css
   - 3 levels deep: ../../../CSS/lightbox.css
   ================================================ */


/* ------------------------------------------------
   THUMBNAIL GRID (the page with clickable photos)
   ------------------------------------------------ */

.row {
  display: flex;
  flex-wrap: wrap;
  padding: 10px 20px;
  gap: 8px;
  justify-content: center;
}

.row .column {
  flex: 1 1 200px;
  max-width: 240px;
}

.row .column img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: block;
}

.row .column img:hover,
.hover-shadow:hover {
  opacity: 0.85;
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}


/* ------------------------------------------------
   MODAL OVERLAY
   ------------------------------------------------ */

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.92);
}

.modal-content {
  position: relative;
  margin: auto;
  padding: 0 0 20px;
  width: 90%;
  max-width: 900px;
}


/* ------------------------------------------------
   SLIDES
   ------------------------------------------------ */

.mySlides {
  display: none;
}

.mySlides img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 4px;
}

.numbertext {
  color: #ccc;
  font-size: 0.85rem;
  padding: 8px 16px;
  position: absolute;
  top: 0;
}


/* ------------------------------------------------
   CLOSE BUTTON
   ------------------------------------------------ */

.close {
  color: white;
  position: absolute;
  top: 10px;
  right: 25px;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  transition: color 0.2s;
}

.close:hover {
  color: #f4b400;
}


/* ------------------------------------------------
   PREV / NEXT ARROWS
   ------------------------------------------------ */

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  padding: 16px 20px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  user-select: none;
  transition: background-color 0.3s;
  z-index: 100;
}

.prev { left: 0; }
.next { right: 0; }

.prev:hover,
.next:hover {
  background-color: #f4b400;
  color: #000;
}


/* ------------------------------------------------
   CAPTION
   ------------------------------------------------ */

.caption-container {
  text-align: center;
  padding: 10px 0;
  color: #ccc;
}


/* ------------------------------------------------
   THUMBNAIL STRIP (inside modal)
   ------------------------------------------------ */

.modal-content .column {
  display: inline-block;
  width: 11%;
  margin: 4px 1%;
}

.modal-content .column img {
  width: 100%;
  height: 60px;
  object-fit: cover;
  opacity: 0.6;
  cursor: pointer;
  border-radius: 3px;
  transition: opacity 0.3s;
}

.modal-content .column img:hover,
.modal-content .column img.active {
  opacity: 1;
  outline: 2px solid #f4b400;
}


/* ------------------------------------------------
   PROJECT INFO BOX
   ------------------------------------------------ */

.content {
  max-width: 800px;
  margin: 30px auto;
  padding: 24px 30px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.title_projects {
  font-size: 1.4rem;
  color: #1f3c88;
  margin-bottom: 16px;
  font-weight: 600;
}

.content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.content ul li {
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.95rem;
  color: #444;
}

.content ul li:last-child {
  border-bottom: none;
}


/* ------------------------------------------------
   RETURN TO PROJECTS BUTTON
   ------------------------------------------------ */

.project-return {
  text-align: center;
  margin: 24px 0 40px;
}

.project-return a {
  display: inline-block;
  padding: 10px 24px;
  background-color: #1f3c88;
  color: white;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.3s;
}

.project-return a:hover {
  background-color: #f4b400;
  color: #000;
}


/* ------------------------------------------------
   MOBILE - phones and tablets (max 768px)
   ------------------------------------------------ */

@media (max-width: 768px) {

  .row {
    padding: 10px;
    gap: 6px;
  }

  .row .column {
    flex: 1 1 140px;
    max-width: 48%;
  }

  .row .column img {
    height: 120px;
  }

  .modal {
    padding-top: 20px;
  }

  .modal-content {
    width: 98%;
  }

  .mySlides img {
    max-height: 55vh;
  }

  .modal-content .column {
    width: 20%;
    margin: 3px 1%;
  }

  .prev,
  .next {
    padding: 10px 14px;
    font-size: 16px;
  }

  .content {
    margin: 20px 16px;
    padding: 16px;
  }
}


/* ------------------------------------------------
   SMALL PHONES (max 480px)
   ------------------------------------------------ */

@media (max-width: 480px) {

  .row .column {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .row .column img {
    height: 200px;
  }

  .modal-content .column {
    width: 30%;
  }

  .title_projects {
    font-size: 1.2rem;
  }
}
