/* ============================================================
   1. CSS Custom Properties
   ============================================================ */
:root {
  --color-bg:          #F7F1E6;
  --color-bg-accent:   #EFE2CB;
  --color-border:      #b7b1a6;
  --color-text:        #171106;
  --color-heading:     #8D0B35;
  --color-link:        #3B66A4;
  --color-link-hover:  #A00000;
  --color-footer-text: #666;
  --color-footer-link: #999999;
  --color-input-bg:    #f0ebe1;
  --color-white:       #ffffff;

  --font-body: 'Lato', Arial, Helvetica, sans-serif;

  --max-width:  940px;
  --nav-width:  190px;
  --radius:     4px;
}

/* ============================================================
   2. Reset / Box-sizing
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================================
   3. @font-face (selbst-gehostet, DSGVO-konform)
   ============================================================ */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/lato-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/lato-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/lato-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/lato-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* ============================================================
   4. Basis-Typografie
   ============================================================ */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: #e8e0d0;
}

h1, h2, h3, h4 {
  color: var(--color-heading);
  line-height: 1.3;
}

h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 700; margin: 1.4rem 0 0.5rem; }
h3 { font-size: 1rem; font-weight: 700; margin: 1.2rem 0 0.4rem; }

p { margin-bottom: 0.9rem; }

a:link, a:visited  { color: var(--color-link); text-decoration: none; }
a:hover, a:focus   { color: var(--color-link-hover); text-decoration: underline; }

ul, ol { padding-left: 1.4rem; margin-bottom: 0.9rem; }
li { margin-bottom: 0.25rem; }

strong, b { font-weight: 700; }

/* ============================================================
   5. Seiten-Wrapper
   ============================================================ */
#page {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--color-bg);
  box-shadow: 0 0 20px rgba(0,0,0,0.15);
}

/* ============================================================
   6. Header
   ============================================================ */
header {
  position: relative;
  background: var(--color-bg-accent) url('../images/logo.gif') no-repeat right center;
  background-size: auto;
  padding: 1rem 1.2rem;
  border-bottom: 2px solid var(--color-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 80px;
}

.header-text {
  flex: 1;
  padding-right: 60px; /* Platz für Logo */
}

header h1 {
  font-size: 1.3rem;
  color: var(--color-heading);
  margin-bottom: 0.1rem;
}

.tagline {
  font-size: 0.9rem;
  color: var(--color-text);
  margin: 0;
  font-style: italic;
}

/* ============================================================
   7. Hamburger-Button (nur mobil)
   ============================================================ */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-heading);
  border-radius: 2px;
  transition: opacity 0.2s;
}

/* ============================================================
   8. Layout: .page-body (flexbox: nav + main)
   ============================================================ */
.page-body {
  display: flex;
  align-items: flex-start;
}

/* ============================================================
   9. Navigation
   ============================================================ */
nav {
  width: var(--nav-width);
  flex-shrink: 0;
  background: var(--color-bg-accent);
  border-right: 1px solid var(--color-border);
  min-height: 300px;
}

/* Foto über den Menülinks – Breite 100 %, Höhe exakt proportional (1535×2303 px) */
nav::before {
  content: '';
  display: block;
  width: 100%;
  aspect-ratio: 1535 / 2303;
  background: url('../images/foto.jpg') no-repeat center top;
  background-size: cover;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 2px solid var(--color-heading);
}

nav li {
  margin: 0;
  border-bottom: 1px solid var(--color-border);
}

nav a,
nav a:link,
nav a:visited {
  display: block;
  padding: 0.65rem 1rem;
  color: var(--color-link);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

nav a:hover,
nav a:focus {
  background: var(--color-bg);
  color: var(--color-heading);
  text-decoration: none;
}

nav li.current a {
  background: var(--color-bg);
  color: var(--color-heading);
  font-weight: 700;
  border-left: 3px solid var(--color-heading);
  padding-left: calc(1rem - 3px);
}

/* ============================================================
   10. Hauptinhalt
   ============================================================ */
main {
  flex: 1;
  padding: 1.4rem 1.6rem;
  min-width: 0; /* verhindert Flex-Overflow */
}

main h2:first-child {
  margin-top: 0;
}

/* ============================================================
   11. Formulare
   ============================================================ */
fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
}

legend {
  color: var(--color-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0 0.4rem;
}

.form-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 0.4rem 0.8rem;
  margin-bottom: 0.7rem;
}

.form-row label {
  font-size: 0.9rem;
  text-align: right;
}

.form-row input[type="text"],
.form-row input[type="email"] {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-input-bg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
}

.form-row input[type="text"]:focus,
.form-row input[type="email"]:focus {
  outline: 2px solid var(--color-heading);
  outline-offset: 1px;
}

textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-input-bg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  resize: vertical;
}

textarea:focus {
  outline: 2px solid var(--color-heading);
  outline-offset: 1px;
}

/* Radio-Gruppen */
.radio-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: flex-start;
  gap: 0.4rem 0.8rem;
  margin-bottom: 0.7rem;
}

.radio-row label:first-child {
  text-align: right;
  font-size: 0.9rem;
  padding-top: 0.1rem;
}

.radio-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  align-items: center;
}

.radio-options label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.radio-options input[type="radio"] {
  accent-color: var(--color-heading);
}

/* Buttons */
.form-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

input[type="submit"],
input[type="reset"] {
  padding: 0.5rem 1.4rem;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

input[type="submit"] {
  background: var(--color-heading);
  color: var(--color-white);
}

input[type="submit"]:hover {
  background: #6e0828;
}

input[type="reset"] {
  background: var(--color-border);
  color: var(--color-text);
}

input[type="reset"]:hover {
  background: #9e9890;
}

/* reCAPTCHA */
.recaptcha-wrap {
  margin: 0.8rem 0;
}

/* Datenschutz-Hinweis im Formular */
.form-notice {
  font-size: 0.88rem;
  margin-bottom: 0.8rem;
}

/* ============================================================
   12. Foto – nur auf Mobilgeräten sichtbar (Desktop: im Menü)
   ============================================================ */
.foto-mobil {
  display: none;
}

.foto-mobil + h2 {
  margin-top: 0;
}

/* ============================================================
   13. Google Maps – responsiver Wrapper
   ============================================================ */
.map-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-top: 0.5rem;
}

.map-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ============================================================
   13. Footer
   ============================================================ */
footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-accent);
  padding: 0.7rem 1.2rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-footer-text);
}

footer a {
  color: var(--color-footer-link);
}

footer a:hover {
  color: var(--color-link-hover);
}

/* ============================================================
   14. Responsive – Tablet / Mobil (≤ 700px)
   ============================================================ */
@media (max-width: 700px) {

  body { font-size: 15px; }

  header {
    flex-wrap: wrap;
    padding: 0.8rem 1rem;
    background-position: right 52px center;
  }

  header h1 {
    font-size: 1.1rem;
    flex: 1;
  }

  .nav-toggle {
    display: flex;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-bg);
  }

  .page-body {
    flex-direction: column;
  }

  nav {
    width: 100%;
    min-height: unset;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    display: none; /* standardmäßig verborgen */
  }

  nav.is-open {
    display: block;
  }

  .foto-mobil {
    display: block;
    float: left;
    width: 42%;
    margin: 0 1rem 0.5rem 0;
    border-radius: var(--radius);
  }

  nav::before {
    display: none;
  }

  nav ul {
    background: none;
    padding-bottom: 0;
  }

  nav a {
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }

  main {
    padding: 1rem;
  }

  .form-row,
  .radio-row {
    grid-template-columns: 1fr;
  }

  .form-row label,
  .radio-row label:first-child {
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
  }
}

/* ============================================================
   15. Responsive – Kleines Smartphone (≤ 400px)
   ============================================================ */
@media (max-width: 400px) {

  header h1 { font-size: 1rem; }

  main { padding: 0.8rem; }

  fieldset { padding: 0.8rem; }

  h2 { font-size: 1.1rem; }
}
