/*
Theme Name: PHLTD Astra Child
Theme URI: https://www.phltd.cn/
Description: PHLTD customizations for the Astra theme.
Author: PHLTD
Template: astra
Version: 1.0.0
 Text Domain: phltd-astra-child
*/

/* Keep all product hover categories readable on shorter desktop screens. */
@media (min-width: 922px) {
    .ast-desktop #menu-item-5900 > .sub-menu {
        min-width: 255px;
    }

    .ast-desktop #menu-item-5900 > .sub-menu > .menu-item > .sub-menu {
        min-width: 275px;
        max-height: min(620px, calc(100vh - 140px));
        overflow-x: hidden;
        overflow-y: auto;
    }

    .ast-desktop #menu-item-5900 > .sub-menu > .menu-item > .sub-menu .menu-link {
        line-height: 1.4;
        white-space: normal;
    }
}

/* On narrower desktop screens, keep the home-page content from the product
   categories through Downloads aligned in a centered, readable column. */
@media (min-width: 1025px) and (max-width: 1599px) {
    body.home #phltd-products-cn-c.phc-root {
        width: calc(100% - 96px) !important;
        max-width: 1200px !important;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-4cff0ae > .e-con-inner,
    body.home .elementor-2500 .elementor-element.elementor-element-cff869a > .e-con-inner,
    body.home .elementor-2500 .elementor-element.elementor-element-52eefaf > .e-con-inner,
    body.home .elementor-2500 .elementor-element.elementor-element-1e69b7d > .e-con-inner,
    body.home .elementor-2500 .elementor-element.elementor-element-952dba7 > .e-con-inner {
        max-width: min(1200px, calc(100% - 96px)) !important;
    }
}

@media (min-width: 561px) and (max-width: 1024px) {
    body.home #phltd-products-cn-c.phc-root {
        width: calc(100% - 48px) !important;
        max-width: 715px !important;
    }
}

@media (max-width: 560px) {
    body.home #phltd-products-cn-c.phc-root {
        width: calc(100% - 24px) !important;
        max-width: 380px !important;
    }
}

/* The brand strip is moved just before the footer on the home page.  Its top
   spacing is painted in three bands: white, gray separator, then white. */
/* On other pages the brand strip has a short, clear gap above it. Astra's
   global 150px primary-footer top margin created the oversized empty area
   below the strip throughout the site. */
body:not(.home) #phltd-brand-footer-source.phltd-brand-showcase-footer {
    margin-top: 44px !important;
}

#colophon.site-footer .site-primary-footer-wrap[data-section="section-primary-footer-builder"] {
    margin-top: 0 !important;
}

body.home #phltd-brand-footer-source.phltd-brand-showcase-footer {
    --phltd-brand-white-gap: 24px;
    --phltd-brand-gray-gap: 32px;
    --phltd-brand-title-gap: 30px;
    margin-top: 0 !important;
    padding-top: calc(var(--phltd-brand-white-gap) + var(--phltd-brand-gray-gap) + var(--phltd-brand-title-gap)) !important;
}

@media (max-width: 921px) {
    body:not(.home) #phltd-brand-footer-source.phltd-brand-showcase-footer {
        margin-top: 32px !important;
    }

    body.home #phltd-brand-footer-source.phltd-brand-showcase-footer {
        --phltd-brand-white-gap: 20px;
        --phltd-brand-gray-gap: 28px;
        --phltd-brand-title-gap: 26px;
    }
}

@media (max-width: 767px) {
    body.home #phltd-brand-footer-source.phltd-brand-showcase-footer {
        --phltd-brand-white-gap: 16px;
        --phltd-brand-gray-gap: 24px;
    }
}

@media (max-width: 420px) {
    body.home #phltd-brand-footer-source.phltd-brand-showcase-footer {
        --phltd-brand-title-gap: 22px;
    }
}

/* Use a light brand showcase on the home page, with enough contrast for the
   heading and individual logo cards. */
body.home #phltd-brand-footer-source.phltd-brand-showcase-footer {
    background: linear-gradient(
        to bottom,
        #fff 0 var(--phltd-brand-white-gap),
        #f4f6f8 var(--phltd-brand-white-gap) calc(var(--phltd-brand-white-gap) + var(--phltd-brand-gray-gap)),
        #fff calc(var(--phltd-brand-white-gap) + var(--phltd-brand-gray-gap))
    ) !important;
    border-color: #e5e9ee !important;
    border-top-color: #fff !important;
}

body.home #phltd-brand-footer-source.phltd-brand-showcase-footer h2 {
    color: #15293d !important;
}

body.home #phltd-brand-footer-source.phltd-brand-showcase-footer .phltd-brand-card {
    background: #f7f9fb !important;
    border-color: #e2e8ed !important;
}

/* The source logo PNGs have opaque white pixels around each mark.  Multiply
   blends those pixels into the light card without altering the source files. */
body.home #phltd-brand-footer-source.phltd-brand-showcase-footer .phltd-brand-card img {
    mix-blend-mode: multiply;
}

/* Company introduction: a five-stage path with the full original copy and
   its links remaining as regular, server-rendered HTML. */
body.home .elementor-2500 .elementor-element.elementor-element-52eefaf {
    padding-top: 46px;
    padding-bottom: 16px;
    background: #fff;
}

body.home .elementor-2500 .elementor-element.elementor-element-0861c35 {
    text-align: left !important;
}

body.home .elementor-2500 .elementor-element.elementor-element-0861c35 > .elementor-widget-container {
    padding: 0 0 22px !important;
}

body.home .elementor-2500 .elementor-element.elementor-element-0861c35 .elementor-heading-title {
    color: #152c42 !important;
    font-family: inherit !important;
    font-size: clamp(26px, 2.5vw, 35px) !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
}

body.home .elementor-2500 .elementor-element.elementor-element-b3bb538 {
    color: #4d6275 !important;
    font-family: inherit !important;
    text-align: left !important;
}

body.home .elementor-2500 .phltd-intro-path {
    position: relative;
    display: grid;
    gap: 18px;
    padding-top: 28px;
    border-top: 1px solid #dce7ef;
}

body.home .elementor-2500 .phltd-intro-path::before {
    content: "";
    position: absolute;
    top: 62px;
    bottom: 70px;
    left: 34px;
    width: 3px;
    background: linear-gradient(#a5d1eb, #2368b3);
}

body.home .elementor-2500 .phltd-intro-step {
    position: relative;
    display: grid;
    grid-template-columns: 88px 180px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    min-height: 154px;
}

body.home .elementor-2500 .phltd-intro-step-marker {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border: 3px solid #6da9d6;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 7px #e9f4fc;
    color: #1e63ad;
    font: 800 22px/1 Arial, sans-serif;
}

body.home .elementor-2500 .phltd-intro-step:last-child .phltd-intro-step-marker {
    border-color: #1e63ad;
    background: #1e63ad;
    color: #fff;
}

body.home .elementor-2500 .phltd-intro-step-title {
    margin: 0 !important;
    color: #152c42;
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
}

body.home .elementor-2500 .phltd-intro-step-copy {
    min-width: 0;
    padding: 22px 26px;
    border: 1px solid #dfe8f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(20, 52, 77, .045);
}

body.home .elementor-2500 .phltd-intro-step:nth-child(even) .phltd-intro-step-copy {
    background: #f5f9fc;
}

body.home .elementor-2500 .phltd-intro-step-copy p {
    margin: 0 !important;
    color: #4d6275 !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.85 !important;
    text-align: left !important;
}

body.home .elementor-2500 .phltd-intro-step-copy a {
    color: #1662ab !important;
    font-weight: 700;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

body.home .elementor-2500 .elementor-element.elementor-element-84eb75b {
    --spacer-size: 20px;
}

@media (max-width: 1024px) {
    body.home .elementor-2500 .phltd-intro-step {
        grid-template-columns: 76px 138px minmax(0, 1fr);
        gap: 14px;
    }

    body.home .elementor-2500 .phltd-intro-step-title {
        font-size: 19px;
    }

    body.home .elementor-2500 .phltd-intro-step-copy {
        padding: 19px 21px;
    }

    body.home .elementor-2500 .phltd-intro-step-copy p {
        font-size: 15px !important;
    }
}

@media (max-width: 767px) {
    body.home .elementor-2500 .elementor-element.elementor-element-52eefaf {
        padding-top: 30px;
    }

    body.home .elementor-2500 .phltd-intro-path {
        gap: 20px;
        padding-top: 24px;
    }

    body.home .elementor-2500 .phltd-intro-path::before {
        top: 52px;
        bottom: 55px;
        left: 29px;
    }

    body.home .elementor-2500 .phltd-intro-step {
        grid-template-columns: 70px minmax(0, 1fr);
        gap: 12px 10px;
        min-height: 0;
    }

    body.home .elementor-2500 .phltd-intro-step-marker {
        width: 60px;
        height: 60px;
        font-size: 19px;
    }

    body.home .elementor-2500 .phltd-intro-step-copy {
        grid-column: 1 / -1;
        margin-left: 30px;
    }
}

@media (max-width: 560px) {
    body.home .elementor-2500 .elementor-element.elementor-element-0861c35 .elementor-heading-title {
        font-size: 23px !important;
    }

    body.home .elementor-2500 .phltd-intro-step-copy {
        padding: 17px;
    }

    body.home .elementor-2500 .phltd-intro-step-copy p {
        font-size: 14px !important;
        line-height: 1.8 !important;
    }
}

/* Home news: keep WordPress's dynamic Recent Posts list and render its first
   article as the feature card, followed by four smaller cards. */
body.home .elementor-2500 .elementor-element.elementor-element-4cff0ae {
    padding-top: 45px;
    padding-bottom: 52px;
    background: #f4f8fc;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f {
    --container-widget-width: 100%;
    width: 100% !important;
    max-width: 100% !important;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f h5 {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 28px !important;
    padding-top: 18px;
    color: #142b42 !important;
    font-family: inherit !important;
    font-size: clamp(28px, 3vw, 40px) !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f h5::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 3px;
    border-radius: 3px;
    background: #ee4550;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f h5::after {
    content: "近期文章 · 持续更新";
    color: #3677b1;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f ul {
    display: grid;
    grid-template-columns: 1.08fr 1fr 1fr;
    grid-auto-rows: minmax(250px, auto);
    gap: 18px;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    counter-reset: phltd-news;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    margin: 0 !important;
    padding: 28px !important;
    overflow: hidden;
    border: 1px solid #dfe8f0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(20, 58, 87, .05);
    counter-increment: phltd-news;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li::before {
    content: counter(phltd-news, decimal-leading-zero);
    color: #89b4d3;
    font: 800 18px/1 Arial, sans-serif;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li a {
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
    padding: 26px 0 20px;
    color: #142b42 !important;
    font-family: inherit !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.55 !important;
    text-decoration: none !important;
    overflow-wrap: anywhere;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li a::after {
    content: "↗";
    position: absolute;
    right: 25px;
    bottom: 22px;
    color: #2472ba;
    font: 24px/1 Arial, sans-serif;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li a:hover,
body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li a:focus-visible {
    color: #1662ab !important;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li .post-date {
    position: absolute;
    top: 27px;
    right: 27px;
    color: #71879a;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li:first-child {
    grid-row: span 2;
    border-color: #142e47;
    background: #142e47;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li:first-child::before {
    content: "NEW / " counter(phltd-news, decimal-leading-zero);
    color: #94bfdf;
    font-size: 13px;
    letter-spacing: 2px;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li:first-child a {
    color: #fff !important;
    font-size: clamp(24px, 2.4vw, 31px) !important;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li:first-child a:hover,
body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li:first-child a:focus-visible {
    color: #dcefff !important;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li:first-child a::after {
    color: #fff;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li:first-child a::before {
    content: "查看文章";
    position: absolute;
    bottom: 25px;
    left: 28px;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li:first-child::after {
    content: "01";
    position: absolute;
    right: -12px;
    bottom: 33px;
    color: rgba(255, 255, 255, .045);
    font: 800 160px/1 Arial, sans-serif;
    pointer-events: none;
}

body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li:first-child .post-date {
    color: #acd0e9;
}

/* On desktop, reduce the news block to about two-thirds of its previous
   height without changing the horizontal columns or the article links. */
@media (min-width: 1025px) {
    body.home .elementor-2500 .elementor-element.elementor-element-4cff0ae {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f h5 {
        margin-bottom: 18px !important;
        padding-top: 14px;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f ul {
        grid-auto-rows: minmax(165px, auto);
        gap: 14px;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li {
        padding: 21px !important;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li a {
        padding: 13px 0 8px;
        font-size: 18px !important;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li:first-child a {
        font-size: 26px !important;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li .post-date {
        top: 20px;
        right: 20px;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li a::after {
        right: 19px;
        bottom: 16px;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li:first-child a::before {
        bottom: 19px;
        left: 21px;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li:first-child::after {
        bottom: 23px;
        font-size: 120px;
    }
}

@media (max-width: 1024px) {
    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(225px, auto);
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li:first-child {
        grid-column: 1 / -1;
        grid-row: auto;
        min-height: 265px;
    }
}

@media (max-width: 600px) {
    body.home .elementor-2500 .elementor-element.elementor-element-4cff0ae {
        padding-top: 32px;
        padding-bottom: 36px;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f ul {
        grid-template-columns: minmax(0, 1fr);
        grid-auto-rows: auto;
        gap: 12px;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li {
        min-height: 170px;
        padding: 22px !important;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li:first-child {
        min-height: 220px;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f h5::after {
        font-size: 12px;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li a {
        font-size: 17px !important;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li:first-child a {
        font-size: 23px !important;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li .post-date {
        top: 21px;
        right: 21px;
        font-size: 12px;
    }

    body.home .elementor-2500 .elementor-element.elementor-element-a2da68f li:first-child a::before {
        bottom: 21px;
        left: 22px;
    }
}

/* Remove only the empty upper stage canopy from the concert photo. The
   remaining image keeps its source proportions and stays responsive. */
body.home .elementor-2500 .elementor-element.elementor-element-0c3e4fb img {
    display: block;
    width: 100%;
    height: auto !important;
    max-height: none;
    aspect-ratio: 1983 / 573;
    object-fit: cover;
    object-position: center bottom;
}

/* Contact page: preview the four photo panels with square corners. */
body.page-id-1562 .elementor-1562 .elementor-element.elementor-element-db12ebc img {
    border-radius: 0 !important;
}

body.page-id-1562 .elementor-1562 .elementor-element.elementor-element-4ee54ca,
body.page-id-1562 .elementor-1562 .elementor-element.elementor-element-378a11c,
body.page-id-1562 .elementor-1562 .elementor-element.elementor-element-b1f6f21 {
    --border-radius: 0px !important;
    border-radius: 0 !important;
}

/* The box photo is square. Its previous tall container repeated the background
   above and below the photo, producing mismatched horizontal bands. */
body.page-id-1562 .elementor-1562 .elementor-element.elementor-element-4ee54ca {
    --min-height: 0px !important;
    aspect-ratio: 1 / 1;
    background-repeat: no-repeat !important;
}

/* Give the second factory address its own visual paragraph. */
body.page-id-1562 .elementor-1562 .elementor-element.elementor-element-b24116f
.elementor-widget-container p:last-child {
    margin-top: 20px !important;
}

/* Download and support: use square photo panels and separate the two addresses. */
body.page-id-1560 .elementor-1560 .elementor-element.elementor-element-6a2491c,
body.page-id-1560 .elementor-1560 .elementor-element.elementor-element-e2f21da {
    --border-radius: 0px !important;
    border-radius: 0 !important;
}

body.page-id-1560 .elementor-1560 .elementor-element.elementor-element-43d7277
.elementor-widget-container p:last-child {
    margin-top: 20px !important;
}

/* About us: square category photos and a calmer introduction rhythm. */
body.page-id-1558 .elementor-1558 .elementor-element.elementor-element-77a0740,
body.page-id-1558 .elementor-1558 .elementor-element.elementor-element-b276139,
body.page-id-1558 .elementor-1558 .elementor-element.elementor-element-f846a38,
body.page-id-1558 .elementor-1558 .elementor-element.elementor-element-424eafb {
    --border-radius: 0px !important;
    border-radius: 0 !important;
}

body.page-id-1558 .elementor-1558 .elementor-element.elementor-element-87ca67a {
    width: 100%;
    max-width: 880px;
    font-size: clamp(16px, 1.22vw, 18px);
    line-height: 1.9;
    letter-spacing: 0.01em;
    color: #536273;
}

body.page-id-1558 .elementor-1558 .elementor-element.elementor-element-87ca67a
.elementor-widget-container p {
    margin: 0 0 1.15em;
}

body.page-id-1558 .elementor-1558 .elementor-element.elementor-element-87ca67a
.elementor-widget-container p:last-child {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    body.page-id-1558 .elementor-1558 .elementor-element.elementor-element-87ca67a {
        text-align: left;
        line-height: 1.85;
    }
}
