:root {
  --blue-1: #0f4c81;
  --blue-2: #1976b2;
  --blue-3: #60a5fa;
  --block-bg: #e4e4e4;
  --page-bg: #6a9fe0af;
  --text: #1f2937;
  --max-width: 1100px;
}

* {
  box-sizing: border-box
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial;
  color: var(--text);
  margin: 0;
  background: var(--muted)
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem
}

.site-header {
  background: linear-gradient(90deg, var(--blue-1), var(--blue-2));
  color: #fff
}

/* HEADER-BAR: Logo links, Toggle rechts */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem
}

.logo {
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .5rem
}

.logo img {
  max-height: 90px;   /* Empfohlene Header-Logo-Größe */
  width: auto;
  height: auto;
  display: block;
}

.main-nav {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  color: #fff;
  overflow: hidden;
  display: flex;
  justify-content: center;
  transition: height 320ms ease, opacity 220ms ease;
  height: 0;
  /* collapsed by default */
  opacity: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial;
  color: var(--text);
  background: var(--page-bg);
  /* gesamte Seite weiß */
}

/* Container */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem
}

.site-header {
  background: linear-gradient(90deg, var(--blue-1), var(--blue-2));
  color: #fff
}

/* --- HOMEPAGE BLOCKS --- */
/* Wrapper */
.home-blocks .blocks {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 0 2rem
}

/* Einzelner Block */
.block {
  display: flex;
  flex-direction: column;
  /* mobile: stacked */
  gap: 0;
  background: var(--block-bg);
  /* grauer Block-Hintergrund */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.04);
  transition: transform .18s ease, box-shadow .18s ease;
}

/* Content / Media */
.block .content {
  padding: 1.1rem;
}

.block .content h2 {
  margin: 0 0 .5rem;
  font-size: 1.25rem;
  color: var(--blue-1)
}

.block .content p {
  margin: 0 0 .9rem;
  line-height: 1.45;
  color: var(--text)
}

.block .content .btn {
  display: inline-block;
  padding: .5rem .9rem;
  border-radius: 6px;
  background: var(--blue-2);
  color: #fff;
  text-decoration: none
}

/* Media (Bild) */
.block .media {
  width: 100%;
  overflow: hidden;
  display: block
}

.block .media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform .4s ease;
}

/* Hover-Effekt (nur größere Pointer-Devices) */
@media (hover:hover) and (pointer:fine) {
  .block:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08)
  }

  .block:hover .media img {
    transform: scale(1.02)
  }
}

/* ----- Desktop: alternierende Anordnung ----- */
@media (min-width:801px) {
  .home-blocks .blocks {
    gap: 1.5rem
  }

  .block {
    flex-direction: row;
    align-items: stretch;
    min-height: 260px;
  }

  /* Inhalt / Bild jeweils 50% */
  .block .content,
  .block .media {
    flex: 1 1 50%
  }

  .block .content {
    padding: 2rem
  }

  .block .media {
    min-height: 260px;
    max-height: 400px;
  }

  /* Alternating: jedes zweite Block-Element umkehren */
  .home-blocks .blocks .block:nth-child(even) {
    flex-direction: row-reverse;
  }

  /* Optional: text alignment depending on position */
  .home-blocks .blocks .block:nth-child(odd) .content {
    text-align: left
  }

  .home-blocks .blocks .block:nth-child(even) .content {
    text-align: left
  }

  /* keep left-aligned for readability */

  /* Bild deckt die Hälfte; Objektposition kann angepasst werden */
  .block .media img {
    width: 100%;
    height: 100%;
    object-fit: cover
  }
}

/* kleine Bildschirme: mehr Abstand im Content */
@media (max-width:400px) {
  .block .content {
    padding: 1rem
  }
}

/* Liste vertikal */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column
}

.main-nav li {
  border-top: 1px solid rgba(255, 255, 255, 0.04)
}

.main-nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: .9rem 1rem
}

/* Hover / active */
.main-nav a:hover {
  background: rgba(255, 255, 255, 0.03)
}

.nav-item.active a {
  background: rgba(255, 255, 255, 0.10);
  font-weight: 600
}

/* Toggle-Button */
.mobile-toggle {
  display: block;
  background: none;
  border: 0;
  color: #fff;
  font-size: 1.3rem;
  padding: .5rem 1rem;
  line-height: 1;
}

/* Content */
.container {
  padding: 2rem 1rem
}

.hero {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
  margin-bottom: 1.5rem
}

.hero h1 {
  color: var(--blue-1)
}

.btn {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 6px;
  background: var(--blue-2);
  color: #fff;
  text-decoration: none
}

.btn.outline {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, .08);
  color: var(--blue-1)
}

.peek {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem
}

.project-card {
  background: #fff;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  margin: 1rem 0
}

.project-card img {
  width: 100%;
  height: auto;
  display: block
}

.site-footer {
  background: #fff;
  padding: 1.25rem 0;
  margin-top: 2rem;
  border-top: 1px solid #e5e7eb
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem
}

.copyright {
  text-align: center;
  padding: .75rem 0;
  color: #6b7280
}

/* FOOTER */
.site-footer {
  background: linear-gradient(90deg, var(--blue-1), var(--blue-2));
  color: #fff;
  padding: 2rem 1rem 1rem 1rem;
  text-align: center;
  margin-top: 3rem;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-content p {
  margin: 0.3rem 0;
}

.footer-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.footer-bottom {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  opacity: 0.85;
}

/* ===== Desktop / größere Bildschirme =====
   Navigation horizontal in der header-bar, keine height-transition nötig.
*/
@media (min-width:801px) {
  .header-bar {
    padding: 1rem
  }

  .site-header {
    background: linear-gradient(90deg, var(--blue-1), var(--blue-2));
  }

  .main-nav {
    background: transparent;
    box-shadow: none;
    height: auto !important;
    opacity: 1 !important;
    transition: none;
  }

  .main-nav ul {
    flex-direction: row;
    gap: 1rem;
    align-items: center
  }

  .main-nav li {
    border-top: none
  }

  .main-nav a {
    padding: .5rem .75rem;
    border-radius: 6px;
    color: #fff
  }

  .mobile-toggle {
    display: none
  }

  /* position der nav: in desktop soll sie in der header-bar stehen,
     deshalb machen wir sie sichtbar und inline */
  .header-bar {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Um die Desktop-Navigation optisch in der Zeile zu haben, nutzen wir flex:
     platzieren die nav innerhalb der header-bar automatisch */
  .site-header>.main-nav {
    order: 2;
  }
}