/*
Theme Name:   Salient Child (Areng)
Description:  Areng.ee child theme for Salient. ALL site CSS lives in this one file.
Template:     salient
Version:      1.0.0
Text Domain:  salient-child
*/

/* ==========================================================================
   WHERE TO CHANGE WHAT
   A. SITE CSS ....... moved unchanged from Salient -> Theme Options -> Custom CSS (2026-12-01)
                       1. global  2-5. Gravity Forms  6. Popup Maker  7. responsive
                       then: footer, buttons, mobile menu, FormCraft, page header, training pages
   B. FIXES .......... 2026-12-01 and later (dated, newest last)
                       (Gravity Forms sections 2-5 were rewritten for the Orbital style 2026-12-01)

   Load order: functions.php prints this file right after Salient's dynamic CSS - the same spot
   where the Custom CSS box was printed - so rules win/lose exactly like before the move.
   Salient's Custom CSS box is now empty; put new rules here, not there.
   ========================================================================== */


/* ==========================================================================
   A. SITE CSS (moved unchanged from Salient Custom CSS box, 2026-12-01)
   ========================================================================== */

/* =========================================
   1. GLOBAL & SELECTION STYLES
   ========================================= */
.cta-text p::selection, 
.koolituse-nimi h1::selection {
  background-color: var(--nectar-extra-color-2); 
}

/* =========================================
   2. GRAVITY FORMS - CONTAINER & TYPOGRAPHY
   Rewritten 2026-12-01 for the "Orbital" form style (Gravity Forms 2.9+/3.x): the old rules
   started with .gform_wrapper.gravity-theme (legacy style) or used <li> markup, so many of
   them no longer matched. Same design as before; small UX fixes are marked "UX".
   ========================================= */

/* 2.0 Orbital colours -> site colours.
   Gravity Forms prints the form colours as #gform_wrapper_1[data-form-index="0"].gform-theme
   {--gf-color-primary: #204ce5 ...}. The :is(..., #areng-gf) trick gives this rule ID strength
   for every form (no element has id areng-gf), so it wins without listing form IDs.
   UX: focus rings, selected choices etc. are now site green instead of Gravity Forms blue. */
body .gform-theme.gform-theme--orbital:is([id^="gform_wrapper_"], #areng-gf) {
    --gf-color-primary: var(--nectar-accent-color);
    --gf-color-primary-rgb: 120, 205, 110;
    --gf-color-primary-darker: #5fb455;
    --gf-color-primary-lighter: #9bdb93;
    --gf-color-primary-contrast: #fff;
    --gf-color-primary-contrast-rgb: 255, 255, 255;
    --gf-ctrl-radius: 5px; /* input corners (was the dead "Border Radius override" rule) */
    --gf-ctrl-label-font-size-primary: 16px; /* field labels/questions (was 14px), 2026-12-01 */
}

form#gform_1 {
    background-color: white;
    padding: 15px;
}

/* Section Titles */
h3.gsection_title {
    font-weight: 500;
    color: var(--nectar-accent-color);
    text-align: center;
    line-height: 1.3;
    font-size: clamp(1.6rem, -0.875rem + 6.333vw, 2.5rem) !important;
}

/* Section Description (training date + place under the title) */
body .gform-theme--orbital .gsection .gsection_description,
div#gfield_description_1_1 {
    width: 100%;
    margin-top: 4px;
    margin-bottom: 2px;
    padding: 0 60px;
    text-align: center;
    color: #444;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Section Divider (was #0072bc = turundustreff blue; site green here) */
body .gform-theme--orbital .gfield.gsection {
    border-bottom: 2px solid var(--nectar-accent-color);
    border-block-end: 2px solid var(--nectar-accent-color);
    padding: 4px 0 8px 0;
}

/* Labels & Descriptions */
body .gform_wrapper .top_label .gfield_label {
    margin-top: 1rem;
    margin-bottom: 4px; /* was 1px; a little air under the 16px labels (2026-12-01) */
    color: #444 !important;
    font-weight: 500 !important;
    font-family: 'Roboto', sans-serif !important;
}

/* Spacing for choice questions (2026-12-01).
   Radio/checkbox questions are a <legend> inside a <fieldset>; browsers ignore the legend's
   margin-top, so they sat only 4px under the field above (text fields get 20px). The 16px is
   moved onto the fieldset, and the pills get 8px air under the question. */
body .gform-theme--orbital fieldset.gfield {
    margin-top: 16px;
}
body .gform_wrapper .top_label fieldset.gfield > .gfield_label {
    margin-top: 0;
}
body .gform-theme--orbital .gfield--type-radio .ginput_container_radio,
body .gform-theme--orbital .gfield--type-checkbox .ginput_container_checkbox {
    margin-top: 8px;
}

/* Description sits right under its label (2026-12-01): no label gap when a description follows */
body .gform_wrapper .top_label .gfield--has-description.field_description_above > .gfield_label {
    margin-bottom: 0;
}

body .gform-theme--orbital .field_description_above .gfield_description:not(.gsection_description):not(.validation_message) {
    margin-top: -2px;
    margin-bottom: 6px;
    padding-bottom: 2px;
    color: #666;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.4;
}

body .gform-theme--orbital .gfield_required,
body .gform-theme--orbital .gfield_required .gfield_required_asterisk {
    color: var(--nectar-extra-color-2);
    font-size: 14px; /* was 13px; sized to the 16px labels (2026-12-01) */
}

/* Error message under a field: 14px (was ~12px, small next to the 16px labels) - 2026-12-01 */
body .gform-theme--orbital .gfield_validation_message,
body .gform-theme--orbital .validation_message {
    font-size: 14px;
}

/* =========================================
   3. STANDARD INPUTS (Text, Date, Email, etc.)
   ========================================= */
/* General Input Styling */
.gform_wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]),
.gform_wrapper textarea {
    width: 100%;
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid var(--nectar-accent-color);
    color: #444;
    font-family: 'Roboto', sans-serif !important;
    font-size: 16px; /* was 14px; matches the 16px labels, and under 16px iPhones zoom the page when a field is tapped */
    line-height: 24px;
    transition: all .2s ease;
}

/* UX: the field you are typing in turns white, so it stands out from the grey ones */
.gform_wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus,
.gform_wrapper textarea:focus {
    background-color: #fff;
}

/* UX: a field with an error gets a red border (it stayed green, so the error was easy to miss) */
.gform_wrapper .gfield_error input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]),
.gform_wrapper .gfield_error textarea {
    border-color: var(--gf-color-danger, #c02b0a);
}

/* Specific Textarea overrides */
textarea#input_1_23 {
    min-width: 300px !important;
    min-height: 60px !important;
    max-height: 360px;
}

/* Hide Specific Instruction */
div#gfield_instruction_1_34 {
    display: none;
}

/* =========================================
   4. CUSTOM CHECKBOXES & RADIOS ("pills")
   All radio choices are pills (the old ".gfield_radio li" rules meant that); checkboxes only
   in fields with the CSS class "checkboxexample".
   ========================================= */

/* --- 4.1 Hide the default inputs ---
   UX: hidden visually but still reachable with the Tab key (was display:none, so keyboard
   users could not choose at all). */
body .gform-theme--orbital .gfield_radio .gchoice,
body .gform-theme--orbital .checkboxexample .gfield_checkbox .gchoice {
    position: relative;
}
body .gform-theme--orbital .gfield_radio .gchoice input.gfield-choice-input,
body .gform-theme--orbital .checkboxexample .gfield_checkbox .gchoice input.gfield-choice-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    clip-path: inset(50%);
    pointer-events: none;
}

/* --- 4.2 Pill labels --- */
body .gform-theme--orbital .gfield_radio .gchoice label.gform-field-label,
body .gform-theme--orbital .checkboxexample .gfield_checkbox .gchoice label.gform-field-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin: 0;
    padding: 8px 30px;
    background: #fff;
    border: 2px var(--nectar-accent-color) solid;
    border-radius: 50px;
    color: #2f7d37; /* UX: darker green - the light accent green on white was hard to read */
    font-size: 14px !important;
    font-weight: 500;
    line-height: 1.4;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}

/* Pill Hover States */
body .gform-theme--orbital .gfield_radio .gchoice label.gform-field-label:hover,
body .gform-theme--orbital .checkboxexample .gfield_checkbox .gchoice label.gform-field-label:hover {
    border-color: var(--nectar-extra-color-1);
    color: var(--nectar-extra-color-1);
}

body .gform-theme--orbital .gfield_radio .gchoice label.gform-field-label:active,
body .gform-theme--orbital .checkboxexample .gfield_checkbox .gchoice label.gform-field-label:active {
    border-color: #333;
    color: #333;
}

/* Pill Checked State (Checkbox - accent background) */
body .gform-theme--orbital .checkboxexample .gfield_checkbox .gfield-choice-input:checked + label.gform-field-label {
    background: var(--nectar-accent-color);
    border-color: var(--nectar-accent-color);
    color: #fff;
}

/* Pill Checked State (Radio - orange background) */
body .gform-theme--orbital .gfield_radio .gfield-choice-input:checked + label.gform-field-label {
    background: var(--nectar-extra-color-1);
    border-color: var(--nectar-extra-color-1);
    color: #fff;
}

/* UX: keyboard focus ring on the pill */
body .gform-theme--orbital .gfield_radio .gfield-choice-input:focus-visible + label.gform-field-label,
body .gform-theme--orbital .checkboxexample .gfield_checkbox .gfield-choice-input:focus-visible + label.gform-field-label {
    outline: 2px solid var(--nectar-extra-color-1);
    outline-offset: 3px;
}

/* Pill rows: wrap with even gaps (fields with their own grid below keep it) */
body .gform-theme--orbital .gfield--type-radio .gfield_radio {
    display: flex;
    flex-direction: row; /* Orbital stacks choices in a column */
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px 12px;
}

/* --- 4.3 Circle inside the radio pills (was only on "Osalen kellena?"; now on all) --- */
body .gform-theme--orbital .gfield_radio .gfield-choice-input + label.gform-field-label::before {
    content: "";
    display: inline-block;
    flex: none;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    margin-left: -14px;
    border: 1px solid var(--nectar-accent-color);
    border-radius: 50%;
    background: none;
    transition: all .3s;
}

/* Checked: green dot with a white ring (readable on the orange pill) */
body .gform-theme--orbital .gfield_radio .gfield-choice-input:checked + label.gform-field-label::before {
    background: var(--nectar-accent-color);
    border: 2px solid #fff;
}

/* --- 4.4 Specific Grid Layouts for Radios/Checkboxes --- */
/* Specific Choice Widths (Form 4) */
.gchoice.gchoice_4_6_1, .gchoice.gchoice_4_6_2, .gchoice.gchoice_4_6_3 {
    width: 200px;
}
.gchoice.gchoice_4_7_1, .gchoice.gchoice_4_7_2, .gchoice.gchoice_4_7_3 {
    justify-content: start !important;
}

/* Grid: Soov Osaleda */
.soov-osaleda .gfield_checkbox {
    display: grid;
    grid-gap: 0.5em 0.1em;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    }

    div#input_3_21 {
    display: grid;
    grid-gap: 0.5em 0.1em;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

/* Container spacing for checkboxes */
.ginput_container.ginput_container_checkbox {
    align-content: center;
    padding: 6px 0 15px 0;
}

/* =========================================
   5. GRAVITY FORMS - SUBMIT BUTTON
   ========================================= */
.gform-theme--foundation .gform_footer, .gform-theme--foundation .gform_page_footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 16px;
    margin-block-start: auto;
}

/* "Saada": orange pill, white uppercase text (fixed 2026-12-01).
   Gravity Forms now prints the submit as <button> (was <input type=submit>) and Orbital styles
   buttons through --gf-local-* variables with a 4-class selector, so this needs the same
   classes + body to win. */
body .gform-theme.gform-theme--framework.gform_wrapper .gform_footer .gform_button,
body .gform-theme.gform-theme--framework.gform_wrapper .gform_page_footer .gform_button {
    --gf-local-bg-color: var(--nectar-extra-color-1);
    --gf-local-border-color: var(--nectar-extra-color-1);
    --gf-local-color: #fff;
    --gf-local-radius: 200px;
    --gf-local-shadow: none;
    --gf-local-height: auto;
    --gf-local-padding-x: 50px;
    --gf-local-padding-y: 14px;
    --gf-local-font-size: 16px;
    --gf-local-font-weight: 600;
    min-width: 200px;
    padding: 14px 50px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: opacity .2s ease;
}
body .gform-theme.gform-theme--framework.gform_wrapper .gform_footer .gform_button:hover,
body .gform-theme.gform-theme--framework.gform_wrapper .gform_page_footer .gform_button:hover {
    opacity: .85;
}
body .gform-theme.gform-theme--framework.gform_wrapper .gform_footer .gform_button:focus-visible,
body .gform-theme.gform-theme--framework.gform_wrapper .gform_page_footer .gform_button:focus-visible {
    --gf-local-outline-color: var(--nectar-extra-color-1);
    outline: 2px solid var(--nectar-extra-color-1);
    outline-offset: 3px;
}

/* =========================================
   6. POPUP MAKER (PUM)
   ========================================= */
.pum-theme-15159 .pum-content + .pum-close, 
.pum-theme-default-theme .pum-content + .pum-close {
    top: 3px;
    right: 3px;
    padding: 6px;
    background-color: var(--nectar-extra-color-1);
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    line-height: 26px;
    letter-spacing: 0.4px;
}

#pum-15159, #pum-12321 {
    position: fixed !important;
    top: 0; bottom: 0; left: 0; right: 0;
    z-index: 9999997;
    background: rgba(50, 50, 50, .3);
    transition: opacity .2s linear;
}

.pum-theme-15159 .pum-container, 
.pum-theme-default-theme .pum-container {
    padding: 0;
    border-radius: 0;
    background-color: rgba(249, 249, 249, 1.00);
    box-shadow: 1px 1px 3px 0px rgb(2 2 2 / 23%);
}

/* =========================================
   7. RESPONSIVE MEDIA QUERIES
   ========================================= */

/* --- DESKTOP / TABLET (Min-width: 768px) --- */
@media (min-width: 768px) {
    
    /* 3-Column Grids */
    div#input_4_6 { 
        display: inline-grid;
        grid-template-columns: repeat(3, 1fr);
        padding-top: 0.4rem;
    }

    /* 4-Column Grid (New addition) */
    div#input_1_13 {
        display: inline-grid;
        grid-template-columns: repeat(3, 1fr);
        padding-top: 0.4rem;
    }

    /* Flex layouts */
    div#input_1_48,
    div#input_1_15 {
        justify-content: flex-start;
        padding-top: 0.4rem;
        display: inline-grid;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 640px) {
    .gform-theme--foundation .gform_fields {
        row-gap: 4px!important;
    }
}
/* UX (2026-12-01): on phones the fields had ~60px gaps (Orbital default) - tighter, still easy to tap */
@media (max-width: 639px) {
    .gform-theme--foundation .gform_fields {
        row-gap: 12px!important;
    }
}

/* --- MOBILE (Max-width: 768px) --- */
@media (max-width: 768px) {
    
    /* Popup Full Screen */
    #popmake-15159, 
    #popmake-12321 {
        width: 100% !important;
        padding: 5px;
        top: 0; left: 0; right: 0; bottom: 0;
        overflow: initial;
    }

    /* Description Spacing */
    div#gfield_description_1_23, 
    div#gfield_description_1_15 {
        padding-top: 2%;
        padding-bottom: 2%;
        font-size: 13px;
        line-height: 1.2;
    }

    /* Grids to Single Column / Stack */
    div#input_1_48 {
        display: grid;
        grid-template-columns: repeat(1, 1fr) !important;
        width: 95% !important;
    }

    div#input_1_13 {
        display: inline-grid;
        grid-template-columns: repeat(4, 1fr); /* Fallback to small grid or stacked depending on content needs */
        width: 97% !important;
    }

    div#input_1_15 {
        display: grid;
        grid-gap: 0.3em 0.1em;
    }
}

li {
    color: #313131;
}

#footer-outer #copyright p {
    line-height: 22px;
    margin-top: 3px;
    color: #ECECEC;
    font-family: 'Roboto';
    letter-spacing: 0.2px;
}

.container-wrap {
    padding-bottom: 0px !important;
}


.nectar-button {
    min-width: 200px;
    text-align: center;
}

#mobile-menu ul li a {
    border-bottom: 1px dotted rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    display: block;
    position: relative;
    padding: 13px 0 !important;
}

/*FORMCRAFTI TEEMA*/
/*formcarfty notification peita*/
html body .fc_modal-dialog .powered-by {
    display: none!important;
}

html .formcraft-css [class*=icon], html .formcraft-css [class^=icon] {
 /*background-color: transparent!important; */
 color: inherit!important;
 }
 
/*e-maili ikoon peita kuna see oli väljaspool kasti*/ 
 [class^="icon-mail"], i[class*=" icon-mail"] {
    display: none;
}
/*error notice disain*/
html .formcraft-css .fc-form .form-element .error {
    top: -4px;
    font-size: .75em;
    line-height: 0.8em;
    background: #fff;
    right: 6px;
}
/* Tärni paremale natuke **** */
html .formcraft-css .fc-form .form-element.is-required-true .field-cover .main-label>span::after {
    content: '*';
    position: absolute;
    color: rgba(255, 0, 0, 0.75);
    top: -3px;
    right: -12px;
}
/*FORMCRAFTI TEEMA OUT*/

#slide-out-widget-area.slide-out-from-right .inner .off-canvas-menu-container li a {
    opacity: 0.98!important;
}


/*2021*/
/*page header*/
body #page-header-bg .span_6 h1 {
    font-size: clamp(1.8rem, -0.875rem + 8.333vw, 3.2rem)!important;
    line-height: clamp(2rem, -0.875rem + 8.333vw, 3.5rem)!important;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-weight: 500;
    font-family: Roboto;
}


body #page-header-bg .span_6 span.subheader strong, body #page-header-bg .span_6 span.subheader {
    font-family: Quicksand;
    letter-spacing: -0.5px;
    font-size: clamp(1rem, -0.875rem + 5.333vw, 1.5rem);
    line-height: 1.4;
    font-weight: 400!important;
}

body .vc_column_container>.vc_column-inner h1 {
    font-size: 2em;
    font-family: 'Roboto';
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}
/*footer2021*/
body h2.light {
    font-size: clamp(1.5rem, -0.875rem + 5.333vw, 2.5rem)!important;
    line-height: clamp(2rem, -0.875rem + 5.333vw, 3rem)!important;
    font-weight: 700;
    font-family: Roboto;
    margin-top: -2px;
    padding: 0rem 2rem 0rem 2rem;
}
body h2.light strong {
    letter-spacing: 0px!important;
}

@media only screen and (max-width: 990px){
    body h2.light {
    margin-top: -1.2em;
}
}
@media only screen and (max-width: 690px){
body h2.light {
    font-size: clamp(1.5rem, -0.875rem + 5.333vw, 2.5rem)!important;
    line-height: clamp(2rem, -0.875rem + 5.333vw, 3rem)!important;
}
}

 
/*footer2021*/
/*UUEM koolituse CSS*/
/* List */

.tabbed[data-style*="vertical"] .wpb_tabs_nav {
    display: none;
}

/* Tab koolitusest */
.tabbed[data-style="vertical_modern"] >div {
    padding-left: 0px;
    width: 100%;
}

/* 2026 fix */
/* Your existing CSS */
.tabbed[data-style*=vertical]>div {
    width: 100%;
    padding-left: 0px;
    right: 0;
}

/* Add for the improved JS */
.wpb_tab[hidden] {
    display: none;
}

.wpb_tab {
    transition: opacity 0.3s ease;
}
/* 2026 fix out */


.vc_col-sm-8.sisu-kolumn {
    padding-top: 20px;
}

body .sisu-heading h2 {
    font-size: 2em;
    font-family: 'Roboto';
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

a.nectar-button.nupp-paremal {
    margin-bottom: 20px;
}

@media only screen and (max-width: 990px){
.nectar-button.nupp-paremal {
    min-width: 155px;
    margin-bottom: 10px!important;
    margin-left: 5px;
    margin-right: 5px;
}

.vc_row-fluid > .span_12 .nupud-kolumn.wpb_column {
    padding-left: 0%;
    padding-right: 0%;
}

body .vc_row-fluid .nupud-kolumn.wpb_column {
    width: 110%;
    margin-left: -5%!important;
}
.koolituse-nimi h1 {
    letter-spacing: 0px!important;

}
}

div#page-hero {
    min-height: 250px;
    display: grid;
    align-items: center;
    align-content: center;
}

div#footer-cta {
    min-height: 250px;
    max-height: 450px;
    height: calc(15vw + 40px);
    display: grid;
    align-items: center;
    align-content: center;
}


.koolituse-nimi {
    max-width: 113ch;
    margin: 0 auto;
}

body .vc_column_container>.vc_column-inner .koolituse-nimi h1 {
    font-size: clamp(1.8rem, -0.875rem + 8.333vw, 3.2rem);
    line-height: clamp(2rem, -0.875rem + 8.333vw, 3.5rem);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-weight: 500;
    font-family: Roboto;
    padding-left: 10px;
    padding-right: 10px;
}



.asukoht {
    font-family: Quicksand;
    letter-spacing: -0.5px;
    font-size: clamp(1rem, -0.875rem + 5.333vw, 1.5rem);
    line-height: 1.4;
    padding-left: 5px;
    padding-right: 5px;
}

.cta-text {
    font-size: clamp(1.5rem, -0.875rem + 5.333vw, 2.5rem);
    line-height: clamp(2rem, -0.875rem + 5.333vw, 3rem);
    font-weight: 700;
    font-family: Roboto;
    padding: 2rem 2rem 0rem 2rem;
}

html .formcraft-css .fc-form .form-page-content .form-element-type-heading:first-child .heading-cover {
    max-width: 560px;
    margin: auto;
    margin-bottom: -10px;
    padding-bottom: 0px;
}

/* Prevent the page under the popup from scrolling */
body.pum-open {
  overflow: hidden !important;
  height: 100%;
}

/* Make sure the popup content can scroll */
.pum-container.pum-scrollable .pum-content{
  max-height: 95vh!important;           
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   B. FIXES
   ========================================================================== */

/* B2. "Registreeru" (popup trigger) focus ring - 2026-12-01
   What: no ring after a mouse click; keyboard users get a ring in the button's own colour
         instead of the browser's default blue.
   Why:  Popup Maker moves focus back to the "Registreeru" button when the popup closes, and the
         browser drew its blue focus ring around the green button. */
.nectar-button.pum-trigger:focus:not(:focus-visible) {
    outline: none;
}
.nectar-button.pum-trigger:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* B3. Training cards on /koolitused/ (Toolset view) - 2026-12-02
   Why: Toolset Blocks 1.6.30 (updated 2026-12-01) dropped the .tb-grid-column wrapper
        around each card, so the page's own WPBakery CSS (".tb-grid .tb-grid-column …")
        stopped matching: titles fell back from Quicksand to Roboto, and Toolset's new
        "align-self:start" made cards in one row different heights.
   What: equal-height cards per row (CSS grid stretch + flex column), button pinned to
        the bottom so all buttons in a row line up, compact even spacing, Quicksand titles.
        Scoped with :has(.koolitus-button) so other Toolset views are untouched.
        The page's old WPBakery Custom CSS was removed 2026-12-02 (owner); the rules from it
        that still did something (hidden colour field, button look, no text selection) are
        moved here, unchanged in look. */
/* The card colour is typed into a Toolset field; a page script copies it to the card
   background (jQuery .tb-field.taust -> background-color). The field itself stays hidden. */
.tb-field.taust {
	display: none;
}
.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding-bottom: 26px;
	text-align: center;
	font-family: 'Quicksand', sans-serif;
	font-weight: 500;
}
.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) > .wp-block-image,
.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) .koolitus-pilt {
	margin: 0;
}
.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) .koolitus-pilt img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 5 / 3;
	object-fit: cover;
	margin: 0; /* theme gave img margin-bottom 15px = hidden extra gap above the title */
}
/* title */
.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) > h2.tb-heading {
	margin: 0;
	padding: 16px 20px 8px;
	font-family: 'Quicksand', sans-serif;
	font-size: clamp(22px, 12px + 1.05vw, 27px); /* smaller on 3 narrow columns (tablet) */
	font-weight: 500;
	line-height: 1.22;
	letter-spacing: 0;
	text-wrap: balance;
	overflow-wrap: anywhere; /* long words like "intensiivprogramm/AI" must not spill out */
}
/* date + place */
.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) > h5.koolituse-asukoht,
.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) > h5.koolituse-asukoht p {
	font-family: 'Roboto', sans-serif;
	font-size: clamp(15px, 10px + 0.5vw, 17px);
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 0;
	color: #fff;
}
.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) > h5.koolituse-asukoht {
	margin: 0;
	padding: 0 24px 20px;
	text-wrap: balance;
}
.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) > h5.koolituse-asukoht p {
	display: block;
	max-width: none;
	margin: 0 auto;
	padding: 0 !important;
}
/* button: pushed to the card bottom, so buttons in a row share one line */
.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) > .tb-button.koolitus-button {
	margin-top: auto;
	padding: 0 !important;
}
.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) .koolitus-button a.tb-button__link {
	margin: 0;
	min-width: 200px;
	padding: 14px 34px 16px !important; /* 1px up: Quicksand lowercase sits low, so equal padding looked off-centre */
	background-color: transparent;
	box-shadow: none;
	border: 2px solid rgba(255, 255, 255, .75) !important;
	border-radius: 50px;
	color: #fff;
	font-size: 18px;
	line-height: 1;
	text-align: center;
	transition: all .45s cubic-bezier(.25, 1, .33, 1);
}
.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) .koolitus-button a.tb-button__link:hover {
	background-color: #fff;
	border-color: #fff !important;
	color: #000;
}
.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) .tb-button__content {
	transition: none !important;
}
.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) .tb-button__content,
.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) .koolitus-pilt {
	-webkit-user-select: none;
	user-select: none;
}
@media (max-width: 690px) {
	.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) {
		min-height: 0 !important;
		padding-bottom: 22px;
	}
	.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) > h2.tb-heading {
		padding: 12px 16px 6px;
		font-size: 23px;
	}
	.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) > h5.koolituse-asukoht {
		padding: 0 18px 16px;
	}
	.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) > h5.koolituse-asukoht,
	.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) > h5.koolituse-asukoht p {
		font-size: 15px;
	}
	.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) .koolitus-button a.tb-button__link {
		padding: 12px 30px 14px !important;
	}
}
/* Title gap = exactly its padding: text-box trims the font's built-in space above the capitals
   (Quicksand adds ~7px). Browsers without text-box (~12%, e.g. iOS < 18.2) keep the padding above,
   which looks about the same (16px + 7px). 2026-12-02 */
@supports (text-box: trim-start cap alphabetic) {
	.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) > h2.tb-heading {
		text-box: trim-start cap alphabetic;
		padding-top: 24px;
	}
	@media (max-width: 690px) {
		.js-wpv-loop-wrapper > .tb-grid > .wpv-block-loop-item:has(.koolitus-button) > h2.tb-heading {
			padding-top: 18px;
		}
	}
}
