/* ============================================================
   Ulli Meiers – moderner, responsiver Nachbau
   Gemeinsames Stylesheet für alle Seiten
   Raster 1018px, Futura, Akzent #861424
   ============================================================ */

@font-face {
  font-family: 'FuturaLtBTLight';
  src: url('futura.woff') format('woff');
  font-weight: normal; font-style: normal; font-display: swap;
}

:root {
  --max:      1058px;   /* 1018 Original + 2×20 Padding -> Content bleibt 768 */
  --gutter:   250px;
  --content:  768px;
  --ink:      #000;
  --muted:    #464646;
  --accent:   #861424;
  --rule:     #C4C9CC;
  --field:    #B5B5B5;
  --font: 'FuturaLtBTLight', 'Century Gothic', 'Futura', 'Trebuchet MS', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0; background: #fff; color: var(--ink);
  font-family: var(--font); font-size: 16px; font-weight: 400; line-height: 1.5;
  overflow-y: scroll;
}

a { color: var(--ink); text-decoration: none; }
a:hover, a:focus-visible { color: var(--accent); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 0; color: #fff; text-decoration: none; }

/* ---------- Rahmen ---------- */
.frame { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; min-height: 140px; padding-top: 50px; }
.logo { width: 344px; max-width: 70vw; }
.logo img { width: 344px; max-width: 100%; }
.contact-top { font-size: 16px; white-space: nowrap; padding-bottom: 6px; }

/* ---------- Mobile-Toggle ---------- */
.nav-toggle {
  display: none; border: 1px solid var(--ink); background: #fff;
  font-family: var(--font); font-size: 15px; padding: 10px 16px;
  cursor: pointer; width: 100%; text-align: left;
}

/* ---------- Hauptnavigation: auf Content-Breite verteilt ---------- */
.mainnav { margin-left: var(--gutter); margin-top: 16px; min-height: 40px; }
.mainnav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap;
  justify-content: space-between;     /* spannt das Menü über die Content-Breite */
  gap: 6px 14px; align-items: center;
}
.mainnav a { font-size: 18px; letter-spacing: .2px; padding: 4px 0; display: inline-block; white-space: nowrap; }
.mainnav a:hover { text-decoration: none; color: var(--accent); }
.mainnav a[aria-current="page"] { color: var(--accent); }

/* ---------- Inhalt: Gutter + Textspalte ---------- */
.content { display: grid; grid-template-columns: var(--gutter) minmax(0, 1fr); margin-top: 26px; }

/* ---------- Sub-Navigation (linke Spalte, rechtsbündig) ---------- */
.subnav { padding-top: 4px; padding-right: 28px; text-align: right; }
.subnav ul { list-style: none; margin: 0; padding: 0; }
.subnav li { margin: 0; }
.subnav a {
  display: inline-block; font-size: 16px; line-height: 26px; color: var(--ink);
  text-decoration: none;
}
.subnav a:hover { color: var(--accent); text-decoration: none; }
.subnav a[aria-current="page"] { color: var(--accent); }
.subnav a[aria-current="page"]::after { content: " \203A"; }  /* › */

.text { max-width: var(--content); font-size: 16px; }
.text h1 { font-size: 24px; font-weight: 400; color: var(--ink); margin: 0 0 20px; line-height: 1.15; }
.text h2 { font-size: 18px; font-weight: 400; color: var(--ink); margin: 28px 0 12px; line-height: 1.3; }
.text h3 { font-size: 16px; font-weight: 700; margin: 22px 0 9px; }
.text p { margin: 0 0 1em; line-height: 1.5; }
.text a:not(.btn) { color: var(--ink); text-decoration: underline; }
.text a:not(.btn):hover { color: var(--accent); }
.text p.bio { line-height: 1.3; margin-bottom: 0; }

hr { border: none; border-top: 1px solid var(--rule); margin: 25px 0; width: 100%; max-width: 530px; height: 1px; }

/* ---------- Galerie: engmaschig wie im Original (≈154px, kleine Lücke) ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  margin: 2px 0 10px;
  max-width: var(--content);
}
.gallery .tile { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; line-height: 0; }
.gallery .tile img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; background: #f3f3f3; transition: opacity .15s ease; }
.gallery .tile:hover img, .gallery .tile:focus-visible img { opacity: .82; }

/* ---------- Pagination (weiter/zurück) ---------- */
.pager { max-width: var(--content); display: flex; justify-content: space-between; margin: 4px 0 0; font-size: 16px; }
.pager a { color: var(--ink); }
.pager a:hover { color: var(--accent); text-decoration: none; }
.pager .next { margin-left: auto; }

/* ---------- Lightbox (Slimbox-Stil wie Original) ---------- */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.8); padding: 20px; }
.lightbox.open { display: flex; }
.lb-card { background: #fff; padding: 10px; max-width: 94vw; max-height: 94vh; display: flex; flex-direction: column; }
.lb-stage { position: relative; line-height: 0; }
.lb-stage img { max-width: 88vw; max-height: 78vh; width: auto; height: auto; display: block; margin: 0 auto; background: #fff; }
.lb-nav { position: absolute; top: 0; height: 100%; width: 50%; border: 0; background: transparent; cursor: pointer; padding: 0; }
.lb-prev { left: 0; }
.lb-next { right: 0; }
.lb-nav span {
  position: absolute; top: 15%; font-size: 16px; color: #333; background: #fff;
  padding: 4px 12px; opacity: 0; transition: opacity .12s ease; white-space: nowrap;
  box-shadow: 0 1px 7px rgba(0,0,0,.3);
}
.lb-prev span { left: 12px; }
.lb-next span { right: 12px; }
.lb-nav:hover span, .lb-nav:focus-visible span { opacity: 1; }
.lb-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 10px 4px 4px; font-size: 14px; color: #666; line-height: 1.4; }
.lb-cap { font-weight: 700; color: #333; }
.lb-num { color: #999; font-size: 12px; margin-top: 2px; }
.lb-close { font-family: var(--font); font-size: 14px; color: #333; background: none; border: 0; cursor: pointer; white-space: nowrap; padding: 0; }
.lb-close:hover { color: var(--accent); }
.lb-x { color: var(--accent); font-weight: 700; }

/* ---------- Formular ---------- */
.form { max-width: var(--content); }
.form .row { display: grid; grid-template-columns: 173px 1fr; gap: 10px 16px; align-items: center; margin-bottom: 12px; max-width: 537px; }
.form label { font-size: 15px; }
.req { color: #cc0000; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form textarea {
  font-family: var(--font); font-size: 14px; color: var(--muted);
  border: 1px solid var(--field); background: #fafafa; padding: 6px 8px; width: 100%; max-width: 360px;
}
.form textarea { display: block; max-width: 537px; width: 100%; min-height: 160px; margin-top: 4px; }
.form .msg-label { display: block; margin: 4px 0 2px; font-size: 15px; }
.hint { font-size: 11px; margin: 6px 0 14px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; max-width: 537px; margin: 14px 0; line-height: 1.5; }
.consent input { margin-top: 3px; }
.btn { font-family: var(--font); font-size: 14px; color: #fff; background: var(--muted); border: 1px solid #fff; padding: 7px 16px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: var(--accent); color: #fff; text-decoration: none; }
.btn.reset { background: #888; }
.notice { padding: 12px 14px; margin: 0 0 20px; font-size: 15px; max-width: 537px; }
.notice.ok  { background: #eef6ee; border: 1px solid #9cc39c; color: #20571f; }
.notice.err { background: #fbeeee; border: 1px solid #d39a9a; color: #8a1f1f; }
.erecht { margin-top: 28px; }
.erecht img { width: auto; }

/* ---------- Footer ---------- */
.footer {
  margin-left: var(--gutter); margin-top: 28px; margin-bottom: 40px; padding-top: 14px;
  border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; font-size: 14px;
}
.footer .copy { color: var(--ink); }
.footer .legal { color: var(--muted); text-align: right; }
.footer .legal a { color: var(--muted); }
.footer .legal a:hover { color: var(--accent); text-decoration: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  :root { --gutter: 170px; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 760px) {
  :root { --gutter: 0px; }
  .header { align-items: center; min-height: 0; padding-top: 28px; gap: 12px; }
  .logo img { width: 260px; }
  .contact-top { padding-bottom: 0; }
  .nav-toggle { display: block; margin-top: 18px; }
  .mainnav { margin-left: 0; margin-top: 0; }
  .mainnav ul { flex-direction: column; align-items: stretch; gap: 0; border: 1px solid #ddd; border-top: none; display: none; justify-content: flex-start; }
  .mainnav.open ul { display: flex; }
  .mainnav li { border-top: 1px solid #ddd; }
  .mainnav a { display: block; padding: 13px 16px; font-size: 15px; }
  .content { grid-template-columns: 1fr; }
  /* Sub-Nav mobil: horizontal über dem Inhalt */
  .subnav { text-align: left; padding: 0 0 16px; margin-bottom: 4px; border-bottom: 1px solid #eee; }
  .subnav ul { display: flex; flex-wrap: wrap; gap: 6px 18px; }
  .subnav a { line-height: 1.6; }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .pager { max-width: none; }
  .form .row { grid-template-columns: 1fr; gap: 4px; align-items: start; }
  .footer { margin-left: 0; flex-direction: column; gap: 6px; }
  .footer .legal { text-align: left; }
}
@media (max-width: 440px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
