/* ==========================================================================
   project.css — Project page (detail + photo gallery + lightbox)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Project detail
   -------------------------------------------------------------------------- */

.project-detail__title {
  font-size: 2rem;
}

.project-detail__location {
  font-size: 1.5rem;
}

.project-detail__hero {
  width: 100%;
  height: 50vh;
  object-fit: cover;
  margin-top: 30px;
  margin-bottom: 30px;
  border-radius: 30px;
}

@media (max-width: 767px) {
  .project-detail__hero {
    height: 30vh;
  }
}

/* Rich-text body copy keeps native paragraph rhythm */
.prose {
  margin-bottom: 50px;
}

.prose p {
  margin-block-start: 1em;
  margin-block-end: 1em;
}

.prose p:first-child {
  margin-block-start: 0;
}

.prose p:last-child {
  margin-block-end: 0;
}

/* --------------------------------------------------------------------------
   2. Photo gallery
   -------------------------------------------------------------------------- */

.gallery {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.gallery__item {
  width: calc(25% - 10px - 10px);
  margin: 10px;
  overflow: hidden;
  flex: auto;
  opacity: 0.8;
  transition: 0.3s ease-in-out opacity;
  cursor: pointer;
}

.gallery__item:hover,
.gallery__item:focus-visible {
  opacity: 1;
}

.gallery__sizer {
  position: relative;
  padding-bottom: 56.25%;
}

.gallery__figure {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  background-size: cover;
  background-position: center;
}

.gallery__figure img {
  width: 100%;
  height: 100%;
  opacity: 0;
}

/* --------------------------------------------------------------------------
   3. Lightbox
   -------------------------------------------------------------------------- */

.lightbox {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.9);
}

.lightbox.is-open {
  display: flex;
}

.lightbox__image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox__button {
  position: absolute;
  padding: 0;
  border: 0;
  background: none;
  color: #ffffff;
  opacity: 0.75;
  cursor: pointer;
  transition: opacity 0.2s ease-in-out;
  line-height: 1;
}

.lightbox__button:hover,
.lightbox__button:focus-visible {
  opacity: 1;
}

.lightbox__close {
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 34px;
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 90px;
  font-size: 44px;
}

.lightbox__prev {
  left: 10px;
}

.lightbox__next {
  right: 10px;
}

.lightbox__counter {
  position: absolute;
  top: 24px;
  left: 20px;
  color: #ffffff;
  opacity: 0.75;
  font-size: 0.9rem;
}

@media (max-width: 767px) {
  .lightbox__prev,
  .lightbox__next {
    width: 44px;
    font-size: 32px;
  }
}
