/*
 * Elementor stand-ins for theme components (Home was rebuilt in Elementor from pages/page-home.php).
 * Loaded after Elementor's frontend CSS. Each rule restores what the template's markup gave a component
 * and Elementor's wrappers take away: containers are position:relative, lists become divs, headings
 * get the kit's font and colour.
 */

/* Sections inset with Bootstrap's .mx-2: Elementor's 100% width plus the margins overflowed by 16px */
.e-con.e-parent.mx-2 {
    --width: calc(100% - 1rem);
}

/*
 * .theme-type on a section: its Heading widgets take the theme's type scale (scss/base/_type.scss)
 * instead of the kit's default heading font (Rethink Sans 600, line-height 1).
 */
.theme-type .elementor-widget-heading :is(h1, h2, h3, h4, h5).elementor-heading-title {
    font-family: "Bricolage Grotesque", sans-serif;
    line-height: 1.25em;
}

.theme-type .elementor-widget-heading :is(h1, h2, h3).elementor-heading-title {
    font-weight: 600;
}

.theme-type .elementor-widget-heading :is(h4, h5, h6).elementor-heading-title {
    font-weight: 500;
}

.theme-type .elementor-widget-heading :is(span, div, p).elementor-heading-title {
    font-family: "Rethink Sans", sans-serif;
    font-weight: 300;
    line-height: 1.35;
}

.theme-type .elementor-widget-heading.text-normal .elementor-heading-title {
    font-weight: 400;
}

.theme-type .elementor-widget-heading.fw-bold .elementor-heading-title {
    font-weight: 700;
}

.site-hero.theme-type .elementor-widget-heading h1.elementor-heading-title {
    line-height: 1.1;
}

/* Hero and poster: the image layer fills the whole section, as in the template */
.site-hero > .e-con.container,
.site-poster > .e-con.container {
    position: static;
}

.site-hero > .e-con.container {
    --padding-top: 0;
    --padding-bottom: 0;
    height: 100%;
}

.elementor.elementor .site-hero .sec-txt > .elementor-widget {
    max-width: 750px;
}

.site-hero .sec-txt .elementor-heading-title {
    color: #fff;
    text-align: center;
}

/* The theme's `.sec-txt span { font-size: 20px }` would reach the label span inside Elementor's buttons */
.site-hero .sec-txt .elementor-button span {
    font-size: inherit;
}

.site-hero > .site-scroller.elementor-widget {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translate(-50%, 0);
    width: auto;
}

.site-hero .site-scroller .elementor-heading-title {
    color: #fff;
    font: inherit;
    text-transform: uppercase;
}

.site-poster .sec-content {
    position: relative;
}

/*
 * Image layers (hero, Trade poster, featured cards): an Image widget fills its layer like the template's <img>.
 * Real widgets rather than container backgrounds, so the image can be changed in Elementor.
 */
.e-con.sec-img,
.e-con.sec-bg {
    overflow: hidden;
}

.elementor.elementor .e-con > .elementor-widget-image.layer-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.elementor.elementor .e-con > .elementor-widget-image.layer-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

.site-hero .sec-img::after,
.site-poster .sec-bg::after,
.card-poster .sec-img::after {
    z-index: 1;
    pointer-events: none;
}

.site-hero .sec-txt,
.site-poster .sec-content,
.card-poster .sec-txt {
    z-index: 2;
}

/* Stats: the template's <ul class="row"><li class="col-md"> as flex containers */
.listing-stats .e-con.card-stat {
    --width: auto;
    --gap: 15px;
    flex: 1 1 0;
    min-width: 150px;
}

.listing-stats .wrap-number .elementor-heading-title {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    font: inherit;
    color: inherit;
    line-height: 1em;
}

.listing-stats .wrap-label .elementor-heading-title {
    font: inherit;
    color: inherit;
}

@media (min-width: 768px) {
    .listing-stats .e-con.card-stat + .e-con.card-stat::before {
        content: "";
        display: block;
        position: absolute;
        top: 0;
        left: -12px;
        width: 1px;
        height: 100%;
        background-color: rgba(0, 0, 0, .05);
    }
}

/* Featured cards: the whole card is the link */
.e-con.card-poster {
    --padding-top: 0;
    --padding-right: 0;
    --padding-bottom: 0;
    --padding-left: 0;
    color: #fff;
}

.card-poster .sec-txt .elementor-heading-title {
    color: inherit;
}

.card-poster .sec-txt .text-secondary .elementor-heading-title {
    color: #F69320;
}
