/* Makler-ASS – statische Website
   Farben und Schriften folgen dem Original-Auftritt (WordPress-Theme "Chronus"). */

:root {
  --color-primary: #1938a0;
  --color-primary-dark: #122a7a;
  --color-accent: #2b52d1;
  --color-text: #303030;
  --color-text-light: #5a5f6d;
  --color-bg: #ffffff;
  --color-bg-alt: #f3f5fa;
  --color-border: #e2e5ee;
  --font-heading: "Rambla", Georgia, "Times New Roman", serif;
  --font-body: "Raleway", Arial, Helvetica, sans-serif;
  --max-width: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-text);
  line-height: 1.3;
  margin: 0 0 0.6em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-top: 2em; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  color: var(--color-primary);
  padding: 0.6em 1em;
  z-index: 1000;
}

.skip-link:focus {
  left: 0.5em;
  top: 0.5em;
}

/* ---------- Header ---------- */

.site-header__bar {
  background: var(--color-primary);
}

.nav-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-body);
  padding: 0.9rem 0;
  cursor: pointer;
}

.nav-toggle__icon {
  display: inline-block;
  width: 22px;
  height: 2px;
  background: #fff;
  position: relative;
  margin-right: 0.5em;
  vertical-align: middle;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: #fff;
}

.nav-toggle__icon::before { top: -6px; }
.nav-toggle__icon::after { top: 6px; }

.main-nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: block;
  color: #fff;
  padding: 0.9rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.main-nav a:hover,
.main-nav a:focus,
.main-nav a[aria-current="page"] {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
}

.site-branding {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.2rem 1.25rem 1.5rem;
  text-align: center;
}

.site-branding__logo {
  margin: 0 auto 0.9rem;
  max-width: 220px;
}

.site-branding__tagline {
  color: var(--color-text-light);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-branding__rule {
  border: 0;
  border-top: 4px solid var(--color-primary);
  width: 170px;
  margin: 1.4rem auto 0;
}

/* ---------- Layout ---------- */

.content-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-header h1 {
  margin-bottom: 0.3em;
}

.page-header .lede {
  font-size: 1.15rem;
  color: var(--color-text-light);
}

/* ---------- Home teasers ---------- */

.teasers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}

.teaser {
  background: var(--color-bg-alt);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.teaser img {
  width: 100%;
  aspect-ratio: 8 / 5;
  object-fit: cover;
}

.teaser__body {
  padding: 1.4rem 1.4rem 1.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.teaser h2 {
  margin-top: 0;
  font-size: 1.3rem;
}

.teaser p {
  color: var(--color-text-light);
}

.teaser__cta {
  margin-top: auto;
  font-weight: 700;
}

.teaser__cta::after {
  content: " \2192";
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  padding: 0.8em 1.6em;
  border-radius: 4px;
  text-decoration: none;
}

.btn:hover,
.btn:focus {
  background: var(--color-primary-dark);
  text-decoration: none;
}

/* ---------- Icon cards (Ursachen / Produkte) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  font-weight: 600;
}

.card__icon {
  flex: none;
  width: 28px;
  height: 28px;
  color: var(--color-primary);
}

.card__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- Content page image ---------- */

.content-image {
  border-radius: 6px;
  margin: 0 0 1.8rem;
  overflow: hidden;
}

.content-image--float {
  float: right;
  width: 340px;
  margin-left: 2rem;
}

/* ---------- Contact details ---------- */

.contact-block {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.contact-card {
  background: var(--color-bg-alt);
  border-radius: 6px;
  padding: 1.4rem;
  text-align: center;
}

.contact-card h3 {
  margin-bottom: 0.4em;
}

.contact-card a {
  font-weight: 600;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
}

.site-footer nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.6rem 1.25rem;
}

.site-footer nav a {
  color: var(--color-text);
  font-weight: 600;
}

.site-footer__bottom {
  text-align: center;
  color: var(--color-text-light);
  font-size: 0.9rem;
  padding: 0 1.25rem 1.8rem;
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ---------- Legal pages ---------- */

.legal h2 {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.4em;
}

/* ---------- Responsive ---------- */

@media (max-width: 780px) {
  .teasers {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-block {
    grid-template-columns: 1fr;
  }

  .content-image--float {
    float: none;
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
  }

  .main-nav.is-open {
    display: block;
  }

  .nav-wrap {
    flex-wrap: wrap;
  }

  .main-nav ul {
    flex-direction: column;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}
