/* Variables */

:root {
    --cibhs-templ-beige: #fafafb;
    --cibhs-templ-green: #b9d948;
    --cibhs-templ-blue: #16508c;

    --q-size: clamp(2.5em, 6vw, 4em);
    --q-offset-y: 0.18em;
    --q-opacity: 0.18;
}

/* Common  */

.cibhs-templ p:empty {
    display: none;
}

.cibhs-templ.is-section h2 {
    font-size: 1.7em;
}


/* Content builder fix */

@media (max-width: 980px) {
  .is-wrapper:has(.cibhs-templ) {
    display: flex;
    flex-flow: column nowrap; /* stack children vertically */
  }

  .is-wrapper:has(.cibhs-templ) > .is-section {
    flex: 0 0 100%;   /* each section takes full width */
    max-width: 100%;  /* no overflow */
  }
}




/* Circle Icons  */

.cibhs-templ-circle-icons {
    container-type: inline-size;
    container-name: cibhs-templ-circle-icons;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.cibhs-templ-circle-icon {
    flex: 0 0 20%;
    box-sizing: border-box;
    text-align: center;
    padding: 10px;
}

.cibhs-templ-circle-icon__icon {
    margin-bottom: 1em;
}

@container cibhs-templ-circle-icons (max-width: 900px) {
    .cibhs-templ-circle-icon {
        flex: 0 0 33.333%;
    }
}

@container cibhs-templ-circle-icons (max-width: 500px) {
    .cibhs-templ-circle-icon {
        flex: 0 0 100%;
    }
}

/* Image List */

.cibhs-templ-image-list {
    container-type: inline-size;
    container-name: cibhs-templ-image-list;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.cibhs-templ-image-list__image {
    flex: 0 0 20%;
    box-sizing: border-box;
    text-align: center;
    padding: 10px;
}

.cibhs-templ-image-list__image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

@container cibhs-templ-image-list (max-width: 900px) {
    .cibhs-templ-image-list__image {
        flex: 0 0 33.333%;
    }
}

@container cibhs-templ-image-list (max-width: 500px) {
    .cibhs-templ-image-list__image {
        flex: 0 0 100%;
    }
}

/* Button/Link */

a.cibhs-templ-button-link {
    color: var(--cibhs-templ-blue);
    background-color: var(--cibhs-templ-green);
    text-decoration: none;
    transition: color 0.3s, background-color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    transform: skewX(-10deg);
}

a.cibhs-templ-button-link:hover {
    color: #fff;
    background-color: var(--cibhs-templ-blue);
    text-decoration: none;
}

/* Product Detail (section) Template */

.cibhs-templ--product-detail.is-section h2 {
    text-transform: none;
    font-size: 1.2rem;
}

.cibhs-templ--product-detail.is-section h3 {
    text-transform: none;
    font-size: 1.1em;
}

.cibhs-templ--product-detail .feature-image {
    margin: 0 auto 1rem auto;
    display: block;
}

/* Continuing Education (section) Template */

.cibhs-templ--continuing-ed .icon-header {
    display: flex;
    align-items: center;
}

.cibhs-templ--continuing-ed .icon-header--stack {
    flex-direction: column;
}

/* Testimonials (section) Template */

.testimonial-slider-wrapper {
    position: relative;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-slider-wrapper ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    transition: transform 0.5s ease-in-out;
}

.testimonial-slider-wrapper li {
    box-sizing: border-box;
    text-align: center;
    padding: 1rem;
}

.testimonial-slider-wrapper .quote {
    display: block;
    margin-bottom: 0.5rem;
}

.testimonial-slider-wrapper .attribution {
    display: block;
}

.testimonial-slider-wrapper+.dots {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.testimonial-slider-wrapper+.dots .dot {
    width: 15px;
    height: 15px;
    margin: 0 10px;
    background: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.testimonial-slider-wrapper+.dots .dot.active {
    background: var(--cibhs-templ-green);
}

/* Course Overview (section) Template */
/* Nothing yet */

/* Course Sponsors (section) Template */
/* Nothing yet */

/* Trainer Bio (section) Template */
/* Nothing yet */


/* Product recommendations */

/*
    The selector ...
    `form:has(.cibhs-templ) .lc-recprod-container`
    ... is intended to target product recommendation containers
    only when they are used along side the CIBHS templates.
*/

form:has(.cibhs-templ) .lc-recprod-container {
    background-color: transparent;
}

form:has(.cibhs-templ) .lc-recprod-container .lc-recprod {
    background-color: var(--cibhs-templ-beige);
}

form:has(.cibhs-templ) .lc-recprod-container .lc-recprod__name {
    font-size: 16px;
    line-height: 1.2;
}

p.lc-recprod-heading {
    display: none;
    /* Hide the original heading while we manipulate it with js */
}

form:has(.cibhs-templ) h2.cibhs-recprod-heading {
    text-align: center;
    margin-bottom: 2rem;
}

form:has(.cibhs-templ) .lc-recprod-container {
    padding-top: 0;
    margin-top: 40px;
}