/*
 * Hengde visual balance hotfix 1.2.4
 * Scope: hero sections, card media ratio, typography rhythm.
 */

html,
body {
    overflow-x: hidden;
}

.v5-hero,
.wpkg-hero,
.v5-product-hero,
.v5-contact-hero,
.v5-page-hero {
    overflow: hidden !important;
}

.v5-home-hero .v5-hero-inner,
.wpkg-hero-grid,
.v5-product-hero-grid,
.v5-contact-grid {
    display: grid !important;
    grid-template-columns: minmax(360px, 0.82fr) minmax(620px, 1.18fr) !important;
    gap: clamp(42px, 5vw, 86px) !important;
    align-items: center !important;
}

.v5-home-hero {
    min-height: clamp(690px, 82vh, 820px) !important;
    padding-top: clamp(116px, 12vh, 150px) !important;
    padding-bottom: clamp(46px, 7vh, 72px) !important;
}

.wpkg-hero,
.v5-product-hero,
.v5-contact-hero {
    min-height: clamp(610px, 72vh, 760px) !important;
    padding-top: clamp(118px, 13vh, 168px) !important;
    padding-bottom: clamp(56px, 8vh, 88px) !important;
}

.v5-page-hero {
    padding-top: clamp(118px, 13vh, 168px) !important;
    padding-bottom: clamp(54px, 8vh, 78px) !important;
}

.v5-home-hero h1 {
    max-width: 15ch !important;
    font-size: clamp(2.7rem, 3.55vw, 3.85rem) !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
    text-wrap: balance;
}

.wpkg-hero h1,
.v5-product-hero h1,
.v5-contact-hero h1,
.v5-page-hero h1,
.v6-article-hero h1,
.v6-project-hero h1,
.v6-solution-hero h1 {
    max-width: 13.8ch !important;
    font-size: clamp(2.25rem, 3.05vw, 3.45rem) !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
    text-wrap: balance;
}

.v5-hero-subtitle,
.v5-hero-copy p,
.wpkg-hero p,
.v5-product-intro,
.v5-product-hero p,
.v5-contact-hero p {
    max-width: 660px !important;
    font-size: clamp(1rem, 1.06vw, 1.16rem) !important;
    line-height: 1.65 !important;
}

.v5-pill {
    font-size: 0.78rem !important;
    line-height: 1 !important;
    padding: 0.72rem 1.12rem !important;
    letter-spacing: 0.05em !important;
}

.v5-hero-media,
.wpkg-hero-media,
.v5-product-hero-media {
    width: 100% !important;
    min-width: 0 !important;
}

.v5-home-hero .v5-collage-img,
.wpkg-hero-img,
.v5-product-hero-img {
    width: 100% !important;
    height: clamp(410px, 36vw, 560px) !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 10 !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 18px !important;
}

.v5-home-hero .v5-collage-img {
    height: clamp(430px, 39vw, 590px) !important;
}

.wpkg-hero-media,
.v5-product-hero-media {
    padding: clamp(10px, 1vw, 16px) !important;
    border-radius: 22px !important;
}

.v5-section-head h1,
.v5-section-head h2,
.wpkg-feature-grid h2,
.v7-line-detail h2,
.v7-equipment-detail h2,
.wpkg-cutting-focus h2,
.v5-standards-inner h2 {
    max-width: 18ch !important;
    font-size: clamp(2rem, 2.9vw, 3.15rem) !important;
    line-height: 1.12 !important;
    letter-spacing: 0 !important;
    text-wrap: balance;
}

.wpkg-cutting-focus .v5-cutting-grid,
.v5-cutting-section .v5-cutting-grid {
    grid-template-columns: minmax(380px, 0.86fr) minmax(620px, 1.14fr) !important;
    gap: clamp(42px, 5vw, 86px) !important;
    align-items: center !important;
}

.wpkg-cutting-focus h2,
.v5-cutting-section h2 {
    max-width: 13.5ch !important;
    font-size: clamp(2.2rem, 3.15vw, 3.5rem) !important;
    line-height: 1.1 !important;
}

/* Previous strict final overrides: keep hero typography subordinate to real equipment images. */
body .v5-home-hero .v5-hero-inner,
body .v3-home-hero .v5-hero-inner,
body .wpkg-hero .wpkg-hero-grid,
body .v5-product-hero-grid {
    grid-template-columns: minmax(340px, 0.72fr) minmax(700px, 1.28fr) !important;
    gap: clamp(46px, 5.6vw, 96px) !important;
}

body .v5-home-hero h1,
body .v3-home-hero h1,
body .v5-hero h1 {
    max-width: 15.5ch !important;
    font-size: clamp(2.65rem, 3.35vw, 3.75rem) !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
}

body .wpkg-hero h1,
body .v5-product-hero h1,
body .v5-contact-hero h1,
body .v5-page-hero h1,
body .v6-article-hero h1,
body .v6-project-hero h1,
body .v6-solution-hero h1 {
    max-width: 16ch !important;
    font-size: clamp(2.1rem, 2.75vw, 3.15rem) !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
}

body .v5-home-hero .v5-hero-subtitle,
body .v5-hero-subtitle,
body .v5-hero-copy p,
body .wpkg-hero p,
body .v5-product-hero p {
    max-width: 610px !important;
    font-size: clamp(0.98rem, 1vw, 1.08rem) !important;
    line-height: 1.62 !important;
}

body .v5-home-hero .v5-hero-media,
body .v3-home-hero .v5-hero-media,
body .wpkg-hero-media,
body .v5-product-hero-media {
    align-self: center !important;
    transform: none !important;
}

body .v5-home-hero .v5-collage-img,
body .wpkg-hero-img,
body .v5-product-hero-img {
    height: clamp(470px, 42vw, 650px) !important;
    aspect-ratio: 16 / 10 !important;
    object-fit: cover !important;
    object-position: center !important;
}

body .v5-home-hero {
    min-height: clamp(680px, 80vh, 800px) !important;
}

body .wpkg-hero,
body .v5-product-hero,
body .v5-contact-hero {
    min-height: clamp(600px, 70vh, 740px) !important;
}

body .wpkg-cutting-focus .v5-cutting-grid,
body .v5-cutting-section .v5-cutting-grid {
    grid-template-columns: minmax(360px, 0.76fr) minmax(700px, 1.24fr) !important;
}

body .wpkg-cutting-focus h2,
body .v5-cutting-section h2 {
    max-width: 16ch !important;
    font-size: clamp(2rem, 2.55vw, 2.95rem) !important;
    line-height: 1.12 !important;
}

body .v5-cutting-img {
    height: clamp(420px, 35vw, 600px) !important;
}

body .v7-module-img,
body .wpkg-card-image,
body .v121-solution-img {
    height: clamp(245px, 17vw, 320px) !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #eef6fb !important;
}

body .v7-module-card h3,
body .wpkg-equipment-card h2,
body .wpkg-line-card h2,
body .v121-solution-card h2,
body .v5-project-card h2,
body .wpkg-news-card h2 {
    font-size: clamp(1.02rem, 1.02vw, 1.22rem) !important;
    line-height: 1.28 !important;
}

.v5-cutting-img {
    width: 100% !important;
    height: clamp(360px, 31vw, 510px) !important;
    aspect-ratio: 16 / 10 !important;
    object-fit: cover !important;
    object-position: center !important;
}

.v7-module-grid,
.wpkg-equipment-grid,
.wpkg-card-grid,
.v121-solution-grid {
    align-items: stretch !important;
}

.v7-module-card,
.wpkg-equipment-card,
.wpkg-line-card,
.v121-solution-card {
    display: grid !important;
    grid-template-rows: auto 1fr !important;
}

.v7-module-img,
.wpkg-card-image,
.v121-solution-img,
.v7-detail-img,
.v5-proof-img {
    width: 100% !important;
    height: clamp(230px, 16.5vw, 290px) !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #edf5fb !important;
}

.v5-proof-img,
.v7-detail-img {
    object-fit: cover !important;
}

.v7-module-card > div,
.wpkg-equipment-card > div,
.wpkg-line-card > div,
.v121-solution-card > div {
    padding: clamp(20px, 2vw, 28px) !important;
}

.v7-module-card h3,
.wpkg-equipment-card h2,
.wpkg-line-card h2,
.v121-solution-card h2,
.v5-project-card h2,
.wpkg-news-card h2 {
    font-size: clamp(1.08rem, 1.15vw, 1.34rem) !important;
    line-height: 1.22 !important;
    letter-spacing: 0 !important;
}

.v7-module-card p,
.wpkg-equipment-card p,
.wpkg-line-card p,
.v121-solution-card p,
.v5-project-card p,
.wpkg-news-card p {
    font-size: 0.96rem !important;
    line-height: 1.58 !important;
}

.v5-tech-grid {
    gap: clamp(20px, 3vw, 42px) !important;
}

.v5-tech-grid strong {
    font-size: 1rem !important;
}

.v5-tech-grid span {
    font-size: 0.9rem !important;
    line-height: 1.45 !important;
}

@media (max-width: 1200px) {
    .v5-home-hero .v5-hero-inner,
    .wpkg-hero-grid,
    .v5-product-hero-grid,
    .v5-contact-grid,
    .wpkg-cutting-focus .v5-cutting-grid,
    .v5-cutting-section .v5-cutting-grid {
        grid-template-columns: minmax(320px, 0.9fr) minmax(460px, 1.1fr) !important;
        gap: 38px !important;
    }

    .v5-home-hero h1 {
        font-size: clamp(2.85rem, 5vw, 4.2rem) !important;
    }

    .wpkg-hero h1,
    .v5-product-hero h1,
    .v5-contact-hero h1 {
        font-size: clamp(2.45rem, 4.45vw, 3.75rem) !important;
    }
}

@media (max-width: 900px) {
    .v5-home-hero,
    .wpkg-hero,
    .v5-product-hero,
    .v5-contact-hero {
        min-height: auto !important;
        padding-top: 104px !important;
        padding-bottom: 52px !important;
    }

    .v5-home-hero .v5-hero-inner,
    .wpkg-hero-grid,
    .v5-product-hero-grid,
    .v5-contact-grid,
    .wpkg-cutting-focus .v5-cutting-grid,
    .v5-cutting-section .v5-cutting-grid {
        grid-template-columns: 1fr !important;
        gap: 26px !important;
    }

    .v5-home-hero h1,
    .wpkg-hero h1,
    .v5-product-hero h1,
    .v5-contact-hero h1,
    .v5-page-hero h1 {
        max-width: 100% !important;
        font-size: clamp(2rem, 9vw, 3rem) !important;
        line-height: 1.08 !important;
    }

    .v5-home-hero .v5-collage-img,
    .wpkg-hero-img,
    .v5-product-hero-img,
    .v5-cutting-img {
        height: auto !important;
        aspect-ratio: 16 / 11 !important;
    }

    .v7-module-img,
    .wpkg-card-image,
    .v121-solution-img,
    .v7-detail-img,
    .v5-proof-img {
        height: auto !important;
        min-height: 210px !important;
        aspect-ratio: 16 / 10 !important;
    }

    .v5-section-head h1,
    .v5-section-head h2,
    .wpkg-feature-grid h2,
    .v7-line-detail h2,
    .v7-equipment-detail h2,
    .wpkg-cutting-focus h2,
    .v5-standards-inner h2 {
        font-size: clamp(1.65rem, 7vw, 2.35rem) !important;
    }
}

@media (max-width: 460px) {
    .v5-home-hero h1,
    .wpkg-hero h1,
    .v5-product-hero h1,
    .v5-contact-hero h1,
    .v5-page-hero h1 {
        font-size: clamp(1.85rem, 8.6vw, 2.45rem) !important;
    }

    .v5-pill {
        font-size: 0.7rem !important;
        padding: 0.62rem 0.9rem !important;
    }
}

/* 1.2.4 final visual correction requested by client: smaller hero text, larger image presence. */
body .v5-home-hero .v5-hero-inner,
body .v3-home-hero .v5-hero-inner,
body .v5-hero-grid,
body .wpkg-hero .wpkg-hero-grid,
body .v5-product-hero-grid {
    grid-template-columns: minmax(420px, 0.78fr) minmax(760px, 1.22fr) !important;
    gap: clamp(52px, 6.2vw, 112px) !important;
    align-items: center !important;
}

body .v5-home-hero .v5-hero-copy,
body .v3-home-hero .v5-hero-copy,
body .v5-hero-copy,
body .wpkg-hero-copy {
    max-width: 640px !important;
}

body .v5-home-hero h1,
body .v3-home-hero h1,
body .v5-hero h1 {
    max-width: 19.5ch !important;
    font-size: clamp(2.25rem, 2.72vw, 3.05rem) !important;
    line-height: 1.1 !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
}

body .wpkg-hero h1,
body .v5-product-hero h1,
body .v5-contact-hero h1,
body .v5-page-hero h1,
body .v6-article-hero h1,
body .v6-project-hero h1,
body .v6-solution-hero h1 {
    max-width: 20ch !important;
    font-size: clamp(2rem, 2.45vw, 2.85rem) !important;
    line-height: 1.12 !important;
    font-weight: 850 !important;
}

body .v5-home-hero .v5-hero-subtitle,
body .v3-home-hero .v5-hero-subtitle,
body .v5-hero-subtitle,
body .v5-hero-copy p,
body .wpkg-hero p,
body .v5-product-hero p {
    max-width: 560px !important;
    font-size: clamp(0.96rem, 0.95vw, 1.06rem) !important;
    line-height: 1.62 !important;
}

body .v5-home-hero .v5-collage-img,
body .v3-home-hero .v5-collage-img,
body .wpkg-hero-img,
body .v5-product-hero-img {
    height: clamp(500px, 45vw, 700px) !important;
    min-height: 500px !important;
    width: 100% !important;
    aspect-ratio: 16 / 10 !important;
    object-fit: cover !important;
    object-position: center !important;
}

body .v5-home-hero .v5-hero-media,
body .v3-home-hero .v5-hero-media,
body .wpkg-hero-media,
body .v5-product-hero-media {
    width: 100% !important;
    max-width: none !important;
}

body .v5-home-hero,
body .v3-home-hero {
    min-height: clamp(660px, 78vh, 780px) !important;
    padding-top: clamp(112px, 11vh, 142px) !important;
    padding-bottom: clamp(42px, 6vh, 68px) !important;
}

body .wpkg-hero,
body .v5-product-hero,
body .v5-contact-hero {
    min-height: clamp(580px, 68vh, 720px) !important;
}

body .wpkg-cutting-focus .v5-cutting-grid,
body .v5-cutting-section .v5-cutting-grid {
    grid-template-columns: minmax(420px, 0.82fr) minmax(760px, 1.18fr) !important;
    gap: clamp(52px, 6vw, 104px) !important;
}

body .wpkg-cutting-focus h2,
body .v5-cutting-section h2 {
    max-width: 18ch !important;
    font-size: clamp(1.95rem, 2.35vw, 2.7rem) !important;
    line-height: 1.15 !important;
}

body .v5-cutting-img {
    height: clamp(470px, 38vw, 660px) !important;
}

body .v5-section-head h1,
body .v5-section-head h2,
body .wpkg-feature-grid h2,
body .v7-line-detail h2,
body .v7-equipment-detail h2,
body .v5-standards-inner h2 {
    max-width: 22ch !important;
    font-size: clamp(1.85rem, 2.35vw, 2.85rem) !important;
    line-height: 1.16 !important;
}

body .v7-module-img,
body .wpkg-card-image,
body .v121-solution-img {
    height: clamp(260px, 18vw, 335px) !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #eef6fb !important;
}

body .v5-proof-img,
body .v7-detail-img,
body .v5-project-card .v5-card-img,
body .wpkg-news-card .wpkg-card-image {
    height: clamp(230px, 16vw, 300px) !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: cover !important;
    object-position: center !important;
}

body .v7-module-card h3,
body .wpkg-equipment-card h2,
body .wpkg-line-card h2,
body .v121-solution-card h2,
body .v5-project-card h2,
body .wpkg-news-card h2 {
    font-size: clamp(1rem, 0.98vw, 1.16rem) !important;
    line-height: 1.3 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}

@media (max-width: 1280px) {
    body .v5-home-hero .v5-hero-inner,
    body .v3-home-hero .v5-hero-inner,
    body .v5-hero-grid,
    body .wpkg-hero .wpkg-hero-grid,
    body .v5-product-hero-grid,
    body .wpkg-cutting-focus .v5-cutting-grid,
    body .v5-cutting-section .v5-cutting-grid {
        grid-template-columns: minmax(360px, 0.82fr) minmax(560px, 1.18fr) !important;
        gap: clamp(34px, 4.6vw, 68px) !important;
    }

    body .v5-home-hero h1,
    body .v3-home-hero h1,
    body .v5-hero h1 {
        font-size: clamp(2.15rem, 3.2vw, 2.85rem) !important;
    }

    body .wpkg-hero h1,
    body .v5-product-hero h1,
    body .v5-contact-hero h1,
    body .v5-page-hero h1 {
        font-size: clamp(1.95rem, 3vw, 2.6rem) !important;
    }

    body .v5-home-hero .v5-collage-img,
    body .v3-home-hero .v5-collage-img,
    body .wpkg-hero-img,
    body .v5-product-hero-img {
        height: clamp(420px, 38vw, 560px) !important;
        min-height: 420px !important;
    }
}

@media (max-width: 900px) {
    body .v5-home-hero .v5-hero-inner,
    body .v3-home-hero .v5-hero-inner,
    body .v5-hero-grid,
    body .wpkg-hero .wpkg-hero-grid,
    body .v5-product-hero-grid,
    body .wpkg-cutting-focus .v5-cutting-grid,
    body .v5-cutting-section .v5-cutting-grid {
        grid-template-columns: 1fr !important;
        gap: 26px !important;
    }

    body .v5-home-hero h1,
    body .v3-home-hero h1,
    body .v5-hero h1,
    body .wpkg-hero h1,
    body .v5-product-hero h1,
    body .v5-contact-hero h1,
    body .v5-page-hero h1 {
        max-width: 100% !important;
        font-size: clamp(1.9rem, 8.4vw, 2.65rem) !important;
        line-height: 1.1 !important;
    }

    body .v5-home-hero .v5-collage-img,
    body .v3-home-hero .v5-collage-img,
    body .wpkg-hero-img,
    body .v5-product-hero-img,
    body .v5-cutting-img {
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 16 / 10 !important;
    }
}

@media (max-width: 460px) {
    body .v5-home-hero h1,
    body .v3-home-hero h1,
    body .v5-hero h1,
    body .wpkg-hero h1,
    body .v5-product-hero h1,
    body .v5-contact-hero h1,
    body .v5-page-hero h1 {
        font-size: clamp(1.72rem, 7.6vw, 2.18rem) !important;
    }
}
