/* Tischlerei Sturz – Stylesheet
   Layout: angelehnt an den bisherigen Auftritt. Cremefarbener Grund, orange Bänder, die links und rechts
   aus dem Inhaltsrahmen herauslaufen, Navigation links im orangen Kasten, Inhalt auf Weiß, rechts eine
   orange Teaserspalte, Logo groß im weißen Rahmen oben rechts. Bewusst nur ein (helles) Farbschema. */

:root {
  --orange: #fcb131;        /* Markenorange, identisch mit dem Logo-Hintergrund */
  --orange-light: #ffdca3;  /* aktiver Menüpunkt (wie bisher) */
  --cream: #fff2dd;         /* Seitenhintergrund (wie bisher) */
  --white: #ffffff;
  --ink: #1b1209;           /* Schrift, warmes Schwarz wie im Logo */
  --muted: #7a6650;
  --frame: #f5c165;         /* feine Rahmenlinien */
  --font: Verdana, "DejaVu Sans", Geneva, Tahoma, sans-serif;
  --wrap: 72rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--font); font-size: 0.95rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-underline-offset: 2px; }
a:hover { color: #000; text-decoration-color: var(--orange); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 1.45rem; font-weight: 700; font-style: italic; }
h2 { font-size: 1.1rem; font-weight: 700; font-style: italic; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }

.wrap {
  max-width: calc(var(--wrap) + 32px); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Kopf ---------- */
.top { padding-block: 1.25rem 0; }
.top .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.toplinks {
  background: var(--white); border: 1px solid var(--frame); padding: 6px; align-self: center; flex: 1 1 auto; max-width: 30rem;
}
.toplinks nav { background: var(--orange); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.2rem 1rem; padding: 1.6rem 0.9rem 0.45rem; font-size: 0.8rem; }
.toplinks a { text-decoration: none; }
.toplinks a:hover, .toplinks a[aria-current="page"] { text-decoration: underline; }
.logo {
  display: block; background: var(--white); border: 1px solid var(--frame); padding: 8px; flex: none;
}
.logo img { width: 300px; height: auto; image-rendering: auto; }

.top .wrap.crumbs { display: block; }
.crumbs { font-size: 0.78rem; color: #c98712; padding-block: 0.7rem 0.5rem; }
.crumbs a { color: #c98712; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span + span::before, .crumbs a + span::before, .crumbs a + a::before { content: "▸"; margin: 0 0.45rem; font-size: 0.7rem; }

/* ---------- Rahmen mit Bändern ---------- */
.stage { position: relative; }
.stage::before, .stage::after {
  content: ""; position: absolute; top: 1rem; height: 6.5rem; background: var(--orange);
  border-top: 8px solid var(--white); border-bottom: 8px solid var(--white); box-shadow: 0 0 0 1px var(--frame);
}
.stage::before { left: 0; right: calc(50% + var(--wrap) / 2 - 1px); top: 1px; }
.stage::after { right: 0; left: calc(50% + var(--wrap) / 2 - 1px); top: 7rem; }

.frame {
  position: relative; z-index: 1; background: var(--white); border: 1px solid var(--frame);
  display: grid; grid-template-columns: 13rem minmax(0, 1fr) 12rem; min-height: 30rem;
}
.frame > * { min-width: 0; }

/* Linke Navigation */
.side { border-right: 1px solid var(--frame); padding: 8px; }
.menu-toggle { display: none; }
.menu { background: var(--orange); border-top: 4px solid var(--orange-light); padding: 4px 0; }
.menu a { display: flex; justify-content: space-between; align-items: center; padding: 0.35rem 0.75rem; font-size: 0.85rem; text-decoration: none; -webkit-text-stroke: 0.4px currentColor; letter-spacing: 0.01em; }
.menu a:hover { background: rgba(255, 255, 255, 0.35); }
.menu a[aria-current="page"] { background: var(--orange-light); }
.menu a[aria-current="page"]::after { content: "▸"; font-size: 0.75rem; }
.menu .sub a { padding-left: 1.4rem; font-size: 0.8rem; }
.menu .sub a::before { content: "▪"; color: var(--white); margin-right: 0.45rem; }
.menu .sub a { justify-content: flex-start; }
.side-contact { margin-top: 1rem; font-size: 0.78rem; line-height: 1.55; padding: 0 0.3rem; }
.side-contact b { display: block; margin-bottom: 0.2rem; }

/* Inhalt */
.content { padding: 1.3rem 1.6rem 1.6rem; display: grid; gap: 1rem; align-content: start; }
.content .lead { font-size: 1rem; }
.content .prose { display: grid; gap: 0.9rem; max-width: 64ch; }
.content-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--frame); padding-top: 0.6rem; margin-top: 0.8rem; font-size: 0.78rem; }
.content-foot a { text-decoration: none; color: var(--muted); }
.content-foot a:hover { color: var(--ink); }

/* Rechte Teaserspalte */
.aside { background: var(--orange); padding: 0.75rem; display: grid; gap: 0.75rem; align-content: start; border-left: 8px solid var(--white); }
.teaser { background: var(--white); padding: 0.6rem; display: grid; gap: 0.35rem; font-size: 0.8rem; line-height: 1.45; min-width: 0; overflow-wrap: break-word; }
.aside { grid-template-columns: minmax(0, 1fr); }
.teaser img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.teaser b { font-size: 0.85rem; margin-top: 0.2rem; }

/* Fuß */
.footer { padding-block: 0.6rem 2rem; }
.footer .wrap { display: flex; justify-content: flex-end; }
.footer small { font-size: 0.72rem; font-style: italic; color: #d29a3a; letter-spacing: 0.04em; }

/* ---------- Bausteine ---------- */
.eu { display: flex; align-items: center; gap: 1rem; margin-top: 0.5rem; }
.eu img { width: 220px; height: auto; }

.areas { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.areas li { background: var(--cream); border: 1px solid var(--frame); padding: 0.1rem 0.6rem; font-size: 0.85rem; }

.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
.services li { padding: 0.45rem 0 0.45rem 1.1rem; border-bottom: 1px dotted var(--frame); position: relative; }
.services li::before { content: "▸"; position: absolute; left: 0; color: var(--orange); font-size: 0.8rem; top: 0.55rem; }
.note { background: var(--cream); border-left: 4px solid var(--orange); padding: 0.7rem 0.9rem; }

/* Referenzen */
.filters, .subfilters { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.subfilters { min-height: 1.9rem; }
.chip {
  font: inherit; font-size: 0.8rem; background: var(--white); color: var(--ink); border: 1px solid var(--frame);
  padding: 0.25rem 0.7rem; cursor: pointer;
}
.chip:hover { background: var(--cream); }
.chip[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); font-weight: 700; }
.chip-sub { font-size: 0.75rem; }
.chip-sub[aria-pressed="true"] { background: var(--orange-light); border-color: var(--orange-light); }
.chip .n { font-weight: 400; opacity: 0.6; margin-left: 0.3rem; font-variant-numeric: tabular-nums; }
.gallery-note { font-size: 0.85rem; color: var(--muted); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: 0.5rem; }
.tile {
  position: relative; aspect-ratio: 4 / 3; max-width: 100%; border: 1px solid var(--frame); padding: 3px; cursor: zoom-in;
  background: var(--white); font: inherit; color: var(--ink);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.tile:hover img { opacity: 0.85; }
.tile .ph { position: absolute; inset: 3px; display: grid; place-items: center; text-align: center; font-size: 0.72rem; background: var(--cream); color: var(--muted); }
.tile .ph b { font-weight: 400; }
.tile .ph span { display: none; }
.tile.has-img .ph { display: none; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(27, 18, 9, 0.9); display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.lightbox figure { background: var(--white); padding: 8px; }
.lightbox img { max-height: 80vh; width: auto; }
.lightbox .lb-btn { position: absolute; background: var(--orange); color: var(--ink); border: 0; font-size: 1.5rem; width: 2.6rem; height: 2.6rem; cursor: pointer; }
.lightbox .lb-close { top: calc(1rem + env(safe-area-inset-top, 0px)); right: calc(1rem + env(safe-area-inset-right, 0px)); }
.lightbox .lb-prev { left: calc(1rem + env(safe-area-inset-left, 0px)); top: 50%; }
.lightbox .lb-next { right: calc(1rem + env(safe-area-inset-right, 0px)); top: 50%; }

/* Aktuell */
.news { list-style: none; margin: 0; padding: 0; display: grid; }
.news li { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr) 8.5rem; gap: 1rem; padding-block: 0.9rem; border-top: 1px dotted var(--frame); }
.news time { font-weight: 700; font-size: 0.85rem; color: #c98712; font-variant-numeric: tabular-nums; }
.news h3 { margin-bottom: 0.25rem; }
.news p + p { margin-top: 0.5rem; }
.news .bank { font-size: 0.8rem; color: var(--muted); }
.news-img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--frame); padding: 2px; background: var(--white); }
.news-more summary { cursor: pointer; font-weight: 700; padding: 0.7rem 0; border-top: 1px dotted var(--frame); }

/* Kontakt */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2rem; }
.contact-grid > div { display: grid; gap: 0.2rem; align-content: start; }
.contact-grid .label { font-weight: 700; font-style: italic; }
.contact-grid address { font-style: normal; }
.copy { font: inherit; font-size: 0.75rem; background: var(--cream); border: 1px solid var(--frame); padding: 0.1rem 0.6rem; cursor: pointer; justify-self: start; margin-top: 0.2rem; }
.copy:hover { background: var(--orange-light); }

/* Rechtstexte */
.agb h2, .legaltext h2 { margin-top: 0.6rem; }
.legaltext h3 { font-size: 0.95rem; margin-bottom: -0.5rem; }
.legaltext ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; }
.legaltext { overflow-wrap: anywhere; }
.agb ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; }
dl.facts { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 0.3rem 1.2rem; margin: 0; }
dl.facts dt { font-weight: 700; }
dl.facts dd { margin: 0; }
.notice { background: var(--orange-light); padding: 0.8rem 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 64rem) {
  .frame { grid-template-columns: 12rem minmax(0, 1fr); }
  .aside { grid-column: 1 / -1; border-left: 0; border-top: 8px solid var(--white); grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr)); }
  .stage::before, .stage::after { display: none; }
}
@media (max-width: 44rem) {
  .top .wrap { flex-direction: column-reverse; align-items: stretch; gap: 0.6rem; }
  .logo { align-self: center; }
  .logo img { width: min(280px, 100%); }
  .toplinks { max-width: none; }
  .toplinks nav { padding-top: 0.45rem; justify-content: center; }
  .frame { grid-template-columns: minmax(0, 1fr); }
  .side { border-right: 0; border-bottom: 1px solid var(--frame); }
  .menu-toggle {
    display: flex; width: 100%; justify-content: space-between; align-items: center; font: inherit; font-weight: 700;
    background: var(--orange); border: 0; border-top: 4px solid var(--orange-light); padding: 0.6rem 0.75rem; cursor: pointer; color: var(--ink);
  }
  .menu { display: none; border-top: 0; }
  .menu.is-open { display: block; }
  .menu a { padding: 0.6rem 0.75rem; font-size: 0.95rem; }
  .side-contact { display: none; }
  .content { padding: 1rem; }
  .services, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .news li { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
  .news-img { max-width: 14rem; }
  dl.facts { grid-template-columns: minmax(0, 1fr); }
  dl.facts dd { margin-bottom: 0.5rem; }
}

@media print {
  .top .toplinks, .side, .aside, .stage::before, .stage::after, .content-foot { display: none !important; }
  .frame { display: block; border: 0; }
  body { background: #fff; }
}
