/* Nordcache Global Design Layer */

:root {
  --nc-accent: #e53935;
  --nc-accent2: #ff6a63;
  --nc-bg: #090b10;
  --nc-card: rgba(255,255,255,.065);
  --nc-border: rgba(255,255,255,.10);
  --nc-text: rgba(255,255,255,.92);
  --nc-muted: rgba(255,255,255,.68);
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 20% 0%, rgba(229,57,53,.10), transparent 32rem),
    radial-gradient(circle at 85% 10%, rgba(255,255,255,.045), transparent 28rem),
    var(--nc-bg);
}

/* Header vereinheitlichen */
header {
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(9, 11, 16, .78) !important;
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 12px 38px rgba(0,0,0,.22);
}

header .container,
header nav,
header > div {
  max-width: 1180px;
}

.brand-link,
.logo-link,
header a[href="/"] {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-link img,
.logo-link img,
header img[src*="nordcache-logo"] {
  display: block;
  height: auto;
  max-height: 48px;
  width: auto;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.35));
}

header nav a,
header li a {
  position: relative;
  color: rgba(255,255,255,.78) !important;
  text-decoration: none !important;
  font-weight: 600;
  transition: color .18s ease;
}

header nav a:hover,
header li a:hover {
  color: #fff !important;
}

header nav a::after,
header li a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--nc-accent), var(--nc-accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}

header nav a:hover::after,
header li a:hover::after {
  transform: scaleX(1);
}

/* Einheitliche Cards auf alten Seiten etwas aufwerten */
.card,
.leistung-card,
.feature-card,
.faq-item,
article {
  border-color: rgba(255,255,255,.10) !important;
}

/* Footer einheitlicher */
footer {
  border-top: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(circle at 20% 0%, rgba(229,57,53,.10), transparent 24rem),
    rgba(5,6,10,.82) !important;
}

footer a,
.footer-btn {
  color: rgba(255,255,255,.78) !important;
  text-decoration: none !important;
}

footer a:hover,
.footer-btn:hover {
  color: #fff !important;
}

/* Service-Linkbox schöner */
#seo-service-links {
  max-width: 1120px !important;
  margin: 46px auto !important;
  padding: 26px 24px !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  box-shadow: 0 18px 52px rgba(0,0,0,.22);
}

#seo-service-links strong {
  color: #fff;
}

#seo-service-links a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  border-bottom: 1px solid rgba(229,57,53,.45);
}

#seo-service-links a:hover {
  color: var(--nc-accent);
}

/* Mobile */
@media (max-width: 760px) {
  header {
    position: relative;
  }

  header nav ul,
  header ul {
    gap: .8rem !important;
    flex-wrap: wrap;
  }

  .brand-link img,
  .logo-link img,
  header img[src*="nordcache-logo"] {
    max-height: 42px;
  }
}

/* Einheitlicher Nordcache Header */
.nc-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: rgba(9, 11, 16, .82) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 14px 42px rgba(0,0,0,.26);
}

.nc-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.nc-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.nc-brand img {
  display: block;
  width: auto;
  height: 40px;
  max-height: 46px;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.35));
}

.nc-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.8vw, 24px);
  flex-wrap: wrap;
}

.nc-nav a {
  color: rgba(255,255,255,.76) !important;
  text-decoration: none !important;
  font-size: .92rem;
  font-weight: 650;
  letter-spacing: -.01em;
  transition: color .18s ease, transform .18s ease;
}

.nc-nav a:hover {
  color: #fff !important;
  transform: translateY(-1px);
}

.nc-nav-cta {
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff !important;
  background: linear-gradient(135deg, var(--nc-accent), var(--nc-accent2));
  box-shadow: 0 14px 34px rgba(229,57,53,.28);
}

@media (max-width: 820px) {
  .nc-header {
    position: relative;
  }

  .nc-header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .nc-nav {
    justify-content: flex-start;
    gap: 10px 14px;
  }

  .nc-nav a {
    font-size: .88rem;
  }

  .nc-brand img {
    height: 36px;
  }
}

/* Premium Logo Integration */
.nc-header {
  background:
    radial-gradient(circle at 18% 50%, rgba(229,57,53,.18), transparent 18rem),
    rgba(9, 11, 16, .88) !important;
}

.nc-header-inner {
  min-height: 76px;
}

.nc-brand {
  position: relative;
  padding: 10px 16px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(245,245,245,.88));
  border: 1px solid rgba(255,255,255,.22);
  box-shadow:
    0 16px 42px rgba(0,0,0,.35),
    0 0 0 1px rgba(229,57,53,.08),
    inset 0 1px 0 rgba(255,255,255,.7);
  overflow: hidden;
}

.nc-brand::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 20% 20%, rgba(229,57,53,.18), transparent 40%);
  pointer-events: none;
}

.nc-brand img {
  position: relative;
  z-index: 1;
  height: 42px !important;
  width: auto !important;
  max-height: none !important;
  object-fit: contain;
  filter: none !important;
}

.nc-brand:hover {
  transform: translateY(-1px);
  box-shadow:
    0 20px 52px rgba(0,0,0,.42),
    0 0 28px rgba(229,57,53,.18),
    inset 0 1px 0 rgba(255,255,255,.8);
}

.nc-brand::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, rgba(229,57,53,.7), transparent);
}

@media (max-width: 820px) {
  .nc-brand {
    padding: 8px 12px;
    border-radius: 15px;
  }

  .nc-brand img {
    height: 36px !important;
  }

  .nc-header-inner {
    min-height: auto;
  }
}

/* Header Layer Fix: Logo darf nicht hinter alter Leiste verschwinden */
.nc-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 2147483000 !important;
  isolation: isolate;
}

.nc-header-inner,
.nc-brand,
.nc-brand img,
.nc-nav {
  position: relative;
  z-index: 2147483001 !important;
}

/* Alte direkte Top-Navigation ausblenden, aber NICHT die neue nc-nav */
body > nav:not(.nc-nav),
body > .navbar,
body > .nav,
body > .topbar,
body > .site-header:not(.nc-header) {
  display: none !important;
}

/* Falls alte absolute/fixed Leisten über dem Logo liegen */
nav:not(.nc-nav):not(.nc-header nav) {
  z-index: 1 !important;
}

/* Logo-Kapsel sichtbar vor Hintergrund */
.nc-brand {
  background: #fff !important;
  border: 1px solid rgba(255,255,255,.35) !important;
  box-shadow:
    0 18px 50px rgba(0,0,0,.45),
    0 0 32px rgba(229,57,53,.22) !important;
}

.nc-brand img {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}
