/* Our Collection — photo masonry gallery */

.collection-page {
  background: #0b0f19;
}

.collection-page .site-main {
  padding-bottom: 48px;
}

.collection-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 88px 16px 32px;
}

.collection-header {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 217, 255, 0.25);
}

.collection-header h1 {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: #f0f6ff;
  line-height: 1.2;
}

.collection-subtitle {
  margin: 8px 0 0;
  color: #00d9ff;
  font-size: 1.05rem;
  font-weight: 600;
}

.collection-meta {
  margin: 6px 0 0;
  color: #7a94aa;
  font-size: 0.9rem;
}

.collection-search {
  max-width: 560px;
  margin: 22px auto 0;
}

.collection-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.collection-search-box {
  position: relative;
}

.collection-search-box input {
  width: 100%;
  padding: 12px 44px 12px 14px;
  font-size: 1rem;
  border: 2px solid rgba(0, 217, 255, 0.45);
  border-radius: 999px;
  background: rgba(15, 21, 36, 0.95);
  color: #e8f0f8;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.collection-search-box input::placeholder {
  color: #7a94aa;
}

.collection-search-box input:focus {
  outline: none;
  border-color: #00d9ff;
  box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.15);
}

.collection-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.85;
}

.collection-grid {
  column-gap: 14px;
  column-count: 1;
}

.collection-card {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 10px;
  overflow: hidden;
  background: #121826;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.collection-card:hover,
.collection-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.collection-card.hidden {
  display: none;
}

.collection-card-link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
}

.collection-card-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.collection-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  background: linear-gradient(145deg, #1a2236 0%, #0f1524 100%);
  color: #00d9ff;
  font-family: 'Orbitron', sans-serif;
  font-size: 3rem;
  font-weight: 700;
}

.collection-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(11, 15, 25, 0.88);
  opacity: 0;
  transition: opacity 0.25s ease;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.collection-card-link:hover .collection-card-overlay,
.collection-card-link:focus .collection-card-overlay,
.collection-card-link:focus-visible .collection-card-overlay {
  opacity: 1;
}

.collection-card-text {
  text-align: center;
  width: 100%;
  color: #f0f6ff;
}

.collection-card-text h2 {
  margin: 0 0 8px;
  font-size: clamp(1rem, 3.5vw, 1.35rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.collection-card-year {
  color: #9bb0c4;
  font-weight: 500;
}

.collection-card-location {
  margin: 0 0 8px;
  color: #00d9ff;
  font-size: 0.9rem;
  font-weight: 600;
}

.collection-card-details {
  margin: 0;
  color: #b8c8d8;
  font-size: 0.88rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.collection-empty,
.collection-no-results {
  text-align: center;
  padding: 48px 20px;
  color: #9bb0c4;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(122, 148, 170, 0.35);
  border-radius: 12px;
}

.collection-no-results.hidden {
  display: none;
}

@media (min-width: 600px) {
  .collection-grid {
    column-count: 2;
  }
}

@media (min-width: 992px) {
  .collection-grid {
    column-count: 3;
    column-gap: 18px;
  }

  .collection-card {
    margin-bottom: 18px;
  }
}

@media (min-width: 1400px) {
  .collection-grid {
    column-count: 4;
  }
}

@media (max-width: 768px) {
  .collection-shell {
    padding-top: 76px;
  }

  /* Show overlay info on tap without hover on touch devices */
  @media (hover: none) {
    .collection-card-overlay {
      opacity: 1;
      background: linear-gradient(to top, rgba(11, 15, 25, 0.92) 0%, rgba(11, 15, 25, 0.35) 55%, transparent 100%);
      align-items: flex-end;
      justify-content: flex-start;
    }

    .collection-card-text {
      text-align: left;
    }

    .collection-card-text h2 {
      font-size: 1rem;
      margin-bottom: 4px;
    }

    .collection-card-details {
      display: none;
    }
  }
}
