/* ============================================================
   39. vOffice Europalauf – Fotogalerie
   Farbpalette abgeleitet aus dem Renn-Logo (#00416e / #00e1f0)
   ============================================================ */

:root {
  --color-ink: #0a1b2b;
  --color-primary: #00416e;
  --color-primary-light: #0a5f96;
  --color-accent: #00e1f0;
  --color-bg: #f5f7f9;
  --color-surface: #ffffff;
  --color-text: #16222c;
  --color-text-muted: #5b6b76;
  --color-border: #e3e8eb;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 8px 24px rgba(10, 27, 43, 0.08);
  --shadow-lift: 0 16px 40px rgba(10, 27, 43, 0.18);
  --transition: 240ms cubic-bezier(.22,.61,.36,1);
  --header-h: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
}

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-header__logo {
  height: 38px;
  width: auto;
}

.site-header__nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-header__nav::-webkit-scrollbar { display: none; }

.nav-link {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover {
  color: var(--color-primary);
  background: rgba(0, 65, 110, 0.06);
}

.nav-link.is-active {
  color: #fff;
  background: var(--color-primary);
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  padding: 96px 24px 84px;
  overflow: hidden;
  color: #fff;
  text-align: center;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 20%, rgba(0, 225, 240, 0.35), transparent 55%),
    radial-gradient(circle at 82% 82%, rgba(0, 225, 240, 0.18), transparent 50%),
    linear-gradient(135deg, #00304f 0%, var(--color-primary) 45%, #023a63 100%);
}

.hero__eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
}

.hero__title {
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero__subtitle {
  margin: 0 auto;
  max-width: 620px;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------------- Gallery ---------------- */

.gallery-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

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

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.gallery-item:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  background: linear-gradient(180deg, rgba(10,27,43,0) 45%, rgba(10,27,43,0.72) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover .gallery-item__overlay,
.gallery-item:focus-visible .gallery-item__overlay {
  opacity: 1;
}

.gallery-item__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 65, 110, 0.55);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 5px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.gallery-item.is-hidden {
  display: none;
}

/* fade-in on load */
.gallery-item img {
  opacity: 0;
}
.gallery-item img.is-loaded {
  opacity: 1;
  transition: opacity 320ms ease, transform 420ms ease;
}

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--color-ink);
  color: rgba(255,255,255,0.7);
  padding: 40px 24px;
}

.site-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-footer__logo {
  height: 28px;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.site-footer__inner p {
  margin: 0;
  font-size: 0.85rem;
}

/* ---------------- Lightbox ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 14, 22, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(6px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__stage {
  max-width: min(1100px, 92vw);
  max-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 220ms ease, transform 220ms ease;
}

.lightbox__img.is-visible {
  opacity: 1;
  transform: scale(1);
}

.lightbox__caption {
  max-width: 720px;
  text-align: center;
  margin-top: 20px;
  color: rgba(255,255,255,0.92);
}

.lightbox__caption p#lightbox-alt {
  margin: 0 0 6px;
  font-size: 0.98rem;
  line-height: 1.5;
}

.lightbox__counter {
  margin: 0;
  font-size: 0.82rem;
  color: var(--color-accent);
  letter-spacing: 0.04em;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}
.lightbox__close:hover { background: rgba(255,255,255,0.2); }

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.lightbox__nav:hover {
  background: var(--color-accent);
  color: var(--color-ink);
}

.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

@media (max-width: 640px) {
  .lightbox__nav { width: 42px; height: 42px; }
  .lightbox__nav--prev { left: 6px; }
  .lightbox__nav--next { right: 6px; }
  .lightbox__close { top: 12px; right: 12px; }
  .hero { padding: 72px 20px 56px; }
  .site-header__inner { padding: 0 16px; }
}
