/* Modern fixes to override legacy myportal.css where needed */
:root {
  color-scheme: light;
  color: #1f2937;
  background: #f3f4f6;
  font-family: Inter, Arial, sans-serif;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: linear-gradient(180deg, #edf2f7 0%, #ffffff 100%);
}

body {
  min-height: 100vh;
  padding: 14px 18px 32px;
  color: #1f2937;
  font: 16px/1.6 Inter, Arial, Verdana, Helvetica, sans-serif;
}

#seitenkopf,
#navileiste,
#hauptseite,
#seitenfuss {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

#seitenkopf {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  padding: 12px 18px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
  height: auto;
  overflow: visible;
  min-height: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

#seitenkopf .logo {
  min-height: 84px;
  min-width: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

#seitenkopf div.seitenkopf-links,
#seitenkopf div.seitenkopf-rechts {
  float: none !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0;
  padding: 0;
  left: auto;
}

#seitenkopf div.seitenkopf-rechts {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

#seitenkopf img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}

#seitenkopf h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 2.5vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #111827;
  font-weight: 700;
  white-space: normal;
}

#seitenkopf h2 {
  margin: 0;
  color: #2563eb;
  font-size: 1.25rem;
  font-weight: 600;
  white-space: normal;
}

#seitenkopf p {
  margin: 0;
  color: #475569;
  font-size: 1rem;
}

#seitenkopf .site-url {
  margin: 0;
  color: #1f2937;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

#seitenkopf .site-desc {
  margin: 0;
  color: #475569;
  font-size: 0.98rem;
  font-weight: 500;
}

#seitenkopf hr {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  margin: 0.75rem 0 0.75rem 0;
  width: 100%;
}

#navileiste {
  padding: 1rem 18px;
  margin: 16px 0 16px 0;
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.05);
  color: #334155;
  font-weight: 700;
  letter-spacing: 0.03em;
}

#navileiste a {
  color: #1d4ed8;
  text-decoration: none;
}

#navileiste a:hover {
  text-decoration: underline;
}

#hauptseite {
  display: grid !important;
  grid-template-columns: minmax(170px, 220px) 1fr !important;
  gap: 24px;
  padding: 0 18px 32px;
  margin: 0;
  align-items: start;
  width: 100%;
}

.hauptseite-links,
.hauptseite-rechts {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.06);
  padding: 24px;
  margin: 0 !important;
  position: static !important;
  width: auto !important;
}

.hauptseite-links {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  float: none !important;
  grid-column: 1 !important;
  padding-top: 40px !important;
}

#hauptseite div.hauptseite-links p,
#hauptseite div.hauptseite-links a {
  display: block;
  margin: 0;
  padding: 8px 0;
  color: #1d4ed8;
  text-decoration: none;
}

#hauptseite div.hauptseite-links a:hover {
  color: #1e40af;
}

#hauptseite div.hauptseite-links img {
  margin-top: 18px;
  border-radius: 16px;
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

#hauptseite div.hauptseite-rechts {
  display: block !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  position: static !important;
  top: auto !important;
  left: auto !important;
  grid-column: 2 !important;
}

#hauptseite h1 {
  margin-top: 0;
  font-size: 2rem;
  color: #111827;
}

#hauptseite h2 {
  margin: 1em 0 0.8em 0;
  padding: 0;
  color: #009f00;
  font-size: 100%;
  font-weight: normal;
}

#hauptseite p {
  margin: 0 0 0.2em 0;
  padding: 0;
  font-size: 100%;
  font-weight: normal;
  text-decoration: none;
}

.beitrag,
.beitrag_prio1 {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 20px;
  overflow: hidden;
}

.beitrag_prio1 {
  background: #eff6ff;
  border-color: rgba(59, 130, 246, 0.24);
}

.beitrag h2,
.beitrag_prio1 h2 {
  margin: 0 0 16px;
  font-size: 1.4rem;
  color: #0f172a;
}

.beitrag p,
.beitrag_prio1 p {
  margin: 0 0 16px;
  color: #334155;
}

.beitrag table,
.beitrag_prio1 table {
  width: 100%;
  border-collapse: collapse;
}

.beitrag td,
.beitrag_prio1 td {
  padding: 0;
  vertical-align: top;
}

.beitrag img,
.beitrag_prio1 img {
  max-width: 100%;
  border-radius: 16px;
  display: block;
  margin-bottom: 12px;
}

.beitrag a,
.beitrag_prio1 a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

.beitrag a:hover,
.beitrag_prio1 a:hover {
  text-decoration: underline;
}

#seitenfuss {
  padding: 18px 24px 32px;
  color: #475569;
  font-size: 0.95rem;
}

@media (max-width: 960px) {
  #seitenkopf {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 20px 18px 22px;
  }

  #navileiste {
    margin: 0 0 24px;
  }

  #hauptseite {
    grid-template-columns: 1fr;
    padding: 0 18px 32px;
  }

  .hauptseite-links,
  .hauptseite-rechts {
    padding: 18px;
  }
}

@media (min-width: 1200px) {
  #hauptseite {
    grid-template-columns: 220px 1fr !important;
  }
}
