/* =========================================================
   Globales Layout
   ========================================================= */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background-color: #f9f9f9;
  color: #111;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1rem 0 1rem;
}

/* =========================================================
   Header & Titel
   ========================================================= */
.header {
  background-color: #CB1967;
  color: #fff;
  padding: 1rem;
  text-align: center;
}

.header-title { font-size: 1.8rem; line-height: 1.2; }
.neos-bold { font-weight: 700; }
.neos-light { font-weight: 300; }

.header-subtitle {
  font-size: 1rem;
  margin-top: 0.25rem;
  opacity: .95;
}

.page-title {
  color: #CB1967;
  font-size: 1.4rem;
  margin: .25rem 0 1rem;
  text-align: center;
}

/* =========================================================
   Zurück-Button
   ========================================================= */
.back-button {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 1.5rem;
  text-decoration: none;
  color: #fff;
  background: transparent;
  z-index: 1000;
}

/* =========================================================
   Listen (Anträge, Anfragen, Presseaussendungen, …)
   ========================================================= */
.content-list {
  list-style: none;
  padding: 0;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}
.content-list li {
  background: #fff;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0,0,0,0.06);
}

/* =========================================================
   Galerie (generische Mini-Galerie – weiterhin nutzbar)
   ========================================================= */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.gallery-thumb {
  width: 150px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform .2s ease;
}
.gallery-thumb:hover { transform: scale(1.05); }

/* Kachel-Buttons für Pressebilder (falls auf anderen Seiten genutzt) */
.bilder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  padding: 1rem;
}
.pressebild-button {
  background: #F6D000;
  border-radius: 12px;
  padding: .5rem;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  transition: transform .2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}
.pressebild-button:hover { transform: translateY(-3px); }
.pressebild-button img {
  max-width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.pressebild-button .caption { font-size: .9rem; margin-top: .45rem; font-weight: 600; }
.pressebild-button .credits { font-size: .8rem; color: #CB1967; }

/* =========================================================
   Spezifisch: PRESSE-GALERIE (galerie.html)
   ========================================================= */
.grid[aria-live="polite"]{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 0.75rem;
}
@media (min-width: 920px){
  .grid[aria-live="polite"]{ max-width: 900px; }
}

.card{
  background:#fff;
  border-radius:14px;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  padding:.75rem;
  transition:transform .18s ease, box-shadow .18s ease;
}
.card:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(0,0,0,.10);
}
.card .thumb{
  width:100%;
  aspect-ratio: 2 / 3;       /* Hochformat */
  object-fit: cover;
  border-radius:10px;
  display:block;
}
.card .meta{
  color:#666;
  font-size:.9rem;
  margin-top:.45rem;
  line-height:1.35;
}

/* =========================================================
   Hervorgehobenes Zitat (WORT & KI)
   ========================================================= */
.highlighted-quote {
  background-color: #fff4cc;
  border-left: 5px solid #CB1967;
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
  border-radius: 8px;
}
.highlighted-quote .quote-block { margin: 0; background: transparent; border: 0; padding: 0; }
.highlighted-quote .quote-text {
  margin: 0 0 .75rem 0;
  font-style: italic;
  font-size: 1.1rem;
  color: #333;
  line-height: 1.5;
}
.highlighted-quote .quote-footer,
.highlighted-quote small { display: block; margin-top: .5rem; font-size: .95rem; color: #666; }

/* =========================================================
   MEHR-Blöcke
   ========================================================= */
.mehr-block { margin-bottom: 2rem; max-width: 600px; width: 100%; }
.mehr-header {
  background-color: #CB1967;
  color: #F6D000;
  font-weight: 700;
  padding: .6rem 1rem;
  border-radius: 5px 5px 0 0;
}
.mehr-text {
  background-color: #fff;
  padding: 1rem;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
  font-size: .95rem;
  color: #333;
}

/* =========================================================
   Einheitliche Buttons
   ========================================================= */
.btn {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: #CB1967;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease-in-out;
  border: none;
}
.btn:hover {
  background: #a91452; /* etwas dunkleres Magenta */
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  margin-top: auto;
  background-color: #f1f1f1;
  text-align: center;
  padding: .6rem;
  font-size: .9rem;
}
.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: .5rem;
}
.footer-icon { width: 20px; height: 20px; vertical-align: middle; }
.impressum-popup { display: none; font-size: .85rem; color: #444; }
@supports (padding: env(safe-area-inset-bottom)) {
  .footer { padding-bottom: env(safe-area-inset-bottom); }
}

/* =========================================================
   Suche & Filter
   ========================================================= */
.suchformular {
  margin-top: .8rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.suchformular input {
  padding: .6rem 2.5rem;
  width: 90%;
  max-width: 400px;
  border-radius: 25px;
  border: 1px solid #ccc;
  font-size: 1rem;
  background: #fff;
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" fill="%23bbb" viewBox="0 0 24 24"%3E%3Cpath d="M10 2a8 8 0 105.293 14.293l4.707 4.707 1.414-1.414-4.707-4.707A8 8 0 0010 2zm0 2a6 6 0 110 12 6 6 0 010-12z"/%3E%3C/svg%3E');
  background-repeat: no-repeat;
  background-position: 10px center;
  background-size: 18px 18px;
}

.suchfilter {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1rem 0;
}
.suchfilter label { font-size: .95rem; color: #333; }
.suchfilter select { padding: .5rem; font-size: 1rem; border-radius: 5px; border: 1px solid #ccc; }

/* =========================================================
   Status-Badges
   ========================================================= */
.status-badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: .8rem; font-weight: 700; color: #fff; margin-left: .5rem; }
.status-ang { background-color: #2e7d32; }
.status-abg { background-color: #c62828; }
.status-zug { background-color: #ef6c00; }

/* =========================================================
   Auth-Guard Patch
   ========================================================= */
html.auth-checking body { visibility: hidden; }

/* =========================================================
   Gemeinderäte – Kartenlayout (öffentliche Profilseite)
   ========================================================= */
.gmdr-grid {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.gmdr-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.gmdr-header {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: .9rem;
  align-items: center;
}
.gmdr-portrait {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.gmdr-title { margin: 0; font-size: 1.15rem; color: #222; }
.gmdr-role  { margin: .15rem 0 0; color: #666; font-size: .95rem; }
.gmdr-section { margin-top: .25rem; }
.gmdr-section h4 {
  margin: .4rem 0 .35rem;
  font-size: 1rem;
  color: #CB1967;
}
.gmdr-section ul {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
}
.gmdr-section li {
  margin: .25rem 0;
  line-height: 1.4;
  color: #333;
}
.gmdr-socials {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .6rem;
  margin-top: .35rem;
}
.gmdr-socials a {
  display: inline-block;
  padding: .35rem .6rem;
  border-radius: 8px;
  background: #F6D000;
  color: #333;
  text-decoration: none;
  font-size: .9rem;
}
.gmdr-socials a:hover { background: #e6c100; }
.btn.sm {
  display: inline-block;
  padding: .35rem .6rem;
  border-radius: 8px;
  background: #F6D000;
  color: #333;
  text-decoration: none;
  font-size: .9rem;
}
.btn.sm:hover { background: #e0c200; }
@media (max-width: 420px) {
  .gmdr-portrait { width: 70px; height: 70px; }
}

/* =========================================================
   Einheitliches Button-Grid (Index, Gemeinderat, Wort)
   ========================================================= */
.button-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  max-width: 480px;
  margin: 2rem auto;
  justify-items: center;
  padding: 0 0.5rem;
}
.button-grid a{ display: block; text-decoration: none; }

/* PNG-Buttons */
.nav-button,
.menu-button{
  width: 100%;
  max-width: 180px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 3px 8px rgba(0,0,0,.15);
  transition: transform .15s ease, box-shadow .15s ease;
}
.nav-button:hover,
.menu-button:hover{
  transform: scale(1.04);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}

/* Sehr kleine Geräte: 1 Kachel pro Reihe */
@media (max-width: 380px){
  .button-grid{
    grid-template-columns: 1fr;
    max-width: 320px;
  }
  .nav-button,
  .menu-button{ max-width: 220px; }
}

/* =========================================================
   Querbalken (Gemeinderat)
   ========================================================= */
.querbalken-link{
  display: block;
  width: min(860px, 92vw);
  margin: .25rem auto 0;
  background: #CB1967;
  color: #fff;
  text-align: center;
  font-weight: 700;
  border-radius: 18px;
  padding: .9rem 1.1rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.16);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.querbalken-link + .querbalken-link{ margin-top: .6rem; }
.querbalken-link:hover{ transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.18); }
.querbalken-link:active{ transform: translateY(0); filter: brightness(.98); }
.querbalken-link:focus-visible{ outline: 2px solid #fff; outline-offset: 2px; }

/* =========================================================
   Responsive Kleinkram
   ========================================================= */
@media (max-width: 500px) {
  .highlighted-quote,
  .mehr-block,
  .suchformular input {
    margin-left: 1rem;
    margin-right: 1rem;
    width: 90%;
  }
}

/* ===========================
   Gemeinderäte – Balkenliste
   =========================== */
.gmdr-list{
  list-style: none;
  padding: 0;
  margin: 0;
  width: min(860px, 92vw);
}
.gmdr-row{
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  margin: .6rem 0;
}
.gmdr-row-link{
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: .9rem;
  align-items: center;
  padding: .75rem .9rem;
  text-decoration: none;
  color: inherit;
}
.gmdr-row-link:hover{ background: #fafafa; }
.gmdr-avatar{
  width: 56px; height: 56px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.gmdr-row-text{ min-width: 0; }
.gmdr-row-name{
  font-weight: 700; color: #222;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gmdr-row-role{
  color: #666; font-size: .95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* === Gemeinderäte – Balkenliste (Liste) === */
.gmdr-list{
  list-style: none;
  padding: 0;
  width: 100%;
  max-width: 860px;
  margin: .25rem auto 1.5rem;
}
.gmdr-placeholder{
  background:#fff;
  color:#666;
  border-radius: 12px;
  padding: .9rem 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  text-align: center;
}

/* =========================================================
   PRESSE – Meta-Statement  (FIX: kein doppelter Rahmen/Box)
   ========================================================= */
#presse-meta {
  width: min(860px, 92vw);
  margin: 1.5rem auto 0;
  display: none; /* per JS sichtbar */
}

/* Nur Textverhalten, keine eigene Box – die Box kommt von .highlighted-quote */
#presse-meta-text {
  white-space: pre-wrap;   /* Zeilenumbrüche aus Firestore erhalten */
  margin: 0;
}
.gmdr-row-link {
  text-decoration: none !important;
  color: inherit !important;
}
.gmdr-row-link:visited { color: inherit !important; }