/* ==========================================================================
   Dr. Thomas Rücker – Sachverständiger für Mykologie
   Shared responsive stylesheet. Mobile-first.
   ========================================================================== */

:root {
  --accent: #66abc5;
  --accent-dark: #3f8ba6;
  --text: #333;
  --muted: #666;
  --line: #dcdcdc;
  --card: #ffffff;
  --maxw: 880px;
  --radius: 6px;
  --shadow: 0 2px 18px rgba(0, 0, 0, 0.12);
  --font: "Helvetica Neue", Arial, "Segoe UI", Roboto, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: #eef2f4 url("../img/background.jpg") center top no-repeat;
  background-size: cover;
  overflow-x: hidden;
}

/* Skip link: visible only when focused (keyboard/screen-reader users). */
.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 1100;
  padding: 10px 16px;
  background: var(--accent-dark);
  color: #fff;
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top .15s;
}
.skip-link:focus { top: 0; color: #fff; }

/* Sticky footer: main grows to fill the viewport on short pages. */
main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

/* Readable content sits on a white card over the fixed background. */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px 48px;
}

.wrap { width: 100%; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-dark); }
a:hover { color: var(--accent); }

h1, h2, h3 { line-height: 1.25; color: #2b2b2b; }
h1 { font-size: 1.6rem; margin: 0 0 .4em; }
h2 { font-size: 1.3rem; margin: 1.8em 0 .6em; }
h3 { font-size: 1.08rem; margin: 1.4em 0 .4em; }
p { margin: 0 0 1em; }

/* ---------- Header ---------- */
.site-header {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { text-decoration: none; color: var(--text); display: block; }
.brand-name {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #2b2b2b;
  line-height: 1.2;
}
.brand-tag { display: block; font-size: .82rem; color: var(--muted); }
.registry { flex: 0 0 auto; }
.registry img { width: 52px; height: auto; }

/* ---------- Navigation ---------- */
.site-nav {
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--line);
  border-bottom: 3px solid var(--accent);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}
.nav-toggle {
  display: block;
  width: 100%;
  padding: 12px 0;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.nav-toggle::before { content: "\2630"; margin-right: 8px; }
.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
}
.nav-menu.open { display: block; padding-bottom: 8px; }
.nav-menu a {
  display: block;
  padding: 11px 4px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  border-top: 1px solid var(--line);
}
.nav-menu a:hover { color: var(--accent-dark); }
.nav-menu a[aria-current="page"] { color: var(--accent); }

/* ---------- Content card ---------- */
.card {
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 28px 22px;
  margin-top: 24px;
}

.lead { font-size: 1.05rem; }
.muted { color: var(--muted); }

ul.check { list-style: none; padding-left: 0; }
ul.check li { position: relative; padding-left: 1.4em; margin-bottom: .4em; }
ul.check li::before {
  content: "\2022";
  color: var(--accent);
  position: absolute;
  left: 0;
  font-size: 1.2em;
  line-height: 1.2;
}

/* ---------- Startseite layout ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.service-box {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  background: #fafcfd;
}
.service-box h2 { margin-top: 0; }
.home-collage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.home-collage img {
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  display: block;
}
.home-collage .feature { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.partners { margin-top: 20px; text-align: center; }
.partners a { display: block; max-width: 360px; margin: 0 auto 18px; }
.partners img { width: 100%; height: auto; }

/* ---------- Über mich ---------- */
.profile { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.profile-photo img { width: 100%; max-width: 260px; border-radius: 6px; margin: 0 auto; }
.steckbrief {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  background: #fafcfd;
}
.steckbrief dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.steckbrief dt { font-weight: 700; color: #2b2b2b; }
.steckbrief dd { margin: 0; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.contact-card address { font-style: normal; line-height: 1.8; }
.map-consent {
  border: 1px solid var(--line);
  background: #eef3f5;
  border-radius: var(--radius);
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.map-consent .btn { margin: 6px 0; }
.map-consent iframe { width: 100%; min-height: 340px; border: 0; border-radius: var(--radius); display: block; }

.btn {
  display: inline-block;
  padding: 9px 18px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent-dark);
  border-radius: 3px;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-dark); color: #fff; }

/* ---------- Gallery ---------- */
.gallery-section { margin-top: 2em; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.gallery-grid a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow .15s, transform .15s;
}
.gallery-grid a:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.gallery-grid img { width: 100%; aspect-ratio: 57 / 80; object-fit: cover; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 4px; box-shadow: 0 6px 40px rgba(0,0,0,.5); }
.lightbox figcaption {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: .95rem;
}
.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 0;
  font-size: 2rem;
  line-height: 1;
  width: 52px;
  height: 68px;
  cursor: pointer;
  border-radius: 4px;
}
.lb-btn:hover { background: rgba(255,255,255,.25); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-close { top: 14px; right: 14px; transform: none; height: 48px; width: 48px; font-size: 1.6rem; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 40px;
  background: rgba(43, 43, 43, 0.92);
  color: #dfe6ea;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  font-size: .9rem;
}
.site-footer a { color: #cfe4ec; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }

/* ==========================================================================
   Larger screens
   ========================================================================== */
@media (min-width: 640px) {
  /* Parallax only on larger screens; on phones `fixed` causes scroll jank. */
  body { font-size: 18px; background-attachment: fixed; }

  .nav-toggle { display: none; }
  .nav-menu {
    display: flex;
    justify-content: center;
    gap: 4px;
  }
  .nav-menu a {
    border-top: 0;
    padding: 12px 14px;
    line-height: 30px;
  }
  .nav-menu a[aria-current="page"] { border-bottom: 3px solid var(--accent); margin-bottom: -3px; }

  .card { padding: 36px 40px; }

  .home-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; }

  .profile { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }

  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
}

@media (min-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Respect users who ask for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .gallery-grid a:hover { transform: none; }
}
