/*
Theme Name: Faith_child
Theme URI: https://yourchurch.org/
Template: faith
Author: 教会站点
Description: 基督教堂定制子主题 - 温暖木色版
Version: 1.1.0
License: GPLv2
Text Domain: faith_child
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "Microsoft YaHei",sans-serif;
    color: #333;
    line-height: 1.6;
    background: #f9f9f9;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.site-header {
    background: #8B4513; /* 温暖木色 */
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 9999;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
}
.site-title a {
    color: #fff;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

/* 主导航基础 */
.main-navigation ul {
    list-style: none;
    display: flex;
}
.main-navigation ul li {
    position: relative !important;
}
.main-navigation ul li a {
    color: #fff;
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    font-size: 16px;
    transition: color 0.3s;
}
.main-navigation ul li a:hover {
    color: #FFA500; /* 活力橙色 */
}

/* 电脑端：按钮式淡入二级菜单（双色） */
.main-navigation .sub-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    min-width: 200px !important;
    background: #A0522D !important; /* 稍浅的木色 */
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    z-index: 99999 !important;
    padding: 8px 0 !important;

    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(12px) !important;
    transition: all 0.3s ease !important;
    pointer-events: none !important;
}
.main-navigation li:hover > .sub-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}
.main-navigation .sub-menu li {
    width: 100% !important;
}
.main-navigation .sub-menu li a {
    padding: 10px 20px !important;
    white-space: nowrap !important;
    color: #fff !important;
}
.main-navigation .sub-menu li a:hover {
    background: #CD853F !important; /* 秘鲁色，木色的延伸 */
    color: #fff !important;
}

/* 三级菜单 */
.main-navigation .sub-menu .sub-menu {
    top: 0 !important;
    left: 100% !important;
    transform: translateX(12px) !important;
}
/* 今日金句 */
.daily-verse-section {
    background: #f5f0e8; /* 浅木色背景，贴合整体风格 */
    padding: 15px 0;
    border-bottom: 1px solid rgba(139, 69, 19, 0.2); /* 木色细边框 */
}
.daily-verse-text {
    font-size: 20px;
    color: #8B4513; /* 木色文字，贴合主题 */
    text-align: center;
    line-height: 2.0;
    margin: 0;
    font-style: italic; /* 斜体增加圣经金句的质感 */
}

/* 手机端适配 */
@media (max-width: 768px) {
    .daily-verse-text {
        font-size: 18px;
        padding: 0 10px;
    }
}

/* 首页横幅 */
.hero-section {
    background: linear-gradient(rgba(139, 69, 19, 0.8), rgba(139, 69, 19, 0.8)), url(images/church-bg.jpg) center/cover no-repeat;
    color: #fff;
    padding: 120px 0;
    text-align: center;
}
.hero-title {
    font-size: 42px;
    margin-bottom: 20px;
}
.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}
.btn-primary {
    display: inline-block;
    background: #FFA500; /* 活力橙色 */
    color: #333;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}
.btn-primary:hover {
    background: #FF8C00; /* 深橙色 */
}

/* 教会介绍 */
.about-section {
    padding: 80px 0;
    background: #fff;
}
.section-title {
    text-align: center;
    font-size: 32px;
    color: #8B4513; /* 木色标题 */
    margin-bottom: 40px;
}
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
    gap: 30px;
}
.about-card {
    background: #f2f2f2;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    text-align: center;
}
.about-card h3 {
    color: #8B4513; /* 木色标题 */
    margin-bottom: 15px;
}
.about-card p {
    font-size: 18px;  /* 正文字号 */
    line-height: 1.7; /* 行间距，避免文字拥挤 */
}
/* 活动板块 */
.events-section {
    padding: 80px 0;
}
.event-list {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(350px,1fr));
    gap: 30px;
}
.event-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s;
}
.event-card:hover {
    transform: translateY(-5px);
}
.event-date {
    background: #8B4513; /* 木色 */
    color: #fff;
    padding: 10px;
    text-align: center;
}
.event-content {
    padding: 20px;
}
.event-content h3 {
    color: #8B4513; /* 木色标题 */
    margin-bottom: 10px;
}

/* 页脚 */
.site-footer {
    background: #333; /* 深灰色 */
    color: #fff;
    padding: 40px 0 20px;
    text-align: center;
}
.footer-info {
    margin-bottom: 20px;
}
.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}
.footer-links a {
    color: #fff;
    text-decoration: none;
}
.footer-links a:hover {
    color: #FFA500; /* 活力橙色 */
}
.copyright {
    opacity: 0.7;
    font-size: 14px;
}
/* 页脚行布局：左对齐，文字+二维码并排 */
.footer-row {
    display: flex;
    justify-content: flex-start; /* 左对齐（关键） */
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px; /* 文字区域 和 二维码 之间的间距 */
    margin-bottom: 20px;
    text-align: left;
}

/* 二维码区域 */
.wechat-qrcode {
    text-align: center;
}
.wechat-qrcode p {
    font-size: 14px;
    margin-bottom: 8px;
}
.wechat-qrcode img {
    width: 120px;
    height: 120px;
    background: #fff;
    padding: 5px;
    border-radius: 4px;
}

/* 手机端：自动变成上下排列 */
@media (max-width: 768px) {
    .footer-row {
        flex-direction: column;
        gap: 25px;
    }
    .wechat-qrcode img {
        width: 100px;
        height: 100px;
    }
}

/* 备案信息小字优化 */
.footer-info p:nth-child(n+4) {
    font-size: 12px;
    opacity: 0.8;
}

/* ===================== 手机端菜单（电脑端不受影响版） ===================== */
@media (max-width: 768px) {
    /* 父容器允许溢出，不遮挡按钮 */
    .site-header {
        overflow: visible !important;
    }
    .header-inner {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 15px !important;
    }

    /* 汉堡按钮：只在手机端生效（添加底色测试） */
    .hamburger-btn {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 44px !important;
        height: 40px !important;
        background: #FFA500 !important; /* 测试用底色：活力橙色，可自行修改 */
        border-radius: 6px !important; /* 圆角让按钮更美观 */
        border: none !important;
        cursor: pointer !important;
        position: absolute !important;
        right: 10px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 999999 !important;
    }
    .hamburger-btn span {
        display: block !important;
        width: 30px !important;
        height: 3px !important;
        background: #fff !important; /* 三横线为白色，对比底色更明显 */
        margin: 3px 0 !important;
        border-radius: 2px !important;
    }

    /* 手机端菜单容器：默认隐藏 */
    .nav-menu-wrap {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        background: #A0522D !important;
        z-index: 999 !important;
    }
    .nav-menu-wrap.active {
        display: block !important;
    }

    /* 手机端菜单竖排 */
    .main-navigation ul {
        flex-direction: column !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .main-navigation ul li {
        width: 100% !important;
    }
    .main-navigation ul li a {
        padding: 15px 20px !important;
        color: #fff !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
        display: block !important;
    }

    /* 手机端二级菜单默认隐藏 */
    .main-navigation .sub-menu {
        display: none !important;
        background: #CD853F !important;
        margin-left: 15px !important;
    }
    .main-navigation .sub-menu.open {
        display: block !important;
    }
}

/* 桌面端强制隐藏汉堡按钮，恢复菜单 */
@media (min-width: 769px) {
    .hamburger-btn {
        display: none !important;
    }
    .nav-menu-wrap {
        display: block !important;
    }
}

/* 文章 & 页面 统一样式 */
.post-page-wrapper {
  background: #fff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin: 30px 0;
  text-align: left;
}

.post-page-title {
  font-size: 30px;
  color: #8B4513;
  margin-bottom: 16px;
  line-height: 1.4;
  font-weight: 700;
  text-align: center;
}

.post-page-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px; /* 上下间距+左右间距 */
  font-size: 12px;
  color: #777;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
  text-align: center;
}

/* 强制每个项目不换行 */
.post-page-meta span {
  white-space: nowrap;
}

/* 手机端优化 */
@media (max-width:768px) {
  .post-page-meta {
    flex-direction: column; /* 手机端强制垂直排列 */
    align-items: center;
    gap: 8px; /* 手机端上下间距缩小 */
    font-size: 13px;
  }
}

.post-page-content {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  text-align: left;
}

.post-page-content p {
  margin-bottom: 1em;
}

.post-page-content h2,
.post-page-content h3 {
  color: #8B4513;
  margin: 25px 0 15px;
  font-weight: 600;
  text-align: left;
}

/* 手机端 */
@media (max-width:768px) {
  .post-page-wrapper {
    padding: 22px 18px;
    border: 1px solid #e2e2e2;
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
  }
  .post-page-title {
    font-size: 24px;
    text-align: center;
  }
  .post-page-meta {
    gap: 10px;
    font-size: 13px;
  }
  .post-page-content {
    font-size: 17px !important;
    line-height: 1.85 !important;
  }
}