
/* 1. Grundeinstellungen */

@page {
  size: A4 landscape;
  margin: 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
}

body {
  background: #ddd;
  font-family: sans-serif;
  position: relative;
  min-height: 100vh;
  padding-bottom: 100px;

}


/* 2. A4-Seite */

.seite {
  width: 297mm;
  height: 210mm;
  margin: 20px auto;
  background: white;
  overflow: hidden;
}


/* 3. Fotoraster */

.raster {
  display: grid;
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;

  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));

  gap: 0.5mm;
  padding: 3mm;
}


/* 4. Fotos */

.raster img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  border: none;
}


/* 5. Bildschirmvorschau */

@media screen {
  .seite {
    width: calc(100vw - 32px);
    max-width: 297mm;
    height: auto;
    aspect-ratio: 297 / 210;
    margin: 16px auto;
  }
}


/* 6. Drucken-Button */

body > .druck-button {
  display: block;
  position: relative;
  z-index: 100;
  width: max-content;
  margin: 24px auto;
  padding: 12px 24px;
  background: #222;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
}

body > .druck-button:hover {
  background: #444;
}


/* 7. Texte */

p {
  margin: 4mm;
  font-size: 4mm;
  bottom: 10mm;
}

h1 {
  margin: 4mm;
  font-size: 10mm;
  text-decoration: underline;
  text-align: center;
}

h2 {
  margin: 4mm;
  font-size: 6mm;
  text-decoration: underline;
  text-align: center;
}

.hinweis2 {
  margin: 4mm;
  padding: 3mm;
  background: #f3f3f3;
  border-radius: 2mm;
  text-align: center;
  font-size: 2mm;
}


/* 8. Interaktiver Fotoaustausch */

.raster img.foto-feld {
  cursor: pointer;
}

.raster img.foto-feld.foto-aktiv {
  outline: 3px dashed #555;
  outline-offset: -4px;
  opacity: 0.7;
}

.raster img.foto-feld:focus-visible {
  outline: 3px solid #555;
  outline-offset: -3px;
}


/* 9. Hinweis */

.hinweis {
  margin: 4mm;
  padding: 3mm;
  background: #f3f3f3;
  border-radius: 2mm;
  text-align: center;
  font-size: 4mm;
}


/* 10. Druckeinstellungen */

@media print {

  @page {
    size: A4 landscape;
    margin: 0;
  }

  html,
  body {
    width: 297mm !important;
    height: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: white !important;
  }

  body > * {
    display: none !important;
  }

  body > .seite {
    display: block !important;
    position: absolute !important;

    width: 297mm !important;
    height: 210mm !important;

    top: 0 !important;
    left: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden !important;
    background: white !important;

    transform: none !important;
  }

  /* Untere vier Fotos drehen */

  .raster img:nth-child(n + 5) {
    transform: rotate(180deg);
  }

  /* Hinweise ausblenden */

  .hinweis,
  .hinweis2 {
    display: none !important;
  }

  /* Interaktive Hervorhebungen entfernen */

  .raster img.foto-feld {
    cursor: default;
    outline: none !important;
    opacity: 1 !important;
  }

  /* Mittellinie */

  .raster::after {
    content: "";
    display: block;
    position: absolute;
    z-index: 9999;
    left: 25%;
    width: 50%;
    top: 50%;
    border-top: 2px dashed black;
    transform: translateY(-1px);
    pointer-events: none;
  }
}


 .site-footer {
  color: #555454;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: left;
  padding: 10px 15px;
}

 .site-footer a {
color: #555454;
text-decoration: none;
background: none;
font-size: 1rem;
margin: 0;
padding: 0;
}

.site-footer a:hover {
text-decoration: underline;
}
 .site-footer p {
  font-size: 0.5rem;
  margin: 1 0 0 0;
 }
  
.visitor-counter {
position: absolute;
right: 15px;
bottom: 10px;
font-size: 0.5rem;
}    