/**
 * Layout Spacing Fix
 * 
 * 修复 header 和 hero 区域之间的空白问题
 * 强制移除所有可能的空白
 */

/* 调试标记 - 如果看到红色边框，说明 CSS 已加载 */
body {
    --layout-fix-loaded: true;
}

/* 移除 body 的 margin 和 padding */
body {
    margin: 0 !important;
    padding: 0 !important;
}

/* 移除 main 容器的所有间距 */
#primary,
.site-main,
main {
    margin: 0 !important;
    padding: 0 !important;
}

/* Hero 区域移除所有默认间距 */
.hero,
section.hero,
div.hero {
    margin: 0 !important;
    padding: 0 !important;
}

/* 如果 header 不是透明的，添加 5px 间距 */
.site-header:not(.site-header--transparent) ~ main .hero:first-child,
.site-header:not(.site-header--transparent) ~ #primary .hero:first-child {
    margin-top: 5px !important;
}

/* 移动端也保持 5px */
@media (max-width: 767px) {
    .site-header:not(.site-header--transparent) ~ main .hero:first-child,
    .site-header:not(.site-header--transparent) ~ #primary .hero:first-child {
        margin-top: 5px !important;
    }
}
