@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-main: #F4F7F6;
  --bg-card: #FFFFFF;
  --primary: #10B981;
  --primary-glow: rgba(16, 185, 129, 0.25);
  --primary-hover: #059669;
  --text-main: #0F172A;
  --text-muted: #475569;
  --border-light: rgba(15, 23, 42, 0.08);
  /* Slate with opacity */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(15, 23, 42, 0.05);
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.03), transparent 60%);
  z-index: -1;
  pointer-events: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* Glassmorphism Header */
header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 32px;
  border-radius: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000; /* Header muss immer oben sein */
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-weight: 500;
  font-size: 15px;
  color: var(--text-muted);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--primary-glow);
  background: var(--primary-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  background: rgba(15, 23, 42, 0.03);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Layout */
section {
  padding: 180px 0;
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary-hover);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.section-title {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 24px;
  line-height: 1.1;
  color: var(--text-main);
}

.section-title span {
  color: var(--primary);
}

.section-desc {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 80px;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 160px;
  position: relative;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 0 24px;
  /* Fix missing margin on small screens */
}

.hero h1 {
  font-size: 72px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 32px;
  background: linear-gradient(135deg, #0F172A 0%, #475569 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 22px;
  color: var(--text-muted);
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
  z-index: 1;
  pointer-events: none;
}

/* Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Erzwungene Stufen: 2 -> 1 (4 Spalten werden übersprungen) */
.grid-benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

@media (max-width: 700px) {
  .grid-benefits {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 40px;
  margin-top: 6px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.card:hover::before {
  opacity: 1;
}

.icon-box {
  width: 56px;
  height: 56px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--primary-hover);
  font-size: 24px;
  transition: var(--transition);
}

.card:hover .icon-box {
  background: var(--primary);
  color: #FFFFFF;
  transform: scale(1.1) rotate(5deg);
}

/* Templates / Image Cards */
.image-card {
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/5;
  display: block;
  border: 1px solid var(--border-light);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  transition: var(--transition);
}

.image-card:hover img {
  transform: scale(1.05);
}

.image-card h3 {
  font-size: 24px;
  font-weight: 700;
  transform: translateY(20px);
  opacity: 0.8;
  transition: var(--transition);
  color: #FFFFFF;
}

.image-card:hover h3 {
  transform: translateY(0);
  opacity: 1;
  color: var(--primary-light);
}

/* Pricing */
.pricing-card {
  padding: 48px;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  overflow: visible;
}

.pricing-card.featured {
  border: 2px solid var(--primary);
  background: linear-gradient(180deg, #FFFFFF 0%, rgba(16, 185, 129, 0.02) 100%);
  box-shadow: 0 20px 50px rgba(16, 185, 129, 0.15);
}

.price {
  font-size: 56px;
  font-weight: 800;
  margin: 24px 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text-main);
}

.featured .price {
  color: var(--primary);
}

.price span {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 500;
}

.features-list {
  list-style: none;
  margin: 32px 0;
  flex: 1;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.features-list li::before {
  content: "✦";
  color: var(--primary);
  font-size: 14px;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: 24px 0;
  cursor: pointer;
  transition: background 0.3s ease;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  transition: color 0.3s ease;
}

.faq-icon {
  position: relative;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background-color: var(--primary);
  border-radius: 2px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Horizontaler Strich */
.faq-icon::before {
  width: 16px;
  height: 2px;
}

/* Vertikaler Strich */
.faq-icon::after {
  width: 2px;
  height: 16px;
}

/* Animation zu Minus */
.faq-item.active .faq-icon::after {
  transform: rotate(90deg);
}

.faq-item.active .faq-icon::before {
  transform: rotate(180deg);
}


.faq-question:hover {
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  /* Groß genug für jeden Text */
  margin-top: 16px;
  transition: max-height 0.4s cubic-bezier(1, 0, 1, 0);
  /* Verhindert das "Zittern" beim Öffnen */
}

/* Legal Pages */
.legal-content h2 {
  font-size: 28px;
  font-weight: 800;
  margin: 48px 0 24px 0;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.legal-content h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 16px 0;
  color: var(--text-main);
}

.legal-content h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 12px 0;
  color: var(--text-main);
}

.legal-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.8;
}

.legal-content ul {
  list-style: disc;
  margin-left: 24px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.legal-content ul li {
  margin-bottom: 8px;
}

.legal-content a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}

.legal-content a:hover {
  text-decoration: underline;
}

/* Forms */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.category-pill {
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  transition: var(--transition);
}

input:checked+.category-pill {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.05);
  color: var(--primary);
}

.category-pill:hover {
  border-color: var(--primary);
}

.form-container {
  padding: 48px;
}

input,
textarea {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #FFFFFF;
  color: var(--text-main);
  font-family: inherit;
  transition: var(--transition);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Grid-Benefits (2-spaltig auf Desktop) */
.grid-benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 900px) {
  .grid-benefits {
    grid-template-columns: 1fr;
  }
}

/* Footer */
footer {
  border-top: 1px solid var(--border-light);
  padding: 64px 0 32px 0;
  margin-top: 80px;
}

/* Responsive */
@media (min-width: 901px) {
  .hamburger {
    display: none;
  }
}

@media (max-width: 900px) {

  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 42px;
  }

  .section-title {
    font-size: 32px;
  }

  /* Mobile Menu */
  .header-btn {
    display: none !important;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001; /* Einen Tick über dem Header */
    position: relative;
    pointer-events: auto !important; /* Sicherstellen, dass Klicks durchgehen */
  }

  .hamburger span {
    width: 28px;
    height: 3px;
    background: var(--text-main);
    border-radius: 4px;
    transition: var(--transition);
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95); /* Dunkler Hintergrund für bessere Lesbarkeit */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    padding: 100px 32px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    z-index: 999; /* Sehr hoch, damit es über allem steht */
  }

  .nav-links.active {
    right: 0;
  }

  /* Erheblich größere Abstände auf dem Handy für White Space */
  section {
    padding-top: 180px !important;
    padding-bottom: 180px !important;
    display: block !important;
    margin-bottom: 20px !important; /* Physischer Puffer */
  }

  .card {
    padding: 24px !important;
  }

  .pricing-card {
    padding: 32px 24px !important;
  }

  header {
    padding: 12px 20px;
    width: 95%;
    top: 12px;
  }

  .hero {
    padding-top: 140px;
    min-height: 80vh;
  }

  /* Bricht Inline-Flex Container automatisch um (z.B. Kontakt-Karte, Über-Mich Karten) */
  .card[style*="display: flex"],
  div[style*="display: flex"].grid-4,
  div[style*="display: flex"].container {
    flex-direction: column !important;
    gap: 32px !important;
  }
}

@media (max-width: 600px) {

  body,
  html {
    max-width: 100%;
    overflow-x: hidden;
  }

  .container {
    padding: 0 20px !important;
  }

  .hero h1 {
    font-size: 36px !important;
    letter-spacing: -1px;
  }

  .section-title {
    font-size: 28px !important;
  }

  .hero p {
    font-size: 18px;
    margin-bottom: 32px;
  }

  .hero-btns,
  div[style*="display: flex"] {
    flex-wrap: wrap;
  }

  .btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 8px;
  }

  .hero-glow {
    width: 300px;
    height: 300px;
  }

  /* Optimiere die Kategorie-Pillen auf extrem kleinen Screens */
  .category-pill {
    padding: 10px 4px;
    font-size: 13px;
  }

  /* Formular Abstände halbieren */
  .form-container {
    padding: 20px !important;
  }

  #contactForm {
    gap: 12px !important;
  }

  /* Vermeide, dass Kontaktformulare über den Bildschirmrand ragen */
  form div[style*="display: flex"] {
    flex-direction: column !important;
    gap: 12px !important;
  }
}