/* Metallbau Bernhard – Stylesheet */

@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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;
}

:root {
  --blue: #00008b;
  --blue-logo: #2b5fc0;
  --link: #1e5fa8;
  --text: #2b2b2b;
  --muted: #5a5a5a;
  --bg: #ededed;
  --surface: #fff;
  --footer: #f5f5f5;
  --line: #d6d6d6;
  --max: 1140px;
  --gutter: 20px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

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

a { color: var(--link); text-underline-offset: .15em; }
a:hover { color: var(--blue); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue-logo); outline-offset: 2px; }

h1, h2, h3, h4 { line-height: 1.3; color: #111; margin: 1.6em 0 .5em; font-weight: 600; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2rem); margin-top: 0; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }
p, ul, address { margin: 0 0 1em; }
address { font-style: normal; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--surface); padding: .5em 1em; z-index: 10;
}
.skip-link:focus { left: var(--gutter); top: var(--gutter); }

/* Kopfbereich */
.site-header { background: var(--bg); padding: 16px 0; }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
}
.logo img { width: 150px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.main-nav a {
  display: inline-block; padding: 6px 0; color: #222; text-decoration: none;
  font-size: .8rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }

/* Seitentitel */
.page-title { background: #f7f7f7; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 0; }
.page-title h1 { margin: 0; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin: .25em 0 0; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.breadcrumb li + li::before { content: "›"; padding: 0 .5em; }
.breadcrumb a { color: var(--muted); }

/* Inhalt */
main { background: var(--surface); padding: 48px 0 56px; }
.content { max-width: 860px; }
.content-wide { max-width: none; }

.divider { border: 0; border-top: 2px solid var(--blue); margin: 40px 0; }

.lead { font-size: 1.08rem; }

.service h2 { margin-top: 0; color: var(--blue); }
.service ul, .checklist { padding-left: 1.2em; }
.service li, .checklist li { margin-bottom: .3em; }

/* Bildergalerie (Karussell) */
.carousel { position: relative; margin: 28px 0 0; }
.carousel-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding-bottom: 8px; list-style: none; margin: 0; padding-left: 0;
  scrollbar-width: thin;
}
/* Mit JavaScript: Bildlaufleiste ausblenden, Navigation über Pfeile und Punkte */
.carousel.is-ready .carousel-track { scrollbar-width: none; padding-bottom: 0; }
.carousel.is-ready .carousel-track::-webkit-scrollbar { display: none; }
.carousel-track li {
  flex: 0 0 calc((100% - 32px) / 3);
  scroll-snap-align: start;
  display: flex; align-items: flex-start; justify-content: center;
}
/* Bilder in Originalgröße anzeigen – nur verkleinern, nie vergrößern */
.carousel-track img { width: auto; height: auto; max-width: 100%; }
.carousel-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.carousel-dots button {
  width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%;
  background: #c4c4c4; cursor: pointer;
}
.carousel-dots button[aria-current="true"] { background: #222; }
.carousel-btn {
  position: absolute; top: 150px; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 139, .85); color: #fff; font-size: 1.4rem; line-height: 1;
  display: none; align-items: center; justify-content: center;
}
.carousel.is-ready .carousel-btn { display: flex; }
.carousel-btn:hover { background: var(--blue); }
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }

@media (max-width: 900px) { .carousel-track li { flex-basis: calc((100% - 16px) / 2); } }
@media (max-width: 520px) { .carousel-track li { flex-basis: 85%; } }

/* Kontakt */
.contact-card {
  display: grid; gap: 24px 48px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  background: #f7f7f7; border-left: 4px solid var(--blue); padding: 28px 32px; margin: 28px 0;
}
.contact-card h2 { margin: 0 0 .4em; font-size: 1.1rem; }
.contact-card p, .contact-card address { margin: 0; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { margin-bottom: .2em; }
.label { display: inline-block; min-width: 5.5em; color: var(--muted); }

.job-image { width: 100%; max-width: 640px; margin: 0 0 32px; }

/* Datenschutz */
.legal h2 { margin-top: 2em; padding-top: .8em; border-top: 1px solid var(--line); }
.legal h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal p, .legal li { overflow-wrap: anywhere; }

/* Fußbereich */
.site-footer { background: var(--footer); color: #000; font-size: .95rem; }
.footer-widgets { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 48px var(--gutter); }
.site-footer h2 { font-size: 1.15rem; font-weight: 500; letter-spacing: .04em; margin: 0 0 .8em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .3em; }
.footer-bottom { background: #e4e4e4; font-size: .8rem; padding: 14px 0; color: var(--muted); }

/* E-Mail-Schutz: Fallback ohne JavaScript */
.mail-fallback { white-space: nowrap; }

@media print {
  .site-header nav, .carousel-btn, .footer-bottom { display: none; }
  main { padding: 0; }
}

@media (max-width: 520px) {
  .contact-card { padding: 22px 18px; }
  .label { min-width: 4.8em; }
}
