/* Design-Variablen: Farben, Schatten, Rundungen und Containerbreite */
:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #eef3f7;
  --text: #18212f;
  --muted: #657184;
  --line: rgba(24, 33, 47, 0.12);
  --primary: #0f766e;
  --primary-dark: #0b4f4a;
  --accent: #e0a82e;
  --ink: #101722;
  --shadow: 0 24px 70px rgba(18, 29, 43, 0.12);
  --radius: 8px;
  --container: 1180px;
}

/* Basis-Reset und globale Einstellungen */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

/* Header, Logo und Hauptnavigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 251, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  position: relative;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
}

.language-toggle {
  flex: 0 0 auto;
  min-width: 46px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--primary-dark);
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.language-toggle:hover,
.language-toggle:focus-visible {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.18);
  transform: translateY(-1px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--ink);
}

.logo img {
  width: 78px;
  height: auto;
  max-height: 68px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.main-nav a {
  position: relative;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary-dark);
  background: rgba(15, 118, 110, 0.08);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  border-radius: 99px;
}

/* Allgemeine Section-Abstaende */
.section,
.page-hero {
  padding: 104px 0;
}

/* Homepage Hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 760px;
  display: flex;
  align-items: center;
  padding: 0;
  color: #fff;
}

.hero::before {
  content: none;
}

.hero-grid,
.split,
.contact-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: 58px;
}

.hero-grid {
  display: block;
}

.hero h1,
.page-hero h1 {
  max-width: 820px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.5rem, 6vw, 5.7rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero h1 {
  color: #fff;
}

.hero p,
.page-hero p,
.section-heading p {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero p {
  color: rgba(255, 255, 255, 0.86);
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.hero .btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(12px);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 18px 34px rgba(15, 118, 110, 0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
}

.btn-light {
  color: var(--ink);
  background: #fff;
}

/* Bildbereiche */
.hero-media,
.image-card {
  position: relative;
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #dce7e9, #f6efd8);
  box-shadow: var(--shadow);
}

.hero .hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  min-height: 100%;
  border-radius: 0;
  box-shadow: none;
  background: #101722;
  opacity: 1;
  transform: none;
}

.hero .hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 23, 34, 0.78), rgba(16, 23, 34, 0.5) 45%, rgba(16, 23, 34, 0.34));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 150px 0;
}

.hero-media img,
.image-card img,
.team-card img,
.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #dce7e9, #f6efd8);
}

.hero-media img {
  position: absolute;
  inset: 0;
}

.muted {
  background: var(--surface-2);
}

/* Ueberschriften und Karten-Grids */
.section-heading {
  max-width: 760px;
  margin-bottom: 54px;
}

h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.25rem;
}

h3 a {
  color: inherit;
  transition: color 180ms ease;
}

h3 a:hover,
h3 a:focus-visible {
  color: var(--primary);
}

.card-grid {
  display: grid;
  gap: 32px;
}

.card-grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.card-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

/* Allgemeine Inhaltskarten und Leistungs-Karten */
.feature-card,
.service-card,
.team-card,
.contact-card,
.contact-form,
.legal-content {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 40px rgba(18, 29, 43, 0.07);
}

.feature-card,
.service-card,
.contact-card,
.contact-form,
.legal-content {
  padding: 30px;
}

.feature-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 38px;
}

.service-card {
  padding: 0;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.feature-card:hover,
.service-card:hover,
.portfolio-card:hover,
.team-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
  border-color: rgba(15, 118, 110, 0.28);
}

.icon,
.service-icon {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 26px;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
}

.service-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card a {
  color: var(--primary);
  font-weight: 800;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.service-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background: linear-gradient(135deg, #dce7e9, #f6efd8);
}

.service-content {
  display: grid;
  gap: 16px;
  padding: 28px;
}

/* Listen mit Akzentpunkten */
.check-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
}

/* Immobilien / Portfolio-Galerie */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.portfolio-grid.large {
  grid-template-columns: repeat(3, 1fr);
}

.paginated-gallery {
  min-height: 1px;
}

.portfolio-card {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #dce7e9;
  box-shadow: 0 14px 40px rgba(18, 29, 43, 0.07);
  text-align: left;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.portfolio-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(16, 23, 34, 0.76));
}

.portfolio-card div {
  position: absolute;
  z-index: 1;
  left: 22px;
  right: 22px;
  bottom: 22px;
  color: #fff;
}

.portfolio-card span,
.portfolio-card strong {
  display: block;
}

.portfolio-card span {
  color: rgba(255, 255, 255, 0.78);
}

.portfolio-card strong {
  font-size: 1.3rem;
}

.team-card {
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.team-card img {
  height: 270px;
}

.team-card h3,
.team-card p {
  padding-inline: 24px;
}

.team-card h3 {
  padding-top: 22px;
}

.team-card p {
  margin-bottom: 24px;
  color: var(--muted);
}

/* Call-to-Action Bereich */
.cta-section {
  padding: 84px 0;
  color: #fff;
  background: linear-gradient(135deg, var(--ink), var(--primary-dark));
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.cta-inner h2 {
  color: #fff;
}

.cta-inner p {
  color: rgba(255, 255, 255, 0.78);
}

.page-hero {
  background: linear-gradient(135deg, #eef3f7, #ffffff);
}

/* Leistungsseiten Hero wie Startseite */
.service-cover {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background: var(--ink);
}

.service-cover > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 23, 34, 0.8), rgba(16, 23, 34, 0.52) 46%, rgba(16, 23, 34, 0.2));
}

.service-cover-content {
  position: relative;
  z-index: 1;
  max-width: 740px;
  padding: 120px 0;
}

.service-cover h1 {
  max-width: 820px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.4rem, 5.4vw, 5.3rem);
  line-height: 1.02;
}

.service-cover p {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.12rem;
}

.service-cover .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.service-compact-panel {
  max-width: 920px;
  padding: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.service-compact-panel p {
  max-width: 760px;
  color: var(--muted);
}

.service-compact-panel .btn {
  margin-top: 22px;
}

/* Kontaktseite: Kontaktdaten, Formular und Maps */
.contact-grid {
  align-items: start;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 72px;
}

.contact-side {
  display: grid;
  gap: 30px;
}

.contact-card {
  min-height: 310px;
}

.contact-card {
  padding: 38px;
}

.contact-card p {
  margin: 0 0 20px;
}

.contact-card p:last-child {
  margin-bottom: 0;
}

.contact-card p,
.legal-content p {
  color: var(--muted);
}

.contact-form {
  display: grid;
  gap: 18px;
  padding: 38px;
}

.form-row {
  display: grid;
  gap: 7px;
}

/* Formularfelder */
label {
  color: var(--ink);
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--text);
  background: #fbfcfd;
  outline: none;
  transition: border 180ms ease, box-shadow 180ms ease;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.checkbox-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--muted);
  font-weight: 500;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-message {
  display: none;
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 700;
}

.form-message.success {
  display: block;
  color: #105c31;
  background: #daf7e5;
}

.form-message.error {
  display: block;
  color: #8a1f1f;
  background: #ffe3e3;
}

.legal-content {
  max-width: 880px;
}

.legal-content h2 {
  margin-top: 34px;
  font-size: 1.55rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

/* Immobilien-Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(16, 23, 34, 0.82);
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  width: min(860px, 100%);
  padding: 18px;
  border-radius: 8px;
  background: #fff;
}

.lightbox-content img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: 8px;
}

.lightbox-content h2 {
  margin-top: 20px;
  font-size: 2rem;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 2rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

/* Footer */
.site-footer {
  padding: 62px 0 26px;
  color: rgba(255, 255, 255, 0.72);
  background: var(--ink);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 44px;
}

.footer-logo {
  color: #fff;
}

.footer-logo img {
  width: 400px;
  max-height: 200px;
}

.site-footer nav {
  display: grid;
  gap: 10px;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer h3 {
  color: #fff;
}

.section-action {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.pagination button {
  min-width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.pagination button:hover {
  transform: translateY(-2px);
}

.pagination button.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.pagination .page-arrow {
  min-width: 44px;
}

.paginated-gallery .portfolio-card.is-hidden {
  display: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.92rem;
}

/* Scroll-Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Tablet und kleine Desktop-Breiten */
@media (max-width: 1060px) {
  .header-inner {
    justify-content: space-between;
  }

  .header-inner > .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .language-toggle {
    margin-right: auto;
  }

  .main-nav {
    position: fixed;
    inset: 88px 0 auto 0;
    display: grid;
    gap: 8px;
    padding: 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(247, 248, 251, 0.98);
    transform: translateY(-130%);
    transition: transform 240ms ease;
  }

  body.nav-open .main-nav {
    transform: translateY(0);
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .card-grid.four {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet Layout */
@media (max-width: 820px) {
  .section,
  .page-hero {
    padding: 72px 0;
  }

  .hero-grid,
  .split,
  .contact-grid,
  .footer-grid,
  .cta-inner {
    grid-template-columns: 1fr;
  }

  .cta-inner {
    display: grid;
  }

  .hero-media,
  .image-card {
    min-height: 340px;
  }

  .card-grid.three,
  .portfolio-grid,
  .portfolio-grid.large,
  .service-grid {
    grid-template-columns: 1fr 1fr;
  }

  .service-cover {
    min-height: 560px;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}

/* Smartphone Layout */
@media (max-width: 580px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .header-inner {
    min-height: 76px;
  }

  .main-nav {
    inset: 70px 0 auto 0;
  }

  .hero {
    min-height: 680px;
  }

  .hero-content {
    padding: 118px 0;
  }

  .card-grid.four,
  .card-grid.three,
  .portfolio-grid,
  .portfolio-grid.large,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .service-card,
  .service-compact-panel,
  .contact-card,
  .contact-form,
  .legal-content {
    padding: 22px;
  }

  .service-cover {
    min-height: 540px;
  }

  .service-cover-content {
    padding: 96px 0;
  }

  .service-card {
    padding: 0;
  }

  .button-row,
  .btn {
    width: 100%;
  }

  .portfolio-card {
    min-height: 260px;
  }

}
