/* === Elastik Fonts === */
@font-face {
    font-family: "Elastik C Bold";
    src: url('{{ asset_url "Elastik-BoldC.otf"}}') format('opentype');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Elastik C Regular";
    src: url('{{ asset_url "Elastik-trial-RegularC.otf"}}') format('opentype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

/* Typography enforcement */
.section-padding.page-width .image-with-text {
    font-family: "Elastik C Regular", system-ui, sans-serif !important;
}

.image-with-text .image-with-text__title,
.image-with-text h1,
.image-with-text h2,
.image-with-text h3,
.image-with-text strong,
.image-with-text b {
    font-family: "Elastik C Bold", system-ui, sans-serif !important;
    font-weight: 700 !important;
}

.image-with-text .body3,
.image-with-text .rte,
.image-with-text p,
.image-with-text li,
.image-with-text a,
.image-with-text .button {
    font-family: "Elastik C Regular", system-ui, sans-serif !important;
    font-weight: 400 !important;
}

/* ========== Section wrapper (dynamic width/colors) ========== */
.section-padding.page-width {
    position: relative;
    color: var(--iwt-text-color, #000);
    border-radius: var(--iwt-radius, 16px);
    overflow: hidden;
    isolation: isolate;

    /* Dynamic component max-width from Liquid var --iwt-maxw */
    max-width: min(var(--iwt-maxw, 1200px), 100%);
    margin: 0 auto;
}

.section-padding.page-width::before {
    content: "";
    position: absolute;
    margin: 0 24px;
    inset: 0;
    background: var(--iwt-bg-color, #fff);
    z-index: 0;
    border-radius: inherit;
}

.section-padding.page-width>* {
    position: relative;
    z-index: 1;
}

.section-padding.page-width,
.section-padding.page-width * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== Layout Base ========== */
.image-with-text {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    text-align: center;
    padding: 60px 80px;
    gap: 60px;
}

.image-with-text.pos-right {
    flex-direction: row-reverse;
}

.image-with-text__img-wrap {
    flex: 0.6;
    max-width: 35%;
    position: relative;
    z-index: 1;
}

.image-with-text__img-wrap--auto {
    height: auto;
}

.image-with-text__image-box {
    height: 100%;
}

.image-with-text__image-box img,
.image-with-text__image-box .image-with-text__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: var(--iwt-card-radius, 12px);
}

/* Info side */
.image-with-text__info-wrap {
    flex: 1.4;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 100%;
}

.image-with-text__info-reference {
    width: 100%;
}

.image-with-text__info {
    padding: 40px;
    border-radius: var(--iwt-card-radius, 12px);
    border: var(--iwt-card-bw, 1px) solid var(--iwt-card-bc, rgba(0, 0, 0, 0.08));
    background: var(--iwt-card-bg, transparent);
    color: var(--iwt-text-color, #000);
    box-sizing: border-box;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    margin: 0 auto;
}

.image-with-text__info--align-left {
    text-align: left;
}

.image-with-text__info--align-center {
    text-align: center;
}

.image-with-text__info--align-right {
    text-align: right;
}

.image-with-text__info--m-align-left {
    text-align: left;
}

.image-with-text__info--m-align-center {
    text-align: center;
}

.image-with-text__info--m-align-right {
    text-align: right;
}

/* Text colors cascade */
.image-with-text__title {
    margin-bottom: 20px;
    color: var(--iwt-text-color, #000);
}

.image-with-text__sub-title,
.image-with-text__content,
.image-with-text__content p,
.image-with-text__content li,
.image-with-text__content a,
.image-with-text__info .rte,
.image-with-text__info .rte * {
    color: var(--iwt-text-color) !important;
}

.image-with-text__btn {
    margin-top: 20px;
    font-family: "Elastik C Regular";
}

/* Size modifiers */
.image-with-text.img-w-small .image-with-text__info-wrap {
    flex: 2;
}

.image-with-text.img-w-medium .image-with-text__info-wrap {
    flex: 1;
}

.image-with-text.img-w-large .image-with-text__info-wrap {
    flex: 0.5;
}

.image-with-text__img-wrap--high {
    height: 700px;
}

.image-with-text__img-wrap--low {
    height: 350px;
}

.image-with-text__img {
    height: 100%;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.image-with-text__empty-img {
    background-color: rgb(var(--color-image-background));
    height: 100%;
    width: 100%;
}

.image-with-text__title--size-small {
    font-size: calc(var(--title-font-size) * 0.8);
}

.image-with-text__title--size-medium {
    font-size: calc(var(--title-font-size) * 1);
}

.image-with-text__title--size-large {
    font-size: calc(var(--title-font-size) * 1.2);
}

.image-with-text__sub-title {
    word-wrap: break-word;
    font-weight: 400;
    margin-top: 20px;
    text-transform: uppercase;
}

.image-with-text__content {
    margin-top: 20px;
}

.image-with-text__title {
    margin-bottom: 20px !important;
    margin-top: 20px;
    overflow: hidden;
}

.image-with-text__info> :first-child {
    margin-top: 0;
}

/* Overlap variants (desktop) */
@media (min-width: 960px) {

    .image-with-text--align-top,
    .image-with-text--align-top .image-with-text__info-wrap {
        align-items: flex-start;
    }

    .image-with-text--align-middle,
    .image-with-text--align-middle .image-with-text__info-wrap {
        align-items: center;
    }

    .image-with-text--align-bottom,
    .image-with-text--align-bottom .image-with-text__info-wrap {
        align-items: flex-end;
    }

    .image-with-text--stretch {
        align-items: stretch;
    }

    .image-with-text--overlap .image-with-text__info-wrap {
        padding: 50px 0;
    }

    .image-with-text--overlap .image-with-text__info {
        position: relative;
    }

    .image-with-text--overlap .image-with-text__info--overlap-pc-right {
        width: calc(100% + 36px);
    }

    .image-with-text--overlap .image-with-text__info--overlap-pc-left {
        left: -36px;
        width: calc(100% + 36px);
    }

    .image-with-text--stretch .image-with-text__img-wrap--high,
    .image-with-text--stretch .image-with-text__img-wrap--low {
        height: auto;
    }
}

/* ========== Mobile ========== */
@media (max-width: 959px) {
    .image-with-text {
        flex-direction: column;
        padding: 60px 30px;
        gap: 40px;
    }

    .image-with-text__img-wrap {
        max-width: 80%;
        flex: 1;
    }

    .image-with-text__info {
        padding: 20px;
    }

    .image-with-text--overlap .image-with-text__info-wrap {
        margin-top: -36px;
        padding-left: 14px;
        padding-right: 14px;
        position: relative;
        z-index: 1;
    }

    .image-with-text.pos-right {
        flex-direction: column;
    }

    .image-with-text__img-wrap--high {
        height: 400px;
    }

    .image-with-text__img-wrap--low {
        height: 200px;
    }

    .image-with-text__content,
    .image-with-text__sub-title {
        margin-top: 15px;
    }

    .image-with-text__title {
        margin-top: 15px;
        overflow: hidden;
    }

    .image-with-text__btn {
        margin-top: 15px;
    }

    /* Ensure wrapper radius on mobile too */
    .section-padding.page-width {
        border-radius: var(--iwt-radius, 16px);
    }

    .image-with-text__info {
        border-radius: var(--iwt-card-radius, 12px);
    }
}


