/* RegenGarten DE - Ripple-Grid Design System */
:root {
  /* Farbpalette */
  --primary-green: #2E5D4A;
  --sky-blue: #7EC8FF;
  --sand: #E7D8B1;
  --graphite: #1A2230;
  --light-gray: #A7B0BD;
  --white: #ffffff;
  --black: #000000;
  
  /* Typografie */
  --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Modular Scale */
  --text-xs: 1rem;
  --text-sm: 1.2rem;
  --text-base: 1.5rem;
  --text-lg: 2.25rem;
  --text-xl: 3.1rem;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Shadows */
  --shadow-card: 0 12px 28px rgba(0,0,0,.22);
  --shadow-hover: 0 20px 40px rgba(0,0,0,.3);
  
  /* Transitions */
  --transition-fast: 160ms ease;
  --transition-slow: 220ms ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-system);
  line-height: 1.6;
  color: var(--graphite);
  background: linear-gradient(135deg, #f8fbff 0%, #e3f2fd 100%);
  position: relative;
  overflow-x: hidden;
}

/* Ripple-Grid Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 25% 25%, rgba(46, 93, 74, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(126, 200, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 75% 25%, rgba(231, 216, 177, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 25% 75%, rgba(46, 93, 74, 0.02) 0%, transparent 50%);
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(46, 93, 74, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 93, 74, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
  animation: ripple-flow 20s ease-in-out infinite;
}

@keyframes ripple-flow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.02); }
}

/* Container & Grid System */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-md);
}

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }

/* Header & Navigation */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(46, 93, 74, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: transform var(--transition-slow);
}

header.scrolled {
  transform: translateY(-50px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
}

.logo {
  font-size: var(--text-lg);
  font-weight: bold;
  color: var(--primary-green);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
}

.nav-menu a {
  color: var(--graphite);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary-green);
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-green);
  border-radius: 2px;
}

.burger-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.burger-menu span {
  width: 25px;
  height: 3px;
  background: var(--primary-green);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-sm);
}

.btn-primary {
  background: var(--primary-green);
  color: var(--white);
}

.btn-primary:hover {
  background: #1e4236;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-green);
  border: 2px solid var(--primary-green);
}

.btn-secondary:hover {
  background: var(--primary-green);
  color: var(--white);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
  transition: all var(--transition-slow);
  border: 1px solid rgba(46, 93, 74, 0.05);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-header {
  margin-bottom: var(--space-md);
}

.card-title {
  font-size: var(--text-base);
  font-weight: bold;
  color: var(--graphite);
  margin-bottom: var(--space-xs);
}

.card-meta {
  font-size: var(--text-xs);
  color: var(--light-gray);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-diy {
  background: #E3F2FD;
  color: #1976D2;
}

.badge-water-saving {
  background: #E8F5E8;
  color: #2E7D32;
}

.badge-winter-safe {
  background: #FFF3E0;
  color: #F57C00;
}

/* Filter Chips */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.filter-chip {
  padding: var(--space-xs) var(--space-sm);
  background: rgba(46, 93, 74, 0.1);
  color: var(--primary-green);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-xs);
  font-weight: 500;
}

.filter-chip:hover,
.filter-chip.active {
  background: var(--primary-green);
  color: var(--white);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--sky-blue) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
  margin-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="rgba(255,255,255,0.1)"/><stop offset="100%" stop-color="rgba(255,255,255,0)"/></radialGradient></defs><circle cx="200" cy="200" r="150" fill="url(%23a)"/><circle cx="800" cy="800" r="200" fill="url(%23a)"/></svg>') center/cover;
  animation: ripple-flow 8s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.hero p {
  font-size: var(--text-base);
  margin-bottom: var(--space-lg);
  opacity: 0.9;
}

/* Statistics */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-2xl) 0;
}

.stat-item {
  text-align: center;
  padding: var(--space-lg);
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.stat-number {
  font-size: var(--text-lg);
  font-weight: bold;
  color: var(--primary-green);
  display: block;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--light-gray);
  margin-top: var(--space-xs);
}

/* Article Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  width: 50px;
  height: 50px;
  background: var(--primary-green);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-slow);
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* Newsletter Form */
.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.newsletter-form input {
  flex: 1;
  padding: var(--space-sm);
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  font-size: var(--text-sm);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(46, 93, 74, 0.1);
}

/* Footer */
footer {
  background: var(--graphite);
  color: var(--white);
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: var(--space-2xl);
}

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

.footer-section h3 {
  margin-bottom: var(--space-md);
  color: var(--sky-blue);
}

.footer-section a {
  color: var(--light-gray);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-section a:hover {
  color: var(--sky-blue);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light-gray);
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Icons */
.icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-sm);
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--space-lg);
    box-shadow: var(--shadow-card);
    gap: var(--space-sm);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .burger-menu {
    display: flex;
  }
  
  .hero h1 {
    font-size: var(--text-lg);
  }
  
  .hero p {
    font-size: var(--text-sm);
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .filter-chips {
    justify-content: center;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  
  .col-12, .col-8, .col-6, .col-4, .col-3 {
    grid-column: span 1;
  }
}

@media (max-width: 480px) {
  :root {
    --text-xs: 0.9rem;
    --text-sm: 1rem;
    --text-base: 1.2rem;
    --text-lg: 1.8rem;
    --text-xl: 2.2rem;
  }
  
  .hero {
    min-height: 80vh;
    text-align: center;
  }
  
  .card {
    padding: var(--space-md);
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--sky-blue) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity var(--transition-slow);
}

.preloader.hidden {
  opacity: 0;
  pointer-events: none;
}

.ripple-loader {
  width: 80px;
  height: 80px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Link Pulse Effect */
a:hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(46, 93, 74, 0.1);
  border-radius: inherit;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 0.5; }
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid var(--primary-green);
  outline-offset: 2px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.hidden { display: none; }
.visible { display: block; }