/* ===== Gallery page — hero =====  */
.gallery-hero {
  padding: 120px 0 56px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.gallery-hero-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}
.gallery-hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.1;
}
.gallery-hero .breadcrumb {
  font-family: var(--font-h);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.gallery-hero .breadcrumb a {
  color: var(--accent);
}
.gallery-hero .subtitle {
  color: var(--text-muted);
  font-size: 16px;
  margin-top: 10px;
  max-width: 520px;
}

/* ===== Gallery content =====  */
.gallery-content { padding: 56px 0 80px; }

/* ===== Projects grid ===== */
#projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

/* ===== Project card ===== */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
}
.project-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.5); }

/* ===== Before/After slider ===== */
.ba-slider {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: ew-resize;
  user-select: none;
  touch-action: pan-y;
  background: #111;
  flex-shrink: 0;
}
.ba-layer {
  position: absolute;
  inset: 0;
}
.ba-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ba-before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 3px;
  background: var(--accent);
  transform: translateX(-50%);
  pointer-events: none;
}
.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.ba-handle svg { color: #111; flex-shrink: 0; }

/* ===== Badges ===== */
.ba-badge {
  position: absolute;
  bottom: 10px;
  font-family: var(--font-h);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  pointer-events: none;
}
.ba-badge-before {
  left: 10px;
  background: rgba(0,0,0,0.75);
  color: #ccc;
}
.ba-badge-after {
  right: 10px;
  background: rgba(240,126,38,0.92);
  color: #111;
}

/* ===== Single (before-only) ===== */
.ba-single {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #111;
  flex-shrink: 0;
}
.ba-single img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ba-single .ba-badge-before {
  bottom: 10px;
  left: 10px;
}

/* ===== Thumbnails ===== */
.project-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.thumb-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.thumb-label {
  font-family: var(--font-h);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 2px;
}
.thumb {
  width: 52px;
  height: 38px;
  object-fit: cover;
  border-radius: 2px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.6;
}
.thumb:hover { opacity: 0.85; }
.thumb.active {
  border-color: var(--accent);
  opacity: 1;
}

/* ===== Videos ===== */
.project-videos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.video-pair {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.video-pair video {
  width: 100%;
  border-radius: 2px;
  display: block;
  background: #000;
}
.video-label {
  font-family: var(--font-h);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

/* ===== Project info ===== */
.project-info {
  padding: 18px 20px 20px;
  flex: 1;
}
.project-info h3 {
  font-size: 17px;
  margin-bottom: 8px;
  color: var(--heading);
}
.project-info p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== Active nav link ===== */
.nav-link--active { color: var(--accent) !important; }

/* ===== Filter row ===== */
.gallery-filters { margin-bottom: 36px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  #projects-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
@media (max-width: 768px) {
  .gallery-hero { padding: 100px 0 40px; }
  .gallery-content { padding: 36px 0 60px; }
  .project-videos { grid-template-columns: 1fr; }
}
