/*
Theme Name: Astra Child
Template: astra
*/

/* ══ 页眉固定置顶 ══ */
.site-header,
#masthead,
.ast-theme-transparent-header #masthead,
.ast-theme-transparent-header .site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
    background-color: #ffffff !important;
}

body {
    padding-top: 80px !important;
}

/* ══ 修复移动端导航菜单滚动 ══ */
@media (max-width: 921px) {
    .main-header-menu {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        max-height: 80vh !important;
        overscroll-behavior: contain !important;
    }
}

/* ══ 表单提交按钮居中 ══ */
.custom-contact-form .wpcf7 input[type="submit"],
.wpcf7-submit,
input[type="submit"],
.submit-button,
.submit-btn,
[type="submit"] {
    display: block !important;
    margin: 0 auto !important;
}

.submit-row,
.wpcf7-submit-wrapper,
p:has(> input[type="submit"]),
p:has(> .wpcf7-submit) {
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
}

/* ══ 取消所有按钮下划线（全站）══ */
a.elementor-button,
a.elementor-button:hover,
a.elementor-button:focus,
a.elementor-button:visited,
a.elementor-button:active,
.elementor-button,
.elementor-button:hover,
.elementor-widget-button a,
.elementor-widget-button a:hover,
.elementor-widget-button a:focus,
.elementor-widget-button a:visited,
.elementor-button-wrapper a,
.elementor-button-wrapper a:hover,
.elementor-button span,
.elementor-button .elementor-button-text,
.ast-button,
.ast-custom-button,
.ast-builder-button-wrap a,
.ast-builder-button-wrap a:hover,
input[type="submit"],
input[type="button"],
input[type="reset"],
button,
.wpcf7-submit,
.submit-button,
.submit-btn {
    text-decoration: none !important;
}



/* ══════════════════════════════════════
   微信气泡定位修复
   ══════════════════════════════════════ */
.wechat-wrap {
    position: relative !important;
    display: inline-block !important;
}

#wechatQR {
    position: absolute !important;
    bottom: 55px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 99999 !important;
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 10px !important;
    padding: 12px !important;
    text-align: center !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
    width: 160px !important;
}

#wechatQR p {
    margin: 0 0 8px 0 !important;
    font-size: 12px !important;
    color: #666666 !important;
}

#wechatQR img {
    width: 130px !important;
    height: 130px !important;
    display: block !important;
    margin: 0 auto !important;
}

/* ══ 修复搜索框被 Hero 遮挡 v2 ══ */

/* 1. 关键：提升整个页眉的层叠等级，使其子元素（搜索下拉）天然高于 Hero */
.site-header,
#masthead {
    position: relative;
    z-index: 99999 !important;
}

/* 2. 搜索下拉容器：不透明白底 + 阴影，防止视频透出 */
.ast-live-search-results {
    background: #ffffff !important;
    z-index: 99999 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
    border-radius: 4px;
    overflow-y: auto;
    max-height: 70vh;
}

/* 3. 结果项保持白底，悬停浅灰 */
.ast-live-search-results a,
.ast-live-search-results .ast-live-search-result {
    background: #ffffff !important;
}
.ast-live-search-results a:hover {
    background: #f5f5f5 !important;
}

/* ══════════════════════════════════════════
   表单名片卡片效果（全站复用）
   用法：表单外层 div 带 .custom-contact-form 即生效；
   同时把所在 Elementor Section/Container 背景设为 #F5F6F8
   ══════════════════════════════════════════ */
.custom-contact-form {
    background: #ffffff;
    border-radius: 8px;
    padding: 48px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .06);
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .custom-contact-form {
        padding: 28px 20px;
        border-radius: 6px;
    }
}