/* Abi 82 Denzlingen – Retro-2010-Look, responsive (mobile first, Desktop ab 992px) */

* {
  box-sizing: border-box;
}

body {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  background-color: #000033;
  background-image: linear-gradient(#101050 0%, #000033 480px);
  font-size: 100.01%;
  margin: 0;
  padding: 10px 8px;
  color: #000;
}

/* mother-container, contains logo, navi, content and footer */
#mother {
  margin: auto;
  width: 100%;
  border: 1px solid silver;
  border-radius: 8px;
  color: black;
  background-color: white;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

/* Container mit dem Logo */
#logo {
  display: grid;
  width: 100%;
  aspect-ratio: 783 / 94;
  min-height: 42px;
  color: black;
  background-color: white;
  background-image: url(../images/top_logo.jpg);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%;
  border-bottom: 1px solid #cccccc;
}

#logo a {
  grid-area: 1 / 1;
  text-decoration: none;
  transition: filter 0.2s ease;
}

#logo a:hover,
#logo a:focus {
  filter: brightness(1.07);
}

/* Hauptüberschrift im Logo-Container (nur für Screenreader/Suchmaschinen) */
#logo h1 {
  font-size: 1.1em;
  color: white;
  margin: 0;
  padding-left: 5px;
  background-image: none;
  display: none;
}

/* Haupt-Navigationsbereich */
#navi {
  font-size: 0.8em;
  color: #ffffff;
  background-color: #000033;
  background-image: linear-gradient(#1a1a70 0%, #000033 100%);
  border-top: 1px solid #4a4a99;
}

#burger {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 1em;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.burger-box {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 22px;
  flex: none;
}

.burger-box span {
  display: block;
  height: 2px;
  width: 100%;
  background: #ffffff;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

#navi.offen .burger-box span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

#navi.offen .burger-box span:nth-child(2) {
  opacity: 0;
}

#navi.offen .burger-box span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

#navi-links {
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  text-align: center;
  transition: max-height 0.25s ease, visibility 0.25s;
}

#navi.offen #navi-links {
  max-height: 480px;
  visibility: visible;
}

#navi-links a {
  display: block;
  padding: 10px 12px;
  border-top: 1px solid #2a2a70;
  line-height: 1.4;
}

#navi-links a:first-of-type {
  border-top: 0;
}

#navi a:link    {text-decoration: none; color: #ffffff;}
#navi a:visited {text-decoration: none; color: #ffffff;}
#navi a:hover   {text-decoration: underline; color: #aaa;}
#navi a:active  {text-decoration: underline; color: #ffffff;}
#navi a:focus   {text-decoration: underline; color: #ffffff;}
#navi a.aktiv   {font-weight: bold; text-decoration: underline;}

#navi .trenner {
  color: #6666aa;
  padding: 0 3px;
  display: none;
}

#content {
  color: black;
  background-color: white;
  font-size: 0.84em;
  line-height: 1.45em;
  padding: 14px 14px 18px;
}

#content a:link    {text-decoration: none; color: #000000;}
#content a:visited {text-decoration: none; color: #000000;}
#content a:hover   {text-decoration: underline; color: #000033;}
#content a:active  {text-decoration: underline; color: #000000;}
#content a:focus   {text-decoration: underline; color: #000000;}

#content h1 {
  color: #000000;
  font-size: 1em;
  text-align: center;
  margin: 0.4em 0 1em;
}

#content h2 {
  color: #000033;
  font-size: 1em;
  margin: 1.2em 0 0.5em;
}

/* normaler Listenstil, beschränkt auf Inhaltsbereich */
#content ul {
  list-style: square;
  margin-left: 1.4em;
  padding-left: 0.4em;
}

#content ul li {
  margin: 0.35em 0;
}

#footer {
  color: black;
  background-image: linear-gradient(#ffffff 0%, #dcdce8 100%);
  border-top: #000033 1px solid;
}

#footer div {
  font-size: 0.7em;
  text-indent: 10px;
  padding: 8px 10px;
  text-align: center;
}

#footer a {
  color: #000;
}

/* ---- Startseite: großes Bild ---- */
.bild-rahmen {
  text-align: center;
  margin: 0;
}

.bild-rahmen a {
  position: relative;
  display: inline-block;
  max-width: 100%;
  transition: box-shadow 0.18s ease;
}

.bild-rahmen a:hover,
.bild-rahmen a:focus {
  box-shadow: 0 6px 18px rgba(0, 0, 51, 0.35);
}

.bild-rahmen img {
  display: block;
  max-width: 100%;
  height: auto;
}

.pfeil-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid #8f8fc4;
  background: radial-gradient(circle at 32% 28%, #3b3b9c 0%, #1a1a70 45%, #000033 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 0 rgba(120, 120, 220, 0.45), 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  animation: pfeil-puls 2.4s ease-in-out infinite;
  transition: transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.pfeil-badge svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
  transition: transform 0.2s ease;
}

@keyframes pfeil-puls {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(120, 120, 220, 0.45), 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(120, 120, 220, 0), 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }
}

.bild-rahmen a:hover .pfeil-badge,
.bild-rahmen a:focus .pfeil-badge {
  transform: translateX(3px) scale(1.06);
}

.bild-rahmen a:hover .pfeil-badge svg,
.bild-rahmen a:focus .pfeil-badge svg {
  transform: translateX(2px);
}

/* ---- Galerie ---- */
.galerie-info {
  font-size: 0.95em;
  margin: 0 0 10px;
  color: #333;
}

.galerie-einladungen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 2px 0 16px;
}

.galerie-einladungen-titel {
  font-size: 0.95em;
  font-weight: bold;
  color: #000033;
  letter-spacing: 0.02em;
}

#content .galerie-einladungen a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid #000033;
  border-radius: 999px;
  background-image: linear-gradient(#ffffff 0%, #dcdce8 100%);
  color: #000033;
  font-weight: bold;
  font-size: 0.9em;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 3px rgba(0, 0, 51, 0.15);
  transition: transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

#content .galerie-einladungen a svg {
  width: 14px;
  height: 14px;
  flex: none;
}

#content .galerie-einladungen a:hover,
#content .galerie-einladungen a:focus {
  background-image: linear-gradient(#3b3b9c 0%, #000033 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 10px rgba(0, 0, 51, 0.35);
}

#content .galerie-einladungen a:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 3px rgba(0, 0, 51, 0.3);
}

/* Masonry-Übersicht */
.galerie-grid {
  column-count: 1;
  column-gap: 10px;
  padding: 4px 0 10px;
}

.galerie-grid a {
  display: block;
  width: 100%;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 10px;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.galerie-grid a:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 51, 0.3);
}

.galerie-grid a:focus-visible {
  outline: 2px solid #000033;
  outline-offset: 2px;
}

.galerie-grid a:active {
  transform: translateY(-1px) scale(0.985);
  transition-duration: 0.06s;
}

.galerie-grid img {
  display: block;
  width: 100%;
  height: auto;
}

.galerie-weiter {
  font-size: 0.95em;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed #999;
}

.galerie-weiter-titel {
  display: block;
  font-size: 1.05em;
  font-weight: bold;
  color: #000033;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

#content .galerie-weiter a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 10px 10px 0;
  padding: 7px 14px;
  border: 1px solid #000033;
  border-radius: 999px;
  background-image: linear-gradient(#ffffff 0%, #dcdce8 100%);
  color: #000033;
  font-weight: bold;
  font-size: 1em;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 4px rgba(0, 0, 51, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

#content .galerie-weiter a::after {
  content: "";
  width: 11px;
  height: 11px;
  flex: none;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5l7 7-7 7' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5l7 7-7 7' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform 0.18s ease;
}

#content .galerie-weiter a:hover,
#content .galerie-weiter a:focus {
  background-image: linear-gradient(#3b3b9c 0%, #000033 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 5px 12px rgba(0, 0, 51, 0.35);
}

#content .galerie-weiter a:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 4px rgba(0, 0, 51, 0.3);
}

#content .galerie-weiter a:focus-visible {
  outline: 2px solid #3b3b9c;
  outline-offset: 2px;
}

#content .galerie-weiter a:hover::after,
#content .galerie-weiter a:focus::after {
  transform: translateX(3px);
}

/* ---- Lightbox ---- */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 20, 0.94);
  z-index: 1000;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  touch-action: none;
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}

#lightbox.offen {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.28s ease;
}

#lightbox .lb-bild {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  margin: 0 auto;
  transform: translateY(-50%);
  max-width: 94vw;
  max-height: 84vh;
  background: #fff;
  box-shadow: 0 0 24px #000;
  will-change: transform, opacity;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes lb-zoom-in {
  from { transform: translateY(-50%) scale(0.92); opacity: 0; }
  to   { transform: translateY(-50%) scale(1); opacity: 1; }
}

@keyframes lb-von-rechts {
  from { transform: translateY(-50%) translateX(64px); opacity: 0; }
  to   { transform: translateY(-50%) translateX(0); opacity: 1; }
}

@keyframes lb-von-links {
  from { transform: translateY(-50%) translateX(-64px); opacity: 0; }
  to   { transform: translateY(-50%) translateX(0); opacity: 1; }
}

#lightbox.offen .lb-bild.anfang     { animation: lb-zoom-in 0.34s ease; }
#lightbox.offen .lb-bild.wechsel-re { animation: lb-von-rechts 0.26s ease; }
#lightbox.offen .lb-bild.wechsel-li { animation: lb-von-links 0.26s ease; }

#lightbox .lb-info {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 51, 0.55);
  border: 1px solid rgba(160, 160, 220, 0.45);
  border-radius: 999px;
  color: #fff;
  font-size: 0.75em;
  padding: 4px 14px;
  white-space: nowrap;
}

.lb-btn {
  position: absolute;
  top: 50%;
  margin-top: -23px;
  width: 46px;
  height: 46px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #8f8fc4;
  background: radial-gradient(circle at 32% 28%, #3b3b9c 0%, #1a1a70 45%, #000033 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.lb-btn svg {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
  transition: transform 0.18s ease;
}

.lb-btn:hover,
.lb-btn:focus {
  border-color: #c6c6ef;
  box-shadow: 0 0 0 4px rgba(120, 120, 220, 0.28), 0 6px 18px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.lb-btn.zurueck { left: 10px; }
.lb-btn.weiter  { right: 10px; }

.lb-btn.zurueck:hover,
.lb-btn.zurueck:focus,
.lb-btn.weiter:hover,
.lb-btn.weiter:focus {
  transform: translateY(-2px);
}

.lb-btn.zurueck:hover svg,
.lb-btn.zurueck:focus svg {
  transform: translateX(-3px);
}

.lb-btn.weiter:hover svg,
.lb-btn.weiter:focus svg {
  transform: translateX(3px);
}

.lb-btn.schliessen {
  top: 10px;
  right: 10px;
  margin-top: 0;
  width: 40px;
  height: 40px;
}

.lb-btn.schliessen svg {
  width: 18px;
  height: 18px;
}

.lb-btn.schliessen:hover svg,
.lb-btn.schliessen:focus svg {
  transform: rotate(90deg);
}

.lb-btn[disabled] {
  opacity: 0.35;
  cursor: default;
}

/* ---- Tablet ab 768px ---- */
@media (min-width: 768px) {
  .galerie-grid {
    column-count: 2;
  }
}

/* ---- Desktop ab 992px ---- */
@media (min-width: 992px) {
  body {
    padding: 28px 12px;
  }

  #mother {
    width: 920px;
    border-radius: 4px;
  }

  #navi {
    line-height: 2.1;
    padding: 6px 8px;
  }

  #burger {
    display: none;
  }

  #navi-links {
    display: contents;
    visibility: visible;
  }

  #navi-links a {
    display: inline;
    padding: 0;
    border-top: 0;
  }

  #navi .trenner {
    display: inline;
  }

  #content {
    padding: 22px 30px;
  }

  .galerie-grid {
    column-count: 3;
    column-gap: 12px;
  }

  .galerie-grid a {
    margin-bottom: 12px;
  }

  .pfeil-badge {
    width: 52px;
    height: 52px;
  }

  .pfeil-badge svg {
    width: 25px;
    height: 25px;
  }

  .lb-btn {
    width: 54px;
    height: 54px;
    margin-top: -27px;
  }

  .lb-btn svg {
    width: 24px;
    height: 24px;
  }

  .lb-btn.zurueck { left: 16px; }
  .lb-btn.weiter  { right: 16px; }

  .lb-btn.schliessen {
    top: 14px;
    right: 14px;
    width: 46px;
    height: 46px;
  }

  .lb-btn.schliessen svg {
    width: 21px;
    height: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
