/*
 * Schulung pages (single-schulung.php). Loaded only on is_singular( 'schulung' ).
 * Each schulung is built with WPBakery; this file holds the shared base (bands, headings, form).
 * The styles of each element live in the CSS file next to its shortcode (folders named schulung-...).
 * Class prefix: .sch-
 */

:root {
    --sch-navy: #29304c;
    --sch-red: #b43534;
    --sch-grey: #f5f5f5;
    --sch-text: #6c6c71;
    --sch-white-70: rgba(255, 255, 255, 0.7);
    --sch-width: 1240px; /* 1200px content + 20px padding on each side */
}

html {
    scroll-behavior: smooth;
}

.sch-page {
    font-family: 'Lato', sans-serif;
}

/* The theme styles every h3 as an uppercase label with a dot; the Schulung elements set their own */
.sch-page h3 {
    padding-left: 0;
    margin-bottom: 0;
    letter-spacing: normal;
    text-transform: none;
}

.sch-page h3::before {
    content: none;
}

.sch-fallback {
    padding-top: 60px;
    padding-bottom: 60px;
}

/* WPBakery rows of the layout: no default row margin */
.wpb_row.sch-row {
    margin-bottom: 0;
}

/* Bands: WPBakery rows with el_class "sch-band sch-band--dark|light" */
.sch-band {
    padding: 100px 0;
}

.sch-band--dark {
    background: var(--sch-navy);
    color: #fff;
}

.sch-band--light {
    background: #fff;
    color: var(--sch-navy);
}

/* Blocks: the content of an element, 1200px wide */
.sch-block {
    box-sizing: border-box;
    max-width: var(--sch-width);
    margin: 0 auto;
    padding: 0 20px;
}

.sch-block + .sch-block {
    margin-top: 80px;
}

.sch-zusatz + .sch-cta {
    margin-top: 50px;
}

.sch-vorteile + .sch-cta {
    margin-top: 50px;
}

/* Spacing between the elements of a band (no Empty space needed; an element without content, e.g. Termine
   without upcoming dates, then leaves no gap) */
.sch-band .sch-termine,
.sch-band .sch-zusatz {
    margin-top: 80px;
}

.sch-band .budi_button {
    margin-top: 50px;
}

/* budi_button as in Figma: red button, darker red on hover (same as the form button) */
.sch-page .budi_button .btn {
    border: 2px solid var(--sch-red);
    background: var(--sch-red);
    color: #fff;
}

.sch-page .budi_button .btn:hover,
.sch-page .budi_button .btn:focus {
    border-color: #8f2928;
    background: #8f2928;
    color: #fff;
}

/* budi_button: info text under the button (e.g. "AZAV-zertifizierte Bildungsmaßnahme.") */
.sch-band .budi_button p {
    margin: 20px 0 0;
    color: var(--sch-text);
    font-size: 18px;
    line-height: 26px;
}

/* budi_button centered (alignment "Mittig"): the info text is wider than the button, center both */
.sch-band .budi_button[style*="center"] > div {
    text-align: center;
}

.sch-band--dark .budi_button p {
    color: var(--sch-white-70);
}

#kursdaten,
#termine,
#anmelden {
    scroll-margin-top: 110px;
}

.sch-heading {
    margin: 0 0 50px;
    font-family: 'Lato', sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: normal;
    text-transform: uppercase;
}

.sch-band--dark .sch-heading {
    color: #fff;
}

.sch-band--light .sch-heading {
    color: var(--sch-navy);
}

/* Section headings in the bands: element "Überschrift" (budi_headline), the same widget as on the other pages.
   Size as in the Figma design of the Schulung pages; the spacing below comes from an "Empty space" element.
   The FAQ row (faq-block) keeps the theme style, exactly as on the Startseite. */
.sch-band .simplistic-headline {
    margin-bottom: 0;
    font-family: 'Lato', sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: normal;
    text-transform: uppercase;
}

.sch-band--dark .simplistic-headline {
    color: #fff;
}

.sch-page .sch-subheading {
    padding-left: 0;
    margin: 0 0 35px;
    font-family: 'Lato', sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 24px;
    text-transform: uppercase;
    color: var(--sch-red);
}

.sch-btn {
    display: inline-block;
    box-sizing: border-box;
    padding: 16px 30px;
    border: 0;
    background: var(--sch-red);
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: normal;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sch-btn:hover,
.sch-btn:focus {
    background: #8f2928;
    color: #fff;
}

.sch-btn--light {
    background: #fff;
    color: var(--sch-red);
}

.sch-btn--light:hover,
.sch-btn--light:focus {
    background: var(--sch-red);
    color: #fff;
}

/* Visually hidden text for screen readers (field labels of the form) */
.sch-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Contact Form 7 form, used in the hero and in the Anmelden section */
.sch-form .sch-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.sch-form .sch-form__col,
.sch-form .sch-form__col > p {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sch-form .wpcf7-form-control-wrap,
.sch-form label {
    display: block;
}

/* the theme adds an 8px bottom margin to every label, which widened the 20px field gap */
.sch-form label {
    margin: 0;
}

.sch-form input[type="text"],
.sch-form input[type="email"],
.sch-form input[type="tel"],
.sch-form select,
.sch-form textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    line-height: normal;
    box-shadow: none;
}

.sch-form textarea {
    height: 110px;
    resize: none;
}

/* the theme sets padding 10px 15px and a 25px top margin on .wpcf7-textarea with the same weight as the rule above;
   its max-height: 100px !important cannot be overridden without !important, so the field stays 100px high */
.sch-form .wpcf7-form-control.wpcf7-textarea {
    height: 110px;
    margin: 0;
    padding: 12px 15px;
}

.sch-form select,
.sch-form .wpcf7-form-control-wrap select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 55px;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='9' viewBox='0 0 15 9' fill='none'%3E%3Cpath d='M7.36377 7.36377H6.36377V7.36387H7.36377H8.36377V7.36377H7.36377ZM6.65666 8.07098C7.04719 8.4615 7.68035 8.4615 8.07088 8.07098L14.4348 1.70702C14.8254 1.31649 14.8254 0.683326 14.4348 0.292802C14.0443 -0.0977225 13.4111 -0.0977225 13.0206 0.292802L7.36377 5.94966L1.70692 0.292802C1.31639 -0.0977225 0.683226 -0.0977225 0.292702 0.292802C-0.0978227 0.683326 -0.0978227 1.31649 0.292702 1.70702L6.65666 8.07098Z' fill='white'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 25px center;
    background-size: 15px 9px;
}

.sch-form select {
    color: rgba(255, 255, 255, 0.6);
}

/* the theme adds a 25px top margin to every CF7 select */
.sch-form .wpcf7-form-control-wrap .wpcf7-select {
    margin: 0;
}

.sch-form select option {
    color: var(--sch-navy);
}

.sch-form input::placeholder,
.sch-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.sch-form input:focus,
.sch-form select:focus,
.sch-form textarea:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.sch-form br {
    display: none;
}

.sch-form p {
    margin: 0;
}

.sch-form .sch-form__text {
    margin: 25px 0;
}

.sch-form .wpcf7-acceptance .wpcf7-list-item {
    margin: 0;
}

.sch-form .wpcf7-acceptance label {
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    cursor: pointer;
}

.sch-form .wpcf7-acceptance input[type="checkbox"] {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    margin: 0;
}

.sch-form .wpcf7-acceptance a {
    color: var(--sch-red);
}

/* The theme styles every button with !important rules (16px, 2px border) and with a higher specificity */
div.wpcf7 .sch-form .wpcf7-submit {
    box-sizing: border-box;
    margin-top: 30px;
    padding: 16px 30px;
    border: 0 !important;
    border-radius: 0;
    background: var(--sch-red);
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-size: 18px !important;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
}

div.wpcf7 .sch-form .wpcf7-submit:hover,
div.wpcf7 .sch-form .wpcf7-submit:focus {
    border: 0 !important;
    background: #8f2928;
    color: #fff;
}

/* CF7 disables the button until the consent checkbox is ticked */
div.wpcf7 .sch-form .wpcf7-submit:disabled {
    background: var(--sch-red);
    color: #fff;
    opacity: 0.7;
    cursor: not-allowed;
}

.sch-form .wpcf7-not-valid-tip {
    margin-top: 4px;
    font-size: 14px;
    color: #ff8a86;
}

.sch-form .wpcf7-response-output {
    margin: 20px 0 0;
    padding: 12px 15px;
    border-color: rgba(255, 255, 255, 0.8);
    color: #fff;
    font-size: 15px;
}

.sch-form-hint {
    color: #fff;
}

@media (max-width: 1199px) {
    .sch-band {
        padding: 70px 0;
    }

    .sch-heading,
    .sch-band .simplistic-headline {
        font-size: 30px;
    }
}

@media (max-width: 767px) {
    .sch-band {
        padding: 50px 0;
    }

    .sch-block {
        padding: 0 20px;
    }

    .sch-block + .sch-block {
        margin-top: 50px;
    }

    .sch-heading {
        margin-bottom: 30px;
        font-size: 28px;
    }

    .sch-band .simplistic-headline {
        font-size: 28px;
    }

    .sch-subheading {
        margin-bottom: 25px;
        font-size: 22px;
    }

    .sch-form .sch-form__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sch-form textarea,
    .sch-form .wpcf7-form-control.wpcf7-textarea {
        height: 90px;
    }
}
