/*
Theme Name: Befund
Theme URI: https://gutachtermagazin.de
Author: Gutachtermagazin
Author URI: https://gutachtermagazin.de
Description: Nachrichtenmagazin-Block-Theme für gutachtermagazin.de — klares News-Portal-Layout: weiße Fläche, fette Grotesk-Schlagzeilen (Archivo), rote Kicker, Serifen-Vorspann (Source Serif 4). Schriften selbstgehostet (DSGVO-konform).
Version: 0.4.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: befund
*/

/* ============================================================
   Gutachtermagazin — News-Portal-Styles (Ergänzung zu theme.json)
   ============================================================ */

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* Deutsche Komposita sauber trennen */
h1, h2, h3, .wp-block-post-title { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: normal; word-break: normal; }

:focus-visible { outline: 2px solid var(--wp--preset--color--brand); outline-offset: 2px; }

a, .gm-card img { transition: color 120ms ease, opacity 160ms ease; }

/* Beitragsbilder füllen immer ihre Spalte (16:9 via Block-Attribut) */
.wp-block-post-featured-image { width: 100%; }
.wp-block-post-featured-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Logo (Wortmarke) ---------- */
.gm-logo {
  font-family: var(--wp--preset--font-family--sans);
  font-weight: 800; font-size: 1.75rem; line-height: 1; letter-spacing: -0.025em;
  margin: 0;
}
.gm-logo a { color: var(--wp--preset--color--ink); text-decoration: none; }
.gm-logo span { color: var(--wp--preset--color--brand); }
.gm-logo a:hover { color: var(--wp--preset--color--ink); }
.gm-logo a:hover span { color: var(--wp--preset--color--brand-hover); }
.gm-logo--footer { font-size: 1.3rem; }

/* ---------- Kopf ---------- */
.gm-header { background: var(--wp--preset--color--white); border-bottom: 1px solid var(--wp--preset--color--line); }
.gm-header .wp-block-site-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.gm-header .wp-block-site-title a:hover { color: var(--wp--preset--color--brand); }
.gm-brandbar { height: 4px; background: var(--wp--preset--color--brand); margin: 0; }
.gm-nav a {
  color: var(--wp--preset--color--ink); font-weight: 700; font-size: 0.95rem;
}
.gm-nav a:hover { color: var(--wp--preset--color--brand); text-decoration: none; }
.gm-claim { color: var(--wp--preset--color--muted); font-size: 0.8rem; margin: 0; }

/* ---------- Kicker (rote Dachzeile) ---------- */
.gm-kicker {
  font-family: var(--wp--preset--font-family--narrow);
  font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--wp--preset--color--brand); margin: 0;
}
.gm-kicker a { color: var(--wp--preset--color--brand) !important; text-decoration: none; }
.gm-kicker a:hover { color: var(--wp--preset--color--brand-hover) !important; }

/* Meta-Zeile (Datum, Autor) */
.gm-meta { font-size: 0.78rem; color: var(--wp--preset--color--muted); display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin: 0; }
.gm-meta a { color: var(--wp--preset--color--muted); }

/* ---------- Sektions-Kopf (fett + rote Unterstreichung) ---------- */
.gm-section-head {
  font-family: var(--wp--preset--font-family--sans);
  font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em;
  color: var(--wp--preset--color--ink);
  border-bottom: 2px solid var(--wp--preset--color--ink);
  padding-bottom: 0.5rem; margin: 0 0 1.4rem; position: relative;
}
.gm-section-head::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 64px; height: 2px;
  background: var(--wp--preset--color--brand);
}
.gm-section-head a { color: inherit; text-decoration: none; }
.gm-section-head a:hover { color: var(--wp--preset--color--brand); }

/* ---------- Aufmacher ---------- */
.gm-lead .wp-block-post-title {
  font-size: clamp(1.7rem, 1rem + 2vw, 2.6rem); font-weight: 800; line-height: 1.08;
  letter-spacing: -0.015em; margin: 0.45rem 0 0.7rem;
}
.gm-lead .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.gm-lead .wp-block-post-title a:hover { color: var(--wp--preset--color--brand); }
.gm-lead .wp-block-post-excerpt {
  font-family: var(--wp--preset--font-family--serif);
  font-size: 1.12rem; line-height: 1.55; color: var(--wp--preset--color--graphite);
}
.gm-lead .wp-block-post-excerpt__more-link { display: none; }

/* ---------- Rail (kleine Teaser rechts) ---------- */
.gm-rail .wp-block-post { border-top: 1px solid var(--wp--preset--color--line); padding-top: 0.9rem; }
.gm-rail .wp-block-post:first-child { border-top: 0; padding-top: 0; }
.gm-rail .wp-block-post-title { font-size: 1.02rem; font-weight: 700; line-height: 1.22; margin: 0.25rem 0 0; }
.gm-rail .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.gm-rail .wp-block-post-title a:hover { color: var(--wp--preset--color--brand); }

/* ---------- Teaser-Karten ---------- */
.gm-card { display: flex; flex-direction: column; gap: 0.55rem; }
.gm-card .wp-block-post-title { font-size: 1.18rem; font-weight: 700; line-height: 1.2; margin: 0; }
.gm-card .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.gm-card .wp-block-post-title a:hover { color: var(--wp--preset--color--brand); }
.gm-card .wp-block-post-excerpt {
  font-family: var(--wp--preset--font-family--serif);
  font-size: 0.95rem; line-height: 1.5; color: var(--wp--preset--color--graphite);
}
.gm-card .wp-block-post-excerpt__more-link { display: none; }
.gm-card a img:hover { opacity: 0.9; }

/* ---------- Rubriken-Karten ---------- */
.gm-topics { background: var(--wp--preset--color--shade); }
.gm-topic-cards .wp-block-column { display: flex; }
.gm-topic-card {
  background: #fff; border: 1px solid var(--wp--preset--color--line);
  border-top: 3px solid var(--wp--preset--color--brand);
  padding: 1.3rem 1.4rem 1.15rem; width: 100%;
  display: flex; flex-direction: column; gap: 0.5rem;
  box-shadow: 0 1px 2px rgba(17,17,17,0.04);
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.gm-topic-card:hover { box-shadow: 0 6px 18px rgba(17,17,17,0.08); transform: translateY(-2px); }
.gm-topic-card h3 { font-size: 1.08rem; font-weight: 700; margin: 0; }
.gm-topic-card h3 a { color: var(--wp--preset--color--ink); text-decoration: none; }
.gm-topic-card h3 a:hover { color: var(--wp--preset--color--brand); }
.gm-topic-card p { font-size: 0.9rem; line-height: 1.5; color: var(--wp--preset--color--muted); margin: 0; }
.gm-topic-link { margin-top: auto; padding-top: 0.5rem; }
.gm-topic-card .gm-topic-link a {
  font-weight: 700; font-size: 0.85rem; color: var(--wp--preset--color--brand); text-decoration: none;
}
.gm-topic-card .gm-topic-link a:hover { color: var(--wp--preset--color--brand-hover); text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .gm-topic-card:hover { transform: none; } }

/* ---------- Artikelseite ---------- */
.gm-article-head .wp-block-post-title {
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); font-weight: 800; line-height: 1.06;
  letter-spacing: -0.018em; margin: 0.5rem 0 0.9rem;
}
.gm-article-meta {
  border-top: 1px solid var(--wp--preset--color--line);
  border-bottom: 1px solid var(--wp--preset--color--line);
  padding: 0.6rem 0; margin: 1.1rem 0 0;
}
.wp-block-post-content {
  font-family: var(--wp--preset--font-family--serif);
  font-size: 1.125rem; line-height: 1.72;
}
.wp-block-post-content > p:first-of-type {
  font-size: 1.28rem; line-height: 1.55; font-weight: 400; color: var(--wp--preset--color--graphite);
}
.wp-block-post-content a { color: var(--wp--preset--color--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.wp-block-post-content a:hover { color: var(--wp--preset--color--brand-hover); }
.wp-block-post-content h2, .wp-block-post-content h3 {
  font-family: var(--wp--preset--font-family--sans); letter-spacing: -0.01em;
}
.wp-block-post-content h2 { margin-top: 2.1rem; }
.wp-block-post-content figcaption { font-family: var(--wp--preset--font-family--sans); }

/* ---------- Pagination ---------- */
.wp-block-query-pagination { font-weight: 700; font-size: 0.9rem; }
.wp-block-query-pagination a { color: var(--wp--preset--color--ink); }
.wp-block-query-pagination a:hover { color: var(--wp--preset--color--brand); }
.wp-block-query-pagination-numbers .current { color: var(--wp--preset--color--brand); }

/* ---------- Suche ---------- */
.wp-block-search__input {
  border: 1px solid var(--wp--preset--color--muted); border-radius: 2px;
  background: #fff; font-size: 0.95rem; padding: 0.65rem 0.85rem;
}
.wp-block-search__button {
  border-radius: 2px; border: 0;
  background: var(--wp--preset--color--brand); color: #fff; font-weight: 700; font-size: 0.9rem;
}
.wp-block-search__button:hover { background: var(--wp--preset--color--brand-hover); }

/* ---------- Fuß ---------- */
.gm-footer { background: var(--wp--preset--color--shade); border-top: 1px solid var(--wp--preset--color--line); }
.gm-footer .wp-block-site-title { font-size: 1.25rem; }
.gm-footer a { color: var(--wp--preset--color--graphite); text-decoration: none; font-size: 0.92rem; }
.gm-footer a:hover { color: var(--wp--preset--color--brand); }
.gm-footer-label { font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--wp--preset--color--muted); margin: 0 0 0.6rem; }
.gm-footer-nav li { margin-bottom: 0.3rem; }
.gm-colophon { font-size: 0.8rem; color: var(--wp--preset--color--muted); margin: 0; }
