/* =========================
   SPD Aßling – Desktop CSS
   ========================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: #000000;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Gesamtlayout */
.spd-page .layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  min-height: 100vh;
  padding: 14px;
}

/* Sidebar */
#sidebar,
.sidebar {
  width: 240px;
}

.sidebar {
  text-align: center;
}

.sidebar img {
  max-width: 140px;
  margin: 0 auto 12px auto;
}

.sidebar h1,
.sidebar h2,
.sidebar .sidebar-title {
  font-size: 16px;
  margin: 8px 0 18px 0;
  font-weight: 800;
}

/* Sidebar-Buttons */
/* Sidebar-Buttons */
.sidebar a,
.sidebar .menu1{
  display: block;
  padding: 10px 12px;
  margin-bottom: 10px;   /* NEU */
  border-radius: 10px;
  background: #eaf0fb;
  border: 1px solid #cfcfcf;
  text-decoration: none;
  font-weight: 700;
  color: inherit;
}

.sidebar .menu2{
  display: block;
  padding: 10px 12px;
  margin-bottom: 10px;   /* NEU */
  border-radius: 10px;
  background: #EBEBEB;
  border: 1px solid #cfcfcf;
  text-decoration: none;
  font-weight: 700;
  color: inherit;
}

.sidebar .menu3{
  display: block;
  padding: 10px 12px;
  margin-bottom: 10px;   /* NEU */
  border-radius: 10px;
  background: #E4F3D4;
  border: 1px solid #cfcfcf;
  text-decoration: none;
  font-weight: 700;
  color: inherit;
}

.sidebar a:hover,
.sidebar  .menu1:hover,
.spd-page .menu1:focus-visible{
  filter: brightness(1.03);
  outline: 2px solid rgba(0,0,0,0.15);
  outline-offset: 2px;
}

/* Inhalt */
.spd-page .content {
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
}

/* Mobile-Elemente auf Desktop aus */
.mobile-title,
.mobile-grid,
#mobile-nav,
#mobile-nav2 {
  display: none;
}

/* Hero / großes Bild */
.spd-page .hero {
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  padding: 16px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.08);
}

/* Wichtig: Titelbild passt sich dem PC-Bildschirm an */
.spd-page .hero img,
#titelbild {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Falls ein Kandidatenbild zu hoch wird */
.kandidat-page .hero img,
.kandidat-page #titelbild {
  max-height: calc(100vh - 40px);
  object-fit: contain;
}

/* Seitentitel */
.page-title {
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 22px 0;
}

/* Kreistag / Bilder-Gitter */
.kreistag-wrap {
  width: 100%;
}

.kreistag-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.kreistag-card-wrap {
  background: #ffffff;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
}

.kreistag-card {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Kandidaten-Seiten */
.kandidat-wrap {
  width: 100%;
}

.kandidat-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Links allgemein */
a {
  color: inherit;
}

/* Sicherheit: keine horizontalen Überläufe */
html,
body {
  overflow-x: hidden;
}
/* HERO-BEREICH BEGRENZEN */
.spd-page .hero {
  max-width: 900px;   /* HIER steuerst du die Gesamtgröße */
  margin: 0 auto;
}

/* BILD IM HERO */
.spd-page .hero img,
#titelbild {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
/* Sidebar überall gleich groß wie bei index.htm */
.spd-page .layout{
  grid-template-columns: 280px 1fr !important;
}

#sidebar,
.spd-page .sidebar{
  width: 280px !important;
}

.spd-page .logo{
  max-width: 180px !important;
}

.spd-page .menu1,
.spd-page .menu2{
  font-size: 15px;
  padding: 11px 12px;
}
/* Kandidatenbild automatisch skalieren */
#titelbild {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;

  /* WICHTIG: begrenzt auf großen Bildschirmen */
  max-width: min(90vw, 700px);
}
.spd-page .hero {
  max-width: min(90vw, 700px) !important;
  margin: 0 auto !important;
}

.spd-page .hero img,
.spd-page .kandidat-img {
  width: 100% !important;
  max-width: 700px !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto !important;
}
/* Tablet: Kandidatenbild kleiner anzeigen */
@media (min-width: 700px) and (max-width: 1366px){

  .spd-page .hero{
    max-width: 440px !important;
    padding: 10px !important;
    margin: 0 auto !important;
  }

  .spd-page .hero img,
  .spd-page .kandidat-img,
  #titelbild{
    width: 100% !important;
    max-width: 440px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
  }

}

/* Tablet: SPD-Logo ausblenden */
@media (min-width: 700px) and (max-width: 1366px){

  #sidebar img,
  .sidebar img,
  .logo,
  .spd-page .logo{
    display: none !important;
  }

}
/* Tablet: Sidebar kompakter darstellen */
@media (min-width: 700px) and (max-width: 1366px){

  #sidebar,
  .sidebar{
    width: 210px !important;
  }

  .sidebar a,
  .sidebar .menu1,
  .sidebar .menu2,
  .sidebar .menu3{
    padding: 7px 8px !important;
    margin-bottom: 6px !important;
    font-size: 13px !important;
    line-height: 1.1 !important;
  }

  .sidebar h1,
  .sidebar h2,
  .sidebar .sidebar-title{
    font-size: 14px !important;
    margin: 4px 0 10px 0 !important;
  }

  .spd-page .layout{
    grid-template-columns: 210px 1fr !important;
    gap: 18px !important;
  }

}
/* Tablet: Sidebar bei Kandidaten-Seiten mit etwas mehr Abstand */
@media (min-width: 700px) and (max-width: 1366px){

  .sidebar a,
  .sidebar .menu1,
  .sidebar .menu2,
  .sidebar .menu3{
    margin-bottom: 12px !important;
  }

}