/* ==========================================================================
   FONTS – Jost (Futura-Stil wie im MM+H-Logo), lokal im Ordner fonts/
   ========================================================================== */
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 300; font-display: swap; src: url('fonts/jost-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/jost-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/jost-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/jost-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/jost-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/jost-latin-700-normal.woff2') format('woff2'); }

/* ==========================================================================
   CSS VARIABLES & DESIGN SYSTEM
   ========================================================================== */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #ffffff;
  --bg-dark: #1c1c1b;
  --text-primary: #1c1c1b;
  --text-secondary: #5e5d59;
  --text-light: #fbfbfa;
  --accent: #8c7e74;
  --accent-light: #b0a49b;
  --accent-hover: #6e6158;
  --brand: #004252;          /* Petrol aus dem MM+H-Logo */
  --border: #d9e5e8;
  --white: #ffffff;
  --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  --header-height: 80px;
}

/* ==========================================================================
   BASE STYLES & RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Jost', 'Futura', 'Century Gothic', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

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

ul, ol {
  list-style: none;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-primary);
}

.subtitle {
  font-family: inherit;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-dark {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.section-dark h2, .section-dark h3 {
  color: var(--text-light);
}

.heading-group {
  margin-bottom: 3.5rem;
  max-width: 600px;
}

.heading-group h2 {
  font-size: clamp(1.7rem, 7vw, 2.2rem); /* Handy: lange Wörter passen in die Zeile */
  overflow-wrap: break-word;
  hyphens: auto;
  margin-top: 0.5rem;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.9rem 2rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 0;
  border: 1px solid var(--text-primary);
  background-color: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn:hover {
  background-color: var(--text-primary);
  color: var(--white);
}

.btn-accent {
  border-color: var(--accent);
  background-color: var(--accent);
  color: var(--white);
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-light {
  border-color: var(--white);
  color: var(--white);
}

.btn-light:hover {
  background-color: var(--white);
  color: var(--bg-dark);
}

/* ==========================================================================
   HEADER & NAVIGATION (MOBILE-FIRST)
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  /* Oben über dem Hero-Bild durchsichtig, beim Scrollen Petrol (.scrolled) */
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: var(--transition-smooth);
}

.header.scrolled,
.header:has(.nav-menu.open) {
  height: 70px;
  background-color: var(--brand);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.header-container {
  /* volle Breite: Schriftzug links, Navigation rechts, mit Abstand zum Rand */
  max-width: none;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

/* Schriftzug "MM+H" als quadratisches Logo: dünner weißer Rahmen,
   Schrift unten wie im Original-Logo */
.logo-text {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  box-sizing: border-box;
  width: 50px;
  height: 50px;
  padding-bottom: 0; /* Schrift sitzt direkt auf der unteren Linie */
  border: 1px solid transparent; /* Kopfzeile: kein Rahmen */
  background-color: var(--brand); /* Logo-Quadrat auch über dem Titelbild in Petrol */
  font-family: inherit;
  font-weight: 300;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  line-height: 0.74; /* ≈ Versalhöhe: Unterkante der Buchstaben = Unterkante der Box */
  color: var(--text-light);
  transition: var(--transition-smooth);
}

/* Logo in der Kopfzeile senkrecht mittig */
.header .logo {
  display: flex;
  align-items: center;
  height: 100%;
}

/* Kopfzeile beim Scrollen: dünner weißer Rahmen (ganz oben ohne) */
.header.scrolled .logo-text {
  border-color: rgba(255, 255, 255, 0.9);
}

/* Fußzeile: gleiches Logo, aber mit dünnem weißem Rahmen */
.logo-text--footer {
  border-color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

/* Gruppenbilder (Team-Seite) */
.group-photos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.group-photo-item {
  margin: 0;
}

.group-photo {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.group-photo--placeholder {
  background: linear-gradient(135deg, var(--border), #f3f6f7);
  border: 1px dashed var(--accent-light);
}

.group-photo-item figcaption {
  padding-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

@media screen and (min-width: 768px) {
  .group-photos {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Nav Menu Mobile */
.nav-menu {
  position: fixed;
  top: 70px; /* Header ist bei geöffnetem Menü 70px hoch */
  left: 0;
  width: 100%;
  height: calc(100vh - 70px);
  background-color: var(--brand);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: var(--transition-smooth);
  z-index: 999;
}

.nav-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-item a {
  font-family: inherit;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--text-light);
  position: relative;
  padding: 0.5rem 0;
}

.nav-item a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background-color: var(--text-light);
  transition: var(--transition-smooth);
  transform: translateX(-50%);
}

.nav-item a:hover::after,
.nav-item.active a::after {
  width: 50px;
}

/* Hamburger Icon button */
.nav-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-light);
  transition: var(--transition-smooth);
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  color: var(--text-light);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(28,28,27,0.4) 0%, rgba(28,28,27,0.7) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 60px;
  text-align: center;
}

/* Kleine Zeile über der Hero-Überschrift ("Milde, Möser + Hamann") in Weiß */
.hero .subtitle {
  color: var(--text-light);
}

.hero h1 {
  font-size: clamp(1.6rem, 7vw, 2.8rem); /* Handy: "Architektengemeinschaft" passt in eine Zeile */
  color: var(--text-light);
  overflow-wrap: break-word;
  hyphens: auto;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.hero p {
  font-size: 1.1rem;
  font-weight: 300;
  margin-bottom: 2.5rem;
  color: rgba(251, 251, 250, 0.85);
}

/* ==========================================================================
   ABOUT US SECTION
   ========================================================================== */
.about-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.about-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.about-text p {
  margin-bottom: 1.5rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   TEAM SECTION
   ========================================================================== */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.team-card {
  background-color: var(--white);
  border: 1px solid var(--border);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition-smooth);
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.03);
  border-color: var(--accent-light);
}

.team-image-wrapper {
  width: 150px;
  height: 150px;
  border-radius: 0; /* viereckig statt rund */
  overflow: hidden;
  margin-bottom: 1.8rem;
  border: 2px solid var(--border);
  transition: var(--transition-smooth);
}

.team-card:hover .team-image-wrapper {
  border-color: var(--brand);
}

.team-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.team-role {
  font-size: 0.9rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.team-contact {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}

.team-contact a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.team-contact a:hover {
  background-color: var(--brand);
  color: var(--white);
  border-color: var(--brand);
}

.team-contact a svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

/* Partner: ohne Kasten, nur Foto + Text */
.team-card,
.team-card:hover {
  background-color: transparent;
  border: none;
  box-shadow: none;
  transform: none;
}

/* ==========================================================================
   PORTFOLIO (SERVICES)
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.service-card {
  padding: 2.5rem 2rem;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  transition: var(--transition-smooth);
}

.service-card:hover {
  background-color: var(--white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.service-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.service-card li {
  position: relative;
  padding-left: 1.2rem;
}

.service-card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ==========================================================================
   IMAGE GALLERY CAROUSEL
   ========================================================================== */
.carousel-section {
  background-color: var(--bg-secondary);
  padding: 5rem 0;
}

.carousel-container {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.carousel-track-container {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  transition: var(--transition-smooth);
  width: 100%;
}

.carousel-slide {
  min-width: 100%;
  padding: 0 0.5rem;
}

.carousel-slide img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 0;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--white);
  border: 1px solid var(--border);
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
}

.carousel-button:hover {
  background-color: var(--text-primary);
  color: var(--white);
  border-color: var(--text-primary);
}

.carousel-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.carousel-button-prev {
  left: 10px;
}

.carousel-button-next {
  right: 10px;
}

.carousel-pagination {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 2rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-light);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: var(--transition-smooth);
}

.carousel-dot.active {
  background-color: var(--text-primary);
  transform: scale(1.3);
}

/* ==========================================================================
   FOOTER STYLE
   ========================================================================== */
.footer {
  background-color: var(--brand);
  color: var(--text-light);
  padding: 5rem 0 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-brand p {
  color: rgba(251, 251, 250, 0.6);
  font-size: 0.95rem;
  max-width: 300px;
}

.footer-info h4 {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-info ul {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  color: rgba(251, 251, 250, 0.7);
  font-size: 0.95rem;
}

.footer-info a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
  color: rgba(251, 251, 250, 0.65);
  font-size: 0.85rem;
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer-legal-links a:hover {
  color: var(--text-light);
}

/* ==========================================================================
   SPRUNGZIELE, TEAM-GALERIE & PROJEKTE
   ========================================================================== */
/* Abstand beim Springen aus der Navigation, damit der feste Header nichts verdeckt */
#philosophie, #team, #projekte {
  scroll-margin-top: 70px;
}

.heading-group--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.team-gallery-heading {
  margin-top: 6rem;
}

.team-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.team-member {
  margin: 0;
}

.team-member img,
.team-photo {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background-color: var(--border);
}

/* Platzhalter, bis ein echtes Foto eingesetzt ist */
.team-photo--placeholder {
  background: linear-gradient(135deg, var(--border), var(--bg-secondary));
  border: 1px dashed var(--accent-light);
}

.team-member figcaption {
  padding-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.team-member figcaption strong {
  font-weight: 500;
}

.team-member figcaption span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Dünne Petrol-Linie zwischen zwei Abschnitten (nicht bis zum Rand) */
main > .section + .section {
  position: relative;
}

main > .section + .section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(min(1200px, 100%) - 3rem);
  height: 1px;
  background-color: var(--brand);
  opacity: 0.6;
}

/* Kopfbild der Unterseiten (Team, Leistungen, Projekte) */
.hero--page {
  height: 50vh;
  min-height: 340px;
}

/* Projektkarte ist ein Link */
a.project-card {
  display: block;
  color: inherit;
}

/* Aktuelles */
.news-list {
  max-width: 800px;
}

.news-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.news-item:first-child {
  padding-top: 0;
}

.news-date {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

.news-item h2 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.news-item p,
.news-empty p {
  color: var(--text-secondary);
}

/* Hinweis, solange es noch keine Meldungen gibt */
.news-empty {
  padding: 2rem 0 2rem 1.5rem;
  border-left: 3px solid var(--brand);
}

.news-empty h2 {
  font-size: clamp(1.3rem, 5vw, 1.8rem);
  margin: 0;
}

/* Am Desktop in einer Zeile */
@media screen and (min-width: 1024px) {
  .news-list:has(.news-empty) {
    max-width: none;
  }

  .news-empty h2 {
    white-space: nowrap;
  }
}

.news-empty p {
  font-size: 1.1rem;
  max-width: 560px;
}

.news-item img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 1.2rem;
}

/* Kontakt (Startseite) */
/* Überschrift über die volle Breite, am Desktop in einer Zeile */
.heading-group--wide {
  max-width: none;
}

@media screen and (min-width: 768px) {
  .heading-group--wide h2 {
    white-space: nowrap;
  }
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.contact-office h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.contact-office p {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.contact-list {
  margin: 0;
}

.contact-list > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-list dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--brand);
  padding-top: 0.15rem;
}

.contact-list dd {
  margin: 0;
  color: var(--text-secondary);
}

.contact-list a:hover {
  color: var(--brand);
}

.contact-mail {
  margin-top: 2.5rem;
  max-width: 520px;
}

@media screen and (min-width: 768px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
  }
}

/* Hinweis am Ende der Referenzen-Übersicht */
.project-more {
  margin-top: 5rem;
  text-align: center;
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  font-weight: 300;
  color: var(--text-primary);
}

.project-more::before {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  margin: 0 auto 1.5rem;
  background-color: var(--brand);
}

/* Referenz ohne Titelbild (noch kein Foto vorhanden) */
.project-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background-color: var(--brand);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.hero--ohne-bild {
  background-color: var(--brand);
}

.hero--ohne-bild::before {
  display: none;
}

/* Projekt-Detailseite */
/* Referenz-Detailseite: Überschrift oben bündig statt mittig */
.about-grid--top {
  align-items: flex-start !important;
}

.about-col {
  flex: 1;
  min-width: 0;
}

.project-facts {
  margin: 3rem 0 0;
  border-top: 1px solid var(--border);
}

/* Eckdaten als Liste: Bezeichnung links, Wert rechts */
.project-facts > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.project-facts dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--brand);
  padding-top: 0.15rem;
}

.project-facts dd {
  margin: 0;
  color: var(--text-secondary);
}

@media screen and (min-width: 768px) {
  .project-facts > div {
    grid-template-columns: 180px 1fr;
    gap: 2rem;
  }
}

/* Galerie: zwei Hochformate nebeneinander */
.gallery-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* Querformate immer über die volle Breite (bündig), auch kleinere Bilder */
.project-gallery img.quer {
  width: 100%;
  max-height: none;
}

.project-gallery .gallery-pair img {
  width: 100%;
  max-height: none;
}

@media screen and (max-width: 767px) {
  .gallery-pair {
    gap: 1rem;
  }
}

/* Galerie: Bilder im Großformat untereinander, unbeschnitten */
.project-gallery {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.project-gallery img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 85vh; /* Hochformate nicht höher als der Bildschirm */
  height: auto;
  margin: 0 auto;
}

.project-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.project-pager-link {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.project-card {
  background-color: var(--white);
  border: 1px solid var(--border);
  transition: var(--transition-smooth);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

.project-image {
  overflow: hidden;
}

.project-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-card:hover .project-image img {
  transform: scale(1.04);
}

/* Übersicht der Referenzen in Schwarz-Weiß – farbig erst auf der Detailseite */
.project-card .project-image img {
  filter: grayscale(100%);
  transition: filter 0.6s ease, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Beim Drüberfahren mit der Maus (oder Tastatur-Fokus) farbig */
.project-card:hover .project-image img,
.project-card:focus-visible .project-image img {
  filter: grayscale(0%);
}

.project-body {
  padding: 1.5rem 1.5rem 1.8rem;
}

.project-body h3 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.project-meta {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.project-body p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Tablet: 6 Menüpunkte etwas kompakter, damit sie in eine Zeile passen */
@media screen and (min-width: 768px) and (max-width: 1180px) {
  .nav-menu {
    gap: 0.9rem !important;
  }

  .nav-item a {
    font-size: 0.72rem !important;
    letter-spacing: 0.04em !important;
  }

  .logo-text {
    font-size: 0.92rem;
  }
}

@media screen and (min-width: 768px) {
  .team-gallery {
    grid-template-columns: repeat(4, 1fr);
  }

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

@media screen and (min-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   STANDARD RESPONSIVE LAYOUTS (TABLET & DESKTOP)
   ========================================================================== */
@media screen and (min-width: 768px) {
  /* Font size increases slightly on larger screens */
  body {
    font-size: 16px;
  }

  .heading-group h2 {
    font-size: 2.8rem;
  }

  .hero h1 {
    font-size: 4.2rem;
  }

  .hero p {
    font-size: 1.3rem;
  }

  /* Header & Navigation Desktop */
  .header-container {
    padding: 0 2.5rem;
  }

  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    flex-direction: row;
    height: auto;
    width: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    background-color: transparent;
    padding: 0;
    gap: 2rem;
  }

  .nav-item a {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0;
  }

  .nav-item a:hover::after,
  .nav-item.active a::after {
    width: 100%;
  }

  /* Unterstrich der Navigation weiß (Header ist durchsichtig bzw. Petrol) */
  .nav-item a::after {
    background-color: var(--text-light);
  }

  /* About US Grid */
  .about-grid {
    flex-direction: row;
    align-items: center;
    gap: 4rem;
  }

  .about-text {
    flex: 1;
    font-size: 1.1rem;
  }

  /* Team Grid */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Services Grid */
  /* Leistungen: die vier Felder untereinander (auch am Desktop) */

  /* Carousel Image Height */
  .carousel-slide img {
    height: 450px;
  }

  /* Footer Grid */
  .footer-grid {
    grid-template-columns: 2fr 1fr;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media screen and (min-width: 1024px) {
  .section {
    padding: 7rem 0;
  }

  .carousel-slide img {
    height: 550px;
  }
}
