/* Grundlayout */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2933;
  background-color: #f5f7fa;
}

body {
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: #102a43;
}

p {
  margin-top: 0;
  color: #1f2933;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15, 23, 42, 0.96);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 1.1rem;
}

.logo span {
  color: #38bdf8;
}

.main-nav {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
}

.main-nav a {
  color: #e5e7eb;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.main-nav a:hover {
  background-color: rgba(148, 163, 184, 0.25);
  color: #ffffff;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #e5e7eb;
  padding: 48px 0 40px;
  text-align: center;
}

.hero-inner {
  max-width: 720px;
  text-align: center;
}

.hero h1 {
  font-size: 1.9rem;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1rem;
  margin-bottom: 24px;
  color: #cbd5f5;
}

/* Quick Converter (Demoversion, zentriert) */
.quick-converter {
  background-color: rgba(15, 23, 42, 0.88);
  border-radius: 16px;
  padding: 20px 16px 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: flex-end;
}

.quick-converter .field-group {
  text-align: left;
}

.quick-converter label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 4px;
  color: #e5e7eb;
}

.quick-converter input,
.quick-converter select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #4b5563;
  background-color: #020617;
  color: #e5e7eb;
  font-size: 0.9rem;
}

.quick-converter input:focus,
.quick-converter select:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.5);
}

.btn-primary {
  width: 100%;
  padding: 10px 12px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #0f172a;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  opacity: 1;
}

.quick-converter-hint {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 4px;
}

.converter-result {
  grid-column: 1 / -1;
  margin-top: 4px;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.converter-result-error {
  color: #fecaca;
}

/* Sektionen */
.section {
  padding: 40px 0;
}

.section-alt {
  background-color: #ffffff;
}

.section h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.section-intro {
  text-align: center;
  margin-bottom: 24px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 16px 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  text-align: left;
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.card p {
  font-size: 0.9rem;
  color: #4b5563;
}

.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.columns-stacked-mobile {
  align-items: stretch;
}

.column {
  background-color: #f9fafb;
  border-radius: 12px;
  padding: 16px 14px;
  border: 1px solid #e5e7eb;
}

.column h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.column p {
  font-size: 0.9rem;
  color: #4b5563;
}

/* FAQ */
.faq-item {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 14px 14px 10px;
  margin-bottom: 10px;
  border: 1px solid #e5e7eb;
}

.faq-item h3 {
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.faq-item p {
  font-size: 0.9rem;
  color: #4b5563;
}

/* Footer */
.site-footer {
  background-color: #020617;
  color: #9ca3af;
  padding: 20px 0;
  margin-top: 16px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 12px;
}

.footer-links a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Mobile & Tablet Anpassungen */
@media (max-width: 960px) {
  .quick-converter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero {
    padding: 32px 0 28px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .quick-converter {
    grid-template-columns: 1fr;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .columns {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  
  /* Bessere Touch-Targets auf Mobile */
  .main-nav a {
    padding: 8px 12px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  
  .btn-primary {
    min-height: 48px;
    font-size: 1rem;
  }
  
  /* Verbesserte Lesbarkeit */
  .card a {
    display: inline-block;
    padding: 4px 0;
    min-height: 32px;
  }
}

/* Sehr kleine Bildschirme (< 480px) */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.3rem;
    line-height: 1.3;
  }
  
  .container {
    padding: 0 12px;
  }
  
  .quick-converter,
  .converter-form {
    padding: 16px 12px !important;
  }
  
  .field-group label {
    font-size: 0.75rem;
  }
  
  .field-group input,
  .field-group select {
    font-size: 0.85rem;
  }
}
