/*
Theme Name: Homelab Helden
Template: astra
Author: Homelab Helden
Description: Kaufberatungs-Layout fuer homelabhelden.de (Richtung C)
Version: 1.3
*/


:root {
  --hh-ink:      #1a2225;
  --hh-muted:    #5c6b70;
  --hh-line:     #e2e7e8;
  --hh-head-bg:  #16262b;
  --hh-accent:   #0d8a52;
  --hh-accent-d: #0a6e41;
  --hh-surface:  #ffffff;
  --hh-page:     #fbfcfb;
}

body { font-family: 'IBM Plex Sans', system-ui, sans-serif; color: var(--hh-ink); background: var(--hh-page); }
/* WICHTIG: .ast-container NICHT einfaerben - die Klasse traegt auch der
   Header-Wrap, sonst sitzt eine helle Box im dunklen Kopfbereich. */
.ast-container { font-family: 'IBM Plex Sans', system-ui, sans-serif; }

h1, h2, h3, h4, .site-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--hh-ink);
}
h1 { font-size: 2.25rem; line-height: 1.16; }
h2 { font-size: 1.55rem; line-height: 1.25; margin-top: 2.2rem; }
h3 { font-size: 1.2rem; line-height: 1.3; }

.entry-content p, .entry-content li { font-size: 1.06rem; line-height: 1.7; }

a { color: var(--hh-accent); }
a:hover, a:focus { color: var(--hh-accent-d); }

/* Kopfbereich */
.site-header, .ast-primary-header-bar, .main-header-bar,
.ast-primary-header-bar .site-primary-header-wrap {
  background-color: var(--hh-head-bg) !important;
  border-bottom: none !important;
}
.site-title a, .site-title a:hover,
.ast-site-identity .site-title a { color: #f2f6f5 !important; }
.site-description { color: #9fb3b0 !important; }
.main-header-menu a, .main-navigation a { color: #cbd8d6 !important; }
.main-header-menu a:hover, .main-navigation a:hover { color: #ffffff !important; }

/* Buttons / Kauf-Aktionen */
.wp-block-button__link,
.ast-button, button, input[type=submit], .ast-custom-button {
  background: var(--hh-accent);
  border-color: var(--hh-accent);
  color: #ffffff;
  border-radius: 5px;
  font-weight: 600;
  letter-spacing: 0;
}
.wp-block-button__link:hover,
.ast-button:hover, button:hover, input[type=submit]:hover {
  background: var(--hh-accent-d);
  border-color: var(--hh-accent-d);
  color: #ffffff;
}

/* Vergleichstabellen */
.entry-content table {
  border: 1px solid var(--hh-line);
  border-radius: 8px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 0.95rem;
  width: 100%;
}
.entry-content table th {
  background: #f3f6f6;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a5a5e;
  text-align: left;
  padding: 12px 16px;
  border: none;
}
.entry-content table td {
  padding: 13px 16px;
  border: none;
  border-top: 1px solid #eef2f2;
}

/* Kasten: Das Wichtigste in Kuerze */
.hh-kurz {
  border: 1px solid #bfe4d0;
  background: #f2faf5;
  border-radius: 8px;
  padding: 22px 24px;
  margin: 28px 0;
}
.hh-kurz > strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2f7d55;
  margin-bottom: 12px;
}
.hh-kurz ul { margin: 0; padding-left: 1.15rem; }
.hh-kurz li { margin-bottom: 8px; }

/* Empfehlungs-/Affiliate-Kasten */
.hh-empfehlung {
  border: 1px solid var(--hh-line);
  background: var(--hh-surface);
  border-radius: 8px;
  padding: 22px 24px;
  margin: 28px 0;
}
.hh-empfehlung > strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5c6b70;
  margin-bottom: 12px;
}

/* Affiliate-Hinweis */
.hh-hinweis {
  font-size: 0.8rem;
  color: var(--hh-muted);
  line-height: 1.55;
  border-top: 1px solid var(--hh-line);
  padding-top: 18px;
  margin-top: 32px;
}

/* Beitragskarten im Archiv */
.ast-article-post, .ast-archive-post {
  background: var(--hh-surface);
  border: 1px solid var(--hh-line);
  border-radius: 8px;
  overflow: hidden;
}
.ast-article-post .ast-article-inner { padding: 4px; }

/* Fusszeile */
.site-footer, .ast-small-footer {
  background: var(--hh-head-bg);
  color: #9fb3b0;
  border: none;
}
.site-footer a { color: #cbd8d6; }

/* Logo im Kopfbereich */
.site-logo-img img,
.custom-logo-link img,
.ast-site-identity img.custom-logo,
img.custom-logo,
.site-branding img {
  height: 44px !important;
  max-height: 44px !important;
  width: auto !important;
  max-width: none !important;
}
.ast-site-identity { padding: 10px 0; }
/* Wortmarke neben dem Zeichen */
.site-title { font-size: 1.35rem; letter-spacing: -0.02em; }

/* Produktbild in der Empfehlungs-Box */
.hh-produkt {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
  align-items: center;
}
.hh-produkt img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  background: #fff;
  border-radius: 5px;
  padding: 6px;
}
.hh-produkt-text p { margin: 0 0 8px 0; }
.hh-produkt-text p:last-child { margin-bottom: 0; }
.hh-produkt-text a {
  display: inline-block;
  background: var(--hh-accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.hh-produkt-text a:hover { background: var(--hh-accent-d); color: #fff; }

@media (max-width: 480px) {
  .hh-produkt { grid-template-columns: 72px 1fr; gap: 14px; }
  .hh-produkt img { width: 72px; height: 72px; }
}

/* ══ Startseite ══════════════════════════════════════════════════ */

/* Hero-Band: volle Breite, auch im Boxed-Layout von Astra */
.hh-hero {
  background: var(--hh-head-bg);
  color: #eef3f2;
  margin: -1.5em calc(-50vw + 50%) 2.5em;
  padding: 56px calc(50vw - 50% + 24px) 60px;
}
.hh-hero-inner { max-width: 1100px; margin: 0 auto; }
.hh-hero h1 {
  color: #f4f8f7;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 14px;
  max-width: 20ch;
}
.hh-hero-sub {
  color: #a9bdba;
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 58ch;
  margin: 0 0 34px;
}
.hh-schritte {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.hh-schritt {
  background: #1e3138;
  border: 1px solid #2b444c;
  border-radius: 7px;
  padding: 18px;
}
.hh-schritt span {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5fbe8d;
  margin-bottom: 8px;
}
.hh-schritt strong { display: block; font-size: 1rem; margin-bottom: 6px; color: #f4f8f7; }
.hh-schritt p { margin: 0; font-size: 0.9rem; line-height: 1.5; color: #a9bdba; }

/* Bestenliste */
.hh-bestenliste { margin: 0 0 2.5em; }
.hh-bl-kopf {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.hh-bl-kopf h2 { margin: 0; font-size: 1.5rem; }
.hh-bl-kopf span { font-size: 0.85rem; color: var(--hh-muted); }
.hh-bestenliste table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--hh-line); border-radius: 8px; overflow: hidden;
}
.hh-bestenliste th {
  background: #f3f6f6; text-align: left; padding: 12px 16px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: #4a5a5e;
}
.hh-bestenliste td { padding: 15px 16px; border-top: 1px solid #eef2f2; vertical-align: middle; }
.hh-bestenliste td span { font-size: 0.85rem; color: var(--hh-muted); }
.hh-rang {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem; font-weight: 700; color: #8d9b9f; width: 44px;
}
.hh-bestenliste td a {
  display: inline-block; background: var(--hh-accent); color: #fff;
  padding: 9px 16px; border-radius: 5px; font-size: 0.85rem;
  font-weight: 600; white-space: nowrap; text-decoration: none;
}
.hh-bestenliste td a:hover { background: var(--hh-accent-d); color: #fff; }
.hh-bl-fuss { font-size: 0.8rem; color: var(--hh-muted); margin-top: 12px; line-height: 1.5; }

/* Kategorie-Kacheln */
.hh-kacheln {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin: 0 0 2.5em;
}
.hh-kacheln a {
  border: 1px solid var(--hh-line); border-radius: 7px; padding: 18px;
  background: #fff; text-decoration: none; color: var(--hh-ink);
}
.hh-kacheln a:hover { border-color: var(--hh-accent); color: var(--hh-ink); }
.hh-kacheln strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.hh-kacheln span { font-size: 0.85rem; color: var(--hh-muted); }

/* Auf kleinen Bildschirmen darf die Tabelle scrollen statt zu brechen */
@media (max-width: 600px) {
  .hh-bestenliste { overflow-x: auto; }
  .hh-bestenliste table { min-width: 520px; }
}

/* Bestenliste mit Produktbildern */
.hh-bl-modell { display: flex; align-items: center; gap: 14px; }
.hh-bl-modell img {
  width: 54px; height: 54px; object-fit: contain;
  background: #fff; border-radius: 4px; padding: 4px; flex-shrink: 0;
}
.hh-bl-preis { font-weight: 600; white-space: nowrap; }

/* ══ Filterbarer Gerätevergleich ═════════════════════════════════ */
.hh-v-filter {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: end;
  background: #f3f6f6; border: 1px solid var(--hh-line);
  border-radius: 8px; padding: 18px 20px; margin-bottom: 20px;
}
.hh-v-filter label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: #4a5a5e;
}
.hh-v-filter select, .hh-v-filter input[type=range] {
  font-size: 0.95rem; padding: 7px 10px; min-width: 150px;
  border: 1px solid var(--hh-line); border-radius: 5px;
  background: #fff; color: var(--hh-ink); text-transform: none;
  font-weight: 400; letter-spacing: 0;
}
.hh-v-filter input[type=range] { padding: 0; accent-color: var(--hh-accent); }
.hh-v-filter output { color: var(--hh-accent); font-weight: 700; }
#hh-v-reset {
  background: none; border: 1px solid var(--hh-line); color: var(--hh-muted);
  border-radius: 5px; padding: 8px 14px; font-size: 0.85rem;
  font-weight: 500; cursor: pointer;
}
#hh-v-reset:hover { border-color: var(--hh-accent); color: var(--hh-accent); background: none; }

.hh-v-tabelle { overflow-x: auto; }
.hh-vergleich table {
  width: 100%; min-width: 860px; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--hh-line); border-radius: 8px; overflow: hidden;
  font-size: 0.92rem;
}
.hh-vergleich th {
  background: #f3f6f6; text-align: left; padding: 12px 14px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: #4a5a5e; white-space: nowrap;
}
.hh-vergleich td { padding: 14px; border-top: 1px solid #eef2f2; vertical-align: middle; }
.hh-v-modell { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.hh-v-modell img {
  width: 48px; height: 48px; object-fit: contain;
  background: #fff; border-radius: 4px; padding: 3px; flex-shrink: 0;
}
.hh-v-klein { font-size: 0.8rem; color: var(--hh-muted); }
.hh-v-preis { font-weight: 700; white-space: nowrap; }
.hh-vergleich td a {
  display: inline-block; background: var(--hh-accent); color: #fff;
  padding: 9px 15px; border-radius: 5px; font-size: 0.83rem;
  font-weight: 600; white-space: nowrap; text-decoration: none;
}
.hh-vergleich td a:hover { background: var(--hh-accent-d); color: #fff; }
.hh-v-treffer { font-size: 0.88rem; color: var(--hh-muted); margin: 12px 0 0; }

/* Hinweiskasten unter der Vergleichstabelle */
.hh-v-hinweis {
  border: 1px solid var(--hh-line);
  border-left: 3px solid var(--hh-accent);
  background: #f8faf9;
  border-radius: 6px;
  padding: 18px 20px;
  margin: 20px 0 12px;
}
.hh-v-hinweis > strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 8px;
}
.hh-v-hinweis p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--hh-muted);
  margin: 0 0 8px;
}
.hh-v-hinweis p:last-child { margin-bottom: 0; }
.hh-v-hinweis strong { color: var(--hh-ink); }

/* Rechtslinks im Footer */
.hh-rechtsfooter {
  background: var(--hh-head-bg);
  color: #9fb3b0;
  padding: 18px 0;
}
.hh-rechtsfooter-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
}
ul.hh-rechtslinks {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
ul.hh-rechtslinks a { color: #cbd8d6; text-decoration: none; }
ul.hh-rechtslinks a:hover { color: #ffffff; }
.hh-copyright { color: #7d9490; }

/* Shop-Auswahl in der Vergleichstabelle */
details.hh-shops { position: relative; }
details.hh-shops > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--hh-accent);
  color: #fff;
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
}
details.hh-shops > summary::-webkit-details-marker { display: none; }
details.hh-shops > summary:hover { background: var(--hh-accent-d); }
.hh-shops-zahl { font-size: 0.68rem; font-weight: 500; opacity: 0.85; }
details.hh-shops ul {
  /* Schwebend: verschiebt die Tabelle nicht und wird vom waagerechten
     Scrollcontainer nicht abgeschnitten. Position setzt das Skript. */
  position: fixed;
  z-index: 60;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--hh-line);
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(20,40,45,0.18);
  min-width: 210px;
}
details.hh-shops li { margin: 0; }
details.hh-shops li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: none;
  color: var(--hh-ink);
  padding: 9px 11px;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 500;
}
details.hh-shops li a:hover { background: #f2faf5; color: var(--hh-ink); }
details.hh-shops li:first-child a strong { color: var(--hh-accent); }
details.hh-shops li a strong { font-weight: 700; white-space: nowrap; }
