/**
Theme Name: Astra Master Child
Author: WordPress-Mastersystem
Description: Neutrales Astra Child Theme fuer das klonbare WordPress-Mastersystem.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-master-child
Template: astra
*/

/* heimwerken.at - Designsystem "Werkstattlicht". Quelle: 08_DESIGNSYSTEM.md */

:root {
  --hw-ink: #1C2024;
  --hw-ink-soft: #4A5157;
  --hw-ink-muted: #7C848B;
  --hw-paper: #FFFFFF;
  --hw-surface: #F6F6F4;
  --hw-surface-alt: #ECEDE9;
  --hw-line: #DCDEDA;
  --hw-accent: #D4511F;
  --hw-accent-hover: #B2431A;
  --hw-accent-soft: #FDF1EB;
  --hw-steel: #2B4C6F;
  --hw-steel-soft: #EDF2F7;
  --hw-safety: #B3261E;
  --hw-safety-soft: #FCEEED;
  --hw-ok: #1E6B43;
  --hw-ok-soft: #EAF3EE;
  --hw-ad: #6B6257;
  --hw-ad-soft: #F4F1EC;
  --hw-font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --hw-font-text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --hw-fs-h1: clamp(2rem, 1.45rem + 2.2vw, 3.25rem);
  --hw-fs-h2: clamp(1.55rem, 1.25rem + 1.2vw, 2.25rem);
  --hw-fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  --hw-fs-h4: 1.125rem;
  --hw-fs-lead: clamp(1.1rem, 1.02rem + 0.35vw, 1.3rem);
  --hw-fs-body: 1.0625rem;
  --hw-fs-small: 0.9375rem;
  --hw-fs-meta: 0.8125rem;
  --hw-lh-tight: 1.15;
  --hw-lh-snug: 1.3;
  --hw-lh-body: 1.65;
  --hw-track-display: -0.015em;
  --hw-space-1: 4px;
  --hw-space-2: 8px;
  --hw-space-3: 12px;
  --hw-space-4: 16px;
  --hw-space-5: 24px;
  --hw-space-6: 32px;
  --hw-space-7: 48px;
  --hw-space-8: 64px;
  --hw-space-9: 96px;
  --hw-container: 1200px;
  --hw-content: 720px;
  --hw-wide: 960px;
  --hw-gutter: clamp(16px, 4vw, 32px);
  --hw-radius-sm: 2px;
  --hw-radius-md: 6px;
  --hw-radius-lg: 12px;
  --hw-shadow-1: 0 1px 2px rgba(28,32,36,.06), 0 1px 3px rgba(28,32,36,.08);
  --hw-shadow-2: 0 2px 6px rgba(28,32,36,.07), 0 8px 24px rgba(28,32,36,.07);
  --hw-ease: cubic-bezier(.2,.6,.3,1);
  --hw-dur: 160ms;
}

/* Basis */
body {
  font-family: var(--hw-font-text);
  font-size: var(--hw-fs-body);
  line-height: var(--hw-lh-body);
  color: var(--hw-ink);
  background: var(--hw-surface);
}
h1, h2, h3, h4, h5, h6, .hw-display {
  font-family: var(--hw-font-display);
  color: var(--hw-ink);
  letter-spacing: var(--hw-track-display);
  font-weight: 700;
}
h1 { font-size: var(--hw-fs-h1); line-height: var(--hw-lh-tight); }
h2 { font-size: var(--hw-fs-h2); line-height: var(--hw-lh-tight); }
h3 { font-size: var(--hw-fs-h3); line-height: var(--hw-lh-snug); font-weight: 600; }
h4 { font-size: var(--hw-fs-h4); line-height: var(--hw-lh-snug); font-weight: 600; }
a { color: var(--hw-accent); text-underline-offset: .15em; }
a:hover { color: var(--hw-accent-hover); }
:focus-visible { outline: 2px solid var(--hw-accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

/* Layoutbreiten */
.hw-container { width: 100%; max-width: var(--hw-container); margin-inline: auto; padding-inline: var(--hw-gutter); }
.hw-section { padding-block: var(--hw-space-8); }
@media (min-width: 1024px) { .hw-section { padding-block: var(--hw-space-9); } }
.hw-content { max-width: var(--hw-content); margin-inline: auto; }
.hw-content > .hw-bleed { max-width: var(--hw-wide); margin-inline: auto; }

/* Kicker, Meta, Lead */
.hw-kicker { font-family: var(--hw-font-text); font-size: var(--hw-fs-meta); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--hw-accent); }
.hw-meta { font-size: var(--hw-fs-meta); color: var(--hw-ink-soft); }
.hw-lead { font-size: var(--hw-fs-lead); line-height: var(--hw-lh-snug); color: var(--hw-ink-soft); }

/* Artikelkarte */
.hw-card { background: var(--hw-paper); border: 1px solid var(--hw-line); border-radius: var(--hw-radius-md); overflow: hidden; box-shadow: var(--hw-shadow-1); transition: box-shadow var(--hw-dur) var(--hw-ease); display: flex; flex-direction: column; }
.hw-card:hover { box-shadow: var(--hw-shadow-2); }
.hw-card__media { aspect-ratio: 16 / 9; background: var(--hw-surface-alt); }
.hw-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hw-card__body { padding: var(--hw-space-4); display: flex; flex-direction: column; gap: var(--hw-space-2); }
.hw-card__title { font-size: var(--hw-fs-h4); line-height: var(--hw-lh-snug); }
.hw-card__title a { color: var(--hw-ink); text-decoration: none; }
.hw-card__title a:hover { text-decoration: underline; color: var(--hw-ink); }
.hw-grid { display: grid; gap: var(--hw-space-5); grid-template-columns: 1fr; }
@media (min-width: 600px) { .hw-grid--2, .hw-grid--3, .hw-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .hw-grid--3 { grid-template-columns: repeat(3, 1fr); } .hw-grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* Hero */
.hw-hero { background: var(--hw-paper); border-bottom: 1px solid var(--hw-line); }
.hw-hero__media { aspect-ratio: 16 / 9; border-radius: var(--hw-radius-lg); overflow: hidden; background: var(--hw-surface-alt); }
.hw-hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hw-hero__text { max-width: var(--hw-content); margin-top: var(--hw-space-5); }

/* Hinweisboxen */
.hw-box { padding: var(--hw-space-4) var(--hw-space-5); border-radius: var(--hw-radius-md); border-left: 3px solid var(--hw-line); background: var(--hw-surface-alt); margin-block: var(--hw-space-5); }
.hw-box__title { font-family: var(--hw-font-display); font-weight: 600; font-size: var(--hw-fs-h4); margin-bottom: var(--hw-space-2); }
.hw-box--wissen { background: var(--hw-steel-soft); border-left-color: var(--hw-steel); }
.hw-box--wissen .hw-box__title { color: var(--hw-steel); }
.hw-box--sicherheit { background: var(--hw-safety-soft); border-left-color: var(--hw-safety); }
.hw-box--sicherheit .hw-box__title { color: var(--hw-safety); }
.hw-box--kriterien { background: var(--hw-surface-alt); border-left-color: var(--hw-ink-soft); }
.hw-box--kriterien ul { list-style: none; padding-left: 0; margin: 0; }
.hw-box--kriterien li { position: relative; padding-left: 1.6em; margin-bottom: var(--hw-space-2); }
.hw-box--kriterien li::before { content: ""; position: absolute; left: 0; top: .45em; width: .55em; height: .3em; border-left: 2px solid var(--hw-ok); border-bottom: 2px solid var(--hw-ok); transform: rotate(-45deg); }

/* Vergleichstabelle */
.hw-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-block: var(--hw-space-5); border: 1px solid var(--hw-line); border-radius: var(--hw-radius-md); background: var(--hw-paper); }
.hw-table { width: 100%; border-collapse: collapse; font-size: var(--hw-fs-small); }
.hw-table th, .hw-table td { padding: var(--hw-space-3) var(--hw-space-4); text-align: left; border-bottom: 1px solid var(--hw-line); vertical-align: top; }
.hw-table thead th { background: var(--hw-surface-alt); font-family: var(--hw-font-display); font-weight: 600; white-space: nowrap; }
.hw-table tbody th { font-weight: 600; background: var(--hw-paper); position: sticky; left: 0; }
@media (min-width: 900px) { .hw-table thead th { position: sticky; top: 0; z-index: 2; } }

/* Monetarisierung und Kennzeichnung */
.hw-disclosure { font-size: var(--hw-fs-meta); color: var(--hw-ink-soft); background: var(--hw-ad-soft); border: 1px solid var(--hw-line); border-radius: var(--hw-radius-sm); padding: var(--hw-space-2) var(--hw-space-3); margin-block: var(--hw-space-4); }
.hw-adlabel { display: inline-block; font-size: var(--hw-fs-meta); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--hw-ad); background: var(--hw-ad-soft); border-radius: var(--hw-radius-sm); padding: 2px var(--hw-space-2); }
.hw-slot { margin-block: var(--hw-space-6); }
.hw-slot:empty { display: none; }
.hw-product { display: grid; gap: var(--hw-space-4); grid-template-columns: 1fr; background: var(--hw-paper); border: 1px solid var(--hw-line); border-radius: var(--hw-radius-md); padding: var(--hw-space-4); }
@media (min-width: 600px) { .hw-product { grid-template-columns: 160px 1fr; align-items: start; } }
.hw-product__media { aspect-ratio: 1 / 1; background: var(--hw-surface-alt); border-radius: var(--hw-radius-sm); }
.hw-product__media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hw-product__facts { list-style: none; padding: 0; margin: var(--hw-space-2) 0; font-size: var(--hw-fs-small); color: var(--hw-ink-soft); }
.hw-product__facts li { border-bottom: 1px solid var(--hw-line); padding-block: var(--hw-space-1); }

/* Buttons */
.hw-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding-inline: var(--hw-space-5); border-radius: var(--hw-radius-md); font-family: var(--hw-font-text); font-weight: 600; font-size: var(--hw-fs-body); text-decoration: none; border: 1px solid transparent; transition: background var(--hw-dur) var(--hw-ease), color var(--hw-dur) var(--hw-ease); cursor: pointer; }
.hw-btn--primary { background: var(--hw-accent); color: #fff; }
.hw-btn--primary:hover { background: var(--hw-accent-hover); color: #fff; }
.hw-btn--secondary { background: var(--hw-paper); color: var(--hw-ink); border-color: var(--hw-line); }
.hw-btn--secondary:hover { background: var(--hw-surface-alt); color: var(--hw-ink); }
.hw-btn--text { min-height: auto; padding: 0; background: none; color: var(--hw-accent); text-decoration: underline; }

/* Vertrauen, Autor, Quellen */
.hw-trust { background: var(--hw-accent-soft); border-top: 1px solid var(--hw-line); border-bottom: 1px solid var(--hw-line); padding-block: var(--hw-space-4); font-size: var(--hw-fs-small); }
.hw-author { display: flex; gap: var(--hw-space-4); align-items: flex-start; background: var(--hw-paper); border: 1px solid var(--hw-line); border-radius: var(--hw-radius-md); padding: var(--hw-space-4); margin-block: var(--hw-space-6); }
.hw-author__avatar { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--hw-surface-alt); }
.hw-author__name { font-family: var(--hw-font-display); font-weight: 600; }
.hw-author__role { font-size: var(--hw-fs-meta); color: var(--hw-ink-soft); }
.hw-sources { font-size: var(--hw-fs-small); color: var(--hw-ink-soft); border-top: 1px solid var(--hw-line); padding-top: var(--hw-space-4); margin-top: var(--hw-space-6); }
.hw-sources ol { padding-left: 1.2em; }
.hw-sources li { margin-bottom: var(--hw-space-2); word-break: break-word; }

/* Bildunterschrift und KI-Kennzeichnung */
figcaption, .hw-caption { font-size: var(--hw-fs-meta); color: var(--hw-ink-muted); margin-top: var(--hw-space-2); }
.hw-ai-note { font-size: var(--hw-fs-meta); color: var(--hw-ink-muted); font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* =========================================================================
   Artikel- und Seitenlayout (Astra-Inhaltsbereich)
   Ergaenzung zum Designsystem. Quelle: 08_DESIGNSYSTEM.md
   ========================================================================= */

/* Lesespalte: Astra-Container auf das Textmass begrenzen */
.ast-container,
.site-content .ast-container {
  max-width: var(--hw-container);
}

.entry-content {
  max-width: var(--hw-content);
}

.entry-content > .hw-container,
.entry-content > .hw-hero,
.entry-content > .hw-trust,
.entry-content > .hw-section {
  max-width: none;
}

/* Seiten und Beitraege, die das Designsystem selbst mitbringen, duerfen breit */
.page .entry-content:has(> .hw-section),
.page .entry-content:has(> .hw-hero) {
  max-width: none;
}

/* Textrhythmus */
.entry-content > * + * { margin-top: var(--hw-space-4); }
.entry-content > h2 { margin-top: var(--hw-space-7); }
.entry-content > h3 { margin-top: var(--hw-space-6); }
.entry-content > h2 + p,
.entry-content > h3 + p { margin-top: var(--hw-space-3); }

.entry-content ul,
.entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: var(--hw-space-2); }

.entry-content a { text-decoration: underline; }
.entry-content strong { font-weight: 600; }

.entry-content blockquote {
  margin: var(--hw-space-6) 0;
  padding: var(--hw-space-4) var(--hw-space-5);
  border-left: 3px solid var(--hw-accent);
  background: var(--hw-accent-soft);
  font-size: var(--hw-fs-lead);
  line-height: var(--hw-lh-snug);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content code {
  font-size: .9em;
  padding: .1em .35em;
  border-radius: var(--hw-radius-sm);
  background: var(--hw-surface-alt);
}

.entry-content figure { margin: var(--hw-space-6) 0; }
.entry-content figure img { border-radius: var(--hw-radius-md); }

/* Tabellen im Fliesstext bekommen automatisch den Scrollcontainer-Look */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--hw-fs-small);
  margin-block: var(--hw-space-5);
  display: block;
  overflow-x: auto;
}
.entry-content th,
.entry-content td {
  padding: var(--hw-space-3) var(--hw-space-4);
  border-bottom: 1px solid var(--hw-line);
  text-align: left;
  vertical-align: top;
}
.entry-content thead th {
  background: var(--hw-surface-alt);
  font-family: var(--hw-font-display);
  font-weight: 600;
  white-space: nowrap;
}

/* Beitragskopf */
.ast-single-post .entry-title,
.page .entry-title { margin-bottom: var(--hw-space-3); }

.entry-meta,
.ast-single-post .entry-meta {
  font-size: var(--hw-fs-meta);
  color: var(--hw-ink-soft);
}
.entry-meta a { color: var(--hw-ink-soft); }

/* Breadcrumbs */
.rank-math-breadcrumb {
  font-size: var(--hw-fs-meta);
  color: var(--hw-ink-soft);
  margin-bottom: var(--hw-space-4);
}
.rank-math-breadcrumb a { color: var(--hw-ink-soft); }

/* Beitragsbild */
.ast-single-post .post-thumb img,
.wp-post-image { border-radius: var(--hw-radius-md); }

/* Archiv- und Suchergebnisliste */
.ast-archive-description { margin-bottom: var(--hw-space-6); }
.ast-archive-description .ast-archive-title { font-size: var(--hw-fs-h1); }

/* 404 und Suche */
.search-no-results .page-content,
.error404 .page-content { max-width: var(--hw-content); }

/* Footer-Grundgeruest, bis der Footer-Builder steht */
.site-footer,
.ast-small-footer {
  background: var(--hw-ink);
  color: #C9CDD1;
}
.site-footer a,
.ast-small-footer a { color: #FFFFFF; }
.site-footer a:hover,
.ast-small-footer a:hover { color: var(--hw-accent); }
.ast-small-footer { font-size: var(--hw-fs-small); }

/* Footerflaechen: Astra setzt hier eigene Hintergruende, deshalb gezielt ueberschreiben */
.site-footer .site-below-footer-wrap,
.site-footer .site-primary-footer-wrap,
.site-footer .site-above-footer-wrap {
  background: var(--hw-ink);
  color: #C9CDD1;
}
.site-footer .site-below-footer-wrap a,
.site-footer .site-primary-footer-wrap a { color: #FFFFFF; text-decoration: none; }
.site-footer .site-below-footer-wrap a:hover,
.site-footer .site-primary-footer-wrap a:hover { color: var(--hw-accent); text-decoration: underline; }
.site-footer .ast-builder-grid-row { align-items: center; gap: var(--hw-space-4); }
.site-footer .menu-item { margin-right: var(--hw-space-4); }
.site-footer .site-footer-section-2 { text-align: right; }
@media (max-width: 599px) {
  .site-footer .site-footer-section-2 { text-align: left; }
}
.site-footer .ast-footer-copyright,
.site-footer .ast-footer-copyright * { color: #C9CDD1; }

/* Kopfbild der Themenwelten */
.hw-hubmedia { max-width: var(--hw-wide); margin: 0 auto var(--hw-space-6); }
.hw-hubmedia img { width: 100%; height: auto; display: block; border-radius: var(--hw-radius-lg); }
.hw-hubmedia figcaption { margin-top: var(--hw-space-2); }

/* Hero ab Tablet zweispaltig: Aussage zuerst, Bild daneben */
@media (min-width: 900px) {
  .hw-hero .hw-container { display: grid; grid-template-columns: 1fr 1.05fr; gap: var(--hw-space-6); align-items: center; }
  .hw-hero__media { order: 2; }
  .hw-hero__text { order: 1; margin-top: 0; max-width: none; }
}

/* Beitragsbild in der Einzelansicht */
.hw-postmedia { max-width: var(--hw-wide); margin: 0 auto var(--hw-space-6); }
.hw-postmedia img { width: 100%; height: auto; display: block; border-radius: var(--hw-radius-lg); }
.hw-postmedia figcaption { margin-top: var(--hw-space-2); }
