/* ==========================================================================
   SmartLife Elektro – Design System
   ========================================================================== */

/* Selbst gehostete Schriften (Inter, Poppins) – latin-Subset genügt für Deutsch (ä/ö/ü/ß liegen in U+0000-00FF) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/inter-var-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/poppins-500-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/poppins-600-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/poppins-700-latin.woff2") format("woff2");
}

:root {
  /* Farben */
  --bg-dark: #1f1c18;
  --accent: #f0a23c;
  --accent-hover: #e69326;
  --accent-text: #2a1a05;
  --secondary: #5ec4a6;
  --secondary-bg: rgba(94, 196, 166, 0.14);
  --secondary-border: rgba(94, 196, 166, 0.35);
  --secondary-text: #a9e3cf;
  --heading-on-dark: #ffffff;
  --text-on-dark: #c9beb0;
  --divider-on-dark: rgba(255, 255, 255, 0.16);

  --bg-light: #ffffff;
  --bg-light-alt: #f7f5f1;
  --text-dark: #2a2622;
  --text-muted: #6b6459;
  --border-light: #e8e3db;

  /* Typografie */
  --font-heading: "Poppins", sans-serif;
  --font-body: "Inter", sans-serif;

  /* Sonstiges */
  --radius: 10px;
  --radius-sm: 8px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--bg-light);
  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.25;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

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

section {
  padding: 72px 0;
}

.section-alt {
  background: var(--bg-light-alt);
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section-dark h1,
.section-dark h2,
.section-dark h3 {
  color: var(--heading-on-dark);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
}

.section-light .btn-outline,
body .btn-outline {
  border-color: var(--text-dark);
}

.section-dark .btn-outline {
  color: var(--heading-on-dark);
  border-color: var(--heading-on-dark);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-light);
}

.site-header .container {
  max-width: 1320px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
  transition: padding 0.2s ease;
}

.site-header .logo img {
  height: 58px;
  width: auto;
  transition: height 0.2s ease;
}

.site-header.is-scrolled .container {
  padding-top: 10px;
  padding-bottom: 10px;
}

.site-header.is-scrolled .logo img {
  height: 42px;
}

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

.main-nav a {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--text-dark);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.main-nav a:hover {
  background: var(--bg-light-alt);
  color: var(--accent-hover);
}

.main-nav a.is-active {
  color: var(--accent-hover);
}

.nav-cta {
  margin-left: 8px;
  padding: 12px 24px !important;
  background: var(--accent);
  color: var(--accent-text) !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text-dark);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0;
  background: linear-gradient(rgba(31, 28, 24, 0.78), rgba(31, 28, 24, 0.94)),
    url("/images/hero-living-room.jpg") center 60% / cover no-repeat;
}

.hero .container {
  max-width: 800px;
  text-align: center;
}

.hero h1 {
  margin-bottom: 0.5em;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-on-dark);
  max-width: 680px;
  margin: 0 auto 2em;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.google-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--divider-on-dark);
  color: var(--text-on-dark);
  font-size: 0.9rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.google-rating:hover {
  border-color: var(--accent);
  color: var(--heading-on-dark);
}

.google-rating-stars {
  color: var(--accent);
  letter-spacing: 1px;
  font-size: 0.95rem;
}

.google-rating strong {
  color: var(--heading-on-dark);
}

.page-hero {
  padding: 72px 0 64px;
  background: linear-gradient(rgba(31, 28, 24, 0.78), rgba(31, 28, 24, 0.94)),
    url("/images/hero-living-room.jpg") center 60% / cover no-repeat;
}

.page-hero .container {
  max-width: 760px;
  text-align: left;
}

.page-hero p {
  font-size: 1.1rem;
  color: var(--text-on-dark);
  max-width: 640px;
}

/* ---------- Zielgruppen-Grid (3 Spalten, exakt gleich breit) ---------- */
.audience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
}

.audience-card {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.audience-card h3 {
  margin-bottom: 0.5em;
}

.audience-card p {
  color: var(--text-muted);
  flex-grow: 1;
}

.audience-card .btn {
  align-self: flex-start;
  margin-top: 12px;
}

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

/* ---------- Badges / Vertrauensbereich (7 Badges, 4 pro Zeile) ---------- */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  align-items: stretch;
}

.badge-card {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.badge-card img {
  height: 88px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.badge-card span {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text-dark);
}

@media (max-width: 860px) {
  .badge-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .badge-card img {
    height: 72px;
  }
}

/* ---------- Pills / Badges (Trust-Elemente) ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--secondary-bg);
  border: 1px solid var(--secondary-border);
  color: var(--secondary-text);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 999px;
}

/* ---------- Leistungen / Listen ---------- */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1.02rem;
}

.check-list li::before {
  content: "";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--secondary-bg);
  border: 1px solid var(--secondary-border);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8.5L6.2 11.5L13 4.5' stroke='%235ec4a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ---------- Ablauf-Schritte (Elektrofachbetriebe) ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 26px 20px;
  min-width: 0;
  overflow-wrap: break-word;
}

.step .step-number {
  counter-increment: step;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 10px;
}

.step .step-number::before {
  content: counter(step, decimal-leading-zero);
}

.step h3 {
  margin-bottom: 4px;
}

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

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

/* ---------- CTA-Bereich (dunkel) ---------- */
.cta-section {
  text-align: center;
}

.cta-section h2 {
  margin-bottom: 0.7em;
}

/* ---------- Qualifikationsliste (Über uns) ---------- */
.qual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.qual-grid li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-light-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-weight: 500;
}

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

/* ---------- Kontaktformular ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 860px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.contact-info h2 {
  margin-bottom: 0.6em;
}

.contact-info ul {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 10px;
  color: var(--text-muted);
}

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

.form-row {
  margin-bottom: 20px;
}

.form-row label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.form-row .required {
  color: var(--accent-hover);
}

.form-row input,
.form-row textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-light-alt);
  color: var(--text-dark);
  transition: border-color 0.15s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-row textarea {
  min-height: 140px;
  resize: vertical;
}

.form-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  background: var(--secondary-bg);
  border: 1px solid var(--secondary-border);
  color: #1f6f56;
}

.form-status.is-error {
  background: rgba(224, 90, 74, 0.12);
  border: 1px solid rgba(224, 90, 74, 0.35);
  color: #a3392a;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--divider-on-dark);
}

.footer-grid h4 {
  color: var(--heading-on-dark);
  font-size: 0.95rem;
  margin-bottom: 1em;
}

.footer-grid a {
  color: var(--text-on-dark);
  display: block;
  padding: 5px 0;
  font-size: 0.95rem;
}

.footer-grid a:hover {
  color: var(--accent);
}

.footer-grid p,
.footer-grid .footer-line {
  color: var(--text-on-dark);
  font-size: 0.95rem;
  padding: 5px 0;
}

.footer-social,
.contact-social {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.footer-social a.social-btn,
.contact-social a.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.footer-social a.social-btn svg,
.contact-social a.social-btn svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-social a.social-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--divider-on-dark);
  color: var(--heading-on-dark);
}

.footer-social a.social-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.contact-social a.social-btn {
  background: var(--bg-light-alt);
  border: 1px solid var(--border-light);
  color: var(--text-dark);
}

.contact-social a.social-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.hours-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 2px;
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
}

.hours-list li:last-child {
  border-bottom: none;
}

.hours-list li span:first-child {
  font-weight: 500;
  color: var(--text-dark);
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-on-dark);
}

.trust-seal {
  display: inline-flex;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}

.trust-seal:hover {
  opacity: 1;
}

.trust-seal img {
  height: 32px;
  width: auto;
  display: block;
}

.footer-bottom a {
  color: var(--text-on-dark);
}

.footer-bottom a:hover {
  color: var(--accent);
}

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

/* ---------- Referenzen Platzhalter ---------- */
.placeholder-box {
  border: 1.5px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 64px 28px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-light-alt);
}

/* ---------- FAQ-Akkordeon ---------- */
.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px 22px;
}

.faq-item summary {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text-dark);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 32px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: -2px;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.15s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin: 14px 0 0;
  color: var(--text-muted);
}

/* ---------- Schwebender WhatsApp-Button ---------- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 33vh;
  z-index: 150;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: bottom 0.2s ease, transform 0.15s ease;
}

.whatsapp-float:hover {
  transform: scale(1.06);
}

.whatsapp-float svg {
  display: block;
  width: 28px;
  height: 28px;
  fill: currentColor;
}

body.cookie-banner-open .whatsapp-float {
  bottom: calc(33vh + 100px);
}

@media (max-width: 600px) {
  .whatsapp-float {
    right: 16px;
    bottom: 20px;
    width: 50px;
    height: 50px;
  }

  .whatsapp-float svg {
    width: 25px;
    height: 25px;
  }

  body.cookie-banner-open .whatsapp-float {
    bottom: 190px;
  }
}

/* ---------- Cookie-Consent-Banner ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-top: 1px solid var(--divider-on-dark);
  padding: 20px 24px;
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner-inner p {
  margin: 0;
  font-size: 0.92rem;
  flex: 1 1 380px;
  color: var(--text-on-dark);
}

.cookie-banner-inner a {
  color: var(--accent);
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-banner .btn {
  padding: 10px 20px;
  font-size: 0.9rem;
}

.cookie-banner .btn-outline {
  border-color: var(--text-on-dark);
  color: var(--text-on-dark);
}

.cookie-banner .btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- Legal-Seiten (Impressum/Datenschutz) ---------- */
.legal-content h2 {
  margin-top: 1.6em;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  margin-top: 1.2em;
}

.legal-content p,
.legal-content li {
  color: var(--text-dark);
}

.legal-content ul {
  padding-left: 1.2em;
}

.legal-content a {
  color: var(--accent-hover);
  text-decoration: underline;
}

.legal-content .todo {
  background: rgba(240, 162, 60, 0.14);
  border: 1px solid rgba(240, 162, 60, 0.4);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.92rem;
  margin: 0.6em 0 1.4em;
}

/* ---------- Mobile Navigation ---------- */
@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 98px;
    left: 0;
    right: 0;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 20px;
    gap: 2px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, top 0.2s ease;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a {
    padding: 12px 10px;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 8px;
    text-align: center;
  }

  .site-header.is-scrolled .main-nav {
    top: 62px;
  }
}

@media (max-width: 600px) {
  section {
    padding: 52px 0;
  }

  .hero {
    padding: 64px 0;
  }
}
