/* =========================================================
   Schäfer Bau – Stylesheet (Farbschema: Rot / Schwarz / Blau)
   ========================================================= */

:root {
  --color-black: #16181d;
  --color-black-2: #1e2128;
  --color-red: #c1272d;
  --color-red-dark: #9e1f24;
  --color-blue: #1f5fa8;
  --color-blue-dark: #17436f;
  --color-light: #f5f6f8;
  --color-white: #ffffff;
  --color-text: #23262c;
  --color-muted: #6b7480;
  --max-width: 1180px;
  --radius: 6px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --font: "Inter", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-light);
  line-height: 1.6;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { color: var(--color-black); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  background: var(--color-red);
  color: var(--color-white);
  font-weight: 700;
  border-radius: var(--radius);
  border: 2px solid var(--color-red);
  transition: background 0.2s, color 0.2s, transform 0.15s, border-color 0.2s;
}
.btn:hover { background: var(--color-red-dark); border-color: var(--color-red-dark); transform: translateY(-2px); }
.btn-blue { background: var(--color-blue); border-color: var(--color-blue); }
.btn-blue:hover { background: var(--color-blue-dark); border-color: var(--color-blue-dark); }
.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}
.btn-outline:hover { background: var(--color-white); color: var(--color-black); }

/* ---------- Header ---------- */
.site-header {
  background: var(--color-white);
  border-top: 4px solid var(--color-red);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 14px rgba(0,0,0,0.10);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.logo { display: flex; align-items: center; }
.logo img { height: 72px; width: auto; display: block; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--color-black);
  margin: 5px 0;
  border-radius: 2px;
}

.main-nav ul {
  display: flex;
  gap: 6px;
  align-items: center;
}
.main-nav a {
  color: var(--color-black);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}
.main-nav a:hover,
.main-nav a.active {
  background: var(--color-red);
  color: var(--color-white);
}

/* dropdown */
.has-dropdown { position: relative; }
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  min-width: 220px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  margin-top: 6px;
  border-top: 3px solid var(--color-blue);
}
.has-dropdown:hover .dropdown { display: block; }
.dropdown a {
  color: var(--color-text);
  padding: 10px 12px;
  display: block;
  border-radius: 4px;
  font-weight: 500;
}
.dropdown a:hover { background: var(--color-light); color: var(--color-blue); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background-color: var(--color-black);
  background-image: linear-gradient(180deg, rgba(22,24,29,0.80), rgba(22,24,29,0.92));
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  padding: 110px 24px 90px;
  text-align: center;
}
.hero-small { padding: 70px 24px; }
/* Startseite: Baustellen-Foto als Hintergrund der Hero-Section */
.hero:not(.hero-small) {
  background-image:
    linear-gradient(180deg, rgba(22,24,29,0.55), rgba(22,24,29,0.80)),
    url("../assets/images/hero.jpg");
  padding: 150px 24px 130px;
}
.hero h1 {
  font-size: 2.6rem;
  margin: 0 0 18px;
  max-width: 820px;
  margin-inline: auto;
  line-height: 1.25;
  color: var(--color-white);
}
.hero .eyebrow {
  color: #ff6b6b;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 14px;
  display: block;
}
.hero p.lead {
  max-width: 620px;
  margin: 0 auto 30px;
  font-size: 1.1rem;
  color: #e9e9e9;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.breadcrumb {
  color: #cfd3d8;
  font-size: 0.9rem;
  margin-top: 10px;
}
.breadcrumb a:hover { color: #ff6b6b; }

/* accent strip below hero */
.hero { border-bottom: 5px solid var(--color-blue); }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-tight { padding: 50px 0; }
.section-alt { background: var(--color-white); }
.section-dark { background: var(--color-black); color: var(--color-white); }

.section-head { text-align: center; max-width: 700px; margin: 0 auto 50px; }
.section-head .eyebrow {
  color: var(--color-red);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  font-size: 0.82rem;
}
.section-dark .section-head .eyebrow { color: #ff6b6b; }
.section-head h2 { font-size: 2rem; margin: 10px 0 14px; }
.section-head p { color: var(--color-muted); }
.section-dark .section-head p { color: #c7ccd1; }

/* ---------- Grid / Cards ---------- */
.grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 26px;
  border-top: 3px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.12); border-top-color: var(--color-red); }
.card .icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(31,95,168,0.12);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  color: var(--color-blue);
}
.card h3 { margin: 0 0 10px; font-size: 1.15rem; }
.card p { color: var(--color-muted); margin: 0; font-size: 0.95rem; }

/* ---------- About / split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split-images { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.split-images img:first-child { margin-top: 30px; }

.stats { display: flex; gap: 40px; margin-top: 30px; flex-wrap: wrap; }
.stats div strong { display: block; font-size: 1.8rem; color: var(--color-red); }
.stats div:nth-child(2) strong { color: var(--color-blue); }
.stats div span { color: var(--color-muted); font-size: 0.9rem; }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  position: relative;
}
.gallery img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.gallery figure:hover img { transform: scale(1.08); }

.ref-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.ref-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 320px;
}
.ref-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.ref-card:hover img { transform: scale(1.06); }
.ref-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,24,29,0.1), rgba(22,24,29,0.88));
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px;
  color: var(--color-white);
  border-bottom: 4px solid var(--color-red);
}
.ref-card .overlay span.count { color: #ff6b6b; font-size: 0.85rem; font-weight: 600; }
.ref-card .overlay h3 { margin: 6px 0 12px; font-size: 1.3rem; color: var(--color-white); }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10,11,13,0.94);
  z-index: 1000;
  align-items: center; justify-content: center;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 88vh; max-width: 90vw; border-radius: 4px; }
.lightbox-close {
  position: absolute; top: 24px; right: 34px;
  color: var(--color-white); font-size: 2.2rem; cursor: pointer;
  line-height: 1;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: var(--color-white); font-size: 2.5rem; cursor: pointer;
  padding: 10px 18px; user-select: none;
}
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

/* ---------- Services list page ---------- */
.service-block {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 26px;
  padding: 30px 0;
  border-bottom: 1px solid #e2e5ea;
}
.service-block:last-child { border-bottom: none; }
.service-block .num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-blue);
  opacity: 0.75;
}
.service-block h3 { margin: 0 0 8px; font-size: 1.25rem; }
.service-block p { margin: 0; color: var(--color-muted); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}
.contact-info-item {
  display: flex; gap: 16px; align-items: flex-start;
  margin-bottom: 24px;
}
.contact-info-item .icon {
  width: 44px; height: 44px; min-width:44px;
  border-radius: 50%;
  background: rgba(193,39,45,0.12);
  color: var(--color-red);
  display: flex; align-items: center; justify-content: center;
}
.contact-info-item h4 { margin: 0 0 4px; font-size: 1rem; }
.contact-info-item p, .contact-info-item a { margin: 0; color: var(--color-muted); }
.contact-info-item a:hover { color: var(--color-blue); }

form.contact-form { display: grid; gap: 16px; }
form.contact-form label { font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; display: block; }
form.contact-form input,
form.contact-form textarea,
form.contact-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d3d7de;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--color-white);
}
form.contact-form input:focus,
form.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(31,95,168,0.15);
}
form.contact-form textarea { min-height: 130px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.map-frame {
  border: 0; width: 100%; height: 260px; border-radius: var(--radius); margin-top: 30px; filter: grayscale(0.15);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--color-blue-dark);
  color: var(--color-white);
  padding: 60px 0;
  text-align: center;
}
.cta-band h2 { margin: 0 0 10px; font-size: 1.8rem; color: var(--color-white); }
.cta-band p { color: #d4dee9; margin: 0 0 26px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-black-2);
  color: #c7ccd1;
  padding: 60px 0 0;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-grid h4 { color: var(--color-white); margin: 0 0 16px; font-size: 1rem; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a:hover { color: #ff6b6b; }
.footer-logo { color: var(--color-white); font-weight: 800; font-size: 1.2rem; margin-bottom: 12px; }
.footer-logo b { color: var(--color-red); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 0; flex-wrap: wrap; gap: 10px;
  font-size: 0.85rem;
}
.footer-bottom ul { display: flex; gap: 18px; }

.ai-notice {
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 16px 0;
  font-size: 0.78rem;
  color: #9aa1a8;
  text-align: center;
  line-height: 1.5;
}
.ai-notice .container { max-width: 900px; }

/* content pages headings spacing */
section h3 { margin-top: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .split, .contact-grid, .footer-grid, .ref-categories { grid-template-columns: 1fr; }
  .split-images { order: 2; }
  .nav-toggle { display: block; }
  .logo img { height: 54px; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-white);
    display: none;
    padding: 10px 24px 20px;
    box-shadow: 0 12px 20px rgba(0,0,0,0.12);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .has-dropdown:hover .dropdown { display: none; }
  .has-dropdown.open .dropdown { display: block; position: static; box-shadow: none; margin-top:0; border-top: none; background: var(--color-light); }
  .hero h1 { font-size: 1.9rem; }
  .form-row { grid-template-columns: 1fr; }
}
