/* WP Reviews — Site Chrome (Header / Footer) v1.4.3
   原生 custom_logo + 禁用首页wpautop + 隐藏Astra footer widgets
   Sticky header、消除顶部空白、搜索图标对齐 */

/* ============================================================
   HEADER FIXES
   ============================================================ */

/* Logo：确保 Astra 原生显示的 custom_logo 尺寸合适、垂直居中 */
.site-branding .custom-logo-link img,
.ast-site-identity .custom-logo-link img,
.site-header .custom-logo {
    max-height: 40px !important;
    width: auto !important;
    display: block !important;
}
.site-branding,
.ast-site-identity {
    display: flex !important;
    align-items: center !important;
}

/* 1. 消除顶部空白：隐藏 above-header、透明 header 占位 */
.site-above-header,
.ast-above-header-wrap,
#ast-desktop-header .ast-above-header {
    display: none !important;
}

.ast-inherit-site-logo-transparent .site-content,
.ast-theme-transparent-header .site-content,
.home.ast-inherit-site-logo-transparent #content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 2. Sticky header */
.site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.main-header-bar {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
}

/* 3. 搜索图标垂直居中 */
.main-header-bar .ast-search-menu-icon,
.main-header-bar .ast-header-search,
.site-header .ast-search-icon,
.site-header .menu-item-search {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

.main-header-bar .ast-search-menu-icon a,
.site-header .ast-search-icon a {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* 4. Subscribe 按钮由 inject_header_chrome() 的 JS 定制（显示为蓝色按钮） */

/* ============================================================
   FOOTER FIXES — 隐藏整个 Astra footer widget 区域（我们注入自己的footer）
   ============================================================ */
.site-footer .site-above-footer-wrap,
.site-footer .ast-footer-social-wrap,
.site-footer .footer-social-widget,
.site-footer [class*="social"],
.site-footer .footer-widget-area,
.site-footer .footer-widget-area-inner,
.site-footer .ast-builder-grid-row-container,
.site-footer .ast-footer-copyright,
.site-footer .ast-small-footer-section,
.site-footer .site-below-footer-wrap,
.site-footer .copyright {
    display: none !important;
}

/* ============================================================
   自定义深色 Footer（插件注入）
   ============================================================ */
.wpr-site-footer {
    background: #1a1d23;
    color: #9ca3af;
    padding: 48px 20px 0;
    margin-top: 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wpr-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 36px;
}

.wpr-footer-col h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.wpr-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wpr-footer-col li {
    margin-bottom: 8px;
}

.wpr-footer-col a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s;
}

.wpr-footer-col a:hover {
    color: #fff;
}

.wpr-footer-brand .wpr-footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.wpr-footer-favicon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}
.wpr-footer-brand-text {
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.wpr-footer-brand .wpr-footer-tagline {
    font-size: 13.5px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
}

.wpr-footer-bottom {
    border-top: 1px solid #2d3139;
    padding: 18px 0;
    text-align: center;
}

.wpr-footer-bottom p {
    font-size: 12.5px;
    color: #6b7280;
    margin: 0;
}

/* Header CTA 按钮 */
.main-header-menu .menu-item.wpr-cta a,
.main-header-bar .wpr-header-cta {
    background: #2563eb !important;
    color: #fff !important;
    padding: 8px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
}

.main-header-menu .menu-item.wpr-cta a:hover {
    background: #1d4ed8 !important;
}

/* 移动端 */
@media (max-width: 768px) {
    .wpr-footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
    .wpr-footer-brand {
        grid-column: 1 / -1;
    }
    .site-header {
        position: relative !important;
    }
}

@media (max-width: 480px) {
    .wpr-footer-inner {
        grid-template-columns: 1fr;
    }
}
