/* ===================================================================
   arbeitszeiten-rechner.de – global styles
   =================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:      #4a90e2;
  --blue-dark: #3a7bc8;
  --green:     #5cb85c;
  --red:       #d9534f;
  --text:      #333;
  --muted:     #666;
  --bg:        #f5f7fa;
  --card:      #fff;
  --border:    #e0e6ef;
  --radius:    8px;
  --max-w:     860px;
}

html { scroll-behavior: smooth; }

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── layout ─────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── header ─────────────────────────────────────────────────────── */
header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 20px;
}

.logo img { height: 40px; display: block; }
.logo span {
  font-size: 1.2em;
  font-weight: bold;
  color: var(--blue);
}

nav { display: flex; gap: 8px; }

nav a {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .95em;
  color: var(--text);
  transition: background .2s, color .2s;
  white-space: nowrap;
}
nav a:hover, nav a.active {
  background: var(--blue);
  color: #fff;
  text-decoration: none;
}

/* ── hero ────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1e5fa8 0%, #4a90e2 100%);
  color: #fff;
  padding: 60px 20px 50px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.8em, 4vw, 2.8em);
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.1em;
  opacity: .9;
  max-width: 600px;
  margin: 0 auto 28px;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.badge {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: .9em;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-size: 1em;
  font-weight: bold;
  transition: background .2s, transform .1s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn-primary { background: #fff; color: var(--blue); }
.btn-primary:hover { background: #eef4fd; }
.btn-blue  { background: var(--blue); color: #fff; }
.btn-blue:hover  { background: var(--blue-dark); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #4cae4c; }
.btn-red   { background: var(--red); color: #fff; }
.btn-red:hover   { background: #c9302c; }
.btn-sm { padding: 6px 12px; font-size: .85em; }

/* ── key-facts strip ─────────────────────────────────────────────── */
.facts {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 28px 20px;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.fact-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.fact-icon {
  width: 36px; height: 36px;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  flex-shrink: 0;
  margin-top: 2px;
}

.fact-item p { font-size: .92em; color: var(--text); }

/* ── sections ────────────────────────────────────────────────────── */
section { padding: 50px 20px; }
section:nth-child(even) { background: #fff; }

section h2 {
  font-size: 1.6em;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--blue);
  display: inline-block;
}

section h3 {
  font-size: 1.15em;
  margin: 24px 0 8px;
  color: var(--text);
}

section p { margin-bottom: 14px; color: #444; }
section p:last-child { margin-bottom: 0; }

section ul {
  margin: 10px 0 14px 0;
  padding-left: 0;
  list-style: none;
}
section ul li {
  padding: 4px 0 4px 24px;
  position: relative;
  color: #444;
}
section ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: bold;
}

/* ── calculator section ──────────────────────────────────────────── */
#rechner { background: var(--bg); }

.calc-wrap {
  max-width: 620px;
  margin: 0 auto;
}

.calc-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  padding: 24px;
  margin-bottom: 20px;
}

.calc-heading {
  background: var(--blue);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius);
  text-align: center;
  font-size: 1.35em;
  font-weight: bold;
  margin-bottom: 20px;
}

.input-group {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  gap: 8px;
  flex-wrap: wrap;
}

.input-group label {
  width: 130px;
  flex-shrink: 0;
  font-weight: bold;
  font-size: .95em;
}

.input-group select,
.input-group input[type="number"] {
  width: 72px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .95em;
  background: #fff;
}

.input-group select:focus,
.input-group input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(74,144,226,.2);
}

.sep { font-weight: bold; font-size: 1.1em; color: var(--muted); }

.calc-buttons { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* Tooltip */
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px; height: 17px;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: bold;
  cursor: help;
  position: relative;
  flex-shrink: 0;
  user-select: none;
}
.info-icon .tip {
  visibility: hidden;
  opacity: 0;
  width: 210px;
  background: #444;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity .2s;
  pointer-events: none;
  z-index: 20;
  line-height: 1.4;
}
.info-icon:hover .tip { visibility: visible; opacity: 1; }

/* Results */
.result-section h3 {
  font-size: 1em;
  margin: 14px 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: none;
  padding: 0;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid #f0f0f0;
  gap: 8px;
}
.result-row:last-child { border-bottom: none; }
.result-label { font-weight: bold; font-size: .93em; }
.result-value { display: flex; align-items: center; gap: 6px; font-size: .93em; }

.chart-container { position: relative; height: 270px; }

/* ── benefits grid ───────────────────────────────────────────────── */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.benefit-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.benefit-card h3 {
  margin: 8px 0 8px;
  font-size: 1em;
  border: none;
  padding: 0;
  color: var(--blue);
}

.benefit-card p { font-size: .9em; margin: 0; }

.benefit-icon { font-size: 1.6em; }

/* ── FAQ ─────────────────────────────────────────────────────────── */
.faq-list { margin-top: 20px; }

details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: var(--card);
  overflow: hidden;
}

summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: bold;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
summary::-webkit-details-marker { display: none; }

summary::after {
  content: '+';
  font-size: 1.4em;
  color: var(--blue);
  flex-shrink: 0;
  margin-left: 10px;
  transition: transform .2s;
}
details[open] summary::after { transform: rotate(45deg); }

.faq-body {
  padding: 4px 20px 18px;
  color: #444;
  font-size: .95em;
}
.faq-body ul { margin-top: 8px; }

/* ── footer ──────────────────────────────────────────────────────── */
footer {
  background: #1a2e4a;
  color: rgba(255,255,255,.75);
  padding: 40px 20px 28px;
  font-size: .9em;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 28px;
}

footer h4 { color: #fff; margin-bottom: 10px; font-size: 1em; }

footer a { color: rgba(255,255,255,.7); }
footer a:hover { color: #fff; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 6px; }
footer ul li::before { display: none; }

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  font-size: .85em;
}

/* ── responsive ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .header-inner { height: auto; padding: 12px 0; flex-direction: column; align-items: flex-start; }
  nav { flex-wrap: wrap; }
  .hero { padding: 40px 16px 36px; }
  .footer-inner { grid-template-columns: 1fr; }
  .input-group label { width: 100%; }
}
