*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 页面内容整体居中：body 作为列向 flex 容器 + align-items:center
   对齐 Wanderlog .body 的做法 —— 居中由父级 flex 负责，而非子级 margin auto。
   注意：flex 列容器下的子项默认按 fit-content 收缩，所以每个区块都要补 width:100%。 */
body {
  margin: 0;
  text-align: center;
  display: flex;
  flex-flow: column;
  align-items: center;
  /* 移动端：禁止 iOS 横屏自动放大字号；长单词/长 URL 强制换行防横向滚动 */
  -webkit-text-size-adjust: 100%;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

main,
.site-footer {
  width: 100%;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem;
}

/* ============================================================
   左上角 Logo 定位逻辑（复刻 Wanderlog #webflow-navbar）
   四层结构，全程不使用 absolute / fixed / float：

   body                   flex 列向 + align-items:center → 导航栏整体水平居中
   └ .site-header         版心层：width:100% + max-width:960px（与 main 同宽）
                          height 64px，padding 收缩内容区，align-items:center 垂直居中
     └ .site-header__inner  撑满层：width:100%，刻意不写 justify-content
                            → 取默认 flex-start，子项自然靠左
       └ .site-brand       固定尺寸的首个 flex 子项 → 落在内容区左边缘

   结果：logo 左边缘 = (视口宽 − 960) / 2 + 1rem，与下方 H1 左边缘严格对齐。
   ============================================================ */
.site-header {
  width: 100%;
  max-width: 960px;
  height: 64px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 1rem;
}

.site-header__inner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-brand {
  flex: none;
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
}

.site-brand__icon {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-brand__text {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

/* Hero 顶部留白：对齐 Wanderlog 首页 .hero-section 的 padding-top: 160px */
main {
  padding-top: 160px;
}

/* 平板 ≤991px：对应 Wanderlog 的同断点取值 64px */
@media screen and (max-width: 991px) {
  main {
    padding-top: 64px;
  }
}

/* 手机 ≤767px：对应 Wanderlog 的同断点取值 80px */
@media screen and (max-width: 767px) {
  main {
    padding-top: 80px;
  }
}

/* 面包屑导航
   位置：main 内、H1 正上方；左对齐，与左上角 logo 左边缘同线
   （body 为 text-align:center，此处需显式覆盖为 left） */
.breadcrumb {
  width: 100%;
  margin-bottom: 1rem;
  text-align: left;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.4;
}

.breadcrumb__link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.breadcrumb__link:hover,
.breadcrumb__link:focus {
  opacity: 0.7;
}

.breadcrumb__separator {
  opacity: 0.5;
}

.breadcrumb__current {
  opacity: 0.75;
}

/* H1 基础样式：桌面与平板
   对应 Tailwind text-5xl：font-size 3rem / line-height 1 */
.site-title {
  font-size: 3rem;
  line-height: 1;
  font-weight: 700;
  margin: 0;
}

/* 手机竖屏 ≤479px
   对应 Tailwind text-4xl：font-size 2.25rem / line-height 2.5rem */
@media screen and (max-width: 479px) {
  .site-title {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
}

/* 版块标题 H2 */
.section-heading {
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 700;
  margin: 3rem 0 0;
}

.section-heading a {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
}

.section-heading a:hover,
.section-heading a:focus {
  opacity: 0.7;
}

/* ============================================================
   页脚「联系我们」
   用 <details> 实现点击展开，无需 JS。
   ============================================================ */
.contact {
  display: inline;
  margin: 0 0 0 0.25rem;
}

.contact > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  display: inline;
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
}

/* 隐藏 Safari 默认三角形标记 */
.contact > summary::-webkit-details-marker {
  display: none;
}

.contact__email {
  display: inline;
  margin: 0 0 0 0.5rem;
}

.contact__email a {
  color: inherit;
}
