/* ============================================================
   PP Industrieservice – Dunkles, modernes Website-Theme
   ============================================================ */

:root {
  --bg: #0d0d0d;
  --bg-alt: #141414;
  --bg-card: #1a1a1a;
  --bg-card-hover: #202020;
  --border: #2a2a2a;
  --text: #f2f2f2;
  --text-muted: #a3a3a3;
  --text-faint: #707070;
  --red: #e2231a;
  --red-dark: #b81c14;
  --gray: #8a8a8a;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --font-heading: "Oswald", "Inter", Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --container-width: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

p { margin: 0 0 1em; color: var(--text-muted); }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.accent { color: var(--red); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.brand-logo {
  height: 46px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover { color: var(--red); border-color: var(--red); }

.nav-cta {
  background: var(--red);
  color: #fff !important;
  padding: 10px 20px !important;
  border-radius: 6px;
  border-bottom: none !important;
}

.nav-cta:hover { background: var(--red-dark); }

.nav-toggle, .nav-burger { display: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px); }

.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }

/* ---------- Hero ---------- */

.hero {
  padding: 120px 0 100px;
  background:
    radial-gradient(circle at 15% 20%, rgba(226, 35, 26, 0.12), transparent 45%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 60px),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero-inner { max-width: 780px; }

.eyebrow {
  color: var(--red);
  font-family: var(--font-heading);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: var(--text);
  margin-bottom: 20px;
}

.hero-text { font-size: 1.1rem; max-width: 620px; }

.hero-actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }

/* ---------- Sections ---------- */

.section { padding: 90px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-eyebrow {
  color: var(--red);
  font-family: var(--font-heading);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 14px; }
.section-lead { max-width: 640px; margin-bottom: 48px; font-size: 1.05rem; }

/* ---------- Leistungen Cards ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--red);
}

.card-icon {
  width: 56px;
  height: 56px;
  color: var(--red);
  margin-bottom: 20px;
}

.card h3 {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 10px;
}

.card p { font-size: 0.95rem; margin-bottom: 0; }

/* ---------- Über uns ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: center;
}

.about-icon {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.about-icon img { max-width: 220px; opacity: 0.9; }

.check-list { list-style: none; padding: 0; margin: 24px 0 0; }
.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--text-muted);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--red);
  border-radius: 3px;
}

/* ---------- Referenzen ---------- */

.referenzen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.referenz-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.referenz-card:hover { transform: translateY(-4px); border-color: var(--red); }

.referenz-bild { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-alt); }
.referenz-bild img { width: 100%; height: 100%; object-fit: cover; }

.referenz-body { padding: 22px 24px; }
.referenz-body h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--text); }
.referenz-body p { font-size: 0.93rem; margin-bottom: 0; }

.empty-state { color: var(--text-faint); font-style: italic; }

/* ---------- Kontakt ---------- */

.kontakt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.kontakt-cards { display: grid; gap: 16px; }

.kontakt-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color 0.2s, background 0.2s;
}

a.kontakt-card:hover { border-color: var(--red); background: var(--bg-card-hover); }

.kontakt-label {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red);
}

.kontakt-value { color: var(--text); font-size: 1.05rem; }

.kontakt-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.kontakt-form-card .form-group:last-of-type { margin-bottom: 24px; }

/* Honeypot-Feld gegen Spam-Bots: für echte Besucher unsichtbar, aber für
   Screenreader/Formular-Logik weiterhin vorhanden. */
.kontakt-form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Footer ---------- */

.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); }

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 60px 0 40px;
}

.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-icon { width: auto; height: 44px; flex-shrink: 0; object-fit: contain; }
.footer-brand p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

.footer-contact h3, .footer-links h3 {
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 14px;
}

.footer-contact p, .footer-links p { font-size: 0.92rem; margin-bottom: 8px; }
.footer-links a:hover, .footer-contact a:hover { color: var(--red); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ---------- Flash messages ---------- */

.flash-container { margin-top: 20px; display: grid; gap: 10px; }

.flash {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.92rem;
  border: 1px solid var(--border);
}

.flash-success { border-color: #2f7a3d; color: #8de29b; background: rgba(47, 122, 61, 0.12); }
.flash-error { border-color: var(--red); color: #ff9c96; background: rgba(226, 35, 26, 0.1); }

/* ---------- Legal pages ---------- */

.legal-section { padding: 70px 0 100px; }
.legal-content { max-width: 760px; }
.legal-content h1 { font-size: 2rem; margin-bottom: 30px; }
.legal-content h2 { font-size: 1.15rem; color: var(--text); margin-top: 40px; }
.legal-content a { color: var(--red); text-decoration: underline; }

.legal-hinweis {
  background: rgba(226, 35, 26, 0.08);
  border: 1px solid var(--red);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: #ffb3ae;
  font-size: 0.9rem;
}

/* ============================================================
   Admin-Bereich
   ============================================================ */

.admin-body { background: var(--bg); }

.admin-shell { max-width: 960px; margin: 0 auto; padding: 48px 24px 100px; }

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.admin-topbar .brand-logo { height: 34px; }

.admin-topbar-links { display: flex; gap: 20px; align-items: center; font-size: 0.9rem; }
.admin-topbar-links a:hover { color: var(--red); }

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}

.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-login-card { width: 100%; max-width: 380px; text-align: center; }
.admin-login-card .brand-logo { height: 40px; margin: 0 auto 30px; }

.form-group { margin-bottom: 22px; text-align: left; }
.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.form-control:focus { outline: none; border-color: var(--red); }

textarea.form-control { resize: vertical; min-height: 120px; }

.form-check { display: flex; align-items: center; gap: 10px; }
.form-check input { width: 18px; height: 18px; }

.field-errors { color: #ff9c96; font-size: 0.82rem; margin-top: 6px; }

.admin-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  vertical-align: middle;
}

.admin-table th {
  color: var(--text-faint);
  text-transform: uppercase;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.admin-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; background: var(--bg-alt); }

.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; }
.badge-on { background: rgba(47, 122, 61, 0.15); color: #8de29b; }
.badge-off { background: rgba(255,255,255,0.06); color: var(--text-faint); }

.table-actions { display: flex; gap: 10px; }
.table-actions form { display: inline; }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.admin-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 20px;
  flex-wrap: wrap;
}

.admin-page-header h1 { font-size: 1.5rem; margin: 0; }

.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-danger { background: transparent; border: 1px solid var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .about-grid, .kontakt-grid { grid-template-columns: 1fr; }
  .about-icon { order: -1; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .main-nav {
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 24px;
    gap: 4px;
    display: none;
  }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-cta { text-align: center; margin-top: 10px; }

  .nav-burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    width: 28px;
  }
  .nav-burger span { height: 2px; background: var(--text); border-radius: 2px; }

  .nav-toggle:checked ~ .main-nav { display: flex; }

  .admin-page-header { flex-direction: column; align-items: flex-start; }
}
