/*
Theme Name: Jäger Technik Child
Description: Gemeinsamer, schlanker GeneratePress-Unterbau für die Technik-Websites von Jäger. Enthält Layout-, Typografie-, Responsive-, A11Y-, Header-, Footer-, Card-, Tabellen- und Duotone-Regeln ohne PW-/Affiliate-Sonderlogik.
Author: Andreas Jäger
Template: generatepress
Version: 1.4.1
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: jaeger-technik-child
*/

/*
 * Lokale Schriftdateien werden ausschließlich über den GeneratePress Font
 * Manager bereitgestellt. Dieses Stylesheet enthält weder @import noch externe
 * Font-URLs oder Font-Preloads.
 */

:root {
    --jt-font-body: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --jt-font-heading: "Montserrat", "Segoe UI", Arial, sans-serif;

    /*
     * Eigenständige Core-Farben. Sie dürfen nicht direkt auf alte
     * GeneratePress-Slugs zeigen: Auf Bestandsseiten können "contrast" und
     * "contrast-2" historisch vollkommen anders belegt sein.
     */
    --jt-text: #334155;
    --jt-heading: #2d3a3a;
    --jt-muted: #64748b;
    --jt-border: #d1d5db;
    --jt-surface: #ffffff;
    --jt-background: #f5f5f5;
    --jt-surface-soft: #eaf1f1;
    --jt-brand: #087f78;
    --jt-brand-dark: #2d3a3a;
    --jt-signal: #b54708;
    --jt-focus: #b54708;

    --jt-wide: 1200px;
    --jt-content: 840px;
    --jt-radius-sm: 6px;
    --jt-radius: 10px;
    --jt-radius-lg: 14px;
    --jt-shadow-sm: 0 1px 3px rgb(15 23 42 / 0.08);
    --jt-shadow: 0 10px 28px rgb(15 23 42 / 0.09);
    --jt-space-1: 0.5rem;
    --jt-space-2: 0.75rem;
    --jt-space-3: 1rem;
    --jt-space-4: 1.5rem;
    --jt-space-5: 2rem;
    --jt-space-6: 3rem;
}

/* 1. Grundtypografie und Medien
   -------------------------------------------------------------------------- */

html {
    scroll-padding-top: 5rem;
}

body.jt-core,
.editor-styles-wrapper {
    color: var(--jt-text);
    background: var(--jt-background);
    font-family: var(--jt-font-body);
    font-size: 1rem;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
}

body :where(input, textarea, select, button) {
    font-family: var(--jt-font-body);
}

body.jt-core :where(h1, h2, h3, h4, h5, h6, .gb-headline, .site-title),
.editor-styles-wrapper :where(h1, h2, h3, h4, h5, h6) {
    color: var(--jt-heading);
    font-family: var(--jt-font-heading);
    font-weight: 700;
    line-height: 1.2;
    text-wrap: balance;
}

body.jt-core h1,
body.jt-core.single-post .entry-title,
body.jt-core.page .entry-title,
.editor-styles-wrapper h1 {
    font-size: clamp(1.8rem, 3.2vw, 2.75rem);
    letter-spacing: -0.025em;
}

body.jt-core h2,
.editor-styles-wrapper h2 {
    font-size: clamp(1.45rem, 2.4vw, 2.05rem);
}

body.jt-core h3,
.editor-styles-wrapper h3 {
    font-size: clamp(1.25rem, 2vw, 1.7rem);
}

body.jt-core h4,
.editor-styles-wrapper h4 {
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
}

body.jt-core.blog .entry-title,
body.jt-core.archive .entry-title,
body.jt-core.search .entry-title {
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

:where(h3, h4, h5, h6) {
    text-transform: none;
}

p,
ul,
ol,
blockquote,
table,
figure {
    margin-block: 0 1.4em;
}

a {
    color: var(--jt-brand);
    text-underline-offset: 0.18em;
    text-decoration-thickness: 0.08em;
}

a:hover {
    color: var(--jt-heading);
}

.entry-content :where(p, li) a:not(.button):not(.gb-button):not(.wp-block-button__link) {
    text-decoration: underline;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

img,
.wp-post-image,
.entry-content img {
    height: auto;
}

.entry-content :where(img, video),
.featured-image img,
.post-image img {
    border-radius: var(--jt-radius-sm);
}

iframe,
embed,
object {
    max-width: 100%;
}

figure figcaption,
.wp-element-caption {
    color: var(--jt-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

pre,
code,
kbd,
samp {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

pre {
    max-width: 100%;
    overflow-x: auto;
    padding: var(--jt-space-3);
    border: 1px solid var(--jt-border);
    border-radius: var(--jt-radius-sm);
    background: #f8fafc;
}

/* 2. GeneratePress-Grundlayout
   -------------------------------------------------------------------------- */

.grid-container,
.inside-header,
.inside-navigation,
.inside-footer-widgets,
.inside-site-info,
.jt-container {
    width: min(100%, var(--jt-wide));
    margin-inline: auto;
}

.site-content {
    padding-block: clamp(1.25rem, 3vw, 2.75rem);
}

:where(.single-post, .page:not(.home)) .inside-article,
.archive .inside-article,
.search .inside-article,
.page-header {
    padding: clamp(1.25rem, 3vw, 2.25rem);
    border: 1px solid var(--jt-border);
    border-radius: var(--jt-radius);
    background: var(--jt-surface);
    box-shadow: var(--jt-shadow-sm);
}

.archive .inside-article,
.search .inside-article {
    margin-bottom: var(--jt-space-4);
}

/* Kompakte Beitragskarten auf der Startseite. GeneratePress gibt die
   Vorschaubilder hier als unterschiedlich hohe Floats aus. Das Raster hält
   Titel, Bild, Auszug und Metadaten zusammen und verhindert dadurch große
   zufällige Leerflächen. Bilddateien und redaktionelle Inhalte bleiben
   unverändert. */
body.jt-core.blog .site-main > article {
    margin-bottom: var(--jt-space-4);
}

body.jt-core.blog .site-main > article > .inside-article {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    grid-template-areas:
        "title title"
        "media summary"
        "media meta";
    column-gap: var(--jt-space-4);
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
    overflow: hidden;
    border: 1px solid var(--jt-border);
    border-radius: var(--jt-radius);
    background: var(--jt-surface);
    box-shadow: var(--jt-shadow-sm);
}

body.jt-core.blog .site-main > article:not(.has-post-thumbnail) > .inside-article {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "title"
        "summary"
        "meta";
}

body.jt-core.blog .site-main > article .entry-header {
    grid-area: title;
    margin: 0 0 var(--jt-space-3);
}

body.jt-core.blog .site-main > article .entry-title {
    margin: 0;
}

body.jt-core.blog .site-main > article .post-image {
    grid-area: media;
    float: none;
    width: 240px;
    height: 180px;
    margin: 0;
    overflow: hidden;
    border-radius: var(--jt-radius-sm);
    background: #f8fafc;
}

body.jt-core.blog .site-main > article .post-image a,
body.jt-core.blog .site-main > article .post-image img {
    display: block;
    width: 100%;
    height: 100%;
}

body.jt-core.blog .site-main > article .post-image img {
    object-fit: contain;
}

body.jt-core.blog .site-main > article .entry-summary,
body.jt-core.blog .site-main > article .entry-content {
    grid-area: summary;
    min-width: 0;
    margin: 0;
}

body.jt-core.blog .site-main > article .entry-summary > :last-child,
body.jt-core.blog .site-main > article .entry-content > :last-child {
    margin-bottom: 0;
}

body.jt-core.blog .site-main > article .entry-meta {
    grid-area: meta;
    align-self: end;
    margin: var(--jt-space-2) 0 0;
    padding: 0;
    border: 0;
}

.jt-content-narrow {
    width: min(100%, var(--jt-content));
    margin-inline: auto;
}

/* Lange Fachbeiträge behalten für Zeichnungen, Tabellen und Bilder die volle
   Inhaltsbreite. Lesetext und Gliederung laufen dagegen in einer ruhigeren
   Spalte mit gut erfassbarer Zeilenlänge. */
body.jt-core.single-post .entry-content > :where(
    p,
    ul,
    ol,
    blockquote,
    h2,
    h3,
    h4,
    h5,
    h6,
    pre,
    details,
    .lwptoc,
    .jt-info,
    .jt-warning,
    .jt-success,
    .jt-callout
) {
    max-width: var(--jt-content);
    margin-inline: auto;
    box-sizing: border-box;
}

body.jt-core.single-post .entry-content > :where(ul, ol) {
    padding-inline-start: 1.5rem;
}

body.jt-core.single-post .entry-content > .wp-block-image:first-child + p {
    color: var(--jt-heading);
    font-size: 1.05rem;
    line-height: 1.75;
}

.page-header {
    border-bottom: 4px solid var(--jt-brand);
}

.page-header :where(h1, .page-title) {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.6rem);
}

.entry-meta {
    margin-block: 0.75rem 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--jt-border);
    color: var(--jt-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.entry-meta a {
    color: var(--jt-brand);
    font-weight: 600;
    text-decoration: none;
}

.cat-links,
.tags-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    color: var(--jt-muted);
    font-size: 0.82rem;
}

:where(.cat-links, .tags-links) a {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--jt-border);
    border-radius: 999px;
    background: var(--jt-background);
    color: var(--jt-heading);
    font-weight: 600;
    text-decoration: none;
}

:where(.cat-links, .tags-links) a:hover {
    border-color: var(--jt-brand);
    background: var(--jt-brand);
    color: #ffffff;
}

/* 3. Header, Navigation und Suche
   -------------------------------------------------------------------------- */

.site-header,
.jt-site-header,
.header-wrap {
    border-bottom: 1px solid var(--jt-border);
    background: var(--jt-surface);
    box-shadow: 0 4px 14px rgb(15 23 42 / 0.05);
}

.inside-header,
.jt-header__inner,
.header-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1rem, 3vw, 2.5rem);
    padding: 1rem clamp(1rem, 3vw, 1.5rem);
}

.site-logo img,
.site-header .header-image,
.header-image.is-logo-image {
    display: block;
    width: auto;
    max-height: 70px;
    border: 0;
    box-shadow: none;
}

.site-branding,
.jt-header__brand {
    min-width: 0;
}

.site-title {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 2rem);
    letter-spacing: -0.025em;
}

.site-description {
    margin: 0.2rem 0 0;
    color: var(--jt-muted);
    font-size: 0.9rem;
}

.main-navigation,
.jt-navigation {
    margin-bottom: 0;
    border-bottom: 3px solid var(--jt-brand);
    background: var(--jt-surface);
}

.main-navigation .main-nav > ul > li > a,
.main-navigation .menu-bar-item > a,
.main-navigation .menu-toggle {
    color: var(--jt-heading);
    font-family: var(--jt-font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.015em;
}

.main-navigation .main-nav ul li[class*="current-menu-"] > a,
.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li:focus-within > a,
.main-navigation .menu-bar-item:hover > a {
    background: var(--jt-surface-soft);
    color: var(--jt-heading);
}

.main-navigation .main-nav > ul > li[class*="current-menu-"] > a {
    box-shadow: inset 0 -3px 0 var(--jt-signal);
}

.main-navigation ul ul a {
    color: #ffffff;
    font-size: 0.9rem;
}

.main-navigation ul ul {
    background: var(--jt-brand-dark);
}

.main-navigation ul ul li:hover > a,
.main-navigation ul ul li:focus-within > a,
.main-navigation ul ul li[class*="current-menu-"] > a {
    background: rgb(255 255 255 / 0.1);
    color: #ffffff;
}

body.jt-nav-dark .main-navigation,
body.jt-nav-dark .jt-navigation {
    background: var(--jt-brand-dark);
}

body.jt-nav-dark .main-navigation .main-nav > ul > li > a,
body.jt-nav-dark .main-navigation .menu-bar-item > a,
body.jt-nav-dark .main-navigation .menu-toggle {
    color: #ffffff;
}

body.jt-nav-dark .main-navigation .main-nav > ul > li:hover > a,
body.jt-nav-dark .main-navigation .main-nav > ul > li:focus-within > a,
body.jt-nav-dark .main-navigation .main-nav > ul > li[class*="current-menu-"] > a,
body.jt-nav-dark .main-navigation .menu-bar-item:hover > a {
    background: rgb(255 255 255 / 0.08);
    color: #ffffff;
}

.navigation-stick,
.jt-sticky-header {
    box-shadow: 0 8px 24px rgb(15 23 42 / 0.16);
}

.header-search,
.jt-header__search {
    position: relative;
    width: min(100%, 38rem);
}

:where(.header-search, .jt-header__search) form {
    width: 100%;
}

:where(.header-search, .jt-header__search) input[type="search"],
.search-modal-form .search-field,
.wp-block-search__input {
    width: 100%;
    min-height: 46px;
    padding: 0.7rem 0.9rem;
    border: 2px solid var(--jt-border);
    border-radius: var(--jt-radius-sm);
    background: var(--jt-background);
    color: var(--jt-text);
}

/* 4. Buttons und Formulare
   -------------------------------------------------------------------------- */

:where(.button, .wp-block-button__link, .gb-button, .gbp-button--primary, .jt-button),
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.72rem 1.1rem;
    border: 2px solid var(--jt-brand);
    border-radius: var(--jt-radius-sm);
    background: var(--jt-brand);
    color: #ffffff;
    font-family: var(--jt-font-heading);
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

:where(.button, .wp-block-button__link, .gb-button, .gbp-button--primary, .jt-button):hover,
:where(.button, .wp-block-button__link, .gb-button, .gbp-button--primary, .jt-button):focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible {
    border-color: var(--jt-brand-dark);
    background: var(--jt-brand-dark);
    color: #ffffff;
}

:where(.button, .wp-block-button__link, .gb-button, .jt-button):active {
    transform: translateY(1px);
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), textarea, select) {
    max-width: 100%;
    min-height: 44px;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--jt-border);
    border-radius: var(--jt-radius-sm);
    background: var(--jt-surface);
    color: var(--jt-text);
}

textarea {
    min-height: 9rem;
    resize: vertical;
}

:where(input, textarea, select)::placeholder {
    color: #64748b;
    opacity: 1;
}

/* Jetpack-Formulare bringen teils eigene Blockfarben und zu kleine
   Standard-Checkboxen mit. Diese Regeln sichern Kontrast und Touch-Ziel. */
.wp-block-jetpack-button .wp-block-button__link,
.contact-form .wp-block-button__link,
.contact-form input[type="submit"] {
    border-color: var(--jt-brand) !important;
    background: var(--jt-brand) !important;
    color: #ffffff !important;
}

.wp-block-jetpack-button .wp-block-button__link:hover,
.wp-block-jetpack-button .wp-block-button__link:focus-visible,
.contact-form .wp-block-button__link:hover,
.contact-form .wp-block-button__link:focus-visible,
.contact-form input[type="submit"]:hover,
.contact-form input[type="submit"]:focus-visible {
    border-color: var(--jt-brand-dark) !important;
    background: var(--jt-brand-dark) !important;
    color: #ffffff !important;
}

.grunion-field-checkbox-wrap input[type="checkbox"],
.contact-form__checkbox-wrap input[type="checkbox"],
.contact-form input[type="checkbox"] {
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    margin-top: 0.15rem;
}

.grunion-field-checkbox-wrap label,
.contact-form__checkbox-wrap label {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.5rem;
}

/* 5. Cards, Raster und Hinweisboxen
   -------------------------------------------------------------------------- */

.jt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: clamp(1rem, 2.5vw, 1.5rem);
}

:where(.jt-card, .gbp-card, .gbp-card-border) {
    min-width: 0;
    padding: clamp(1.1rem, 2.5vw, 1.6rem);
    border: 1px solid var(--jt-border);
    border-radius: var(--jt-radius);
    background: var(--jt-surface);
    box-shadow: var(--jt-shadow-sm);
}

.gbp-card-border {
    border-top: 4px solid var(--jt-brand);
}

:where(.jt-card, .gbp-card) :where(h2, h3, .gbp-card__title, .jt-card__title) {
    margin-top: 0;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
}

:where(.gbp-card__meta-text, .jt-card__meta) {
    color: var(--jt-muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.jt-card--interactive {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.jt-card--interactive:hover,
.jt-card--interactive:focus-within {
    border-color: var(--jt-brand);
    box-shadow: var(--jt-shadow);
    transform: translateY(-2px);
}

:where(.jt-info, .jt-warning, .jt-success, .jt-callout) {
    margin-block: var(--jt-space-4);
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid var(--jt-border);
    border-inline-start: 5px solid var(--jt-brand);
    border-radius: var(--jt-radius);
    background: var(--jt-surface-soft);
}

.jt-warning {
    border-inline-start-color: var(--jt-signal);
    background: #fff8f0;
}

.jt-success {
    border-inline-start-color: #18794e;
    background: #f0fdf4;
}

:where(.jt-info, .jt-warning, .jt-success, .jt-callout) > :last-child {
    margin-bottom: 0;
}

/* 6. Duotone-Überschriften und Icons
   -------------------------------------------------------------------------- */

.jt-duotone,
.jt-heading--duotone {
    color: var(--jt-heading);
}

:where(.jt-duotone, .jt-heading--duotone) :where(.jt-accent, em, strong:first-child) {
    color: var(--jt-brand);
    font-style: normal;
}

:where(.entry-content, .editor-styles-wrapper) > h2,
.jt-section-heading {
    position: relative;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--jt-border);
}

:where(.entry-content, .editor-styles-wrapper) > h2::after,
.jt-section-heading::after {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: min(22%, 8rem);
    height: 4px;
    border-radius: 999px;
    background: var(--jt-signal);
    content: "";
}

:where(.entry-content, .editor-styles-wrapper) > h3 {
    position: relative;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--jt-border);
}

:where(.entry-content, .editor-styles-wrapper) > h3::after {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: min(16%, 5rem);
    height: 3px;
    border-radius: 999px;
    background: var(--jt-brand);
    content: "";
}

:where(.jt-heading--duotone, .entry-content h2) .gb-icon {
    color: var(--jt-signal);
}

.entry-content h3 .gb-icon {
    color: var(--jt-brand);
}

:where(.jt-heading--duotone, .entry-content h2, .entry-content h3) .gb-icon,
:where(.jt-heading--duotone, .entry-content h2, .entry-content h3) .gb-icon svg {
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

:where(.jt-heading--duotone, .entry-content h2, .entry-content h3) .gb-icon svg path {
    fill: currentColor;
}

/* 7. Tabellen
   -------------------------------------------------------------------------- */

.wp-block-table,
.jt-table-wrap,
.jt-table-card {
    max-width: 100%;
    margin-block: 1.5rem 2rem;
    overflow-x: auto;
    border: 1px solid var(--jt-border);
    border-radius: var(--jt-radius);
    background: var(--jt-surface);
    box-shadow: var(--jt-shadow-sm);
    -webkit-overflow-scrolling: touch;
}

.entry-content table,
.jt-table-wrap table,
.jt-table-card table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    border-spacing: 0;
    background: var(--jt-surface);
}

.entry-content :where(th, td),
.jt-table-wrap :where(th, td),
.jt-table-card :where(th, td) {
    padding: 0.8rem 0.9rem;
    border: 0;
    border-right: 1px solid var(--jt-border);
    border-bottom: 1px solid var(--jt-border);
    vertical-align: top;
    text-align: left;
    line-height: 1.45;
}

.entry-content :where(th, td):last-child,
.jt-table-wrap :where(th, td):last-child,
.jt-table-card :where(th, td):last-child {
    border-right: 0;
}

.entry-content thead th,
.jt-table-wrap thead th,
.jt-table-card thead th {
    background: var(--jt-brand-dark);
    color: #ffffff;
    font-family: var(--jt-font-heading);
    font-weight: 700;
}

.entry-content tbody tr:nth-child(even) td,
.jt-table-wrap tbody tr:nth-child(even) td,
.jt-table-card tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.entry-content tbody tr:last-child td,
.jt-table-wrap tbody tr:last-child td,
.jt-table-card tbody tr:last-child td {
    border-bottom: 0;
}

.jt-table-hint {
    display: none;
    margin: 0;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--jt-border);
    background: var(--jt-background);
    color: var(--jt-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

/* 8. Inhaltsverzeichnis, Breadcrumbs, Autorenbox und Beitragsnavigation
   -------------------------------------------------------------------------- */

.lwptoc {
    margin-block: 2rem;
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid var(--jt-border);
    border-inline-start: 5px solid var(--jt-brand);
    border-radius: var(--jt-radius);
    background: var(--jt-surface);
    box-shadow: var(--jt-shadow-sm);
}

.lwptoc_title {
    color: var(--jt-heading);
    font-family: var(--jt-font-heading);
    font-size: 1.15rem;
    font-weight: 700;
}

.lwptoc_item a,
.lwptoc_toggle_label {
    color: var(--jt-brand);
}

.lwptoc_item a {
    display: inline-block;
    padding-block: 0.2rem;
    text-decoration: none;
}

.lwptoc_item a:hover,
.lwptoc_toggle_label:hover {
    color: var(--jt-heading);
    text-decoration: underline;
}

.rank-math-breadcrumb,
.rank-math-breadcrumb p,
.breadcrumbs,
.jt-breadcrumbs {
    color: var(--jt-muted);
    font-family: var(--jt-font-body);
    font-size: 0.78rem;
    line-height: 1.5;
}

:where(.rank-math-breadcrumb, .breadcrumbs, .jt-breadcrumbs) a {
    color: var(--jt-brand);
    font-weight: 600;
    text-decoration: none;
}

:where(.rank-math-breadcrumb, .breadcrumbs, .jt-breadcrumbs) a:hover {
    text-decoration: underline;
}

:where(.author-card, .author-box, .jt-author-box) {
    display: flex;
    align-items: flex-start;
    gap: var(--jt-space-4);
    margin-top: var(--jt-space-6);
    padding: clamp(1.1rem, 3vw, 1.75rem);
    border: 1px solid var(--jt-border);
    border-radius: var(--jt-radius);
    background: var(--jt-background);
}

:where(.author-card, .author-box, .jt-author-box) :where(img, .avatar) {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

:where(.author-card, .author-box, .jt-author-box) :where(h2, h3, .author-name) {
    margin-top: 0;
    font-size: 1.25rem;
}

#nav-below,
.post-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--jt-space-3);
    margin-block: var(--jt-space-5);
}

:where(#nav-below, .post-navigation) :where(.nav-previous, .nav-next) a {
    display: flex;
    align-items: center;
    min-height: 100%;
    padding: var(--jt-space-3);
    border: 1px solid var(--jt-border);
    border-radius: var(--jt-radius-sm);
    background: var(--jt-surface);
    color: var(--jt-heading);
    font-weight: 700;
    text-decoration: none;
}

:where(#nav-below, .post-navigation) :where(.nav-previous, .nav-next) a:hover {
    border-color: var(--jt-brand);
    color: var(--jt-brand);
}

.nav-next a {
    justify-content: flex-end;
    text-align: right;
}

/* 9. Footer
   -------------------------------------------------------------------------- */

.site-footer,
.footer-widgets,
.site-info,
.jt-footer {
    background: var(--jt-brand-dark);
    color: #ffffff;
}

.site-footer,
.jt-footer {
    border-top: 4px solid var(--jt-brand);
}

:where(.site-footer, .jt-footer) :where(h2, h3, h4, p, li) {
    color: #ffffff;
}

/* GeneratePress setzt .widget-title spezifischer als die generische
   Überschriftenregel. Der Footer-Titel muss auf Dunkel sicher weiß bleiben. */
.site-footer .widget-title,
.footer-widgets .widget-title,
.jt-footer .widget-title {
    color: #ffffff !important;
}

:where(.site-footer, .jt-footer) a {
    color: #99f6e4;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

:where(.site-footer, .jt-footer) a:hover,
:where(.site-footer, .jt-footer) a:focus-visible {
    color: #ffffff;
}

.site-footer .footer-widgets-container {
    padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.25rem, 3vw, 2rem);
}

.site-footer .inside-footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: clamp(1.75rem, 4vw, 3rem);
    width: 100%;
    margin: 0;
}

.site-footer .inside-footer-widgets > :where(.footer-widget-1, .footer-widget-2, .footer-widget-3) {
    width: auto;
    min-width: 0;
}

.site-footer .inside-footer-widgets .widget {
    margin: 0 0 1.25rem;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.55;
}

.site-footer .inside-footer-widgets .widget:last-child {
    margin-bottom: 0;
}

.site-footer .inside-footer-widgets :where(.widget-title, h2) {
    margin: 0 0 1rem;
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    line-height: 1.2;
}

.site-footer .inside-footer-widgets h4 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    line-height: 1.35;
}

.site-footer .inside-footer-widgets :where(ul, ol) {
    margin: 0;
}

.site-footer .inside-footer-widgets li {
    margin-bottom: 0.65rem;
}

.site-footer .inside-footer-widgets li:last-child {
    margin-bottom: 0;
}

.site-footer .inside-footer-widgets :where(p, .wp-block-paragraph) {
    margin-bottom: 1rem;
}

.site-footer .inside-footer-widgets :where(p, .wp-block-paragraph):last-child {
    margin-bottom: 0;
}

.site-footer .post-date,
.site-footer .wpp-meta {
    display: block;
    margin-top: 0.15rem;
    color: #dbe4e8;
    font-size: 0.75rem;
    line-height: 1.4;
}

.site-footer .site-info {
    border-top: 1px solid rgb(255 255 255 / 0.16);
}

.site-footer .inside-site-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    min-height: 0;
    padding: 0.9rem clamp(1.25rem, 3vw, 2rem);
    font-size: 0.8rem;
    line-height: 1.45;
}

.site-footer .copyright-bar,
.site-footer .footer-bar {
    margin: 0 !important;
}

.site-footer .copyright-bar {
    order: 1;
}

.site-footer .footer-bar {
    order: 2;
}

.site-footer .footer-bar .widget {
    margin: 0;
    padding: 0;
}

.site-footer .footer-bar .menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem 1rem;
    margin: 0;
}

.site-footer .footer-bar .menu li {
    margin: 0;
}

/* 10. Barrierefreiheit
   -------------------------------------------------------------------------- */

:where(a, button, input, select, textarea, summary, [role="button"], [tabindex]):focus-visible {
    outline: 3px solid var(--jt-focus);
    outline-offset: 3px;
    box-shadow: none;
}

:where(.menu-toggle, .submenu-toggle, .search-item a, .gb-menu-toggle) {
    min-width: 44px;
    min-height: 44px;
}

.screen-reader-text,
.jt-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.screen-reader-text:focus,
.jt-visually-hidden:focus {
    position: fixed !important;
    z-index: 100000;
    top: 1rem;
    left: 1rem;
    width: auto !important;
    height: auto !important;
    padding: 0.75rem 1rem !important;
    clip: auto !important;
    overflow: visible !important;
    border-radius: var(--jt-radius-sm);
    background: var(--jt-surface);
    color: var(--jt-heading);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 11. Responsive- und Overflow-Härtung
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    #page,
    .site-content,
    .content-area,
    .site-main,
    .inside-article,
    .entry-content,
    .gb-container,
    .gb-grid-column,
    .gb-element,
    .site-branding,
    .main-navigation,
    .main-navigation li,
    .main-navigation a {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    :where(h1, h2, h3, h4, h5, h6, .entry-title, .gb-headline) {
        max-width: 100%;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    .entry-content :where(p, li, a, .gb-text) {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: normal;
    }

    html,
    body {
        max-width: 100%;
        overflow-x: clip;
    }
}

@media (max-width: 768px) {
    .site-content {
        padding-block: 1rem;
    }

    :where(.single-post, .page:not(.home)) .inside-article,
    .archive .inside-article,
    .search .inside-article,
    .page-header {
        padding: 1.1rem;
    }

    body.jt-core.blog .site-main > article > .inside-article {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "title"
            "media"
            "summary"
            "meta";
        row-gap: var(--jt-space-3);
        padding: 1.1rem;
    }

    body.jt-core.blog .site-main > article .entry-header,
    body.jt-core.blog .site-main > article .entry-summary,
    body.jt-core.blog .site-main > article .entry-content,
    body.jt-core.blog .site-main > article .entry-meta {
        margin: 0;
    }

    body.jt-core.blog .site-main > article .post-image {
        width: 100%;
        height: clamp(180px, 55vw, 260px);
    }

    body.jt-core.single-post .entry-content > :where(
        p,
        ul,
        ol,
        blockquote,
        h2,
        h3,
        h4,
        h5,
        h6,
        pre,
        details,
        .lwptoc,
        .jt-info,
        .jt-warning,
        .jt-success,
        .jt-callout
    ) {
        max-width: 100%;
    }

    .site-footer .inside-footer-widgets {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.75rem;
    }

    .site-footer .inside-site-info {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .site-footer .footer-bar .menu {
        justify-content: center;
    }

    .inside-header,
    .jt-header__inner,
    .header-wrap {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.8rem;
    }

    .header-search,
    .jt-header__search {
        grid-column: 1 / -1;
        width: 100%;
    }

    .site-logo img,
    .site-header .header-image,
    .header-image.is-logo-image {
        max-height: 52px;
    }

    .main-navigation.toggled .main-nav > ul {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .main-navigation.toggled .main-nav a {
        white-space: normal;
    }

    .wp-block-table table,
    .jt-table-wrap table,
    .jt-table-card table {
        min-width: 680px;
    }

    .entry-content > table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .jt-table-hint {
        display: block;
    }

    :where(.author-card, .author-box, .jt-author-box) {
        flex-direction: column;
    }
}

/* --------------------------------------------------------------------------
 * Schlankes Ersatzteil-Anfrageformular
 * ----------------------------------------------------------------------- */

.jt-contact-form {
    width: 100%;
    max-width: 760px;
    margin-block: var(--jt-space-5, 1.5rem);
}

.jt-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.jt-form-field,
.jt-form-consent,
.jt-form-required {
    margin: 0;
}

.jt-form-field--full {
    grid-column: 1 / -1;
}

.jt-form-field label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--jt-heading);
    font-family: var(--jt-font-heading);
    font-size: 0.95rem;
    font-weight: 700;
}

.jt-contact-form input[type="text"],
.jt-contact-form input[type="email"],
.jt-contact-form input[type="number"],
.jt-contact-form textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    padding: 0.72rem 0.85rem;
    border: 1px solid var(--jt-border);
    border-radius: 4px;
    background: var(--jt-surface);
    color: var(--jt-text);
    font: inherit;
}

.jt-contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.jt-form-field--captcha input {
    max-width: 9rem;
}

.jt-contact-form input:focus-visible,
.jt-contact-form textarea:focus-visible,
.jt-contact-form button:focus-visible {
    border-color: var(--jt-focus);
    outline: 3px solid var(--jt-focus);
    outline-offset: 2px;
}

.jt-form-consent {
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr);
    gap: 0.7rem;
    align-items: start;
    color: var(--jt-text);
    font-size: 0.92rem;
    line-height: 1.55;
}

.jt-form-consent input {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0.2rem 0 0;
    accent-color: var(--jt-brand);
}

.jt-form-required {
    margin-top: 0.7rem;
    color: var(--jt-muted);
    font-size: 0.82rem;
}

.jt-form-submit {
    margin-top: 1rem;
    min-height: 46px;
    padding: 0.7rem 1.2rem;
    border: 2px solid var(--jt-brand);
    border-radius: 4px;
    background: var(--jt-brand);
    color: #ffffff;
    font-family: var(--jt-font-heading);
    font-weight: 700;
    cursor: pointer;
}

.jt-form-submit:hover {
    border-color: var(--jt-brand-dark);
    background: var(--jt-brand-dark);
    color: #ffffff;
}

.jt-form-notice {
    max-width: 760px;
    margin-block: 1rem;
    padding: 0.85rem 1rem;
    border-left: 4px solid var(--jt-brand);
    border-radius: 3px;
    background: var(--jt-surface-soft);
    color: var(--jt-heading);
}

.jt-form-notice--error {
    border-left-color: var(--jt-signal);
    background: #fff7ed;
}

.jt-form-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 600px) {
    body,
    .editor-styles-wrapper {
        line-height: 1.65;
    }

    body.jt-core h1,
    body.jt-core.single-post .entry-title,
    body.jt-core.page .entry-title,
    .editor-styles-wrapper h1 {
        font-size: clamp(1.65rem, 8vw, 2.2rem);
        letter-spacing: -0.025em;
    }

    body.jt-core h2,
    .editor-styles-wrapper h2 {
        font-size: 1.5rem;
    }

    body.jt-core h3,
    .editor-styles-wrapper h3 {
        font-size: 1.22rem;
    }

    body.jt-core.blog .entry-title,
    body.jt-core.archive .entry-title,
    body.jt-core.search .entry-title {
        font-size: 1.45rem;
    }

    #nav-below,
    .post-navigation {
        grid-template-columns: 1fr;
    }

    .nav-next a {
        justify-content: flex-start;
        text-align: left;
    }

    :where(.button, .wp-block-button__link, .gb-button, .jt-button) {
        max-width: 100%;
        white-space: normal;
    }

    .jt-form-grid {
        grid-template-columns: 1fr;
    }

    .jt-form-field--full {
        grid-column: auto;
    }
}

@media print {
    .main-navigation,
    .site-footer,
    .site-info,
    .menu-toggle,
    .search-modal-form,
    #nav-below,
    .post-navigation {
        display: none !important;
    }

    .jt-contact-form,
    .jt-form-notice {
        display: none !important;
    }

    body,
    .inside-article {
        background: #ffffff !important;
        color: #000000 !important;
        box-shadow: none !important;
    }

    a {
        color: #000000 !important;
        text-decoration: underline !important;
    }
}
