/* main.css — Publieke galerij styling — VUN Fotoportal
   Developed by Vincent van Unen | www.unen.nl | code@unen.nl
   Kleurpalet: Pruisischblauw #013449 | Mint aqua #2DD4BF | Lichtgrijs #E5E7EB */

:root {
  --prussian:    #013449;
  --mint:        #2DD4BF;
  --mint-dark:   #20a899;
  --mint-light:  #7ee8d9;
  --gray:        #E5E7EB;
  --bg:          #010e1a;
  --bg-surface:  #011f33;
  --bg-card:     #022a45;
  --bg-hover:    #03364f;
  --text:        #e2e8f0;
  --text-muted:  #8B9BB4;
  --text-dim:    #4a6278;
  --border:      #0d3652;
  --shadow:      0 4px 24px rgba(0,0,0,0.5);
  --radius:      12px;
  --radius-sm:   6px;
  --transition:  0.25s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Anti-copy measures */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.gallery-item, .photo-wrapper {
  -webkit-user-select: none;
  user-select: none;
}

/* ─── Typography ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

a { color: var(--mint); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--mint-light); }

/* ─── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--prussian); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--mint-dark); }

/* ─── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(1, 14, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(1rem, 4vw, 3rem);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.navbar-brand .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--mint), var(--prussian));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 6px 14px;
  gap: 8px;
  transition: border-color var(--transition);
}

.search-bar:focus-within {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1);
}

.search-bar input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.9rem;
  width: 200px;
}

.search-bar input::placeholder { color: var(--text-dim); }

.search-bar svg { color: var(--text-muted); flex-shrink: 0; }

/* ─── Hero Section ──────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: clamp(300px, 50vh, 560px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--prussian) 0%, #011828 50%, var(--bg) 100%);
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(1,14,26,0.95) 0%, rgba(1,14,26,0.3) 60%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: clamp(1rem, 4vw, 3rem);
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

.hero-tag {
  display: inline-block;
  background: rgba(45, 212, 191, 0.15);
  color: var(--mint);
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero h1 {
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 500px;
}

/* ─── Filters / Categoriebalk ──────────────────────────────────────────────── */
.filters {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 60px;
  z-index: 90;
}

.filters-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  height: 52px;
}

.filters-inner::-webkit-scrollbar { display: none; }

.filter-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--mint);
  color: var(--mint);
}

.filter-btn.active {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--prussian);
  font-weight: 600;
}

/* ─── Gallery Container ─────────────────────────────────────────────────────── */
.gallery-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem);
}

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 12px;
}

.gallery-header h2 {
  font-size: 1.4rem;
  color: var(--text);
}

.gallery-count {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ─── Masonry Grid ──────────────────────────────────────────────────────────── */
.masonry-grid {
  columns: 4;
  column-gap: 16px;
}

@media (max-width: 1200px) { .masonry-grid { columns: 3; } }
@media (max-width: 768px)  { .masonry-grid { columns: 2; } }
@media (max-width: 480px)  { .masonry-grid { columns: 1; } }

.gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
  cursor: pointer;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(45,212,191,0.15);
}

/* Blokkeer afbeeldingen slepen/bewaren */
.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
}

/* Watermerk overlay */
.gallery-item::after {
  content: attr(data-copyright);
  position: absolute;
  bottom: 8px;
  right: 10px;
  z-index: 3;
  color: rgba(255,255,255,0.55);
  font-size: 10px;
  font-family: Arial, sans-serif;
  pointer-events: none;
  user-select: none;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  letter-spacing: 0.02em;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), filter var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.04);
  filter: brightness(1.08);
}

/* Hover overlay */
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(1,14,26,0.9) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  pointer-events: none;
}

.gallery-item:hover .gallery-item-overlay { opacity: 1; }

.gallery-item-title {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.gallery-item-meta {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.gallery-item-category {
  background: rgba(45,212,191,0.2);
  color: var(--mint);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
}

/* ─── Lazy loading skeleton ─────────────────────────────────────────────────── */
.gallery-skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Load More button ──────────────────────────────────────────────────────── */
.load-more-container {
  text-align: center;
  padding: 2rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn-primary {
  background: var(--mint);
  color: var(--prussian);
}

.btn-primary:hover {
  background: var(--mint-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(45,212,191,0.3);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--mint);
  color: var(--mint);
}

.btn-outline:hover {
  background: rgba(45,212,191,0.1);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ─── Lightbox ───────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner {
  position: relative;
  max-width: min(90vw, 1200px);
  max-height: 90vh;
  display: flex;
  align-items: center;
  gap: 0;
}

.lightbox-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-card);
}

/* Lightbox watermark overlay */
.lightbox-img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  cursor: default;
  pointer-events: all;
}

.lightbox-img-wrap::after {
  content: attr(data-watermark);
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 6;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  font-family: Arial, sans-serif;
  pointer-events: none;
  user-select: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
}

.lightbox-img {
  max-width: min(80vw, 1000px);
  max-height: 80vh;
  object-fit: contain;
  display: block;
  border-radius: var(--radius);
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(1,14,26,0.7);
  border: 1px solid var(--border);
  color: var(--text);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
}

.lightbox-nav:hover {
  background: rgba(45,212,191,0.2);
  border-color: var(--mint);
  color: var(--mint);
}

.lightbox-nav.prev { left: -60px; }
.lightbox-nav.next { right: -60px; }

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(1,14,26,0.7);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.lightbox-close:hover { background: rgba(255,80,80,0.2); border-color: #ff5050; color: #ff5050; }

.lightbox-info {
  position: absolute;
  bottom: -80px;
  left: 0;
  right: 0;
  color: var(--text);
  text-align: center;
  padding: 12px;
}

.lightbox-info h3 { font-size: 1rem; margin-bottom: 4px; }
.lightbox-info p  { font-size: 0.8rem; color: var(--text-muted); }

.lightbox-copyright {
  position: absolute;
  bottom: 12px;
  left: 16px;
  z-index: 6;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  pointer-events: none;
  user-select: none;
}

/* ─── Empty state ──────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state svg { width: 64px; height: 64px; opacity: 0.3; margin: 0 auto 1rem; display: block; }
.empty-state h3  { font-size: 1.2rem; margin-bottom: 8px; color: var(--text); }

/* ─── Copyright notice (toast) ──────────────────────────────────────────────── */
.copyright-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--mint);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.85rem;
  z-index: 99999;
  transition: transform 0.3s ease;
  text-align: center;
  max-width: 400px;
  backdrop-filter: blur(8px);
}

.copyright-toast.show { transform: translateX(-50%) translateY(0); }

/* ─── Footer ────────────────────────────────────────────────────────────────── */
footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 2rem clamp(1rem, 4vw, 3rem);
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.footer-copyright { color: var(--text-muted); font-size: 0.85rem; }
.footer-links     { display: flex; gap: 16px; }
.footer-links a   { color: var(--text-muted); font-size: 0.85rem; }
.footer-links a:hover { color: var(--mint); }

/* ─── Loading spinner ─────────────────────────────────────────────────────── */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 2rem auto;
  display: block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Tags ──────────────────────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  background: rgba(45,212,191,0.1);
  color: var(--mint);
  border: 1px solid rgba(45,212,191,0.2);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
}

.tag:hover {
  background: rgba(45,212,191,0.2);
  border-color: var(--mint);
}

/* ─── SEO foto-pagina ───────────────────────────────────────────────────────── */
.photo-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 3rem);
}

.photo-page-main {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .photo-page-main { grid-template-columns: 1fr; }
}

.photo-page-img-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.photo-page-img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
}

.photo-page-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-page-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

.photo-meta-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.photo-meta-card h2 { font-size: 1.4rem; margin-bottom: 8px; }
.photo-meta-card p  { color: var(--text-muted); line-height: 1.7; }

.meta-list { list-style: none; margin-top: 1rem; }
.meta-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.meta-list li span { color: var(--text); }

.copyright-box {
  background: rgba(45,212,191,0.05);
  border: 1px solid rgba(45,212,191,0.2);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Responsief ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .navbar-inner { height: 52px; }
  .lightbox-nav.prev { left: 4px; }
  .lightbox-nav.next { right: 4px; }
  .lightbox-img { max-width: 96vw; max-height: 70vh; }
  .search-bar input { width: 120px; }
}

/* ─── Animaties ─────────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

.gallery-item {
  animation: fadeIn 0.4s ease both;
}
