/* =========================================
   GRUNDLAYOUT & VARIABLEN
   ========================================= */
:root {
  --portrait-size: clamp(140px, 16vw, 240px);
  --portrait-border: 6px;
  --portrait-shadow: 0 8px 24px rgba(0,0,0,.25);
  --text-color: #333;
  --muted: #666;
  --border: #e7e7e7;
  --bg-white: #fff;
  --blue: #0b63ce;
  --blue-light: rgba(11,99,206,.10);
  --spacing-section: 80px;
  --shadow-soft: 0 2px 10px rgba(0,0,0,.03);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans";
  color: var(--text-color);
  line-height: 1.5;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

/* =========================================
   NAVIGATION – SCHWEBEND + MOBIL
   ========================================= */
.nav-overlay {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* ===============================
   DESKTOP-MENÜ
   =============================== */
.nav-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.nav-links a {
  position: relative;
  color: #fff;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  text-decoration: none;
  text-shadow: 0 2px 4px rgba(0,0,0,.4);
  transition: color .3s ease;
  white-space: nowrap;
}

/* animierte Linie beim Hover/aktiv */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background-color: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a:focus::after,
.nav-links a.active::after { transform: scaleX(1); }

.nav-links a:hover,
.nav-links a:focus { color: #e6ebf1; }

/* Hamburger-Button */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  text-shadow: 0 2px 4px rgba(0,0,0,.4);
  transition: opacity .2s ease;
}
.nav-toggle:hover, .nav-toggle:focus { opacity: .8; }

/* ===============================
   KOMPAKTREGELN für mittlere Breiten
   =============================== */
@media (max-width: 1100px) and (min-width: 961px){
  .nav-links { gap: clamp(10px, 2.2vw, 24px); }
  .nav-links a {
    font-size: clamp(0.95rem, 1.4vw, 1.05rem);
    letter-spacing: 0.2px;
  }
}

/* ===============================
   MOBILES MENÜ
   =============================== */
@media (max-width: 960px) {
  .nav-overlay {
    top: 16px;
    right: 16px;
    left: auto;
    transform: none;
  }

  .nav-toggle {
    display: block;
    position: relative;
    z-index: 15;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 44px;
    right: 0;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 14px 22px;
    list-style: none;
    flex-direction: column;
    gap: 12px;
    text-align: right;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    transition: opacity .25s ease, transform .25s ease;
    opacity: 0;
    transform: translateY(-8px);
  }

  .nav-links a {
    font-size: 1rem;
    color: #111;
    text-decoration: none;
    text-shadow: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .3s ease, transform .3s ease, color .2s ease;
  }

  .nav-links a::after {
    background-color: #0b63ce;
    bottom: -2px;
  }

  .nav-links a:hover,
  .nav-links a:focus { color: #0b63ce; text-decoration: none; }

  .nav-links.show {
    display: flex !important;
    opacity: 1;
    transform: translateY(0);
  }
  .nav-links.show a { opacity: 1; transform: translateY(0); }
  .nav-links.show a:nth-child(1){transition-delay:.05s;}
  .nav-links.show a:nth-child(2){transition-delay:.1s;}
  .nav-links.show a:nth-child(3){transition-delay:.15s;}
  .nav-links.show a:nth-child(4){transition-delay:.2s;}
  .nav-links.show a:nth-child(5){transition-delay:.25s;}
}

/* =========================================
   HERO
   ========================================= */
.hero {
  position: relative;
  min-height: 70vh;
  background: url("/bilder/Steine02.png") no-repeat center top / cover;
  color: #f8fafc;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 16px;
  overflow: visible;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(4, 12, 24, 0.55) 0%,
    rgba(4, 12, 24, 0.35) 40%,
    rgba(4, 12, 24, 0.15) 70%,
    rgba(4, 12, 24, 0.04) 100%
  );
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero-text {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(6vh);
}

/* --- HIER SIND DIE WICHTIGEN ÄNDERUNGEN --- */
.hero h1{
  font-weight: 700;
  letter-spacing: .5px;
  margin: 0;
  line-height: 1.2;
  
  /* NEU: Verhindert Zeilenumbruch */
  white-space: nowrap; 
  width: 100%;
  
  /* NEU: Schriftgröße passt sich an (Min: 1.3rem, Ideal: 4.5vw, Max: 3.1rem) */
  font-size: clamp(1.3rem, 4.5vw, 3.1rem);
}

@media (min-width:1600px){
  .hero h1{
    font-size: clamp(2.4rem, 3vw, 3.6rem);
  }
}

.role{
  display: block;
  margin-top: .4rem;
  font-weight: 600;
  letter-spacing: .3px;
  color: #e8f1f8;
  opacity: .95;
  font-size: clamp(1.05rem, 1.8vw, 1.7rem);
}
@media (min-width:1600px){
  .role{
    font-size: clamp(1.2rem, 1.6vw, 2rem);
  }
}

/* =========================================
   PORTRAIT – FADE-IN
   ========================================= */
@keyframes fadeInPortrait {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.portrait {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: var(--portrait-size);
  height: var(--portrait-size);
  bottom: calc(-0.5 * var(--portrait-size));
  border-radius: 50%;
  border: var(--portrait-border) solid #fff;
  box-shadow: var(--portrait-shadow);
  object-fit: cover;
  background: #fff;
  z-index: 5;
  opacity: 0;
  animation: fadeInPortrait 1.2s ease-out 0.4s forwards;
}

/* Portrait-Größe */
:root {
  --portrait-size: clamp(150px, 16vw, 260px);
}
@media (min-width:1600px){
  :root {
    --portrait-size: clamp(180px, 12vw, 300px);
  }
}

/* =========================================
   WEISSER BEREICH & SERVICES
   ========================================= */
.section-white {
  background: #fff;
  padding-top: calc(0.5 * var(--portrait-size) + var(--portrait-border) + 24px);
  padding-bottom: var(--spacing-section);
  text-align: left;
}

/* --- NEUES GRID LAYOUT --- */

/* 1. Mobile First: Standardmäßig 2 Spalten */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px; /* Etwas weniger Abstand am Handy */
  align-items: stretch;
  margin-top: 10px;
}

/* 2. Desktop: Ab ca. 1000px Breite auf 4 Spalten umschalten */
@media (min-width: 1000px) {
  .services {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px; /* Mehr Platz am großen Bildschirm */
  }
}

/* Karten-Design */
.service-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 12px;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  color: inherit;
  text-decoration: none;
}
/* Mehr Padding innerhalb der Karte auf großen Bildschirmen */
@media (min-width: 1000px) {
  .service-card {
    padding: 24px 20px;
    border-radius: 16px;
  }
}

.service-card:hover,
.service-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  border-color: rgba(11,99,206,.35);
  outline: none;
}
.service-card h3{ margin: 6px 0 6px; font-size: 1.1rem; font-weight: 700; }
.service-card p{ margin: 0; color: var(--muted); font-size: .98rem; line-height: 1.45; }


/* =========================================
   FOOTER
   ========================================= */
footer {
  background: #fff;
  color: var(--muted);
  text-align: center;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}
footer a { color: var(--blue); }
footer a:hover { text-decoration: underline; }

/* =========================================
   SCROLL-PFEIL (RECHTS POSITIONIERT)
   ========================================= */
.scroll-indicator {
  position: absolute;
  /* Positionierung unten rechts */
  bottom: 40px;
  right: 30px; 
  
  /* Aussehen des Pfeils */
  width: 24px;
  height: 24px;
  border-bottom: 3px solid #fff;
  border-right: 3px solid #fff;
  
  /* Drehung, damit er nach unten zeigt */
  transform: rotate(45deg);
  
  /* Animation und Verhalten */
  animation: bounce 2s infinite;
  opacity: 0.8;
  cursor: pointer;
  z-index: 6; /* Sicherstellen, dass er über dem Hintergrund liegt */
}

/* Die Hüpf-Animation */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) rotate(45deg);
  }
  40% {
    transform: translateY(-10px) rotate(45deg);
  }
  60% {
    transform: translateY(-5px) rotate(45deg);
  }
}

/* Auf Handys etwas mehr Abstand zum Rand */
@media (max-width: 600px) {
  .scroll-indicator {
    right: 20px;
    bottom: 50px; 
  }
}


/* Zentrierter Inhaltsbereich wie im Impressum */
.container {
  max-width: 900px;   /* Breite der Textspalte */
  margin: 0 auto;     /* zentriert die Spalte */
  padding: 0 20px;    /* etwas Abstand vom Rand innen */
}


/* =========================================
   WASSERTROPFEN-LADER (RIPPLE)
   ========================================= */
.water-spinner {
  display: inline-block;
  position: relative;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 10px;
}
.water-spinner::before,
.water-spinner::after {
  content: "";
  position: absolute;
  border: 2px solid #fff;
  border-radius: 50%;
  opacity: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: ripple 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
.water-spinner::after {
  animation-delay: -0.5s;
}
@keyframes ripple {
  0% { width: 0; height: 0; opacity: 1; }
  100% { width: 100%; height: 100%; opacity: 0; }
}

/* =========================================
   RESPONSIVE FEINSCHLIFF HERO (AM ENDE)
   ========================================= */
@media (max-width:1200px){ .hero{min-height:60vh;} }
@media (max-width:992px){
  .hero{min-height:52vh;}
  .hero h1{font-size:clamp(1.6rem,2.2vw+1rem,2.2rem);}
}
@media (max-width:576px){
  .hero{min-height:46vh; padding:32px 16px;}
  
  /* --- HIER WURDE EBENFALLS ANGEPASST --- */
  .hero h1{
    /* Erlaubt der Schrift, auf schmalen Handys bis 1rem (16px) zu schrumpfen */
    font-size: clamp(1.0rem, 5.5vw, 1.9rem);
  }
  
  .role{font-size:1.05em;}
}