/* =========================================================
   galerie.css
   ---------------------------------------------------------
   ZIEL:
   - Galerie-Seite optisch passend zur Startseite
   - Reiter oben sollen farblich genauso wirken
   - Home = leicht blau
   - Galerie = leicht türkis
   - Kontakt = türkis / blau
   - Über mich = warm / orange
   - Galerie bleibt eigene Seite mit eigener Grid-Optik
   - Lightbox-Bilder sollen NICHT blau wirken
   ========================================================= */


/* =========================================================
   1) VARIABLEN
   ========================================================= */
:root {
  --bg: #f6feff;
  --text: #0f172a;
  --muted: rgba(15, 23, 42, 0.68);
  --line: rgba(15, 23, 42, 0.10);

  --aqua: #10cfc7;
  --blue: #2a8cff;
  --warm: #ff7a00;

  --wrap: 1180px;

  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 18px;
  --pill: 999px;

  --shadow-soft: 0 14px 34px rgba(15, 23, 42, 0.08);
  --shadow-mid: 0 16px 38px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 20px 42px rgba(15, 23, 42, 0.12);
}


/* =========================================================
   2) RESET
   ========================================================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
  border: 0;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}


/* =========================================================
   3) BODY
   ========================================================= */
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 12% 0%, rgba(16, 207, 199, 0.18), transparent 60%),
    radial-gradient(900px 520px at 88% 0%, rgba(42, 140, 255, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg), #f7fbff);
  line-height: 1.5;
}


/* =========================================================
   4) WRAP
   ========================================================= */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}


/* =========================================================
   5) HEADER
   ========================================================= */
.top {
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}


/* =========================================================
   6) BRAND / LOGO
   ========================================================= */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo {
  width: 78px;
  height: 78px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 950;
  font-size: 1.55rem;
  letter-spacing: 0.2px;
}

.brand-sub {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}


/* =========================================================
   7) NAVIGATION / REITER
   ========================================================= */
.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-btn {
  text-decoration: none;
  font-weight: 950;
  color: rgba(15, 23, 42, 0.90);
  padding: 10px 14px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.08s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease;
}

.nav-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(42, 140, 255, 0.35);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.10);
}

.nav a:nth-child(1).nav-btn {
  border-color: rgba(42, 140, 255, 0.20);
  background: linear-gradient(90deg, rgba(42, 140, 255, 0.10), rgba(255, 255, 255, 0.90));
}

.nav a:nth-child(2).nav-btn {
  border-color: rgba(16, 207, 199, 0.22);
  background: linear-gradient(90deg, rgba(16, 207, 199, 0.12), rgba(255, 255, 255, 0.92));
}

.nav-btn-accent {
  border-color: rgba(16, 207, 199, 0.28);
  background: linear-gradient(90deg, rgba(16, 207, 199, 0.18), rgba(42, 140, 255, 0.12));
}

.nav-btn-ghost {
  border-color: rgba(255, 122, 0, 0.22);
  background: linear-gradient(90deg, rgba(255, 122, 0, 0.14), rgba(16, 207, 199, 0.10));
}

.nav-btn.active {
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.10);
  border-color: rgba(16, 207, 199, 0.28);
}


/* =========================================================
   8) HERO / EINLEITUNG
   ========================================================= */
.hero {
  padding: 18px 0 10px;
}

.hero-center {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 950;
  color: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.72);
}

.hero-title {
  margin: 12px 0 8px;
  font-size: clamp(2.2rem, 3.8vw, 3.3rem);
  line-height: 1.05;
}

.hero-mark {
  width: 72px;
  height: 8px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--aqua), var(--blue));
  box-shadow: 0 10px 28px rgba(16, 207, 199, 0.18);
}

.hero-text {
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 760px;
}


/* =========================================================
   9) SECTION / BEREICHE
   ========================================================= */
.section {
  padding: 14px 0;
}

.section-head {
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
}


/* =========================================================
   10) GALLERY PAGE WRAPPER
   ========================================================= */
.gallery-page {
  width: 100%;
}


/* =========================================================
   11) GALERIE GRID
   ========================================================= */
.grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}


/* =========================================================
   12) TILE / KACHEL
   ========================================================= */
.tile {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.tile:focus,
.tile:focus-visible,
.tile:active {
  outline: none;
  box-shadow: none;
  background: transparent;
}

button::-moz-focus-inner {
  border: 0;
}


/* =========================================================
   13) BILDRAHMEN / BLATT-AUF-BLATT
   ========================================================= */
.tile-frame {
  position: relative;
  height: 320px;
  border-radius: var(--r-lg);
}

.sheet {
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
}

.sheet-color.sheet-a {
  background: rgba(16, 207, 199, 0.18);
}

.sheet-color.sheet-b {
  background: rgba(42, 140, 255, 0.16);
}

.sheet-color.sheet-c {
  background: rgba(255, 122, 0, 0.12);
}

.sheet-white {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}


/* =========================================================
   14) BILD
   ========================================================= */
.tile-img {
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
  will-change: transform;
  pointer-events: none;
  outline: none;
  filter: none;
  mix-blend-mode: normal;
}

.tile:hover .tile-img img {
  transform: scale(1.04) translateY(-6px);
}

.tile:hover .sheet-white {
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.10);
  border-color: rgba(42, 140, 255, 0.28);
}

.tile-cap {
  margin-top: 10px;
  font-weight: 950;
  color: rgba(15, 23, 42, 0.85);
  text-align: center;
}


/* =========================================================
   14A) SPEZIAL-EFFEKT NUR FÜR BILD 15
   ========================================================= */
.tile-flip .flip-frame {
  perspective: 1200px;
}

.tile-flip .flip-card {
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  overflow: visible;
  z-index: 2;
}

.tile-flip .flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  transform-style: preserve-3d;
  transition: transform 0.9s ease;
}

.tile-flip:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.tile-flip .flip-card-front,
.tile-flip .flip-card-back {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.tile-flip .flip-card-front {
  transform: rotateY(0deg);
}

.tile-flip .flip-card-back {
  transform: rotateY(180deg);
}

.tile-flip .flip-card-front img {
  transform: scale(1);
  transition: transform 0.9s ease;
}

.tile-flip .flip-card-back img {
  transform: scale(1.18);
  transition: transform 0.9s ease;
}

.tile-flip:hover .flip-card-front img {
  transform: scale(1.03);
}

.tile-flip:hover .flip-card-back img {
  transform: scale(1.22);
}

/* Hier bewusst transform zurücksetzen, nicht translate */
.tile-flip:hover .tile-img img {
  transform: none;
}

.tile-flip:hover .flip-card-front img,
.tile-flip:hover .flip-card-back img {
  will-change: transform;
}


/* =========================================================
   15) FALLBACK FÜR ALTE GALERIE-KLASSEN
   ========================================================= */
.gallery-item {
  margin: 0;
}

.gallery-btn {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.gallery-btn img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-btn:hover img {
  transform: scale(1.03) translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.gallery-item figcaption {
  margin-top: 10px;
  font-weight: 950;
  color: rgba(15, 23, 42, 0.85);
  text-align: center;
}


/* =========================================================
   16) KONTAKTBLOCK UNTEN
   ========================================================= */
.contact {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--r-lg);
  padding: 22px 18px;
  box-shadow: var(--shadow-mid);
  text-align: center;
}

.contact h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.contact p {
  margin: 0 auto 12px;
  max-width: 72ch;
  color: var(--muted);
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}


/* =========================================================
   17) FALLBACK FÜR ÄLTERE OUTRO-KLASSEN
   ========================================================= */
.gallery-outro {
  margin-top: 28px;
}

.gallery-outro-inner {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--r-lg);
  padding: 22px 18px;
  box-shadow: var(--shadow-mid);
  text-align: center;
}

.gallery-outro-inner h2 {
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.gallery-outro-inner p {
  margin: 0 auto 12px;
  max-width: 72ch;
  color: var(--muted);
}

.gallery-outro-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.outro-btn {
  text-decoration: none;
  font-weight: 950;
  color: rgba(15, 23, 42, 0.90);
  padding: 10px 14px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.outro-btn-primary {
  border-color: rgba(16, 207, 199, 0.28);
  background: linear-gradient(90deg, rgba(16, 207, 199, 0.18), rgba(42, 140, 255, 0.12));
}

.outro-btn-secondary {
  border-color: rgba(255, 122, 0, 0.22);
  background: linear-gradient(90deg, rgba(255, 122, 0, 0.14), rgba(16, 207, 199, 0.10));
}


/* =========================================================
   18) FOOTER
   ========================================================= */
.footer {
  text-align: center;
  padding: 14px 0 6px;
}

.footer-links a {
  color: rgba(15, 23, 42, 0.75);
  font-weight: 950;
  text-decoration: none;
}

.footer-links a:hover {
  color: rgba(15, 23, 42, 0.95);
}

.footer-links span {
  color: rgba(15, 23, 42, 0.35);
  padding: 0 10px;
}

.footer-copy {
  margin-top: 6px;
  color: rgba(15, 23, 42, 0.55);
  font-weight: 700;
}


/* =========================================================
   19) LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 18px;
}

.lightbox.show {
  display: flex;
}

.lightbox-inner {
  max-width: min(1200px, 92vw);
  max-height: 90vh;
  text-align: center;
}

.lightbox-inner img,
#lightboxImg {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  outline: none;
  filter: none !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

/* Wichtig gegen blaue Browser-Überlagerungen */
#lightboxImg:focus,
#lightboxImg:active,
#lightboxImg:hover {
  outline: none;
  filter: none !important;
  mix-blend-mode: normal !important;
}

#lightboxTitle {
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 800;
  margin-top: 16px;
  line-height: 1.4;
}

.lightbox-close,
.lightbox-arrow {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
  transition: 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox-close:focus,
.lightbox-close:focus-visible,
.lightbox-arrow:focus,
.lightbox-arrow:focus-visible {
  outline: none;
  box-shadow: none;
}

.lightbox-close {
  top: 14px;
  right: 14px;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 28px;
}

.lightbox-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 2rem;
}

.lightbox-arrow.left {
  left: 18px;
}

.lightbox-arrow.right {
  right: 18px;
}


/* =========================================================
   19A) EXTRA FIX GEGEN BLAUES BILD IN FIREFOX / BROWSERN
   ---------------------------------------------------------
   Diese Regeln sind bewusst extra stark gesetzt.
   ========================================================= */
.lightbox *::selection {
  background: transparent;
  color: inherit;
}

.lightbox img::selection {
  background: transparent;
}

.lightbox,
.lightbox-inner,
#lightboxImg {
  -webkit-tap-highlight-color: transparent;
}

.lightbox img {
  color: transparent;
}


/* =========================================================
   20) RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .grid,
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tile-frame,
  .gallery-btn img {
    height: 300px;
  }
}

@media (max-width: 800px) {
  .top-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    justify-content: flex-start;
  }

  .grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tile-frame,
  .gallery-btn img {
    height: 290px;
  }
}

@media (max-width: 640px) {
  .grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .tile-frame,
  .gallery-btn img {
    height: 320px;
  }

  .logo {
    width: 70px;
    height: 70px;
  }

  .brand-name {
    font-size: 1.35rem;
  }

  .nav-btn {
    padding: 9px 12px;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 2.6rem);
  }

  .hero-text {
    font-size: 1rem;
  }

  .contact {
    padding: 20px 14px;
  }

  .lightbox-arrow.left {
    left: 8px;
  }

  .lightbox-arrow.right {
    right: 8px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
  }
}