/*
Theme Name: PRIMAGAS Schulungen 2027
Author: KOCH ESSEN Kommunikation + Design GmbH
Author URI: https://koch-essen.de/
Version: 1.0.0
*/


/* ==========================================================================
   BASE
   @font-face rules are inlined in the <head>, see ke_theme_fonts() in functions/init.php.
   Components are in their own files: _header.css, _footer.css, _buttons.css, _tooltips.css,
   _share-button.css and _back-to-top-button.css (loaded after this file).
   ========================================================================== */

:root {
    --color-blue: #004d8a;
    --color-blue-light: #407aa7; /* --color-blue mixed with 25% white */
    --color-red: #d31925;
    --color-text: #1d1d1d;
    --color-white: #fff;
    --color-lightgray: #f1f3f5;
    --header-height: 17rem;
    --admin-bar-height: 0px;
}

/* WP admin bar (logged-in users): 32px, 46px on narrow screens. */
:root:has(body.admin-bar) {
    --admin-bar-height: 32px;
}

@media (max-width: 782px) {

    :root:has(body.admin-bar) {
        --admin-bar-height: 46px;
    }
}

/* below 600px, WP's admin bar scrolls away instead of sticking to the top. */
@media (max-width: 600px) {

    :root:has(body.admin-bar) {
        --admin-bar-height: 0px;
    }
}

html {
    font-size: 62.5%;
    scroll-padding-top: calc(var(--header-height) + var(--admin-bar-height) + .8rem);
}

/* anchor links and the back to top button */
@media (prefers-reduced-motion: no-preference) {

    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    font-family: "PT Sans", sans-serif;
    font-size: 1.7rem;
    line-height: 1.2;
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.is-hidden {
    display: none !important;
}


/* ==========================================================================
   BACKGROUND COLORS
   Pagebuilder select "hintergrundfarbe" (see ke_get_bg_class() in helpers.php).
   ========================================================================== */

.bg-weiss {
    background-color: var(--color-white);
}

.bg-hellgrau {
    background-color: var(--color-lightgray);
}


/* ==========================================================================
   CONTENT WIDTH
   830px box, centered on desktop. Same side margins as .content.
   ========================================================================== */

.content-width {
    max-width: 830px;
    margin-right: 1.5rem;
    margin-left: 1.5rem;
}

@media (min-width: 640px) {

    .content-width {
        margin-right: 3rem;
        margin-left: 3rem;
    }
}

@media (min-width: 890px) {

    .content-width {
        margin-right: auto;
        margin-left: auto;
    }
}


/* ==========================================================================
   MAIN CONTENT
   830px container, centered on desktop. Styles the_content() output
   (headings, text, lists, tables, videos). Buttons are in _buttons.css.
   ========================================================================== */

.content {
    contain: content;
    max-width: 830px;
    margin: 4rem 1.5rem 0;
}

@media (min-width: 640px) {

    .content {
        margin-right: 3rem;
        margin-left: 3rem;
    }
}

@media (min-width: 890px) {

    .content {
        margin-right: auto;
        margin-left: auto;
    }
}

.content h1,
.content h2,
.content h3,
.content h4,
.content h5 {
    margin-top: 0;
    color: var(--color-blue);
}

.content h1 {
    font-size: 2em;
}

.content h2 {
    font-size: 2.6rem;
}

.content p {
    margin: 0;
    font-size: 1.7rem;
    line-height: 2.7rem;
}

.content p + p {
    margin-top: .5em;
}

.content figure {
    margin: 0 0 1em;
}

/* images: no floating (as on the live site), overrides the core image block css */
.content .wp-block-image figure {
    display: block;
    float: none;
    margin: 0 0 1em;
}

.content .wp-block-image img {
    vertical-align: baseline;
}

/* icon centered above the following .float-list on mobile, left of it on desktop */
.content .wp-block-image figure.alignleft {
    margin: 0 0 1em;
    text-align: center;
}

.content ul.float-list {
    margin-top: 0;
}

@media (min-width: 640px) {

    .content .wp-block-image figure.alignleft {
        float: left;
        margin: 0 2rem 1em 0;
    }

    .content ul.float-list {
        padding-left: 14rem;
    }
}

.content .wp-block-spacer {
    clear: both;
}

.content iframe[src^="https://www.youtube.com/embed/"],
.content iframe[src^="https://www.youtube-nocookie.com/embed/"] {
    width: 100%;
}

@media (min-width: 890px) {

    .content iframe[src^="https://www.youtube.com/embed/"],
    .content iframe[src^="https://www.youtube-nocookie.com/embed/"] {
        min-height: 480px;
    }
}

/* tables: wp loads the core table block css (stripes etc.) on demand, we only adjust size + padding. */
.content figure.wp-block-table.is-style-stripes {
    width: 100%;
}

.content figure.wp-block-table.is-style-stripes td {
    padding: 10px;
}
