/* ============================================================
   NETZNETZ – Layout 2 (passend zur Serverstatus-Seite)
   Durchgehende Kopfzeile, ruhige Panels, Manrope + IBM Plex Mono
   Klassennamen sind unverändert zur alten style.css
   ============================================================ */
:root {
  --bg-surface: #0c1424;       /* Hintergrund */
  --bg-card: #131d33;          /* Panels */
  --bg-card-2: #0f182b;        /* Fußzeile, Einbuchtungen */
  --border-color: #25324f;     /* Linien */
  --accent-primary: #4f8cff;
  --accent-hover: #3b78eb;
  --text-main: #e9eefb;
  --text-muted: #8c99b8;
  --status-online: #34d399;
  --status-maint: #fbbf24;
  --status-crit: #f87171;
  --font-main: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-code: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; }
[hidden] { display: none !important; }

body {
  background: var(--bg-surface);
  font-family: var(--font-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* 1. TOP NAVBAR – durchgehende Leiste */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding-top: env(safe-area-inset-top, 0px);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: cover;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text-main);
}

.brand-badge {
  font-family: var(--font-code);
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  text-decoration: none;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link i { font-size: 0.85rem; }

/* Logo-Icon in der Navbar (NetzNetzBrowser) */
.nav-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-link:hover {
  background: var(--bg-card);
  color: var(--text-main);
}

/* 2. MAIN CONTENT AREA */
.main-wrapper {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

/* Hero Banner: große Überschrift ohne Kasten */
.hero-banner {
  padding: 0.5rem 0 0.25rem;
}

.hero-banner h1 {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.7rem;
}

.hero-banner p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 62ch;
}

/* Grid Layout */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  align-items: start;
}

.section-header {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-header i { color: var(--text-muted); font-size: 0.85rem; }

/* Developer Cards */
.dev-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dev-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dev-card:hover {
  background: #17223b;
  border-color: #3a4a6e;
}

.dev-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.dev-icon {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 8px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.dev-name { font-weight: 700; font-size: 0.9rem; overflow-wrap: anywhere; }

/* Status-Badge: Pille mit Punkt */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.13);
  color: var(--status-online);
  white-space: nowrap;
}

.status-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-online);
}

.dev-card[data-status="offline"] .status-badge {
  background: rgba(251, 191, 36, 0.13);
  color: var(--status-maint);
}

.dev-card[data-status="offline"] .dot { background: var(--status-maint); }

/* Services & Partner Cards */
.service-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.service-box:last-child {
  margin-bottom: 0;
}

.service-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.service-avatar {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 9px;
  overflow: hidden;
  background: var(--bg-card-2);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-avatar img { width: 100%; height: 100%; object-fit: cover; }

.service-title { font-weight: 700; font-size: 0.95rem; }
.service-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.45; }

.service-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover { background: var(--bg-card-2); }

/* 3. FOOTER */
.footer {
  width: 100%;
  background: var(--bg-card-2);
  border-top: 1px solid var(--border-color);
  padding: 1.25rem 0;
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--text-main);
}

/* 4. COOKIE BANNER */
.cookie-banner {
  position: fixed;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  right: 1.5rem;
  max-width: 420px;
  width: calc(100% - 3rem);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.cookie-banner.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cookie-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.cookie-header i {
  color: var(--status-maint);
}

.cookie-body {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-btn {
  font-family: inherit;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s;
}

.cookie-btn-accept {
  background: var(--accent-primary);
  color: #fff;
}

.cookie-btn-accept:hover {
  background: var(--accent-hover);
}

.cookie-btn-essential {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-color);
}

.cookie-btn-essential:hover {
  background: var(--bg-card-2);
  color: var(--text-main);
}

/* Responsive Adjustments */
@media (max-width: 850px) {
  .navbar-container {
    flex-direction: column;
    height: auto;
    padding: 0.9rem 1rem;
    gap: 0.75rem;
  }
  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
  }
  .main-wrapper {
    padding: 1.75rem 1rem 2.5rem;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .footer-container {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .cookie-banner {
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    right: 1rem;
    left: 1rem;
    width: auto;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner, .nav-link, .dev-card, .btn-action { transition: none; }
}