/* Team — unified look with Angebot/Projekte (standalone file, no imports) */

:root{
  --brand-dark: #000000;
  --accent: #000000;
  --page-bg: #fffeef;
  --logo-h: 90px;
  --nav-gap: 16px;
  --content-max: 1450px;
}

/* Base */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: 'Poppins', Arial, sans-serif;
  background:var(--page-bg);
  color:#000;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

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;
}

/* Reserve space for header+nav */
main{ margin-top:calc(var(--logo-h) + 96px); flex:1; }

/* Team section layout — white cards like Angebot/Projekte */
.team-section{
  padding:40px 16px 80px;
}
.team-section h1{
  text-align:center;
  color:var(--brand-dark);
  font-size:2.4rem;
  margin: 6px 0 48px;
  animation: h1-entrance 700ms ease-out;
}

/* grid */
.team-grid{
  max-width:var(--content-max);
  margin:0 auto;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:28px;
  padding:0 8px;
}

/* member card */
.team-member{
  background:#ffffff;
  border-radius:16px;
  padding:28px 22px;
  text-align:center;
  border:1px solid rgba(26,52,116,0.06);
  box-shadow:0 10px 30px rgba(26,52,116,0.05);
  transform: translateY(22px);
  opacity:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:18px;
  animation: card-pop 700ms cubic-bezier(.2,.9,.3,1) forwards;
}
.team-member:nth-child(1){ animation-delay: 220ms; }
.team-member:nth-child(2){ animation-delay: 360ms; }
.team-member:nth-child(3){ animation-delay: 500ms; }
.team-member:nth-child(4){ animation-delay: 640ms; }
.team-member:nth-child(5){ animation-delay: 780ms; }

/* photo / avatar */
.member-photo{
  width:140px;
  height:140px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  box-shadow:0 6px 18px rgba(0,0,0,0.06);
  flex-shrink:0;
}
.member-photo svg,
.member-photo svg *{
  fill:#000 !important;
  stroke:#000 !important;
  color:#000 !important;
}

/* text */
.team-member h2{ margin:0; color:var(--brand-dark); font-size:1.25rem; }
.team-member .role{ margin:0; color:#333; font-size:1rem; font-weight:500; }

/* hover lift */
.team-member:hover{ transform: translateY(0); box-shadow:0 18px 40px rgba(26,52,116,0.08); transition: transform .22s, box-shadow .22s; }

/* Footer */
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 h1-entrance{ from{ opacity:0; transform:translateY(12px) } to{ opacity:1; transform:none } }
@keyframes card-pop{ from{ opacity:0; transform:translateY(22px) } to{ opacity:1; transform:none } }

/* ==== zusätzliche Animationen wie auf Angebot/Projekte ==== */

/* animated headline (clip + subtle gradient shift) */
.team-section 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: 6px 0 48px;
  position: relative;
  animation: h1-entrance 700ms cubic-bezier(.2,.9,.3,1) both,
             h1-grad-shift 6s linear infinite;
}

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

/* ensure each member card can show a small animated badge */
.team-member {
  position: relative; /* needed for ::before */
  transform: translateY(18px) scale(.995);
  opacity: 0;
  animation: card-pop 620ms cubic-bezier(.2,.9,.3,1) forwards;
  will-change: transform, opacity;
}

/* stagger a bit more for many members */
.team-grid .team-member:nth-child(1) { animation-delay: 260ms; }
.team-grid .team-member:nth-child(2) { animation-delay: 420ms; }
.team-grid .team-member:nth-child(3) { animation-delay: 580ms; }
.team-grid .team-member:nth-child(4) { animation-delay: 740ms; }
.team-grid .team-member:nth-child(5) { animation-delay: 900ms; }
.team-grid .team-member:nth-child(6) { animation-delay: 1060ms; }
.team-grid .team-member:nth-child(7) { animation-delay: 1220ms; }
.team-grid .team-member:nth-child(8) { animation-delay: 1380ms; }

/* small accent badge (grows from left) */
.team-member::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 20px;
  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 not yet present */
@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 badge-pop {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

/* respect user reduced motion settings */
@media (prefers-reduced-motion: reduce) {
  .team-section h1,
  .team-section h1::after,
  .team-member,
  .team-member::before {
    animation: none !important;
    transition: none !important;
  }
}

/* ==== end animations ==== */

/* Responsive Design */
@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;
  }
}