/* gallery-project.css — single project view /gallery/{id}
   Standalone page — does not inherit from base/index styles.
   Solid dark background, flat slideshow, no 3D, mobile-first. */

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root,
[data-theme="dark"] {
  --bg:          #141412;
  --surface:     #1c1c1a;
  --border:      rgba(255,255,255,0.08);
  --text:        #f0f0d8;
  --text-muted:  rgba(240,240,216,0.45);
  --accent:      #c6613f;
  --nav-bg:      rgba(12,12,10,0.72);
  --thumb-ring:  #c6613f;
}

[data-theme="light"] {
  --bg:          #f2ede6;
  --surface:     #e8e2d9;
  --border:      rgba(0,0,0,0.10);
  --text:        #16110a;
  --text-muted:  rgba(22,17,10,0.45);
  --accent:      #c6613f;
  --nav-bg:      rgba(242,237,230,0.82);
  --thumb-ring:  #c6613f;
}

html, body {
  height: 100%;
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* ── Nav ──────────────────────────────────────────────────── */
.gp-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.gp-nav__back,
.gp-nav__links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.18s;
}

.gp-nav__back:hover,
.gp-nav__links a:hover { color: var(--text); }

.gp-nav__links {
  display: flex;
  gap: 20px;
}

/* ── Hero band ────────────────────────────────────────────── */
.gp-hero {
  margin-top: 54px;
  height: 180px;
  position: relative;
  overflow: hidden;
}

.gp-hero__bg {
  position: absolute;
  inset: -24px;
  background-size: cover;
  background-position: center;
  filter: blur(4px) brightness(0.3);
  will-change: transform;
}

.gp-hero__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  gap: 8px;
}

.gp-hero__title {
  font-size: clamp(1.1rem, 4vw, 2rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.gp-hero__desc {
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  max-width: 520px;
  line-height: 1.6;
}

/* ── Slideshow section ────────────────────────────────────── */
.gp-show {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 16px 48px;
  gap: 0;
}

/* ── Main viewer (image + side arrows) ───────────────────── */
.gp-viewer {
  position: relative;
  width: 100%;
  max-width: 860px;
  display: flex;
  align-items: center;
  gap: 0;
}

/* ── Slide container ──────────────────────────────────────── */
.gp-slides {
  flex: 1;
  position: relative;
  /* Aspect ratio 16:10 — adjust if your images are different */
  aspect-ratio: 16 / 10;
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.gp-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  /* Simple fade — no 3D, no rAF, GPU-composited only */
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.gp-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.gp-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  /* Subtle scale-in on the active slide — gives life without being heavy */
  transition: transform 0.32s ease;
  transform: scale(0.985);
}

.gp-slide.is-active img {
  transform: scale(1);
}

/* ── Arrow buttons ────────────────────────────────────────── */
.gp-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.15s;
  /* Sit slightly outside the image frame */
  margin: 0 10px;
}

.gp-arrow:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: scale(1.08);
}

.gp-arrow:active { transform: scale(0.95); }

.gp-arrow:disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

/* ── Caption ──────────────────────────────────────────────── */
.gp-caption {
  margin-top: 14px;
  min-height: 22px;
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.02em;
  max-width: 640px;
  transition: opacity 0.2s;
}

/* ── Filmstrip / thumbnail tape ───────────────────────────── */
.gp-strip-wrap {
  margin-top: 20px;
  width: 100%;
  max-width: 860px;
  overflow-x: auto;
  /* Hide scrollbar — strip scrolls programmatically */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.gp-strip-wrap::-webkit-scrollbar { display: none; }

.gp-strip {
  display: flex;
  gap: 8px;
  padding: 4px 2px 6px;
  /* Allow strip to be wider than its container */
  width: max-content;
  min-width: 100%;
  justify-content: center;
}

.gp-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  transition: border-color 0.18s, transform 0.18s, opacity 0.18s;
  opacity: 0.45;
}

.gp-thumb:hover {
  opacity: 0.75;
  transform: translateY(-2px);
}

.gp-thumb.is-active {
  border-color: var(--thumb-ring);
  opacity: 1;
}

.gp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* No pointer events so clicks register on the button */
  pointer-events: none;
}

/* ── Counter ──────────────────────────────────────────────── */
.gp-counter {
  margin-top: 12px;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  .gp-nav { padding: 0 16px; }
  .gp-hero { height: 150px; }
  .gp-show { padding: 24px 8px 40px; }

  .gp-arrow {
    width: 34px;
    height: 34px;
    margin: 0 5px;
  }

  .gp-thumb {
    width: 56px;
    height: 38px;
  }

  .gp-strip { justify-content: flex-start; }
}

/* ── LAZY IMAGE FADE-IN ───────────────────────────────────────
   gallery_project is a standalone template (doesn't use base.html
   / bg.css), so the fade-in rule lives here instead.
────────────────────────────────────────────────────────────── */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s ease;
}
img[loading="lazy"].img--loaded {
  opacity: 1;
}

/* ── FLOATING "GET IN TOUCH" BUTTON (copied from bg.css) ─── */
.float-cta {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--drop-bg);
  border: 1px solid var(--drop-border);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--nav-text);
  opacity: 0.65;
  transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
  white-space: nowrap;
}
.float-cta:hover {
  opacity: 1;
  border-color: var(--nav-hover);
  color: var(--nav-hover);
  transform: translateY(-2px);
}
.float-cta__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nav-hover);
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .float-cta { bottom: 16px; right: 16px; padding: 7px 13px; font-size: 0.7rem; }
}
