/* ===== PORTFOLIO / OUR WORK PAGE ===== */

/* Grid — larger cards than materials, 2-3 columns */
.portfolio-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

/* Card */
.portfolio-card {
  background: white;
  border: 1px solid var(--stone-200);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.11);
  border-color: rgba(184, 146, 63, 0.4);
}

/* Photo */
.portfolio-img-wrap {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: var(--stone-100);
}

.portfolio-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.portfolio-card:hover .portfolio-img-wrap img {
  transform: scale(1.04);
}

.portfolio-img-wrap.img-error img { display: none; }
.portfolio-img-wrap.img-error .mat-img-placeholder { display: flex; }

/* Room badge */
.portfolio-room-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.2rem 0.65rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: rgba(26, 23, 20, 0.82);
  color: var(--gold);
}

/* Card body */
.portfolio-card-info {
  padding: 1.1rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.portfolio-stone {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--stone-900);
  margin-bottom: 0.3rem;
}

.portfolio-meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone-500);
  margin-bottom: 0.4rem;
}

.portfolio-materials {
  font-size: 0.78rem;
  color: var(--stone-700);
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 0.35rem;
}

.portfolio-notes {
  font-size: 0.82rem;
  color: var(--stone-500);
  font-weight: 300;
  font-style: italic;
  line-height: 1.55;
  margin: 0;
}

/* Empty state */
.portfolio-empty {
  max-width: 480px;
  margin: 4rem auto;
  text-align: center;
  color: var(--stone-500);
  font-size: 1rem;
  line-height: 1.8;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 8, 0.93);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-inner {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lightbox-inner img {
  max-width: 90vw;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.lightbox-caption {
  text-align: center;
  color: var(--stone-200);
  font-family: 'Libre Franklin', sans-serif;
}

.lightbox-caption strong {
  font-size: 1.05rem;
  color: var(--cream);
  font-family: 'Playfair Display', serif;
}

.lightbox-caption span {
  font-size: 0.8rem;
  color: var(--stone-400);
  margin-left: 0.25rem;
}

.lightbox-caption p {
  font-size: 0.82rem;
  color: var(--stone-400);
  font-style: italic;
  margin: 0.25rem 0 0;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: none;
  border: none;
  color: var(--stone-200);
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem;
  transition: color 0.2s ease;
  z-index: 1001;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--gold);
}

.lightbox-close { top: 1.25rem; right: 1.5rem; font-size: 2rem; }
.lightbox-prev  { left: 1rem;  top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lightbox-next  { right: 1rem; top: 50%; transform: translateY(-50%); font-size: 3rem; }

/* Responsive */
@media (max-width: 900px) {
  .portfolio-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
  .portfolio-img-wrap { height: 210px; }
}

@media (max-width: 640px) {
  .portfolio-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .portfolio-img-wrap { height: 160px; }
  .portfolio-stone { font-size: 0.9rem; }
  .lightbox-prev { left: 0.25rem; }
  .lightbox-next { right: 0.25rem; }
}

@media (max-width: 400px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}
