:root {
  /* Color Palette - Premium & Calm (e.g. for Demenznetz) */
  --color-primary: #1f8e38; /* Green from user upload */
  --color-primary-hover: #17702b;
  --color-secondary: #0e3016; /* Deep green slate */
  --color-background: #f8fafc;
  --color-surface: #ffffff;
  --color-text-main: #334155;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-accent: var(--color-primary);

  /* Typography */
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;
  --transition-speed: 0.3s;
  --border-radius: 12px;
}

/* ========================================= */
/* CSS Reset & Base                          */
/* ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family-sans);
  background-color: var(--color-background);
  color: var(--color-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: var(--color-primary);
  transition: opacity var(--transition-speed) ease, color var(--transition-speed) ease;
}

a:hover {
  opacity: 0.7;
}

ul {
  list-style: none;
}

/* ========================================= */
/* Typography                                */
/* ========================================= */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
p { margin-bottom: 1rem; }

/* ========================================= */
/* Layout Components                         */
/* ========================================= */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========================================= */
/* Header & Navigation                       */
/* ========================================= */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo img {
  height: 40px;
  width: auto;
}

/* Desktop Navigation */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--color-text-main);
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--color-primary);
  transition: width var(--transition-speed) ease;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hamburger Button */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger-box {
  width: 24px;
  height: 20px;
  display: inline-block;
  position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 24px;
  height: 2px;
  background-color: var(--color-primary);
  position: absolute;
  transition: transform 0.15s ease, background-color 0.15s ease;
  border-radius: 4px;
}

.hamburger-inner {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-inner::before {
  content: '';
  top: -8px;
}

.hamburger-inner::after {
  content: '';
  bottom: -8px;
}

/* Hamburger Active State */
.hamburger.is-active .hamburger-inner {
  background-color: transparent;
}

.hamburger.is-active .hamburger-inner::before {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.is-active .hamburger-inner::after {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--color-surface);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 4rem;
    gap: 2.5rem;
    transition: left var(--transition-speed) ease-in-out;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.05);
  }

  .nav-links.is-open {
    left: 0;
  }
  
  .nav-links a {
    font-size: 1.25rem;
  }
}

/* ========================================= */
/* Main Content                              */
/* ========================================= */
.site-main {
  flex: 1;
  padding: 4rem 0;
}

/* ========================================= */
/* Footer                                    */
/* ========================================= */
.site-footer {
  background-color: var(--color-primary);
  color: #f1f5f9;
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-widget h3 {
  color: var(--color-surface);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.footer-widget ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-widget a, .site-info a {
  color: #ffffff;
  position: relative;
  padding-bottom: 0.15rem;
  transition: opacity var(--transition-speed) ease;
}

.footer-widget a::after, .site-info a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #ffffff;
  transition: width var(--transition-speed) ease;
}

.footer-widget a:hover, .site-info a:hover {
  opacity: 0.8;
}

.footer-widget a:hover::after, .site-info a:hover::after {
  width: 100%;
}

.site-info {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.875rem;
}

/* ========================================= */
/* SPA Components (Cards, Grids, Badges)     */
/* ========================================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  background-color: var(--color-border);
}

.card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  color: var(--color-primary);
}

.card-subtitle {
  color: var(--color-primary);
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.card-contacts {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.card-contacts a {
  color: var(--color-text-main);
}

.card-contacts a:hover {
  color: var(--color-primary);
}

.badge {
  display: inline-block;
  background: #e0e7ff;
  color: var(--color-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.rich-text p {
  margin-bottom: 1rem;
  color: var(--color-text-main);
}

.loader {
  display: inline-block;
  font-weight: 600;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}
