/*
Theme Name: Hygieneartikel24 Lean
Theme URI: https://hygieneartikel24.com
Author: Juri
Description: Schlankes, markengefuehrtes Content- und Affiliate-Theme fuer Hygieneartikel24.com. Kein Page-Builder, System-Font-Stack fuer Fliesstext, ein kuratierter Display-Font (Manrope) fuer Marke/Headlines, semantisches HTML5, eigener DSGVO-Cookie-Consent.
Version: 1.5
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: hygieneartikel24
*/

/* -------------------- 1. Reset & Grundlagen -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--hyg-text);
  background: var(--hyg-bg);
  line-height: 1.65;
  font-size: 1.05rem;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--hyg-accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--hyg-accent-dark); }
h1, h2, h3, h4 { font-family: var(--hyg-font-heading); line-height: 1.22; letter-spacing: -0.01em; margin: 1.6em 0 0.6em; color: var(--hyg-heading); font-weight: 800; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.4em; }
table { border-collapse: collapse; width: 100%; margin: 1.5em 0; }
th, td { border: 1px solid var(--hyg-border); padding: 0.6em 0.8em; text-align: left; }
th { background: var(--hyg-accent); color: #fff; }

/* -------------------- 2. Design-Tokens (Markenfarben Hygieneartikel24) -------------------- */
:root {
  /* Primaerfarbe: Vertrauen, Gesundheit, Ruhe */
  --hyg-accent: #1F5C4A;
  --hyg-accent-dark: #143d31;
  --hyg-accent-tint: #E1F1EA;

  /* Sekundaerfarbe fuer Handlungsaufforderungen (bewusst abgesetzt von der Markenfarbe,
     damit CTA-Buttons in Artikeln visuell hervorstechen statt in der Navigation unterzugehen) */
  --hyg-cta: #D9622B;
  --hyg-cta-dark: #B44C1D;
  --hyg-cta-tint: #FBEAE0;

  --hyg-bg: #ffffff;
  --hyg-bg-alt: #F6F9F7;
  --hyg-text: #2A322D;
  --hyg-text-secondary: #5B6B64;
  --hyg-heading: #17211C;
  --hyg-border: #E2E8E5;

  --hyg-font-heading: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --hyg-radius: 10px;
  --hyg-radius-sm: 6px;
  --hyg-shadow-sm: 0 1px 2px rgba(23, 33, 28, 0.05);
  --hyg-shadow-md: 0 6px 20px rgba(23, 33, 28, 0.06);

  --hyg-max-width: 1120px;
  --hyg-content-width: 740px;
}

/* -------------------- 3. Layout -------------------- */
.hyg-container { max-width: var(--hyg-max-width); margin: 0 auto; padding: 0 1.25rem; }
.hyg-content { max-width: var(--hyg-content-width); margin: 0 auto; padding: 0 1.25rem; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--hyg-accent);
  color: #fff; padding: 0.75em 1.2em; z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* -------------------- 4. Header & Navigation -------------------- */
.site-header {
  border-bottom: 1px solid var(--hyg-border);
  padding: 1rem 0;
}
.site-header .hyg-container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-branding a { text-decoration: none; display: inline-flex; align-items: center; gap: 0.55rem; }
.site-logo-icon { width: 34px; height: 34px; flex-shrink: 0; }
.site-logo-word { font-family: var(--hyg-font-heading); font-weight: 800; font-size: 1.25rem; color: var(--hyg-heading); letter-spacing: -0.01em; }
.site-logo-word .site-logo-suffix { color: var(--hyg-cta); }
.site-branding p { margin: 0.15rem 0 0; font-size: 0.82rem; color: var(--hyg-text-secondary); }
.primary-nav ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; }
.primary-nav a { text-decoration: none; color: var(--hyg-text); font-weight: 600; }
.primary-nav a:hover { color: var(--hyg-accent); }
.nav-toggle { display: none; background: none; border: 1px solid var(--hyg-border); border-radius: 6px; padding: 0.5em 0.8em; font-size: 1.2rem; cursor: pointer; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .primary-nav { display: none; width: 100%; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0.9rem; padding: 1rem 0; }
  .site-header .hyg-container { flex-wrap: wrap; }
}

/* -------------------- 5. Beitragslisten (Startseite/Blog) -------------------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.75rem; margin: 2rem 0; }
.post-card { border: 1px solid var(--hyg-border); border-radius: var(--hyg-radius); overflow: hidden; background: #fff; box-shadow: var(--hyg-shadow-sm); transition: box-shadow 0.15s ease; }
.post-card:hover { box-shadow: var(--hyg-shadow-md); }
.post-card__body { padding: 1.1rem 1.2rem 1.4rem; }
.post-card h2 { margin-top: 0; font-size: 1.15rem; }
.post-card h2 a { text-decoration: none; color: var(--hyg-heading); }
.post-card__excerpt { color: #444; font-size: 0.95rem; }
.post-card__meta { font-size: 0.8rem; color: #778; text-transform: uppercase; letter-spacing: 0.03em; }

/* -------------------- 6. Hero (Startseite) -------------------- */
.hero { background: var(--hyg-bg-alt); padding: 3.5rem 0; text-align: center; }
.hero h1 { font-size: 2.2rem; margin-top: 0; }
.hero p { max-width: 620px; margin: 0 auto 1.5rem; color: #445; }

/* Zweispaltiger Hero mit Bild (Startseite) */
.hero--split { text-align: left; padding: 3rem 0; }
.hero--split .hero__inner {
  display: flex; align-items: center; gap: 2.5rem; flex-wrap: wrap;
}
.hero--split .hero__content { flex: 1 1 380px; }
.hero--split .hero__content p { margin: 0 auto 1.2rem 0; }
.hero--split h1 { font-size: 2.3rem; }
.hero__sub { color: var(--hyg-text-secondary); font-size: 1rem; }
.hero__image { flex: 1 1 340px; max-width: 460px; margin: 0 auto; }
.hero__image img {
  border-radius: var(--hyg-radius); box-shadow: var(--hyg-shadow-md);
  width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3;
}
@media (max-width: 780px) {
  .hero--split .hero__inner { flex-direction: column-reverse; text-align: center; }
  .hero--split .hero__content p { margin: 0 auto 1.2rem; }
}

/* Trust-/USP-Leiste unterhalb des Heros */
.hyg-trust-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem; margin: 2.2rem 0; padding: 1.5rem 0; border-bottom: 1px solid var(--hyg-border);
}
.hyg-trust-item { display: flex; align-items: flex-start; gap: 0.8rem; }
.hyg-trust-icon {
  flex-shrink: 0; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--hyg-accent-tint); color: var(--hyg-accent-dark);
  display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 700;
}
.hyg-trust-item p { margin: 0.2rem 0 0; font-size: 0.88rem; color: var(--hyg-text-secondary); }
.hyg-trust-item strong { font-family: var(--hyg-font-heading); color: var(--hyg-heading); }

/* Kategorie-Kacheln (Startseite) */
.hyg-category-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem; margin: 1.5rem 0 2.5rem;
}
.hyg-category-card {
  display: block; padding: 1.5rem 1.4rem; border: 1px solid var(--hyg-border);
  border-radius: var(--hyg-radius); background: #fff; text-decoration: none;
  box-shadow: var(--hyg-shadow-sm); transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.hyg-category-card:hover { box-shadow: var(--hyg-shadow-md); transform: translateY(-2px); }
.hyg-category-card h3 { margin-top: 0; color: var(--hyg-heading); }
.hyg-category-card p { color: var(--hyg-text-secondary); font-size: 0.92rem; margin-bottom: 0.8rem; }
.hyg-category-card__link { font-weight: 700; color: var(--hyg-accent); font-size: 0.9rem; }

/* -------------------- 7. Artikel (single.php) -------------------- */
.entry-header { margin-bottom: 1.5rem; }
.entry-meta { font-size: 0.85rem; color: #778; }
.entry-content h2 { border-top: 1px solid var(--hyg-border); padding-top: 1.2em; }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption { font-size: 0.85rem; color: #778; text-align: center; }

/* Affiliate-Hinweisbox (allgemeiner Disclosure am Artikelanfang) */
.hyg-disclosure {
  background: var(--hyg-bg-alt);
  border-left: 4px solid var(--hyg-accent);
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  margin: 0 0 1.6rem;
  border-radius: 4px;
}

/* Einzelne Affiliate-Links: Kennzeichnung direkt am Link (rechtlich vorgeschrieben) */
.aff-link { font-weight: 600; }
.aff-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #ffe9a8;
  color: #6b5300;
  padding: 0.05em 0.4em;
  border-radius: 3px;
  margin-left: 0.3em;
  text-decoration: none;
  vertical-align: middle;
}

/* Produkt-/Vergleichs-Box */
.hyg-product-box {
  border: 1px solid var(--hyg-border);
  border-radius: var(--hyg-radius);
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0;
  background: #fff;
  box-shadow: var(--hyg-shadow-sm);
}
.hyg-product-box h3 { margin-top: 0; }

/* CTA-Buttons bewusst in der Sekundaerfarbe (Koralle), nicht in der Markenfarbe (Tanne) -
   so heben sich Handlungsaufforderungen sichtbar von Navigation/Markenelementen ab. */
.hyg-cta-button {
  display: inline-block;
  font-family: var(--hyg-font-heading);
  background: var(--hyg-cta);
  color: #fff !important;
  padding: 0.65em 1.4em;
  border-radius: var(--hyg-radius-sm);
  text-decoration: none !important;
  font-weight: 800;
  margin-top: 0.5em;
  box-shadow: var(--hyg-shadow-sm);
}
.hyg-cta-button:hover { background: var(--hyg-cta-dark); }

/* Badges, z. B. "Empfehlung" oder "Preis-Tipp" in Produktboxen */
.hyg-badge {
  display: inline-block;
  font-family: var(--hyg-font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.2em 0.65em;
  border-radius: 999px;
  background: var(--hyg-accent-tint);
  color: var(--hyg-accent-dark);
  margin-bottom: 0.6em;
}
.hyg-badge--cta { background: var(--hyg-cta-tint); color: var(--hyg-cta-dark); }

/* FAQ */
.hyg-faq-item { border-bottom: 1px solid var(--hyg-border); padding: 1rem 0; }
.hyg-faq-item h3 { margin: 0 0 0.4em; font-size: 1.05rem; }

/* -------------------- 8. Footer -------------------- */
.site-footer { border-top: 1px solid var(--hyg-border); background: var(--hyg-bg-alt); margin-top: 3rem; padding: 2rem 0; font-size: 0.9rem; }
.site-footer .hyg-container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.footer-links ul { list-style: none; display: flex; gap: 1.2rem; padding: 0; margin: 0; flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: #445; }
#hyg-cookie-settings-link { background: none; border: none; padding: 0; text-decoration: underline; cursor: pointer; color: #445; font-size: 0.9rem; }

/* -------------------- 9. Cookie-Consent-Banner -------------------- */
#hyg-cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: #fff; border-top: 1px solid var(--hyg-border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
  padding: 1.2rem 1.25rem;
}
#hyg-cookie-banner[hidden] { display: none; }
.hyg-cookie-inner { max-width: var(--hyg-max-width); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.hyg-cookie-text { flex: 1 1 380px; font-size: 0.9rem; color: #334; margin: 0; }
.hyg-cookie-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.hyg-btn { border-radius: 6px; padding: 0.6em 1.1em; font-weight: 600; cursor: pointer; font-size: 0.9rem; border: 1px solid var(--hyg-border); background: #fff; }
.hyg-btn--primary { background: var(--hyg-accent); color: #fff; border-color: var(--hyg-accent); }
.hyg-btn--primary:hover { background: var(--hyg-accent-dark); }

#hyg-cookie-settings-panel {
  position: fixed; inset: 0; background: rgba(10,20,15,0.5); z-index: 10000;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
#hyg-cookie-settings-panel[hidden] { display: none; }
.hyg-cookie-modal { background: #fff; border-radius: 10px; max-width: 480px; width: 100%; padding: 1.6rem; }
.hyg-cookie-modal h2 { margin-top: 0; }
.hyg-cookie-category { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--hyg-border); padding: 0.8rem 0; gap: 1rem; }
.hyg-cookie-category p { margin: 0; font-size: 0.85rem; color: #556; }
.hyg-cookie-modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.2rem; }
