/* css/style.css */

/* -------------------------------------------------- */
/* 1) RESET & GRUNDEINSTELLUNGEN */
/* -------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* -------------------------------------------------- */
/* 2) BODY & LAYOUT */
/* -------------------------------------------------- */
/* Body als Flexcontainer:
   Navigation links, Hauptinhalt (main) rechts */
body {
  margin: 0;
  padding: 0;
  display: flex;
  font-family: Arial, sans-serif;
  background-color: #f0f8ff; /* Winterliches Hellblau */
}

/* -------------------------------------------------- */
/* 3) NAVIGATION LINKS */
/* -------------------------------------------------- */
nav {
  width: 220px;             /* Breite der linken Spalte */
  background-color: #d32f2f; /* Nikolaus-Rot */
  min-height: 100vh;        /* Volle Bildschirmhöhe */
  color: #fff;
  padding: 20px 0;
  box-sizing: border-box;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  margin: 0 0 10px 0;
}

/* Navigation-Links als Block-Elemente => "Kästchen" */
nav a {
  display: block;
  text-decoration: none;
  color: #fff;
  background-color: transparent;
  padding: 12px 15px;
  border: 1px solid #fff;   /* Weißer Rahmen */
  border-radius: 5px;      
  transition: background-color 0.3s, color 0.3s;
}

nav a:hover {
  background-color: #b71c1c;
}

nav a.active {
  background-color: #b71c1c; 
}

/* -------------------------------------------------- */
/* 4) HAUPTBEREICH (MAIN) & FOOTER */
/* -------------------------------------------------- */
main {
  flex: 1;               
  padding: 20px;
  box-sizing: border-box;
}

footer {
  margin-top: 20px;
  padding: 10px;
  text-align: center;
  color: #fff;
  background-color: #d32f2f;
}

/* -------------------------------------------------- */
/* 5) HEADER-BEREICH (Seiten-Header) */
/* -------------------------------------------------- */
/* Gesamter Header-Container */
.page-header {
  background-color: #fff; 
  border: 1px solid #ccc; 
  padding: 20px;          
  margin-bottom: 20px;    
}

/* Oberer Header-Teil: Logo & Titel nebeneinander */
.header-top {
  display: flex;
  align-items: center;
  gap: 20px;             
  margin-bottom: 10px;   
}

/* Logo verkleinern */
.logo {
  max-width: 120px;
  height: auto;
}

/* Haupttitel */
.header-top h1 {
  font-size: 1.8rem;
  color: #d32f2f; /* Nikolaus-Rot */
}

/* Untertitel */
.header-subtitle {
  font-size: 1rem;
  color: #555;
  line-height: 1.4;
}

/* -------------------------------------------------- */
/* 6) HERO-BEREICH (OPTIONAL) */
/* -------------------------------------------------- */
.hero {
  display: flex;               /* Ermöglicht die horizontale Anordnung */
  align-items: center;         /* Zentriert Bild und Text vertikal */
  gap: 20px;                   /* Abstand zwischen Bild und Text */
  background-color: #fff;
  padding: 20px;
  border: 1px solid #ccc;
  margin-bottom: 20px;
}


.hero h1 {
  font-size: 2.5rem; /* oder einen anderen Wert nach Wunsch */
  color: #d32f2f;     /* Rotton beibehalten */
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 10px;
}

.hero-img {
  max-width: 200px;
  height: auto;
  border: 2px solid #d32f2f;
  border-radius: 5px;
}

/* -------------------------------------------------- */
/* 7) INTRO-SEKTION (OPTIONAL) */
/* -------------------------------------------------- */
.intro {
  background-color: #ffffffcc; /* Weiß mit leichter Transparenz */
  padding: 20px;
  border: 1px solid #ccc;
  margin-bottom: 20px;
}

.intro-photos {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.intro-photos img {
  width: 50%;
  height: auto;
  object-fit: cover;
  border: 2px solid #ccc;
  border-radius: 5px;
}

/* -------------------------------------------------- */
/* 8) NEWS-BOX */
/* -------------------------------------------------- */
/* Wenn du neben .news article noch eine andere "News-Box" verwenden möchtest: */
.news-box {
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 20px;
  margin-bottom: 20px;
  border-left: 6px solid #d32f2f;
}

.news-box h2 {
  color: #d32f2f;
  margin-bottom: 15px;
}

/* Einzelne Artikel in der News-Box */
.news-box article {
  margin-bottom: 20px;
  padding: 10px;
  background: #f9f9f9;
  border-left: 4px solid #d32f2f;
}

.news-box h3 {
  margin-bottom: 5px;
}

/* -------------------------------------------------- */
/* 9) COOKIE-BANNER */
/* -------------------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%; /* oder calc(100% - 220px), wenn Nav fixiert ist */
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cookie-banner p {
  margin: 0;
  padding: 0 10px;
  text-align: center;
}

.cookie-banner button {
  margin-left: 10px;
  background-color: #d32f2f;
  color: #fff;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 5px;
}

.cookie-banner button:hover {
  background-color: #b71c1c;
}

/* -------------------------------------------------- */
/* 10) NEWS (BESTEHEND) */
/* -------------------------------------------------- */
.news article {
  margin-bottom: 20px;
  padding: 10px;
  background: #fff;
  border-left: 4px solid #d32f2f;
}

/* -------------------------------------------------- */
/* 11) FOTOS / GALERIE */
/* -------------------------------------------------- */
.gallery .photo-container {
  display: flex;
  gap: 10px;
}

.gallery .photo-container img {
  width: 300px;
  height: 200px;
  object-fit: cover;
}

/* -------------------------------------------------- */
/* 12) FEHLER- & FORMULAR-STILE */
/* -------------------------------------------------- */
#error-msg {
  color: red;
  margin-top: 10px;
}

#protected-content {
  display: none; /* Zunächst ausgeblendet */
  margin-top: 20px;
}

/* Einfaches Formular-Layout */
form {
  display: flex;
  flex-direction: column;
  max-width: 300px;
}

form label,
form input,
form button {
  margin-bottom: 10px;
}

/* -------------------------------------------------- */
/* 13) TABELLEN FÜR ANLÄSSE (Excel-Import) */
/* -------------------------------------------------- */
table {
  width: 100%;        
  border-collapse: collapse;
  table-layout: auto; 
}

th, td {
  border: 1px solid #ccc;
  padding: 8px;
}

/* -------------------------------------------------- */
/* 14) ALBEN (FOTOS) */
/* -------------------------------------------------- */
.photo-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap; /* ermöglicht Umbruch bei vielen Bildern */
}

.photo-container img {
  width: 300px;
  height: 200px;
  object-fit: cover;
  border: 2px solid #ccc;
  border-radius: 5px;
}

.album {
  margin-bottom: 30px; /* Abstand zwischen Alben */
}

.album h2 {
  margin-bottom: 10px;
  color: #d32f2f;
}

/* -------------------------------------------------- */
/* 15) GLOBALE SECTION-ABSTÄNDE */
/* -------------------------------------------------- */
section {
  margin-bottom: 80px; /* Mehr Abstand nach unten zwischen den Sektionen */
}

/* -------------------------------------------------- */
/* 16) Container für alle Zunftrat-Mitglieder */
/* -------------------------------------------------- */
.zunftrat-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

/* Einzelne Mitglieds-Karten */
.zunftrat-member {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 200px;          /* Feste Breite der Karten, anpassbar */
  padding: 15px;
  text-align: center;
  box-sizing: border-box;
}

/* Foto in der Karte */
.zunftrat-member img {
  width: 100%;           /* Füllt die Karten-Breite */
  height: auto;
  border-radius: 5px;
  margin-bottom: 10px;
}

/* Name & Funktion */
.zunftrat-member h2 {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 5px;
}

.zunftrat-member .funktion {
  font-weight: bold;
  color: #d32f2f; /* Nikolaus-Rot */
  margin-bottom: 10px;
}

.zunftrat-member:hover {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
  transition: 0.2s;
}

/* ---------------------------------------------- */
/* Responsive Layout: weniger Spalten bei kleinen Screens */
/* ---------------------------------------------- */
@media (max-width: 1024px) {
  .zunftrat-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .zunftrat-container {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------- */
/* EmailButton */
/* ---------------------------------------------- */
.email-button {
  display: inline-block;
  margin-top: 0.5em;
  padding: 0.5em 1em;
  background-color: #d40000; /* Zunftrot oder was immer du magst */
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}
.email-button:hover {
  background-color: #a00000;
}

/* ---------------------------------------------- */
/* MFA Button */
/* ---------------------------------------------- */

.mfa-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #d32f2f;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}
.mfa-button:hover {
  background-color: #a32222;
}

/* ---------------------------------------------- */
/* Protokolle */
/* ---------------------------------------------- */

.protokoll-liste {
  margin-top: 1.5rem;
}

.protokoll-eintrag {
  padding: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid #ddd;
  display: flex;
  align-items: center;
  gap: 10px;
}

.protokoll-eintrag .icon {
  font-size: 1.4rem;
}

#pdf-preview-container {
  border: 1px solid #ccc;
  padding: 10px;
  width: fit-content;
  margin-top: 20px;
}

#pdf-preview {
  display: block;
  max-width: 100%;
  height: auto;
}

.protokoll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 1.5rem;
}

.protokoll-eintrag {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  background-color: #fff;
}

.protokoll-eintrag canvas {
  width: 100%;
  height: auto;
}


@media (max-width: 768px) {
  .pdf-preview {
    display: none !important;
  }

  .pdf-icon-mobile {
    display: inline-block;
    font-size: 2rem;
    margin-top: 5px;
  }
}

@media (min-width: 769px) {
  .pdf-icon-mobile {
    display: none;
  }
}
/* ---------------------------------------------- */
/* PopUp */
/* ---------------------------------------------- */
.popup {
  position: fixed !important;
  inset: 0;
  background-color: rgba(0,0,0,0.6);
  display: none; /* wird mit JS aktiviert */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-content {
  position: relative;
  background: transparent;
  padding: 0;
  border-radius: 0;
  max-width: 50vw;
  max-height: 90vh;
}

.popup-content img {
  width: 100%;
  height: auto;
  animation: rotateIn 1.5s ease-in-out forwards;
  position: relative;
  z-index: 1;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 36px;
  color: white;
  cursor: pointer;
  background: none;
  border: none;
  text-shadow: 1px 1px 4px black;
  z-index: 2;
}

@keyframes rotateIn {
  0% {
    transform: scale(0.5) rotate(-180deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .popup-content {
    max-width: 90vw;
  }

  .popup-content img {
    width: 100%;
  }
}

/* ---------------------------------------------- */
/* RESPONSIVE DESIGN – Mobile Navigation mit Burger */
/* ---------------------------------------------- */
.burger-button {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 26px;
  padding: 6px 10px;
  cursor: pointer;
}

/* Responsive ab max-width 768px */
@media (max-width: 768px) {

  body {
    flex-direction: column;
  }

  nav {
    width: 100%;
    background-color: #d32f2f;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .burger-button {
    display: block;
  }

  #main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #d32f2f;
    margin-top: 5px;
    padding: 0;
  }

  #main-nav.nav-visible {
    display: flex;
  }

  nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  nav li {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
  }

  nav a {
    display: block;
    padding: 10px;
    font-size: 1rem;
    color: white;
    text-decoration: none;
  }

  nav a:hover {
    background-color: #b71c1c;
  }

  /* Hauptinhalt & Layout-Anpassungen */
  main {
    width: 100%;
    padding: 10px;
  }

  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-img {
    max-width: 80%;
  }

  .intro-photos {
    flex-direction: column;
  }

  .intro-photos img {
    width: 100%;
  }

  .popup-content {
    max-width: 90vw;
  }

  .zunftrat-container {
    grid-template-columns: 1fr;
  }

  .gallery .photo-container {
    flex-direction: column;
    align-items: center;
  }

  .gallery .photo-container img,
  .photo-container img {
    width: 100%;
    height: auto;
  }

  footer {
    font-size: 0.9rem;
  }

  .email-button,
  .mfa-button {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
}
