body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
    background-color: #fffeef;
}

/* ===== cleaner card + header/nav overrides (replace previous heavy styles) ===== */

:root {
  --brand-dark: #000000;
  --brand-light: #a4cede;
  --page-bg: #fffeef;
  --card-bg: #ffffff;
  --card-border: rgba(26,52,116,0.06);
  --logo-h: 90px;
  --nav-gap: 16px;
  --text-color: #000000;
}

/* header/logo (keeps logo right) */
header {
  position: fixed;
  top: 12px;
  right: 20px;
  z-index: 12000;
  height: var(--logo-h);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: transparent;
}
header .logo img {
  height: var(--logo-h);
  width: auto;
  max-width: 32vw;
  display: block;
  object-fit: contain;
}

/* centered top-nav just under logo */
.top-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: calc(var(--logo-h) + var(--nav-gap));
  z-index: 11000;
  width: min(920px, 94%);
  background: rgba(255,255,255,0.98);
  padding: 10px 18px;
  border-radius: 32px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
  box-sizing: border-box;
}
.top-nav ul { display:flex; gap:22px; align-items:center; justify-content:center; margin:0; padding:0; list-style:none; }
.top-nav a { color:var(--brand-dark); font-weight:700; text-decoration:none; }

/* reserve content space */
main { margin-top: calc(var(--logo-h) + 96px); }

/* services heading - simple, centered */
.services-section h1 {
  color: var(--brand-dark);
  font-size: 2.4rem;
  margin: 8px 0 28px;
  text-align: center;
  background: none;
  -webkit-background-clip: unset;
}

/* GRID: balanced columns and consistent gaps */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  align-items: start;
  padding: 6px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

/* CLEAN CARD DESIGN */
.service-card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 24px rgba(26,52,116,0.04);
  transition: transform .28s cubic-bezier(.2,.9,.3,1), box-shadow .28s;
  overflow: hidden;
}

/* Ensure cards have equal height */
.services-grid {
    align-items: stretch; /* grid items strecken auf gleiche Höhe */
}

.service-card {
    height: 100%;           /* card füllt die Grid-Zelle */
    display: flex;          /* beibehalten (row layout) */
    flex-direction: row;    /* icon links, content rechts */
    align-items: flex-start;
}

.service-card .content {
    flex: 1 1 auto;         /* Inhalt nimmt verbleibenden Platz ein */
}

/* remove older decorative pseudo-elements if present */
.service-card::before,
.service-card::after { display: none !important; content: none !important; }

/* icon block left */
.service-icon {
  min-width: 64px;
  min-height: 64px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(26,52,116,0.08), rgba(164,206,222,0.04));
  box-shadow: 0 6px 14px rgba(26,52,116,0.04);
  flex-shrink: 0;
}

/* text block */
.service-card .content {
  flex: 1 1 auto;
}
.service-card h2 {
  margin: 0 0 8px 0;
  color: var(--brand-dark);
  font-size: 1.2rem;
  font-weight: 700;
}
.service-card p {
  margin: 0;
  color: #2b3a42;
  line-height: 1.6;
  font-size: 0.98rem;
}

/* hover lift */
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(26,52,116,0.08);
}

/* featured (optional) */
.service-card.featured {
  border-color: rgba(26,52,116,0.12);
  background: linear-gradient(180deg, rgba(164,206,222,0.06), var(--card-bg));
}

/* responsive: stack icon above text on small screens */
@media (max-width: 720px) {
  .service-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px;
  }
  .service-icon { margin-bottom: 8px; }
  .service-card .content { width: 100%; }
}

/* tighten desktop layout for a more professional rhythm */
@media (min-width: 1200px) {
  .services-grid { gap: 34px; }
  .service-card { padding: 28px; gap: 20px; }
  .services-section h1 { font-size: 2.6rem; margin-bottom: 36px; }
}

/* ===== end override ===== */

/* Header & Navigation */
:root{
  --logo-h: 90px; /* anpassen falls Logo anders */
  --nav-gap: 16px;
}

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: #000000;
    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: #000000;
    font-size: 0.8rem;
}

/* Main Content */
main {
    margin-top: calc(var(--logo-h) + 96px);
    flex: 1;
}

.services-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center; /* added: centers the inline-block H1 and keeps card headings centered */
}

h1 {
    color: #000000;
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    animation: fadeIn 1s ease-out;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}

.service-card {
    /* new look: soft glass + gradient border + card body */
    position: relative;
    background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0.62));
    border-radius: 18px;
    padding: 28px 26px;
    text-align: left;
    border: 1px solid rgba(26,52,116,0.08);
    box-shadow: 0 10px 30px rgba(26,52,116,0.06), inset 0 1px 0 rgba(255,255,255,0.6);
    overflow: visible;
    transition: transform 400ms cubic-bezier(.2,.9,.3,1), box-shadow 400ms;
    transform-origin: center;
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Ensure cards have equal height */
.services-grid {
    align-items: stretch; /* grid items strecken auf gleiche Höhe */
}

.service-card {
    height: 100%;           /* card füllt die Grid-Zelle */
    display: flex;          /* beibehalten (row layout) */
    flex-direction: row;    /* icon links, content rechts */
    align-items: flex-start;
}

.service-card .content {
    flex: 1 1 auto;         /* Inhalt nimmt verbleibenden Platz ein */
}

/* diagonal accent stripe */
.service-card::before{
    content: "";
    position: absolute;
    top: -12%;
    left: -10%;
    width: 140%;
    height: 40%;
    background: linear-gradient(90deg, rgba(26,52,116,0.12), rgba(164,206,222,0.06));
    transform: rotate(-6deg);
    border-radius: 12px;
    pointer-events: none;
    z-index: 0;
    filter: blur(6px);
}

/* subtle colorful corner tab */
.service-card::after{
    content: "";
    position: absolute;
    top: 18px;
    right: 18px;
    width: 56px;
    height: 56px;
    background: radial-gradient(circle at 30% 30%, rgba(26,52,116,0.95), rgba(67,106,170,0.85));
    border-radius: 12px;
    transform: rotate(15deg);
    box-shadow: 0 8px 18px rgba(26,52,116,0.12);
    z-index: 2;
}

/* bring content above pseudo elements */
.service-card > * { position: relative; z-index: 3; }

/* icon circle aligned left for a unique layout */
.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(26,52,116,0.12), rgba(164,206,222,0.06));
    box-shadow: 0 6px 14px rgba(26,52,116,0.06);
    margin-bottom: 6px;
}

/* svg inside icon: slightly inset */
.service-icon svg { width: 40px; height: 40px; transform: translateY(-2px); }

/* Title left-aligned, bold, with small accent line */
.service-card h2 {
    color: var(--accent-dark);
    font-size: 1.25rem;
    margin: 0 0 6px 0;
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* small accent under title */
.service-card h2::after {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    margin-top: 8px;
    background: linear-gradient(90deg, var(--accent-dark), rgba(67,106,170,0.8));
    border-radius: 4px;
}

/* body text more airy and left aligned */
.service-card p {
    color: #24303a;
    line-height: 1.6;
    margin: 0;
    text-align: left;
}

/* hover / focus: lift + tilt + stronger shadow */
.service-card:hover,
.service-card:focus-within {
    transform: translateY(-10px) rotateX(2deg) rotateY(-1deg);
    box-shadow: 0 20px 40px rgba(26,52,116,0.12);
}

/* accessible focus state */
.service-card:focus-within { outline: 2px solid rgba(26,52,116,0.12); outline-offset: 6px; }

/* responsiveness: stack icon and text on small width */
@media (max-width: 680px) {
    .service-card {
        padding: 20px;
    }
    .service-icon { width: 56px; height: 56px; border-radius: 12px; }
    .service-card h2 { font-size: 1.15rem; }
}

/* optional: variation for featured card (use .service-card.featured) */
.service-card.featured {
    background: linear-gradient(180deg, rgba(164,206,222,0.22), rgba(255,255,255,0.6));
    border: 1px solid rgba(26,52,116,0.12);
    transform: scale(1.02);
}
.service-card.featured::after { width: 70px; height:70px; right:14px; top:12px; }

/* 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: #1a3474;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

footer ul li a:hover {
    color: #a4cede;
}

/* ==== Page-specific animations & unique h1 design ==== */

/* color vars for new accents */
:root {
  --accent-dark: #000000;
  --accent-light: #a4cede;
  --h1-grad: linear-gradient(90deg, #1a3474 0%, #3b6fb8 45%, #6fb1d9 100%);
}

/* subtle background texture to lift the page */
body {
  background-image: radial-gradient(rgba(26,52,116,0.02) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Animated gradient headline */
.services-section h1 {
  background: var(--h1-grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  line-height: 1.05;
  animation: h1-entrance 800ms cubic-bezier(.2,.9,.3,1) both,
             h1-grad-shift 6s linear infinite;
  position: relative;
  padding-bottom: 8px;
}

/* decorative underline that grows */
.services-section h1::after {
  content: "";
  display: block;
  height: 6px;
  width: 0%;
  background: linear-gradient(90deg, rgba(26,52,116,0.95), rgba(26,52,116,0.6));
  border-radius: 6px;
  margin: 12px auto 0;
  animation: underline-grow 700ms 250ms cubic-bezier(.2,.9,.3,1) forwards;
}

/* Card staggered reveal */
.services-grid .service-card {
  transform: translateY(22px) scale(.99);
  opacity: 0;
  animation: card-pop 600ms cubic-bezier(.2,.9,.3,1) forwards;
  will-change: transform, opacity;
}
.services-grid .service-card:nth-child(1) { animation-delay: 260ms; }
.services-grid .service-card:nth-child(2) { animation-delay: 420ms; }
.services-grid .service-card:nth-child(3) { animation-delay: 580ms; }

/* small accent badge on cards (unique look) */
.service-card {
  position: relative;
  overflow: visible;
}
.service-card::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 18px;
  width: 44px;
  height: 6px;
  background: linear-gradient(90deg, rgba(26,52,116,0.95), rgba(26,52,116,0.6));
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(26,52,116,0.06);
  transform-origin: left center;
  opacity: 0;
  animation: badge-pop 500ms 500ms cubic-bezier(.2,.9,.3,1) forwards;
}

/* make animated bars (h1 underline + card badge) black */
.services-section h1::after {
  background: #000 !important;
}

.service-card::before {
  background: #000 !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* Icons in den Service-Cards schwarz machen */
.service-icon { color: #000 !important; }
.service-icon svg,
.service-icon svg * {
  fill: #000 !important;
  stroke: #000 !important;
  color: #000 !important;
}

/* Keyframes */
@keyframes h1-entrance {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@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.0; }
  to   { width: 48%; opacity: 1; }
}
@keyframes card-pop {
  from { opacity: 0; transform: translateY(22px) scale(.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes badge-pop {
  from { transform: scaleX(0.0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .services-section h1,
  .services-section h1::after,
  .services-grid .service-card,
  .service-card::before {
    animation: none !important;
    transition: none !important;
  }
  .services-section h1 { color: var(--accent-dark); -webkit-background-clip: unset; background: none; }
}
  
/* Optional small polish for desktop: slightly bigger heading width */
@media (min-width: 992px) {
  .services-section h1::after { width: 38%; }
}

@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;
    }
}

/* Make site text black */
:root { --text-color: #000000; }

body {
  color: var(--text-color);
}

/* Override components that set other colors */
.services-section h1 {
  color: var(--text-color) !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
}

.top-nav ul li a,
.service-card h2,
.service-card p,
footer ul li a,
a {
  color: var(--text-color) !important;
}

/* Ensure SVG icons keep their fills (don't force color on svg elements) */
svg { color: inherit; }