/* ── Gallery Tabs ── */
.gallery-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.gallery-tab {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 8px 18px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-burgundy);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.15s;
}
.gallery-tab:hover,
.gallery-tab.is-active {
  background: var(--color-burgundy);
  border-color: var(--color-burgundy);
  color: var(--color-gold);
}

/* ── Gallery Grid ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.gallery-item { aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: #ede7df; cursor: pointer; position: relative; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }
/* Dog badge on gallery photos */
.gallery-dog-badge {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(85,2,35,0.85));
  color: var(--color-gold); font-size: 0.68rem; font-weight: 700;
  text-align: center; text-decoration: none;
  padding: 18px 6px 6px; opacity: 0; transition: opacity 0.2s;
  text-transform: uppercase; letter-spacing: 0.4px; display: block;
}
.gallery-item:hover .gallery-dog-badge { opacity: 1; }
.gallery-dog-badge:hover { color: #fff; }

/* ── Gallery Lightbox ── */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 8px 8px 92px 8px; /* bottom reserves thumbnail strip space */
}
.lb-overlay.lb-visible { opacity: 1; pointer-events: all; }

.lb-img-wrap {
  position: relative;
  max-width: 98vw;
  max-height: calc(100vh - 110px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img-wrap img {
  width: 98vw;
  height: calc(100vh - 108px);
  object-fit: contain;
  image-rendering: auto;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  display: block;
  transition: opacity 0.15s ease;
}
.lb-img-wrap img.lb-loading { opacity: 0; }

.lb-caption {
  display: none;
  position: absolute;
  bottom: -32px;
  left: 0; right: 0;
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-btn {
  position: fixed;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 48px; height: 48px;
  font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  z-index: 9001;
}
.lb-btn:hover { background: rgba(255,255,255,0.25); }

.lb-close { top: 20px; right: 20px; font-size: 1.25rem; }
.lb-prev  { left: 16px;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 16px; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .lb-btn  { width: 38px; height: 38px; }
}


/* ── Lightbox thumbnail carousel ── */
.lb-thumb-strip {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 60px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  z-index: 9002;
  overflow-x: auto;
  scrollbar-width: none;
}
.lb-thumb-strip::-webkit-scrollbar { display: none; }
.lb-thumb {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.55;
  transition: opacity 0.15s, border-color 0.15s;
  flex-shrink: 0;
  background: none;
  padding: 0;
}
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-thumb.is-active { border-color: var(--color-gold); opacity: 1; }
.lb-thumb:hover { opacity: 0.85; }

/* ── Pedigrees Index ── */
.pedigree-index-list { list-style: none; column-count: 3; column-gap: 24px; margin-bottom: 24px; }
.pedigree-index-list li { margin-bottom: 8px; break-inside: avoid; }
.pedigree-index-list a { font-size: 0.9rem; color: var(--color-burgundy); text-decoration: none; font-weight: 600; }
.pedigree-index-list a:hover { text-decoration: underline; color: var(--color-gold); }

/* ── Links page ── */
.links-content a { color: var(--color-burgundy); }
.links-content ul { padding-left: 20px; margin-bottom: 16px; }
.links-content li { margin-bottom: 6px; font-size: 0.9rem; }

/* Spacing modifier for second section-heading on pedigrees index */
.section-heading--spaced { margin-top: 32px; }
