@font-face {
  font-family: 'Open Sans';
  src: url('fonts/open-sans-v43-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  src: url('fonts/open-sans-v43-latin-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  src: url('fonts/open-sans-v43-latin-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  src: url('fonts/open-sans-v43-latin-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  src: url('fonts/open-sans-v43-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  src: url('fonts/open-sans-v43-latin-800italic.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background: #fff;
  color: #222;
}

header {
  background-color: #e3000f;
  color: white;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
}

.header-top,
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem;
  flex-wrap: wrap;
}

.header-logo img,
.footer-logo img {
  height: 90px;
}

.header-social,
.footer-social {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
  text-transform: uppercase;
  text-decoration: none;
}

.social-link span {
  display: inline;
}

.header-bottom {
  text-align: center;
  padding: 1.5rem 1rem;
}

.header-bottom h1,
.header-bottom p {
  margin: 0.3rem 0;
  font-weight: bold;
  text-transform: uppercase;
}

.claims {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding: 2rem 1rem;
  justify-items: center;
}

.claim-tile {
  position: relative;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0.5rem;
  text-decoration: none;
  background: #e3000f;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.claim-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.claim-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(227, 0, 15, 0.9);
  color: white;
  font-weight: bold;
  text-align: center;
  padding: 0.6rem 0.3rem;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.claim-tile .info {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 1rem;
  font-size: 0.85rem;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.claim-tile:hover .info {
  opacity: 1;
  visibility: visible;
}

.claim {
  position: relative;
  background-color: #e3000f;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  max-width: 260px;
}

.claim .info {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 0.6rem;
  font-size: 0.85rem;
  border-radius: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
  width: max-content;
  max-width: 220px;
  text-align: center;
}

.claim:hover .info,
.claim.show-info .info {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-20px);
}

.claim-link {
  color: white;
  text-decoration: none;
  display: inline-block;
  font-weight: bold;
}

.claim-link:hover {
  text-decoration: none;
}

.candidate-heading {
  text-align: center;
  text-transform: uppercase;
  color: #e3000f;
  background: white;
  padding: 0.5rem 1rem;
  margin: 1.5rem auto 1rem;
  display: inline-block;
  border-radius: 6px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  font-weight: bold;
  font-size: 1.4rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.candidates {
  border-radius: 8px;
  text-align: center;
  padding: 2rem 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.candidates h2 {
  text-transform: uppercase;
  color: #e3000f;
  background: white;
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
  display: inline-block;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.kandidat {
  background: white;
  border: 5px solid #FFFFFF;
  border-radius: 0.5rem;
  overflow: hidden;
  text-align: center;
  position: relative;
  transition: transform 0.2s ease-in-out;
  padding-bottom: 4.5rem;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.kandidat:hover {
  transform: translateY(-5px);
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.kandidat img {
  width: 100%;
  height: auto;
  display: block;
}

.kandidat strong {
  display: block;
  margin: 0.5rem 0;
  font-size: 1.05rem;
  color: #e3000f;
}

.kandidat a strong {
  text-decoration: none;
}
.kandidat a strong:hover {
  text-decoration: underline;
}

.kandidat a {
  text-decoration: none !important;
  color: inherit;
}

.kandidat a:hover {
  text-decoration: none !important;
  color: inherit;
}

.info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.6rem;
  font-size: 0.85rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.kandidat:hover .info {
  opacity: 1;
  visibility: visible;
}

.wahlbezirk {
  font-size: 0.8rem;
  color: #000;
  margin-bottom: 0.3rem;
}

.mail {
  font-size: 0.6rem;
  color: #000;
  margin-bottom: 0.3rem;
  position: relative;
  z-index: 2;
}

footer {
  background-color: #e3000f;
  color: white;
  position: relative;
}

.footer-middle {
  padding: 1rem 2rem;
  text-align: left;
}

.footer-middle a {
  color: white;
  font-weight: bold;
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 1rem 2rem;
  background: #e3000f;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: white;
  font-weight: bold;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.9rem;
}

.header-footer-separator {
  border-bottom: 2px solid #b3000d;
  width: 97%;
  margin: 0 auto;
}

html {
  height: 100%;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

main {
  flex: 1 0 auto;
  text-align: center;
  background-image: url('../img/hintergrund.png');
  background-repeat: no-repeat;
  background-position: left top;
  background-size: cover;
  background-attachment: scroll;
}

footer {
  flex-shrink: 0;
  background-color: #e3000f;
  color: white;
}

.bild-container {
  position: relative;
  display: block;
}

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

.copyright-overlay {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.6rem;
  padding: 2px 4px;
  border-radius: 3px;
  font-style: normal;
  pointer-events: none;
}

.copyright-overlay-claim {
  position: absolute;
  left: 4px;
  bottom: 200px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.6rem;
  padding: 2px 4px;
  border-radius: 3px;
  font-style: normal;
  pointer-events: none;
}

.kandidat .mail a {
  font-size: 0.75rem;
  color: #e3000f;
  font-weight: bold;
  text-decoration: none;
}

.kandidat .mail a:hover {
  text-decoration: underline;
  color: #900;
}

.wahlbezirk-suche {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 280px;
}

.wahlbezirk-suche input {
  width: 50%;
  padding: 8px 10px 8px 38px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.wahlbezirk-suche .search-icon {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.6;
}

#wahlbezirk-ergebnis {
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;
  background: #fff;
  border: 2px solid #e3000f;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 999;
  color: #000;
  margin-top: 10px;
  text-align: left;
  font-size: 0.95rem;
}

.versteckt {
  display: none;
}

.slogan-block {
  flex: 1 1 400px;
  text-align: center;
}

.stoerer-wahl {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 150px;
  height: 150px;
  background-color: white;
  border-radius: 50% !important;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-9deg);
  pointer-events: none;
}

.stoerer-content {
  text-align: center;
  color: #e3000f;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
  font-size: 1.2rem;
  font-family: 'Open Sans', sans-serif;
}

.stoerer-content .stoerer-spd {
  font-weight: 800;
  font-size: 1.7rem;
}

@media (max-width: 768px) {
  .header-row {
    flex-direction: column;
  }

  .wahlbezirk-suche {
    max-width: 100%;
  }

  .slogan-block {
    text-align: center;
  }

  .header-flex-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 1rem;
  }

  .flex-left,
  .flex-center,
  .flex-right {
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
  }

  .slogan-block h1,
  .slogan-block p {
    margin: 0;
  }

  .wahlbezirk-suche {
    max-width: 100px;
  }

  .wahlbezirk-info-box {
    text-align: center;
    margin: 0,2rem auto;
    max-width: 600px;
    padding: 0 1rem;
  }

  .wahlbezirk-info-box h3 {
    font-size: 1.4rem;
    color: #e3000f;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 600px) {

  .kandidat .info {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.75);
    margin-top: 0.5rem;
    border-radius: 0.5rem;
  }

  .header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .header-bottom {
    text-align: center;
    padding: 0.1rem 0.2rem;
  }

  .header-logo {
    flex: 0.3 0.3 30%;
    text-align: left;
  }

  .header-logo img,
  .footer-logo img {
    width: 100%;
    max-width: 150px;
    height: auto;
  }

  .social-link span {
    display: none;
  }

  .footer-links a {
    font-size: 0.8rem;
  }

  .footer-middle {
    font-size: 0.9rem;
  }

  .wahlbezirk-social-wrapper {
    flex: 0.5 0.5 50%;
    display: flex;
    justify-content: flex-end;
  }

  .wahlbezirk-info-box {
    max-width: 250px;
    padding: 0.1rem;
    font-size: 0.7rem;
  }

  .wahlbezirk-info-box h3 {
    font-size: 0.7rem;
    text-align: right;
  }

  .wahlbezirk-heading {
    display: inline-block;
    text-align: center;
    white-space: normal;
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .wahlbezirk-suche {
    width: 100%;
    max-width: 50%;
    margin: 0 auto;
  }

  .wahlbezirk-suche input {
    width: 100%;
    padding: 6px 10px 6px 34px;
    font-size: 0.7rem;
  }
}
