/* ==========================================================================
   Hochzeitsgalerie – Grundfarben & Schriften
   Zum Anpassen an eure Hochzeitsfarben einfach die Werte hier ändern.
   ========================================================================== */
:root {
  --color-bg: #fbf7f2;
  --color-surface: #ffffff;
  --color-text: #2f2a26;
  --color-text-muted: #6f6660;
  --color-accent: #a9705f;      /* dusty rose / terracotta */
  --color-accent-dark: #7d4f42;
  --color-line: #e7ddd3;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 14px;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 2.5rem;
  max-width: 700px;
  margin: 0 auto;
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--color-accent);
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0;
  color: var(--color-text);
}
.hero-date {
  margin: 0.4rem 0 1.2rem;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}
.hero-text {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin: 0;
}

/* ---------- Tabs ---------- */
.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  background: var(--color-bg);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-line);
  flex-wrap: wrap;
}
.tab-btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.tab-btn:hover { border-color: var(--color-accent); color: var(--color-accent-dark); }
.tab-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ---------- Upload panel ---------- */
.upload-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
}
.upload-panel h2 {
  font-family: var(--font-heading);
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}
.upload-hint {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0 0 1.2rem;
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.file-drop {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 2px dashed var(--color-line);
  border-radius: var(--radius);
  padding: 1.5rem;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.file-drop:hover { border-color: var(--color-accent); background: #fff8f4; }
.file-drop-icon { font-size: 1.8rem; }
.file-drop input[type="file"] {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.file-preview-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.file-preview-list li {
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}
.btn-primary {
  margin-top: 1.25rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-primary:hover:not(:disabled) { background: var(--color-accent-dark); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.progress-wrap {
  margin-top: 1rem;
  background: var(--color-line);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--color-accent);
  transition: width 0.15s ease;
}
.upload-status {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

/* ---------- Gallery ---------- */
.gallery-loading, .gallery-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 3rem 1rem;
  font-size: 1.05rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.6rem;
}
.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-line);
  border: none;
  padding: 0;
}
.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}
.gallery-item:hover img,
.gallery-item:hover video { transform: scale(1.04); }
.video-badge {
  position: absolute;
  bottom: 0.4rem;
  right: 0.4rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  pointer-events: none;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  color: var(--color-text-muted);
  padding: 2rem 1rem 3rem;
  font-size: 0.9rem;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 14, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
/* Ohne diese Regel gewinnt unsere .lightbox-Regel gegen die eingebaute
   Browser-Regel fuer [hidden], wodurch das Overlay staendig sichtbar waere. */
.lightbox[hidden] {
  display: none;
}
.lightbox-image {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 6px;
}
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  width: 44px;
  height: 44px;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-bar {
  position: absolute;
  bottom: 1.25rem;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  color: #fff;
  font-size: 0.9rem;
}
.lightbox-download {
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .hero { padding: 2.5rem 1.25rem 1.75rem; }
  .lightbox-nav { width: 38px; height: 38px; font-size: 1.2rem; }
}
