/*
Theme Name: HyApexFlow Child
Theme URI: https://www.hyapexflow.com/
Template: astra
Author: SHENZHEN HONGYUE FLUID INTELLIGENCE
Author URI: https://www.hyapexflow.com/
Version: 1.0.4
License: GNU General Public License v2 or later
Text Domain: hyapexflow-child
*/

/* Hide default Astra page title when using Full Width Custom template */
.page-template-full-width-custom .ast-single-post .entry-header,
.page-template-full-width-custom .entry-title {
    display: none !important;
}
.page-template-full-width-custom .site-content .container {
    max-width: 100% !important;
    padding: 0 !important;
}
.page-template-full-width-custom #primary {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* ===== 品牌色板 v2 — 统一单色板体系（Bootstrap / Astra / WPForms 三源映射）=====
   目标：全站只有 1 套品牌蓝 + 1 个品牌青 + 1 个行动橙（Ember 保守应用：hover / 高亮标签 / 数据高亮）
   表头保持品牌蓝（总经理拍板）。 */
:root {
    /* 品牌 token */
    --hy-primary: #0056b3;
    --hy-primary-dark: #004080;
    --hy-secondary: #00a8cc;
    --hy-aqua-deep: #007a99;
    --hy-dark: #0b1b2b;
    --hy-dark-2: #10324f;
    --hy-light: #f4f8fb;
    --hy-ember: #ff6b35;
    --hy-ember-deep: #c2410c;
    --hy-text: #475569;
    --hy-muted: #6c757d;
    --hy-border: #e1e8ed;
    --hy-gradient: linear-gradient(135deg, #0b1b2b 0%, #0056b3 100%);

    /* Bootstrap 5 语义色 → 品牌色板 */
    --bs-primary: #0056b3;
    --bs-primary-rgb: 0, 86, 179;
    --bs-link-color: #0056b3;
    --bs-link-hover-color: #004080;
    --bs-info: #00a8cc;
    --bs-info-rgb: 0, 168, 204;

    /* Astra 全局色板对齐（消灭双胞胎色） */
    --ast-global-color-0: #0056b3;
    --ast-global-color-1: #004080;
    --ast-global-color-2: #0b1b2b;
    --ast-global-color-3: #475569;
    --ast-global-color-5: #f4f8fb;
    --ast-global-color-7: #d1d5db;

    /* WPForms 表单按钮映射 */
    --wpforms-button-background-color: #0056b3;
    --wpforms-button-border-color: #0056b3;
}

/* Bootstrap 主按钮 → 品牌蓝（白底/浅色区块场景，白字 7.04:1 ✔） */
.btn-primary {
    --bs-btn-bg: #0056b3;
    --bs-btn-border-color: #0056b3;
    --bs-btn-hover-bg: #004080;
    --bs-btn-hover-border-color: #004080;
    --bs-btn-active-bg: #003366;
    --bs-btn-active-border-color: #003366;
    --bs-btn-disabled-bg: #0056b3;
    --bs-btn-disabled-border-color: #0056b3;
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
}

/* 兜底：语义色类高特异性覆盖（防止 Bootstrap 后加载抢占） */
:root .text-primary { color: var(--hy-primary) !important; }
:root .text-info { color: var(--hy-secondary) !important; }

/* WPForms 提交按钮 → 品牌蓝 + hover 深蓝 */
.wpforms-form .wpforms-submit {
    background-color: #0056b3 !important;
    border-color: #0056b3 !important;
    color: #fff !important;
}
.wpforms-form .wpforms-submit:hover {
    background-color: #004080 !important;
    border-color: #004080 !important;
    color: #fff !important;
}

/* ===== 基础区块 ===== */
.hy-section { padding: 4rem 0; }
.hy-hero { background: var(--hy-gradient); color: #fff; padding: 5rem 0; }
.hy-cta { background-color: var(--hy-primary); color: #fff; padding: 3rem 0; }
.hy-card { border: 1px solid var(--hy-border); border-radius: .75rem; padding: 1.5rem; height: 100%; background: #fff; transition: transform .15s; }
.hy-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,.08); }
.hy-table th { background: var(--hy-primary); color: #fff; }   /* 表头保持品牌蓝 */
.hy-faq .accordion-button:not(.collapsed) { background: var(--hy-light); color: var(--hy-primary); }
.hy-img-caption { font-size: .875rem; color: var(--hy-muted); margin-top: .5rem; }

/* 数据卡大数字 → Ember 深阶橙字（行动色，数据高亮；#C2410C 白底 5.15:1 ✔）
   注：不能用亮橙 #FF6B35 做白底文字（仅 2.81:1 不达标）；亮橙只用于深字场景（按钮底） */
.hy-card h3.text-primary { color: var(--hy-ember-deep) !important; }

/* ===== Section headings redesign ===== */
/* 1. White-background sections: bold heading with gradient underline */
.hy-section.bg-white h2,
.hy-section.hy-light h2,
.hy-section:not(.hy-hero):not(.hy-cta) h2 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--hy-dark);
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}
.hy-section.bg-white h2::after,
.hy-section.hy-light h2::after,
.hy-section:not(.hy-hero):not(.hy-cta) h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--hy-secondary) 0%, var(--hy-primary) 100%);
}
.hy-section.text-center h2::after,
.hy-section .text-center h2::after {
    left: 50%;
    transform: translateX(-50%);
}

/* 2. Hero headings: large, crisp, left accent bar */
.hy-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    text-shadow: 0 2px 10px rgba(0,0,0,.25);
    position: relative;
    padding-left: 1.25rem;
    border-left: 5px solid var(--hy-secondary);
}
@media (min-width: 992px) {
    .hy-hero h1 { font-size: 3.5rem; }
}

/* 2a. Centered hero (home page): remove left bar, add centered underline */
.hy-hero.text-center h1 {
    padding-left: 0;
    border-left: none;
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
}
.hy-hero.text-center h1::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--hy-secondary) 0%, #fff 100%);
}

/* 3. CTA headings: white with glow + subtle underline */
.hy-cta h2 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.25;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.2);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1rem;
}
.hy-cta h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,.55);
}

/* 4. Ensure h2.h3 / h2.h4 classes don't override our styles */
.hy-section h2.h3,
.hy-section h2.h4,
.hy-hero h1,
.hy-cta h2 {
    font-weight: 800 !important;
}

/* 5. Small eyebrow label above headings where present
   - 白底区块：用 Aqua 深阶 #007A99（WCAG 4.95:1 ✔，修复原 2.81:1 FAIL）
   - hero 深底：保持品牌青 #00A8CC（深底 6.2:1 ✔） */
.hy-section .hy-eyebrow {
    display: inline-block;
    font-size: .875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--hy-aqua-deep);
    margin-bottom: .75rem;
}
.hy-hero .hy-eyebrow {
    color: var(--hy-secondary);
}

/* ===== 深底区块链接（hero / CTA）：白字，hover 品牌青（修复原 2.47:1 FAIL）===== */
.hy-hero a:not(.btn) { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.hy-hero a:not(.btn):hover { color: var(--hy-secondary); }
.hy-cta a:not(.btn) { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.hy-cta a:not(.btn):hover { color: var(--hy-secondary); }

/* 蓝底 CTA 区块内的主按钮：白底深字（17.4:1 ✔），hover Ember 橙底深字（6.14:1 ✔）
   —— 修复"蓝底蓝按钮"不可见问题，橙保守应用在 hover */
.hy-cta .btn-primary {
    background: #fff;
    border-color: #fff;
    color: var(--hy-dark);
    font-weight: 700;
}
.hy-cta .btn-primary:hover,
.hy-cta .btn-primary:focus {
    background: var(--hy-ember);
    border-color: var(--hy-ember);
    color: var(--hy-dark);
}

/* 蓝底 CTA 区块内的 WPForms 表单按钮：白底深字（17.4:1 ✔），hover Ember 橙底深字（6.14:1 ✔）
   —— 修复产品页"Request a Free ATCS Proposal"表单在蓝底上的按钮不可见问题 */
.hy-cta .wpforms-form .wpforms-submit {
    background-color: #fff !important;
    border-color: #fff !important;
    color: var(--hy-dark) !important;
}
.hy-cta .wpforms-form .wpforms-submit:hover {
    background-color: var(--hy-ember) !important;
    border-color: var(--hy-ember) !important;
    color: var(--hy-dark) !important;
}

/* ===== Custom Footer ===== */
.hy-footer { background: var(--hy-dark); color: #aebcc8; margin-top: 0; }
.hy-footer-top { padding: 4rem 0 3rem; }
.hy-footer-brand { color: #fff; font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; letter-spacing: -.02em; }
.hy-footer-desc { font-size: .9rem; line-height: 1.7; margin-bottom: 1.5rem; }
.hy-footer-title { color: #fff; font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1.25rem; }
.hy-footer-links { list-style: none; padding: 0; margin: 0; }
.hy-footer-links li { margin-bottom: .6rem; }
.hy-footer-links a { color: #aebcc8; text-decoration: none; font-size: .9rem; transition: color .15s; }
.hy-footer-links a:hover { color: var(--hy-secondary); }
.hy-footer-contact { font-size: .875rem; margin-bottom: 1rem; }
.hy-footer-contact a { color: #aebcc8; text-decoration: none; }
.hy-footer-contact a:hover { color: var(--hy-secondary); }
.hy-subscribe .form-control { font-size: .875rem; }
.hy-subscribe .btn { font-size: .875rem; }

/* Footer 订阅按钮：白底深字（深底上 17.4:1 ✔，修复原 1.56:1 FAIL），hover Ember 橙底深字（6.14:1 ✔） */
.hy-subscribe .btn.btn-primary {
    background: #fff;
    border-color: #fff;
    color: var(--hy-dark);
    font-weight: 700;
}
.hy-subscribe .btn.btn-primary:hover,
.hy-subscribe .btn.btn-primary:focus {
    background: var(--hy-ember);
    border-color: var(--hy-ember);
    color: var(--hy-dark);
}

.hy-social { display: flex; gap: .75rem; }
.hy-social-link { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; transition: all .2s; text-decoration: none; }
.hy-social-link:hover { background: var(--hy-secondary); color: #fff; transform: translateY(-2px); }
.hy-footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 1.25rem 0; font-size: .85rem; }
.hy-footer-bottom a { color: #aebcc8; text-decoration: none; }
.hy-footer-bottom a:hover { color: var(--hy-secondary); }
.site-footer { display: none !important; }

/* ===== Image placeholder blocks（过渡文案灰 → #6C757D，WCAG 4.69:1 ✔，修复原 2.86:1 FAIL）===== */
.hy-img-placeholder { background: var(--hy-light); border: 2px dashed #c8d4e0; border-radius: .75rem; min-height: 280px; display: flex; align-items: center; justify-content: center; color: var(--hy-muted); }
.hy-img-placeholder-inner { text-align: center; padding: 2rem; }
.hy-img-placeholder-inner svg { opacity: .4; }
.hy-img-placeholder-inner p { font-size: .9rem; margin-bottom: 0; }
.hy-img-placeholder-inner small { color: var(--hy-muted); }

/* ===== Trust bar（深色条）：与 hero 区分明暗，微调渐变 #0B1B2B → #10324F ===== */
.hy-trust-bar { background: linear-gradient(180deg, var(--hy-dark) 0%, var(--hy-dark-2) 100%); padding: 2.5rem 0; }
.hy-trust-item { color: #fff; text-align: center; }
.hy-trust-icon { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.1); color: var(--hy-secondary); font-size: 1rem; font-weight: 800; margin-bottom: .75rem; }
.hy-trust-item p { color: #cfdde8; font-size: .9rem; }
.hy-trust-item small { color: #aebcc8; }

/* ===== Certification badges ===== */
.hy-cert-badge { background: #fff; border: 1px solid var(--hy-border); border-radius: .75rem; padding: 1.5rem 1rem; text-align: center; height: 100%; }
.hy-cert-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--hy-light); color: var(--hy-primary); font-size: 1.25rem; font-weight: 800; margin-bottom: .75rem; }
.hy-cert-badge p { font-size: .9rem; margin-bottom: 0; }
.hy-cert-badge small { color: var(--hy-muted); }
.hy-cert-pending { font-size: .75rem; color: var(--hy-muted); font-style: italic; margin-top: .5rem !important; }

/* ===== Case study pending label ===== */
.hy-case-pending { font-size: .75rem; color: var(--hy-muted); font-style: italic; }

/* ===== Flag dot ===== */
.hy-flag-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--hy-secondary); flex-shrink: 0; }
