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

/* 1. 【补丁】加载你设计稿里的字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* =========================================
   React 嵌入终极修复盾 (基于 V3.0 成功经验)
   ========================================= */

/* 2. 【补丁】解决两边白边 (这是 V3.0 缺少的唯一布局规则) */
body.home .site-content,
body.home .ast-container,
body.home .entry-content {
    max-width: 100vw !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important; /* 去掉两边米色/白色背景 */
}

/* 3. 根容器重置 (V3.0 原版逻辑) */
#root {
    font-size: 16px !important; 
    line-height: 1.5 !important;
    /* 【微调】把字体改成你设计稿的 Inter */
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    width: 100%;
    margin: 0;
    padding: 0;
    color: #1a202c;
    text-align: left;
}

/* 4. 清除黑框、背景、边框 (V3.0 原版逻辑 - 你的最爱) */
#root *, #root *::before, #root *::after {
    box-sizing: border-box;
    border-color: transparent;
}

/* 5. 链接和按钮清洗 (V3.0 原版逻辑) */
#root a, #root button, #root [role="button"] {
    text-decoration: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    color: inherit !important;
}

/* 6. 图片清洗 (V3.0 原版逻辑) */
#root img, #root svg {
    display: inline-block;
    max-width: 100%;
    height: auto;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0;
    border: none !important;
    vertical-align: middle;
}

/* 7. 列表清洗 (V3.0 原版逻辑) */
#root ul, #root ol, #root li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

/* 8. 标题修复 (V3.0 原版逻辑 + 字体补丁) */
#root h1, #root h2, #root h3, #root h4, #root h5, #root h6 {
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    color: inherit !important;
    font-size: unset;
    /* 【补丁】应用 Playfair Display 字体 */
    font-family: 'Playfair Display', serif !important;
}
