/* ============================================================
   DOKUMENTASI.CSS — Galeri Proyek
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #0a0f1e;
  --bg2:          #0d1426;
  --bg-card:      #111827;
  --border:       rgba(255,255,255,0.08);
  --border-acc:   rgba(37,99,235,0.4);
  --text:         #f0f4ff;
  --text2:        #94a3b8;
  --text3:        #64748b;
  --accent:       #2563EB;
  --accent2:      #22D3EE;
  --radius:       12px;
  --radius-lg:    18px;
  --shadow:       0 4px 24px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.doc-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== NAVBAR ===== */
.doc-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(10,15,30,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.doc-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.doc-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.doc-logo strong { color: var(--accent2); }
.doc-back-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text2);
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.2s;
}
.doc-back-btn:hover { color: var(--text); border-color: var(--border-acc); background: rgba(37,99,235,0.1); }

/* ===== HERO ===== */
.doc-hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
  position: relative;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(37,99,235,0.18) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
}
.doc-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent2);
  background: rgba(34,211,238,0.1);
  border: 1px solid rgba(34,211,238,0.25);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.doc-hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.doc-gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.doc-hero-desc {
  font-size: 1rem;
  color: var(--text2);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== FILTER BAR ===== */
.doc-filter-bar {
  position: sticky;
  top: 64px;
  z-index: 100;
  background: rgba(10,15,30,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 0;
}
.doc-filter-bar .doc-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.doc-filter-scroll {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.doc-filter-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.doc-filter-btn:hover { border-color: var(--border-acc); color: var(--text); }
.doc-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 2px 12px rgba(37,99,235,0.4);
}
.doc-count {
  font-size: 0.82rem;
  color: var(--text3);
  white-space: nowrap;
}

/* ===== MAIN ===== */
.doc-main {
  padding: 3rem 0 5rem;
}

/* ===== PROJECT GRID ===== */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* Project card */
.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  display: flex;
  flex-direction: column;
}
.doc-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-acc);
  box-shadow: 0 20px 40px rgba(37,99,235,0.15);
}

/* Cover photo collage */
.doc-card-cover {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(34,211,238,0.08));
  overflow: hidden;
  display: grid;
  gap: 2px;
}
.doc-card-cover.photos-1 { grid-template-columns: 1fr; }
.doc-card-cover.photos-2 { grid-template-columns: 1fr 1fr; }
.doc-card-cover.photos-3 { grid-template-columns: 1fr 1fr; }
.doc-card-cover.photos-3 .cover-img:first-child { grid-row: 1 / 3; }
.doc-card-cover.photos-many { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.doc-card:hover .cover-img { transform: scale(1.05); }

.cover-more {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
}

.cover-placeholder {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.85rem;
}

/* Card body */
.doc-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.doc-card-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent2);
  background: rgba(34,211,238,0.1);
  border: 1px solid rgba(34,211,238,0.2);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  width: fit-content;
}
.doc-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}
.doc-card-desc {
  font-size: 0.83rem;
  color: var(--text2);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.doc-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.doc-card-client {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
}
.doc-card-date {
  font-size: 0.75rem;
  color: var(--text3);
}
.doc-card-photos-count {
  font-size: 0.75rem;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ===== EMPTY STATE ===== */
.doc-empty {
  text-align: center;
  padding: 5rem 0;
  color: var(--text3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.doc-empty p { font-size: 1rem; }

/* ===== LIGHTBOX ===== */
.doc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.doc-lightbox[hidden] { display: none; }

.doc-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.doc-lb-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
  animation: lb-pop 0.3s cubic-bezier(0.34,1.56,0.64,1);
  max-height: 95vh;
  display: flex;
  flex-direction: column;
}
@keyframes lb-pop {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.doc-lb-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.doc-lb-close:hover { background: rgba(239,68,68,0.7); }

.doc-lb-header {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}
.doc-lb-header-info { flex: 1; min-width: 0; }
.doc-lb-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent2);
  display: block;
  margin-bottom: 0.3rem;
}
.doc-lb-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 0.2rem;
}
.doc-lb-meta {
  font-size: 0.8rem;
  color: var(--text2);
}
.doc-lb-counter {
  font-size: 0.82rem;
  color: var(--text3);
  white-space: nowrap;
  margin-top: 0.25rem;
}

.doc-lb-stage {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  overflow: hidden;
  min-height: 0;
  background: #000;
}

.doc-lb-img-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 300px;
}
.doc-lb-img-wrap img {
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.2s;
}
.doc-lb-caption {
  font-size: 0.82rem;
  color: var(--text2);
  padding: 0.6rem 1rem;
  text-align: center;
  min-height: 2rem;
}

.doc-lb-nav {
  width: 48px;
  min-width: 48px;
  height: 100%;
  background: rgba(0,0,0,0.4);
  border: none;
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.doc-lb-nav:hover { background: rgba(37,99,235,0.4); color: white; }
.doc-lb-nav:disabled { opacity: 0.2; cursor: default; }

/* Thumbnail strip */
.doc-lb-thumbs {
  display: flex;
  gap: 6px;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  background: rgba(0,0,0,0.3);
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.doc-lb-thumbs::-webkit-scrollbar { height: 4px; }
.doc-lb-thumbs::-webkit-scrollbar-track { background: transparent; }
.doc-lb-thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.doc-lb-thumb {
  width: 64px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  opacity: 0.55;
}
.doc-lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}
.doc-lb-thumb:hover { opacity: 0.85; }
.doc-lb-thumb.active {
  border-color: var(--accent);
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.3);
}

/* ===== FOOTER ===== */
.doc-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text3);
}
.doc-footer a { color: var(--accent2); }
.doc-footer a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .doc-hero { padding: 3.5rem 0 2.5rem; }
  .doc-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .doc-lb-content { max-height: 100vh; border-radius: 0; }
  .doc-lb-img-wrap img { max-height: 320px; }
}
@media (max-width: 480px) {
  .doc-grid { grid-template-columns: 1fr; }
  .doc-lb-header { flex-direction: column; }
}
