/* ==========================================================================
   Home services section — three service cards (two per row, one on mobile)
   followed by a full-width positioning card. Emerald + navy + white only.
   ========================================================================== */

#services {
  position: relative;
  padding: 4rem 0 5rem;
}

.svc-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.6rem;
}

/* ---------- Intro ---------- */

.svc-intro {
  margin: 0 auto 2.6rem;
  text-align: center;
  max-width: 640px;
}

.svc-eyebrow {
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--c-green-light, #4ade80);
  margin: 0 0 0.85rem;
  font-weight: 600;
}

.svc-headline {
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1.18;
  color: #fff;
  margin: 0 0 0.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.svc-subline {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.78);
}

/* ---------- Card grid: two per row, one on mobile ---------- */

.svc-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.3rem;
}

/* ---------- Service card ---------- */

.svc-card {
  flex: 1 1 calc(50% - 0.65rem);
  min-width: 0;
  min-height: 300px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 2.5rem 1.9rem;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.85), rgba(10, 14, 39, 0.6));
  border: 1px solid rgba(34, 197, 94, 0.16);
  overflow: hidden;
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s ease,
    box-shadow 0.3s ease;
}

.svc-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2;
  background: linear-gradient(90deg, var(--c-green, #22c55e), var(--c-green-light, #4ade80));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Blurred photo backdrop — one image per card.
   A dark wash is layered over the photo so the white text stays readable. */
.svc-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: blur(4px);
  opacity: 0.92;
  pointer-events: none;
  transition: opacity 0.3s ease;
  /* Fade the photo out into the card background at the edges */
  -webkit-mask-image: radial-gradient(ellipse 92% 88% at 50% 44%, #000 22%, transparent 96%);
  mask-image: radial-gradient(ellipse 92% 88% at 50% 44%, #000 22%, transparent 96%);
}

.svc-card--solutions::after {
  background-image: linear-gradient(160deg, rgba(8, 12, 30, 0.5), rgba(8, 12, 30, 0.82)), url('../../img/it-solutions-card-bg.webp');
}
.svc-card--check::after {
  background-image: linear-gradient(160deg, rgba(8, 12, 30, 0.5), rgba(8, 12, 30, 0.82)), url('../../img/it-check-card-bg.webp');
}
.svc-card--consulting::after {
  background-image: linear-gradient(160deg, rgba(8, 12, 30, 0.5), rgba(8, 12, 30, 0.82)), url('../../img/it-consulting-card-bg.webp');
}

/* Keep card content above the photo backdrop */
.svc-card > * { position: relative; z-index: 1; }

.svc-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.svc-card:hover::before {
  transform: scaleX(1);
}

.svc-card:hover::after {
  opacity: 1;
}

.svc-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.12);
  color: var(--c-green, #22c55e);
  margin-bottom: 0.3rem;
}

.svc-card-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.svc-card-desc {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.82);
}

/* ---------- Button ---------- */

.svc-btn {
  margin-top: auto;
  padding-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--c-green-light, #4ade80);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.svc-arrow {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.05em;
  line-height: 1;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.svc-btn:hover .svc-arrow {
  transform: translateX(4px);
}

.svc-btn:focus-visible {
  outline: 2px solid var(--c-green, #22c55e);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---------- Full-width positioning card ---------- */

.svc-positioning {
  position: relative;
  height: auto;
  margin-top: 1.3rem;
  padding: 1.8rem 2.4rem;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(34, 197, 94, 0.1), rgba(10, 14, 39, 0.55) 60%);
  border: 1px solid rgba(34, 197, 94, 0.28);
  overflow: hidden;
  text-align: center;
}

.svc-positioning-glow {
  position: absolute;
  top: -40%;
  left: 50%;
  width: 520px;
  height: 320px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(34, 197, 94, 0.18), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.svc-positioning > *:not(.svc-positioning-glow) {
  position: relative;
  z-index: 1;
}

.svc-positioning-eyebrow {
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-green-light, #4ade80);
  margin: 0 0 0.7rem;
  font-weight: 600;
}

.svc-positioning-title {
  font-size: clamp(1.4rem, 3.2vw, 1.95rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.65rem;
  letter-spacing: -0.01em;
}

.svc-positioning-text {
  max-width: 660px;
  margin: 0 auto 1.1rem;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.86);
}

.svc-positioning-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.svc-tag {
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--c-green-light, #4ade80);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.svc-positioning-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: #06210f;
  background: linear-gradient(135deg, var(--c-green, #22c55e), var(--c-green-dark, #16a34a));
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.svc-positioning-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.42);
  color: #06210f;
}

.svc-positioning-link:focus-visible {
  outline: 2px solid var(--c-green, #22c55e);
  outline-offset: 3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  #services { padding: 3rem 0 3.5rem; }
  .svc-inner { padding: 0 1.15rem; }
  .svc-card {
    flex: 1 1 100%;
    padding: 1.5rem 1.4rem;
    border-radius: 14px;
  }
  .svc-positioning { padding: 2rem 1.4rem; }
}

/* ---------- Reduced motion / forced colors ---------- */

@media (prefers-reduced-motion: reduce) {
  .svc-card,
  .svc-card::before,
  .svc-arrow,
  .svc-positioning-link { transition: none; }
}

@media (forced-colors: active) {
  .svc-card,
  .svc-positioning { border-color: CanvasText; background: Canvas; }
}

/* ==========================================================================
   Help router — "Wie können wir Ihnen helfen?"
   Full-width heading card, then two choice cards (two per row, one on mobile).
   ========================================================================== */

.help-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.6rem;
}

.help-head {
  text-align: center;
  padding: 2.4rem 2rem;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(34, 197, 94, 0.1), rgba(10, 14, 39, 0.55) 60%);
  border: 1px solid rgba(34, 197, 94, 0.26);
  margin-bottom: 1.3rem;
}

.help-eyebrow {
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-green-light, #4ade80);
  font-weight: 600;
  margin: 0 0 0.7rem;
}

.help-title {
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}

.help-subline {
  margin: 0;
  color: rgba(226, 232, 240, 0.82);
  font-size: 1rem;
  line-height: 1.55;
}

.help-head-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.3rem;
  padding: 0.8rem 1.7rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  color: #06210f;
  background: linear-gradient(135deg, var(--c-green, #22c55e), var(--c-green-dark, #16a34a));
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.help-head-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.42);
  color: #06210f;
}

.help-head-cta:hover .svc-arrow { transform: translateX(4px); }

.help-head-cta:focus-visible {
  outline: 2px solid var(--c-green, #22c55e);
  outline-offset: 3px;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.3rem;
}

.help-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 1.9rem 1.8rem;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.85), rgba(10, 14, 39, 0.6));
  border: 1px solid rgba(34, 197, 94, 0.16);
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.3s ease;
}

.help-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.help-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.12);
  color: var(--c-green, #22c55e);
  margin-bottom: 0.3rem;
}

.help-card-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.help-card-desc {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.82);
}

.help-card-cta {
  margin-top: auto;
  padding-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--c-green-light, #4ade80);
  font-weight: 600;
  font-size: 0.95rem;
}

.help-card:hover .svc-arrow { transform: translateX(4px); }

.help-foot {
  text-align: center;
  margin: 1.4rem 0 0;
  font-size: 0.93rem;
  color: var(--c-text-dim, #9ca3af);
}

.help-foot a {
  color: var(--c-green-light, #4ade80);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   Quick self check (leak checker test) — placed at the bottom of the page.
   ========================================================================== */

.leak-test {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.6rem;
}

.leak-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 2.6rem 2.2rem;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(34, 197, 94, 0.09), rgba(10, 14, 39, 0.55) 60%);
  border: 1px solid rgba(34, 197, 94, 0.24);
}

.leak-eyebrow {
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-green-light, #4ade80);
  font-weight: 600;
  margin: 0 0 0.7rem;
}

.leak-card h2 {
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.8rem;
  letter-spacing: -0.01em;
}

.leak-card p {
  max-width: 560px;
  margin: 0 auto 1.6rem;
  color: rgba(226, 232, 240, 0.84);
  font-size: 1rem;
  line-height: 1.65;
}

.leak-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  color: #06210f;
  background: linear-gradient(135deg, var(--c-green, #22c55e), var(--c-green-dark, #16a34a));
  border: none;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.leak-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.42);
}

.leak-btn:focus-visible { outline: 2px solid var(--c-green, #22c55e); outline-offset: 3px; }

/* Third-party redirect notice modal (used by the leak checker button) */
.third-party-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.third-party-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.third-party-modal-content {
  position: relative;
  z-index: 1;
  background: rgba(10, 16, 30, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  max-width: 460px;
  width: 92%;
  padding: 1.8rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.third-party-modal-content p {
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0 0 1.4rem;
}

.third-party-modal-footer {
  display: flex;
  gap: 0.9rem;
  justify-content: flex-end;
}

.third-party-modal-footer .btn {
  padding: 0.7rem 1.3rem;
  font-size: 0.92rem;
}

.third-party-modal-footer .btn:first-child {
  flex: 1;
  text-align: center;
}

@media (max-width: 640px) {
  .help-card { flex: 1 1 100%; }
  .help-head { padding: 2rem 1.4rem; }
  .leak-card { padding: 2rem 1.4rem; }
}

@media (max-width: 480px) {
  .third-party-modal-content { max-width: calc(100% - 2rem); }
  .third-party-modal-footer { flex-direction: column; }
  .third-party-modal-footer .btn { width: 100%; }
  .third-party-modal-footer .btn:first-child { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  .help-card, .leak-btn { transition: none; }
}
