/* =========================================
   PEDRO BELO
   Collection Page v3.0
   True masonry — respects each photo's real aspect ratio.
   Nothing is cropped. Portraits stay tall, landscapes stay wide.
   ========================================= */

/* ---------- Hero ---------- */

.collection-hero {
  position: relative;
  width: 100%;
  height: 70vh;
  max-height: 700px;
  min-height: 400px;
  overflow: hidden;
  background: var(--bg-primary);
}

.collection-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.collection-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.2) 0%,
    rgba(10, 10, 10, 0.5) 60%,
    rgba(10, 10, 10, 0.85) 100%
  );
}

.collection-hero__content {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--text-primary);
  padding: 0 var(--space-md);
  max-width: 900px;
  width: 100%;
}

.collection-hero__content .meta {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.collection-hero__title {
  font-family: var(--font-serif);
  font-size: 72px;
  line-height: 1.05;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.collection-hero__desc {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-sm);
  line-height: 1.5;
}

.collection-hero__count {
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .collection-hero { height: 60vh; }
  .collection-hero__title { font-size: 44px; }
  .collection-hero__desc { font-size: 18px; }
  .collection-hero__content { bottom: 40px; }
}

/* ---------- Intro paragraph (long description) ---------- */

.collection-intro {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
  text-align: center;
}

.collection-intro p {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.7;
  color: var(--text-primary);
}

/* ---------- Gallery ---------- */

.collection-gallery {
  padding: var(--space-lg) 0 var(--space-xxl);
}

/*
 * TRUE MASONRY using CSS multi-column layout.
 * Each photo keeps its natural aspect ratio — nothing cropped.
 * Portraits are tall, landscapes are wide, they flow into columns.
 */
.collection-masonry {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);

  /* Multi-column masonry */
  column-count: 2;
  column-gap: var(--space-md);
}

@media (min-width: 1400px) {
  /* On very wide screens, 3 columns look better */
  .collection-masonry { column-count: 3; }
}

.collection-masonry__item {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
  border-radius: 4px;
  color: var(--text-primary);

  /* Prevent an item from being split across two columns */
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: var(--space-md);
}

.collection-masonry__item figure {
  margin: 0;
  padding: 0;
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--bg-secondary);
  line-height: 0;              /* removes gap under the image */
}

.collection-masonry__item img {
  width: 100%;
  height: auto;               /* natural aspect ratio — no crop */
  display: block;
  transition: transform var(--dur-slow) var(--ease),
              opacity var(--dur-mid) var(--ease);
}

/* Caption overlay — appears on hover */
.collection-masonry__item figcaption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-md);
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.9) 0%,
    rgba(10, 10, 10, 0.55) 40%,
    rgba(10, 10, 10, 0) 100%
  );
  opacity: 0;
  transition: opacity var(--dur-mid) var(--ease);
  pointer-events: none;
  line-height: normal;
}

.collection-masonry__title {
  display: block;
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 6px;
}

.collection-masonry__location {
  display: block;
  color: var(--text-secondary);
}

/* Hover state — desktop only */
@media (hover: hover) {
  .collection-masonry__item:hover img {
    transform: scale(1.03);
    opacity: 0.92;
  }
  .collection-masonry__item:hover figcaption {
    opacity: 1;
  }
}

/* Mobile — 1 column */
@media (max-width: 768px) {
  .collection-masonry {
    column-count: 1;
    column-gap: 0;
    padding: 0 var(--space-sm);
  }
  .collection-masonry__title { font-size: 22px; }
  /* On mobile, caption is always visible (no hover) */
  .collection-masonry__item figcaption { opacity: 1; }
}

/* ---------- Quote ---------- */

.collection-quote {
  padding: var(--space-xxl) var(--space-md);
  text-align: center;
  border-top: 1px solid var(--divider);
}

.collection-quote blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 32px;
  line-height: 1.5;
  color: var(--text-primary);
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .collection-quote blockquote { font-size: 22px; }
}
