/* Inner pages last-win contrast. Not loaded on homepage. */

html body.sanhui-brand-page .sanhui-section-dark,
html body.sanhui-brand-page .sanhui-about-why,
html body.sanhui-brand-page .sanhui-about-method,
html body.sanhui-brand-page .sanhui-about-dont,
html body.sanhui-brand-page .sanhui-contact-prepare,
html body.sanhui-brand-page .sanhui-placeholder-section {
    color: #102A43;
}

html body.sanhui-brand-page .sanhui-section-dark .sanhui-section-title h2,
html body.sanhui-brand-page .sanhui-about-why .sanhui-section-title h2,
html body.sanhui-brand-page .sanhui-about-method .sanhui-section-title h2,
html body.sanhui-brand-page .sanhui-about-dont .sanhui-section-title h2,
html body.sanhui-brand-page .sanhui-contact-prepare .sanhui-section-title h2,
html body.sanhui-brand-page .sanhui-placeholder-section .sanhui-section-title h2,
html body.sanhui-brand-page .sanhui-about-why h2,
html body.sanhui-brand-page .sanhui-about-method h2,
html body.sanhui-brand-page .sanhui-about-dont h2,
html body.sanhui-brand-page .sanhui-about-why-card h3,
html body.sanhui-brand-page .sanhui-about-capability-card h3,
html body.sanhui-brand-page .sanhui-about-fit-card h3,
html body.sanhui-brand-page .sanhui-about-method-step h3,
html body.sanhui-brand-page .sanhui-about-position-card li,
html body.sanhui-brand-page .sanhui-about-dont-item,
html body.sanhui-brand-page .sanhui-cases-detail-card h3,
html body.sanhui-brand-page .sanhui-cases-detail-card h3 a,
html body.sanhui-brand-page .sanhui-contact-topic-card h3,
html body.sanhui-brand-page .sanhui-contact-prepare-item h3,
html body.sanhui-brand-page .sanhui-article-content h3,
html body.sanhui-brand-page .sanhui-article-content h3 a {
    color: #102A43 !important;
    -webkit-text-fill-color: #102A43 !important;
}

html body.sanhui-brand-page .sanhui-about-position-text p,
html body.sanhui-brand-page .sanhui-about-why-card p,
html body.sanhui-brand-page .sanhui-about-capability-card p,
html body.sanhui-brand-page .sanhui-about-fit-card p,
html body.sanhui-brand-page .sanhui-about-method-step p,
html body.sanhui-brand-page .sanhui-about-dont-item,
html body.sanhui-brand-page .sanhui-cases-detail-section p,
html body.sanhui-brand-page .sanhui-cases-detail-section strong,
html body.sanhui-brand-page .sanhui-contact-topic-card p,
html body.sanhui-brand-page .sanhui-contact-prepare-item p,
html body.sanhui-brand-page .sanhui-contact-form-info p,
html body.sanhui-brand-page .sanhui-contact-form-trust-item span,
html body.sanhui-brand-page .sanhui-article-excerpt,
html body.sanhui-brand-page .sanhui-section-dark p,
html body.sanhui-brand-page .sanhui-section-dark li {
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
}

html body.sanhui-brand-page .sanhui-about-position-tag {
    color: #102A43 !important;
    -webkit-text-fill-color: #102A43 !important;
    background: #fff;
    border: 1px solid #e6dcc8;
}

html body.sanhui-brand-page .sanhui-about-position-text strong {
    color: #102A43 !important;
    -webkit-text-fill-color: #102A43 !important;
}

html body.sanhui-brand-page .sanhui-about-hero,
html body.sanhui-brand-page .sanhui-about-cta,
html body.sanhui-brand-page .sanhui-cases-hero,
html body.sanhui-brand-page .sanhui-cases-cta,
html body.sanhui-brand-page .sanhui-contact-hero,
html body.sanhui-brand-page .sanhui-articles-hero,
html body.sanhui-brand-page .sanhui-articles-cta,
html body.sanhui-brand-page .sh-teachers-hero,
html body.sanhui-brand-page .sh-cta {
    color: #f4f7fb;
}

html body.sanhui-brand-page .sanhui-about-hero h1,
html body.sanhui-brand-page .sanhui-about-hero p,
html body.sanhui-brand-page .sanhui-about-cta h2,
html body.sanhui-brand-page .sanhui-about-cta p,
html body.sanhui-brand-page .sanhui-cases-hero h1,
html body.sanhui-brand-page .sanhui-contact-hero h1,
html body.sanhui-brand-page .sh-teachers-hero h1,
html body.sanhui-brand-page .sh-cta h2 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

html body.sanhui-brand-page .sanhui-about-hero .sanhui-about-hero-desc,
html body.sanhui-brand-page .sanhui-about-cta p,
html body.sanhui-brand-page .sanhui-about-stat span {
    color: #d5deea !important;
    -webkit-text-fill-color: #d5deea !important;
}

html body.sanhui-brand-page .sanhui-cases-detail-photo {
    display: block;
    height: 200px;
    overflow: hidden;
}

html body.sanhui-brand-page .sanhui-cases-detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
}

.sh-teachers-page .sh-mentor__photo {
    aspect-ratio: 3 / 4;
    height: auto;
    max-height: none;
    flex: 0 0 auto;
}

.sh-teachers-page .sh-mentor__photo img {
    object-fit: cover;
    object-position: center top;
}

.sh-teachers-page .sh-mentor__photo img[src*="hujiangwei"],
.sh-teachers-page .sh-mentor__photo img[src*="shenzijie"] {
    object-position: center 18%;
}

html body.sanhui-brand-page .sanhui-about-stat {
    min-width: 0;
}

html body.sanhui-brand-page .sanhui-about-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 880px) {
    html body.sanhui-brand-page .sanhui-about-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .sh-teachers-page .sh-mentor__photo {
        aspect-ratio: 4 / 5;
        max-height: 300px;
    }
    html body.sanhui-brand-page .sanhui-articles-grid {
        gap: 32px;
    }
    html body.sanhui-brand-page .sanhui-article-excerpt {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    html body.sanhui-brand-page .sanhui-article-thumb {
        max-height: 160px;
    }
}

@media (max-width: 400px) {
    html body.sanhui-brand-page .sanhui-about-stats {
        grid-template-columns: 1fr 1fr;
    }
    html body.sanhui-brand-page .sanhui-about-stat strong {
        font-size: 22px;
    }
}

/* Contact + articles: beat old dark-theme white type on light cards. */
html body.sanhui-brand-page .sanhui-section-dark .sanhui-contact-topic-card,
html body.sanhui-brand-page .sanhui-contact-topic-card,
html body.sanhui-brand-page .sanhui-contact-prepare-item,
html body.sanhui-brand-page .sanhui-contact-form-trust-item,
html body.sanhui-brand-page .sanhui-article-card {
    background: #fff !important;
    background-image: none !important;
    border: 1px solid #e6dcc8 !important;
    color: #102A43 !important;
    -webkit-text-fill-color: #102A43 !important;
}

html body.sanhui-brand-page .sanhui-section-dark .sanhui-contact-topic-card h3,
html body.sanhui-brand-page .sanhui-contact-topic-card h3,
html body.sanhui-brand-page .sanhui-contact-prepare-item h3,
html body.sanhui-brand-page .sanhui-section-dark .sanhui-article-content h3,
html body.sanhui-brand-page .sanhui-section-dark .sanhui-article-content h3 a {
    color: #102A43 !important;
    -webkit-text-fill-color: #102A43 !important;
}

html body.sanhui-brand-page .sanhui-section-dark .sanhui-contact-topic-card p,
html body.sanhui-brand-page .sanhui-contact-topic-card p,
html body.sanhui-brand-page .sanhui-contact-prepare-item p,
html body.sanhui-brand-page .sanhui-section-dark .sanhui-article-excerpt,
html body.sanhui-brand-page .sanhui-article-date,
html body.sanhui-brand-page .sanhui-article-readmore {
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
}

html body.sanhui-brand-page .sanhui-contact-form-panel .sanhui-lead-form label,
html body.sanhui-brand-page .sanhui-section-dark .sanhui-lead-form label {
    color: #102A43 !important;
    -webkit-text-fill-color: #102A43 !important;
}

html body.sanhui-brand-page .sanhui-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    width: 100%;
}

html body.sanhui-brand-page:has(.sanhui-articles-grid) .sanhui-container {
    width: min(1280px, calc(100% - 32px));
}

html body.sanhui-brand-page .sanhui-btn-gold,
html body.sanhui-brand-page .sanhui-btn-gold::before,
html body.sanhui-brand-page .sanhui-btn-gold::after,
html body.sanhui-brand-page .sanhui-mobile-consult a:last-child {
    box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
}

html body.sanhui-brand-page .sanhui-btn-gold::before,
html body.sanhui-brand-page .sanhui-btn-gold::after {
    display: none !important;
}

@media (max-width: 1023px) {
    html body.sanhui-brand-page .sanhui-articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    html body.sanhui-brand-page .sanhui-articles-grid,
    html body.sanhui-brand-page .sanhui-contact-topic-grid {
        grid-template-columns: 1fr;
    }
}
