body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', Arial, sans-serif;
    background: #fffeef;
    color: #000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Logo */
header {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 11000; /* höher als .top-nav */
    height: var(--logo-h);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.logo img {
    height: var(--logo-h);
    max-width: 40vw;
    width: auto;
    object-fit: contain;
}

.top-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: calc(var(--logo-h) + var(--nav-gap));
    z-index: 10900; /* kleiner als header */
    width: 95%;
    max-width: 920px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    padding: 8px 12px;
    border-radius: 40px;
}

.top-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
    align-items: center;
}

.top-nav ul li a {
    text-decoration: none;
    color: #000;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 25px;
}

.top-nav ul li a:hover {
    background: #d1d1d1;
    color: #fff;
}

.top-nav ul li.separator {
    color: #a4cede;
    font-size: 0.8rem;
}

/* Main spacing - reserve header+nav */
main {
    margin-top: calc(var(--logo-h-desktop) + 96px);
    flex: 1;
}

/* Contact card */
.contact-section {
    padding: 28px 16px 60px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.contact-card {
    width: 100%;
    max-width: 760px;
    background: #ffffff;
    border-radius: 18px;
    padding: 36px;
    box-shadow: 0 14px 40px rgba(26, 52, 116, 0.06);
    border: 1px solid rgba(26, 52, 116, 0.06);
    animation: slideUp 0.7s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.organization-info {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(26, 52, 116, 0.06);
}

.organization-info h1 {
    margin: 0;
    font-size: 2rem;
    color: var(--brand-dark);
}

.organization-info h2 {
    margin: 8px 0 0;
    font-size: 1.05rem;
    color: #333;
    font-weight: 500;
}

/* contact blocks */
.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 18px;
}

.contact-block {
    background: transparent;
    padding: 0;
}

.contact-block h3 {
    margin: 0 0 8px;
    color: var(--brand-dark);
    font-size: 1.05rem;
}

.contact-block span,
.contact-block a {
    display: block;
    color: #000;
    text-decoration: none;
    margin-bottom: 6px;
    font-size: 1rem;
}

.contact-block a:hover {
    color: var(--brand-dark);
    transform: translateX(6px);
    transition: transform 0.18s ease, color 0.18s ease;
}

/* Footer - relative at page end */
footer {
    position: relative;
    width: 100%;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.95);
    margin-top: 40px;
}

footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

footer ul li a {
    color: #000;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

footer ul li a:hover {
    color: #a4cede;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Kontakt: Animationen wie auf Angebot/Projekte */

/* animated headline */
.contact-section h1,
.organization-info h1 {
  background: linear-gradient(90deg, #000 0%, #000 45%, #000 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  margin: 0 auto 36px;
  position: relative;
  animation: h1-entrance 700ms cubic-bezier(.2,.9,.3,1) both,
             h1-grad-shift 6s linear infinite;
}

/* underline grow */
.contact-section h1::after,
.organization-info h1::after {
  content: "";
  display: block;
  height: 6px;
  width: 0%;
  background: #000;
  border-radius: 6px;
  margin: 12px auto 0;
  animation: underline-grow 700ms 180ms cubic-bezier(.2,.9,.3,1) forwards;
}

/* contact card entrance */
.contact-card {
  position: relative;
  transform: translateY(18px) scale(.995);
  opacity: 0;
  animation: card-pop 640ms cubic-bezier(.2,.9,.3,1) forwards;
  will-change: transform, opacity;
}

/* subtle badge on contact card */
.contact-card::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 18px;
  width: 44px;
  height: 6px;
  background: #000;
  border-radius: 6px;
  transform-origin: left center;
  opacity: 0;
  transform: scaleX(0);
  animation: badge-pop 520ms 480ms cubic-bezier(.2,.9,.3,1) forwards;
}

/* keyframes */
@keyframes h1-entrance {
  from { opacity: 0; transform: translateY(12px) scale(.995); }
  to   { opacity: 1; transform: none; }
}
@keyframes h1-grad-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes underline-grow {
  from { width: 0%; opacity: 0; }
  to   { width: 48%; opacity: 1; }
}
@keyframes card-pop {
  from { opacity: 0; transform: translateY(18px) scale(.995); }
  to   { opacity: 1; transform: none; }
}
@keyframes badge-pop {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .contact-section h1,
  .organization-info h1,
  .contact-card,
  .contact-card::before {
    animation: none !important;
    transition: none !important;
  }
}

/* Responsive */
@media screen and (max-width: 1024px) {
    :root{ --logo-h:80px; }
    main{ margin-top: calc(var(--logo-h) + 90px); }
}

@media screen and (max-width: 900px) {
  header {
    position: relative;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    z-index: 50;
  }

  .logo img {
    max-height: 90px;
    width: auto;
  }

  .top-nav {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    margin-top: 10px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  }

  .top-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
}


@media screen and (max-width: 768px) {
    :root{ --logo-h:72px; }
    .top-nav{ top: calc(var(--logo-h) + 12px); }
    main{ margin-top: calc(var(--logo-h) + 82px); }

    .logo img {
        max-height: 100px;
    }

    .top-nav {
        padding: 12px 25px;
        width: 90%;
    }

    .top-nav ul {
        gap: 15px;
    }

    .top-nav ul li a {
        font-size: 1rem;
        padding: 6px 12px;
    }

    main {
        margin-top: 160px;
    }

    .services-section {
        padding: 15px;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .service-icon svg {
        width: 56px;
        height: 56px;
    }
}

@media screen and (max-width: 480px) {
    :root{ --logo-h:56px; }
    header{ right:8px; }
    .top-nav{ top: calc(var(--logo-h) + 10px); padding:6px 8px; border-radius:32px; }
    main{ margin-top: calc(var(--logo-h) + 72px); }

    .logo img {
        max-height: 80px;
    }

    .top-nav {
        padding: 8px 15px;
        top: 30px;
    }

    .top-nav ul {
        gap: 10px;
    }

    .top-nav ul li a {
        font-size: 0.9rem;
        padding: 5px 10px;
    }

    main {
        /* margin-top: 130px; */
        margin-top: clamp(120px, 20vh, 220px);
    }

    h1 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }

    .service-card {
        padding: 20px;
    }

    .service-card h2 {
        font-size: 1.3rem;
    }

    .service-icon svg {
        width: 48px;
        height: 48px;
    }
}

/* Override: center first h1 and force black for texts & animated parts */
.services-section h1 {
  color: #000 !important;
  text-align: center !important; /* ensure centered */
}

/* animated underline (h1) -> black */
.services-section h1::after {
  background: #000 !important;
}

/* animated badge on cards -> black */
.service-card::before {
  background: #000 !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12) !important;
}

/* make general text black */
body,
.services-section h1,
.service-card h2,
.service-card p,
.top-nav ul li a,
footer ul li a {
  color: #000 !important;
}

/* icons: fill/stroke -> black */
.service-icon svg,
.service-icon svg * {
  fill: #000 !important;
  stroke: #000 !important;
  color: #000 !important;
}

/* ensure animated gradients fallback to black where applied */
@keyframes h1-grad-shift { /* keep animation but ensure visible on black text fallback */ }

/* respect reduced motion (no change) */
@media (prefers-reduced-motion: reduce) {
  .services-section h1,
  .services-section h1::after,
  .service-card,
  .service-card::before {
    animation: none !important;
    transition: none !important;
  }
}