/* main.css
   Basisstyles für das Frontend des Online-Vertretungsplans
   Fokus: Klarheit, Barrierefreiheit, Responsive Design
*/

/* ======= Grundlayout ======= */
html {
  box-sizing: border-box;
  font-size: 18px;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  background: #f5f8fa;
  color: #182243;
  min-height: 100vh;
  line-height: 1.6;
    background-image: url(../img/background_muster.webp);
}

/* ======= Header / Navigation ======= */
.header {
  background: #001e64;
  color: #fff;
  padding: 1.2em 0.8em;
}

.header__content {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.4em;
}

.header__logo {
  height: 40px;
  width: auto;
  margin-right: 1em;
}

.header__title {
  font-size: 1.45em;
  font-weight: bold;
  letter-spacing: 1.5px;
  margin: 0;
  flex: 1 1 auto;
}

.header__nav {
  display: flex;
  gap: 1em;
}

.header__nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5em 1em;
  border-radius: 6px;
  transition: background 0.17s;
}

.header__nav a:focus,
.header__nav a:hover {
  background: #304e96;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ======= Hauptcontainer ======= */
.main-container {
  max-width: 1320px;
  margin: 2em auto 0 auto;
  /*padding: 2em 1.3em;
  background: #fff;*/
  border-radius: 12px;
  /*box-shadow: 0 2px 18px rgba(0,30,100,0.08);*/
}

@media (max-width: 650px) {
  .main-container {
    margin: 1em 0 0 0;
    padding: 0.7em 0.2em;
    border-radius: 0;
    box-shadow: none;
  }
  .header__content {
    flex-direction: column;
    gap: 0.4em;
  }
  .header__nav {
    flex-direction: column;
    gap: 0.4em;
    align-items: flex-start;
  }
}

/* ======= Formulare ======= */
.form-block {
  max-width: 420px;
  margin: 2em auto;
  padding: 1.2em 1.3em;
  background: #f8fbff;
  border-radius: 8px;
  box-shadow: 0 1px 7px rgba(0,30,100,0.04);
}

form label {
  font-weight: 600;
  color: #001e64;
  margin-bottom: 0.3em;
  display: block;
}

form input,
form select,
form textarea {
  display: block;
  width: 100%;
  margin-bottom: 1.1em;
  padding: 0.6em;
  font-size: 1.05em;
  border: 1.5px solid #b7c2db;
  border-radius: 5px;
  background: #f8fafd;
  color: #181d2a;
  transition: border-color 0.15s;
}

form input:focus,
form select:focus,
form textarea:focus {
  border-color: #3765ba;
  outline: none;
}

form button,
.button {
  background: #001e64;
  color: #fff;
  border: none;
  padding: 0.72em 2em;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.18s;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

form button:focus,
form button:hover,
.button:focus,
.button:hover {
  background: #304e96;
  outline: 2px solid #001e64;
  outline-offset: 2px;
}

/* ======= Meldungen / Feedback ======= */
.message {
  margin: 1em 0;
  padding: 1em 1.2em;
  border-radius: 8px;
  font-size: 1.07em;
  background: #f5faff;
  color: #143d61;
  border: 1.5px solid #b5dbfb;
}

.message.error {
  background: #ffeaea;
  color: #a01d1d;
  border: 1.5px solid #efb9b9;
}

.message.success {
  background: #e8ffea;
  color: #2a792a;
  border: 1.5px solid #9be9a4;
}

/* ======= PDF-Anzeige ======= */
.pdf-viewer {
  margin: 2em auto 1.5em auto;
  max-width: 700px;
  background: #f5fafd;
  border: 1.5px solid #b7c2db;
  border-radius: 9px;
  box-shadow: 0 2px 10px rgba(0,30,100,0.06);
  overflow: auto;
}

.pdf-viewer iframe,
.pdf-viewer embed {
  width: 100%;
  height: 540px;
  border: none;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .pdf-viewer {
    max-width: 99vw;
  }
  .pdf-viewer iframe,
  .pdf-viewer embed {
    height: 360px;
  }
}
@media (max-width: 600px) {
  .pdf-viewer iframe,
  .pdf-viewer embed {
    height: 220px;
  }
}

/* ======= Listen & Tabellen ======= */
ul,
ol {
  padding-left: 1.5em;
  margin-top: 1em;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0 1em 0;
  background: #f5fafd;
  font-size: 1em;
  border-radius: 10px;
  overflow: hidden;
}

th, td {
  padding: 0.8em 0.4em;
  border-bottom: 1px solid #e0e6f3;
  text-align: left;
}

th {
  background: #e4eafd;
  color: #001e64;
  font-weight: 700;
}

@media (max-width: 650px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }
  th {
    position: sticky;
    top: 0;
    z-index: 2;
  }
  tr {
    margin-bottom: 1em;
    background: #f7fafd;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,30,100,0.07);
  }
  td {
    border: none;
    position: relative;
    padding-left: 50%;
    min-height: 2.2em;
  }
  td::before {
    content: attr(data-label);
    position: absolute;
    left: 0.7em;
    top: 0.5em;
    font-weight: bold;
    color: #6c93f6;
    white-space: nowrap;
  }
}

/* ======= Footer ======= */
.footer {
  margin-top: 4em;
  text-align: center;
  color: #9aa2bb;
  font-size: 1em;
  padding: 1.6em 0 0.8em 0;
  background: transparent;
}

.footer a {
  color: #304e96;
  text-decoration: underline;
  transition: color 0.16s;
}

.footer a:hover,
.footer a:focus {
  color: #001e64;
  outline: 2px solid #001e64;
  outline-offset: 2px;
}

/* ======= Barrierefreiheit (z.B. für Screenreader) ======= */
.sr-only,
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ======= Buttons allgemein ======= */
.button,
.btn {
  display: inline-block;
  border-radius: 6px;
  border: none;
  background: #304e96;
  color: #fff;
  padding: 0.6em 1.4em;
  font-weight: 600;
  font-size: 1.04em;
  cursor: pointer;
  transition: background 0.17s;
  margin-bottom: 0.3em;
}

.button:hover,
.button:focus,
.btn:hover,
.btn:focus {
  background: #001e64;
  outline: 2px solid #304e96;
  outline-offset: 2px;
}

/* ======= Sonstiges ======= */
img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #304e96;
  text-decoration: underline;
}

a:hover,
a:focus {
  color: #001e64;
  outline: 2px solid #304e96;
  outline-offset: 2px;
}

::-webkit-input-placeholder { color: #8e97af; opacity: 1; }
::-moz-placeholder { color: #8e97af; opacity: 1; }
:-ms-input-placeholder { color: #8e97af; opacity: 1; }
::placeholder { color: #8e97af; opacity: 1; }
