/*!
 * Hengjia Industro CMS adapter v1.1.0
 * Additive integration only. The original Industro layout, colors and components stay unchanged.
 */

/* Local Latin subsets. Chinese glyphs use the local operating-system font stack below. */
@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 400 600;
    font-stretch: 100%;
    font-display: swap;
    src: url("../fonts/open-sans/open-sans-latin-variable.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Rubik";
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url("../fonts/rubik/rubik-latin-variable.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body {
    font-family: "Open Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-family: "Rubik", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

/* Production pages must not expose the foreign demo photo embedded in the original stylesheet. */
body:not([data-industro-preview="1"]) .page-header {
    background-image: linear-gradient(135deg, #02245B 0%, #033678 100%);
}

/* The original slide-in title starts outside the viewport; contain that animation without changing it. */
.page-header {
    overflow: hidden;
}

/* Keep server-rendered empty and preview-only blocks from flashing before the adapter runs. */
html:not(.hengjia-industro-ready) [data-hide-when-empty] {
    visibility: hidden;
}

html:not(.hengjia-industro-ready) [data-preview-only] {
    display: none !important;
}

[data-hide-when-empty][hidden],
[data-preview-only][hidden] {
    display: none !important;
}

@supports selector(section:has(.js-cms-item)) {
    html:not(.hengjia-industro-ready) [data-hide-when-empty]:not(:has(.js-cms-item)) {
        display: none !important;
    }
}

/* Rich text emitted by PbootCMS. */
.cms-content,
[data-cms-content] {
    max-width: 100%;
    line-height: 1.8;
    overflow-wrap: anywhere;
    word-break: normal;
}

.cms-content > :last-child,
[data-cms-content] > :last-child {
    margin-bottom: 0;
}

.cms-content img,
.cms-content video,
.cms-content iframe,
[data-cms-content] img,
[data-cms-content] video,
[data-cms-content] iframe {
    max-width: 100%;
}

.cms-content img,
.cms-content video,
[data-cms-content] img,
[data-cms-content] video {
    height: auto !important;
}

.cms-content figure,
[data-cms-content] figure {
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
}

.cms-content table,
[data-cms-content] table {
    width: 100% !important;
    max-width: 100%;
}

.cms-content th,
.cms-content td,
[data-cms-content] th,
[data-cms-content] td {
    padding: .75rem;
    vertical-align: top;
}

.cms-media {
    display: block;
    width: 100%;
    max-width: 100%;
}

.cms-media--hero {
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
}

.cms-media--service {
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
}

.cms-media--project {
    aspect-ratio: 4 / 5;
    height: auto;
    object-fit: cover;
}

/* Product parameters inherit the surrounding Industro Facts colors. */
.product-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    border-top: 1px solid rgba(127, 127, 127, .25);
    list-style: none;
}

.product-spec {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(5rem, .75fr) minmax(0, 1.25fr);
    align-items: baseline;
    gap: 1rem;
    padding: 1rem;
    border-right: 1px solid rgba(127, 127, 127, .25);
    border-bottom: 1px solid rgba(127, 127, 127, .25);
}

.product-spec:nth-child(even) {
    border-right: 0;
}

.product-spec__label {
    opacity: .75;
}

.product-spec__value {
    min-width: 0;
    margin: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* PbootCMS numbar output does not always include Bootstrap page-item classes. */
.pagination {
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.pagination > a,
.pagination > span {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: .5rem .75rem;
    border: 1px solid #dee2e6;
    color: var(--dark);
    background: #FFFFFF;
}

.pagination > a:hover,
.pagination > a:focus-visible,
.pagination > .active,
.pagination > .current,
.pagination > .page-num-current {
    border-color: var(--dark);
    color: #FFFFFF;
    background: var(--dark);
}

/* Server and client validation states use the native Bootstrap form structure. */
.form-control[aria-invalid="true"],
.form-select[aria-invalid="true"],
.form-check-input[aria-invalid="true"],
.form-control.is-invalid,
.form-select.is-invalid,
.form-check-input.is-invalid {
    border-color: #dc3545;
}

.form-error,
.field-error,
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: .35rem;
    color: #b02a37;
    font-size: .875em;
    line-height: 1.5;
}

.form-status[aria-live] {
    min-height: 1.5em;
}

.form-status.is-pending {
    color: var(--secondary);
}

.form-status.is-success {
    color: #146C43;
}

.form-status.is-error {
    color: #B02A37;
}

[data-submit][aria-busy="true"] {
    cursor: wait;
}

[data-captcha] {
    cursor: pointer;
}

[data-gallery-src][aria-pressed="true"] {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

@media (max-width: 767.98px) {
    .cms-content table,
    [data-cms-content] table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .product-specs {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-spec,
    .product-spec:nth-child(even) {
        border-right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto !important;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
    }

    .wow {
        visibility: visible !important;
        animation: none !important;
    }
}
