/*
Theme Name: Kaspari Media Quadrat
Description: Broschürenlayout mit quadratischen Projektbildern und lokal eingebundener Encode Sans.
Template: kasparimedia-pruefung
Version: 1.0.41
Requires at least: 6.5
Requires PHP: 8.1
Author: Kaspari Media
Text Domain: kasparimedia-quadrat
*/

@font-face {
    font-family: "Encode Sans";
    src: url("assets/fonts/encode-sans.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 700;
    font-display: swap;
}

/* Nummerierte Bildkarten auf Unterseiten, entsprechend den Lichtwerbungskarten. */
body.wp-theme-kasparimedia-pruefung:not(.home) :is(main,#main) .wt-service-tile {
    align-self: stretch;
    aspect-ratio: auto !important;
    border: 1px solid #dfe8ef;
    background: white;
    color: #173857;
}
body.wp-theme-kasparimedia-pruefung:not(.home) :is(main,#main) .wt-service-tile::after,
body.wp-theme-kasparimedia-pruefung:not(.home) :is(main,#main) .wt-service-tile::before {
    content: none;
}
body.wp-theme-kasparimedia-pruefung:not(.home) :is(main,#main) .wt-service-tile > img {
    display: block;
    position: static;
    filter: none;
}
body.wp-theme-kasparimedia-pruefung:not(.home) :is(main,#main) .wt-tile-content {
    position: relative;
    inset: auto;
    display: grid;
    align-content: start;
    gap: var(--km-copy-space);
    padding: var(--km-card-padding);
    background: white;
    text-shadow: none;
}
body.wp-theme-kasparimedia-pruefung:not(.home) :is(main,#main) .wt-tile-content > strong {
    margin: 0;
    color: #173857;
    font-weight: 700;
    letter-spacing: -.025em;
}
body.wp-theme-kasparimedia-pruefung:not(.home) :is(main,#main) .wt-tile-content > small {
    margin: 0;
    padding: 0;
    max-width: none;
    color: #63778b;
    opacity: 1;
    font-weight: 400;
}
body.wp-theme-kasparimedia-pruefung:not(.home) :is(main,#main) .wt-tile-content > b {
    display: none;
}
body.wp-theme-kasparimedia-pruefung:not(.home) :is(main,#main) .wt-service-tile:is(:hover,:focus-visible) strong {
    text-decoration: underline;
}
body.wp-theme-kasparimedia-pruefung:not(.home) :is(main,#main) .wt-tile-content > .km-card-label {
    margin: 0;
    color: var(--km-accent, #008dd2);
    font-size: var(--km-label);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 1px;
}
/* Laufende Bildnummern und redaktionelle Texte im Foto ausblenden. */
body.wp-theme-kasparimedia-pruefung :is(main,#main) :is(
    .wd-card-img > span, .lw-card-photo > span, .fv-card-photo > span, .sw-card-photo > span,
    .wt-tile-content > span:not(.km-card-label), .wd-material-photo > small,
    .lw-image-tag, .fv-image-tag, .sw-image-tag, .wt-photo-caption, .wt-machine-photo > span,
    .co-about-note, .co-brochure-preview > span, .lw-photo-highlight, .fv-photo-highlight,
    .lw-hero-label, .fv-hero-label, .co-hero-photo > figcaption, .mp-hero-image > figcaption,
    .service-grid .tile-meta small
) {
    display: none !important;
}

/* Die Vergrößerung bleibt per Tastatur und mit vorgelesenem Namen bedienbar. */
body.wp-theme-kasparimedia-pruefung main .krd-open .krd-zoom {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Die Menüstriche verwenden ihre feste Abteilungsfarbe auf jeder Seite. */
.header .service-link[href*="/leistungen/druckartikel/"] { --km-abteilungsfarbe: #eb5f0c; }
.header .service-link[href*="/leistungen/einzelbuchstaben/"] { --km-abteilungsfarbe: #008dd2; }

/* Häkchen in den Vorteilslisten der Leistungsheader. */
body.wp-theme-kasparimedia-pruefung :is(main,#main) [data-km-panorama] :is(.lw-checks,.fv-checks,.wt-hero-highlights) > span::before {
    content: "✓";
    width: auto;
    height: auto;
    background: none !important;
    color: var(--km-abteilungsfarbe, #008dd2);
    font-weight: 700;
}
body[class*="km-ci-"] [data-km-panorama] .wd-claim {
    color: var(--km-abteilungsfarbe);
}

/* Referenzen auf Leistungsseiten folgen dem Raster der Abteilungen. */
@media (max-width: 870px) {
    body.wp-theme-kasparimedia-pruefung #main .project-grid.wd-reference-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 620px) {
    body.wp-theme-kasparimedia-pruefung #main .project-grid.wd-reference-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

body.wp-theme-kasparimedia-pruefung :is(main, #main) :is(.wd-hero, .lw-hero, .fv-hero, .wt-hero) h1 {
    font-size: calc(var(--km-h1) * 0.85) !important;
}

/* Auch Maschinenkarten ohne Link reagieren auf den Mauszeiger. */
body.wp-theme-kasparimedia-pruefung main.wt-page .wt-machine-card:not([href]) {
    pointer-events: auto;
}
