/* modules.css - small modular styles added without touching main stylesheet */

/* ===== related works (similars) ===== */

.similar-section{
  width: 90%;
  max-width: 600px;
  margin: 36px auto 10px;
  text-align: center;
}

.similar-heading{
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: lowercase;
}

/* Swiper container for related works */
.related-swiper{
  width: 100%;
  --swiper-navigation-size: 24px;
}

.related-swiper .swiper-pagination{
  position: static;
  margin-top: 10px;
}

.related-pair{
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.related-card{
  width: calc(50% - 6px);
  text-decoration: none;
  color: inherit;
}

.similar-thumb{
  width: 100%;
  height: auto;
  display: block;
}

.similar-title{
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.2;
}

.related-swiper .swiper-button-prev,
.related-swiper .swiper-button-next{
  color: #999;
  opacity: 0.65;
  transition: opacity 120ms ease;
}

.related-swiper .swiper-button-prev:hover,
.related-swiper .swiper-button-next:hover{
  opacity: 0.95;
}

@media (max-width: 767px){
  .related-nav{
    display: none;
  }
}

@media (min-width: 768px){
  .related-pair{
    justify-content: center;
    gap: 28px;
  }
  .related-card{
    width: clamp(220px, 34%, 280px);
  }
}

/* Hide pagination & arrows when there is only one slide */
.related-swiper.is-single .swiper-pagination,
.related-swiper.is-single .related-nav{
  display: none;
}

/* Footer / continue UI under related works */
.similar-footer{
  margin-top: 14px;
  font-size: 0.95rem;
}

.similar-footer a{
  text-decoration: none;
}

.similar-end{
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  font-size: 0.95rem;
}


/* Back/forward links */
.work-breadcrumb {
  margin: 12px 0 18px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.work-breadcrumb .back-origin{
  white-space: nowrap;
}

.nav-link{
  text-decoration: none;
  color: #555;
}

.nav-link:hover,
.nav-link:focus,
.nav-link:active{
  text-decoration: underline;
}

.work-breadcrumb .back-anchor {
  /* display: inline-block; */ 
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  /* margin-left: 6px; */
  font-weight: normal;
  white-space: nowrap;
  pointer-events: none;
}

/* Back-link anchor reveal (only on hover/focus/active) */
.back-link:hover .back-anchor,
.back-link:focus .back-anchor,
.back-link:focus-visible .back-anchor,
.back-link:active .back-anchor{
  max-width: 18em;
  opacity: 0.225; /* 50% lighter than previous 0.45 */
  pointer-events: auto;
}

.similar-footer{
  text-align: right;
}



.swiper .swiper-slide img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}


/* Square crop (Instagram feel) for carousel images only. */
/* List/series carousels */
.swiper .carousel-img{
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Related carousel (override generic .swiper .swiper-slide img rule) */
.related-swiper .swiper-slide img.similar-thumb{
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center;
  display: block;
}
