/*
Theme Name: Henghuber
Author: Gerd Henghuber
Description: Block-Theme »Die Titelseite« für Reputationsmanagement im Mittelstand: redaktionelle Optik, fertige Abschnitte und Seitenvorlagen, komplett im Website-Editor pflegbar.
Requires at least: 6.6
Requires PHP: 7.4
Version: 1.5.5
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: henghuber
*/

/* Breite Inhalte (Spalten, Raster) in Abschnitten auf volle 1200 px – auch für bereits angelegte Seiten */
.wp-block-group.alignwide.is-layout-constrained > .alignwide { max-width: var(--wp--style--global--wide-size); }

/* Kopf, Inhalt und Fuß ohne Abstand übereinander */
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-block-post-content > .alignfull { margin-block-start: 0; margin-block-end: 0; }

/* Kopfzeile */
.wp-block-group.site-header { padding-block: 1.25rem; border-bottom: 1px solid var(--wp--preset--color--linie); }
.wp-block-group.dachzeile { background: var(--wp--preset--color--papier); border-bottom: 1px solid var(--wp--preset--color--linie); padding-block: 0.6rem; font-size: 0.8125rem; letter-spacing: 0.04em; color: var(--wp--preset--color--schiefer); }
.wp-block-group.dachzeile p { margin: 0; }
.wp-block-group.dachzeile a { color: inherit; text-decoration: none; }
.wp-block-group.dachzeile a:hover { color: var(--wp--preset--color--signal); text-decoration: underline; }

/* Lange deutsche Wörter in Überschriften trennen */
h1, h2, h3 { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }

/* Rubrik direkt über Überschrift */
.is-style-rubrik { margin-block-end: 0; }
.is-style-rubrik + .wp-block-heading { margin-block-start: 0.6rem; }
.is-style-kennziffer + .wp-block-heading { margin-block-start: 0.75rem; }

/* Verlinkte Überschriften */
.wp-block-heading a { color: inherit; text-decoration: none; }
.wp-block-heading a:hover { color: var(--wp--preset--color--signal); }

/* Kontur-Button */
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--tinte); border-color: var(--wp--preset--color--tinte); color: #fff; }

/* Dunkle Abschnitte */
.is-style-abschnitt-dunkel .is-style-rubrik,
.is-style-abschnitt-dunkel .is-style-kennziffer { color: var(--wp--preset--color--signal-hell); }
.is-style-abschnitt-dunkel .is-style-nebentext,
.is-style-abschnitt-dunkel cite { color: var(--wp--preset--color--nebel); }
.is-style-abschnitt-dunkel .wp-block-group.is-style-kasten { border-color: #3B5675; }
.is-style-abschnitt-dunkel .wp-block-group.is-style-karte { border-top-color: var(--wp--preset--color--signal-hell); }
.is-style-abschnitt-dunkel .wp-block-button.is-style-outline .wp-block-button__link { color: #fff; border-color: #fff; }
.is-style-abschnitt-dunkel .wp-block-button.is-style-outline .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--nachtblau); }

/* Logo in der Kopfzeile: feste Höhe, Breite folgt */
.hh-logo { display: inline-block; line-height: 0; flex-shrink: 0; }
p:has(> .hh-logo) { margin: 0; line-height: 0; }
.hh-logo-wrap { order: -1; margin-right: auto; line-height: 0; }
.hh-logo img { display: block; height: 54px; width: auto; max-width: none; }
@media (max-width: 600px) { .hh-logo img { height: 42px; } }

/* Fußzeile */
.wp-block-group.footer-unterzeile { border-top: 1px solid #2E3239; padding-top: 1.25rem; font-size: 0.8125rem; }
.wp-block-group.footer-unterzeile p { margin: 0; }
.is-style-abschnitt-tinte .wp-block-site-title a { color: #fff; }
.is-style-abschnitt-tinte p { margin-block: 0.35rem; }

/* Kästen: Inhalt bis zum Rand, Buttons unten */
.wp-block-group.is-style-kasten > :first-child,
.wp-block-group.is-style-kasten-hell > :first-child { margin-block-start: 0; }

/* Tabellen im Zeitungsstil */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th, .wp-block-table td { border: 0; border-bottom: 1px solid var(--wp--preset--color--linie); padding: 0.9rem 1.5rem 0.9rem 0; text-align: left; vertical-align: top; }
.wp-block-table thead { border-bottom: 0; }
.wp-block-table thead th { font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wp--preset--color--schiefer); border-bottom: 1px solid var(--wp--preset--color--tinte); }
.wp-block-table tbody tr:first-child td { border-top: 0; }
.wp-block-table:not(:has(thead)) table { border-top: 1px solid var(--wp--preset--color--tinte); }

/* Häufige Fragen */
.wp-block-details:first-of-type { border-top: 1px solid var(--wp--preset--color--tinte); }
.wp-block-details summary { font-weight: 600; font-size: 1.1875rem; cursor: pointer; min-height: 44px; display: list-item; padding-block: 0.4rem; }

/* Listen */
.wp-block-list li + li { margin-top: 0.5rem; }

/* Bilder und Bildunterschriften */
.wp-block-image img { display: block; width: 100%; height: auto; }
.wp-block-image figcaption { margin: 0.65rem 0 0; font-size: 0.875rem; line-height: 1.45; text-align: left; color: var(--wp--preset--color--schiefer); }
.is-style-abschnitt-dunkel .wp-block-image figcaption { color: var(--wp--preset--color--nebel); }

/* Fokus sichtbar */
:where(a, button, summary, input, select, textarea):focus-visible { outline: 2px solid var(--wp--preset--color--signal); outline-offset: 2px; }
