/* * 门业公司主题 v1.0
 * Style: 现代简约 / 木质质感 / 家居温馨
 */

:root {
    /* --- 门业专属配色 --- */
    --c-primary: #5D4037;       /* 主色：深胡桃木色（体现门业木质质感） */
    --c-primary-dark: #483428;  /* 悬停深色：加深木色 */
    --c-secondary: #71797E;     /* 辅助色：金属灰（现代五金质感） */
    --c-accent: #B7894C;        /* 强调色：铜金色（门业五金点缀） */

    /* --- 基础背景与文字 --- */
    --bg-body: #F9F7F5;         /* 浅米色背景（贴合家居温馨感） */
    --bg-white: #FFFFFF;        /* 纯白卡片 */
    --text-main: #2D2D2D;       /* 主要文字（深灰，易读） */
    --text-light: #666666;      /* 次要文字（中灰） */
    --text-lighter: #999999;    /* 极淡文字（浅灰） */
    --border-color: #E0D8D0;    /* 边框色（柔和木纹感） */

    /* --- 布局参数 --- */
    --radius-sm: 6px;           /* 小圆角（现代简约） */
    --radius-md: 10px;          /* 中等圆角 */
    --radius-lg: 14px;          /* 大圆角 */
    --header-height: 75px;      /* 导航栏高度（更稳重） */
    --max-width: 1280px;        /* 最大宽度（适配大屏） */
    --shadow-card: 0 3px 8px rgba(93, 64, 55, 0.08); /* 卡片阴影（木质浅阴影） */
    --shadow-hover: 0 8px 20px rgba(93, 64, 55, 0.12); /* 悬停阴影 */
    --transition-base: all 0.3s ease; /* 统一过渡动画 */
}

/* === 全局重置 === */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    outline: none; 
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif; /* 适配中文显示 */
}

body {
    background-color: var(--bg-body);
    color: var(--text-light);
    line-height: 1.7;
    font-size: 16px;
}

a { text-decoration: none; color: inherit; transition: var(--transition-base); }
ul, li { list-style: none; }
img { display: block; max-width: 100%; height: auto; }

/* === 容器 === */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* === 头部导航 === */
.site-header {
    background: var(--bg-white);
    height: var(--header-height);
    box-shadow: 0 2px 12px rgba(93, 64, 55, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--c-primary);
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
}

/* 桌面端导航 */
.desktop-nav { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
}

.desktop-nav a {
    font-size: 0.98rem; 
    font-weight: 500;
    color: var(--text-main);
    padding: 10px 15px; 
    border-radius: var(--radius-sm);
    position: relative;
}

/* 选中/悬停效果：底部木纹下划线 + 浅背景 */
.desktop-nav a:hover, 
.desktop-nav a.active { 
    color: var(--c-primary); 
    background-color: rgba(93, 64, 55, 0.04); 
}
.desktop-nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--c-accent);
    transition: var(--transition-base);
}
.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    width: 80%;
}

/* 移动端菜单 */
.mobile-menu-trigger { 
    display: none; 
    font-size: 1.6rem; 
    cursor: pointer; 
    color: var(--c-primary); 
}
.mobile-menu-overlay {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: var(--bg-white); 
    z-index: 9999;
    flex-direction: column; 
    padding: 36px 24px;
}
.mobile-menu-header { 
    display: flex; 
    justify-content: space-between; 
    width: 100%; 
    margin-bottom: 40px; 
}
.logo-mobile { 
    font-weight: 700; 
    font-size: 1.5rem; 
    color: var(--c-primary); 
}
.close-btn { 
    font-size: 2.2rem; 
    cursor: pointer; 
    color: var(--text-main);
    transition: var(--transition-base);
}
.close-btn:hover {
    color: var(--c-primary);
}
.mobile-nav-links { 
    display: flex; 
    flex-direction: column; 
    gap: 24px; 
    text-align: center; 
    margin-top: 20px;
}
.mobile-nav-links a { 
    font-size: 1.25rem; 
    color: var(--text-main); 
    font-weight: 500;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.mobile-nav-links a:hover {
    color: var(--c-primary);
    border-bottom-color: var(--c-accent);
}
.mobile-nav-links .mobile-cta { 
    color: var(--c-primary); 
    font-weight: 700; 
    border-bottom-color: var(--c-accent);
}

/* === Hero Section (门业banner) === */
.hero-section {
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
    color: #fff;
    padding: 120px 0;
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}
.hero-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to top, var(--bg-body), transparent);
}
.hero-content h1 { 
    font-size: 3.2rem; 
    margin-bottom: 24px; 
    font-weight: 700; 
    letter-spacing: 1px;
}
.hero-subtitle { 
    font-size: 1.25rem; 
    margin-bottom: 50px; 
    opacity: 0.95; 
    max-width: 750px; 
    margin-left: auto; 
    margin-right: auto;
    line-height: 1.8;
}
.hero-buttons { 
    display: flex; 
    justify-content: center; 
    gap: 24px; 
}

/* 按钮样式（门业质感） */
.btn {
    display: inline-block; 
    padding: 14px 36px; 
    font-size: 1rem;
    border-radius: var(--radius-sm); 
    font-weight: 600; 
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
}
.primary-btn { 
    background: #fff; 
    color: var(--c-primary); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.primary-btn:hover { 
    background: #f8f5f2; 
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.secondary-btn { 
    background: transparent; 
    border: 1px solid rgba(255,255,255,0.7); 
    color: #fff; 
}
.secondary-btn:hover { 
    border-color: #fff; 
    background: rgba(255,255,255,0.1); 
    transform: translateY(-3px);
}

/* === Info Section (核心价值) === */
.info-section { 
    margin-bottom: 80px; 
}
.center-header { 
    text-align: center; 
    margin-bottom: 60px; 
}
.center-header h2 { 
    font-size: 2.2rem; 
    color: var(--text-main); 
    margin-bottom: 12px; 
    position: relative;
    display: inline-block;
}
.center-header h2::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--c-accent);
}
.center-header p { 
    color: var(--text-lighter); 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    font-size: 0.95rem; 
}

.info-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 40px; 
}
.info-card {
    background: var(--bg-white);
    padding: 48px 36px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: var(--transition-base);
    border: 1px solid var(--border-color);
    text-align: center;
}
.info-card:hover { 
    transform: translateY(-8px); 
    box-shadow: var(--shadow-hover); 
    border-color: rgba(183, 137, 76, 0.2);
}
.info-card .icon { 
    font-size: 3rem; 
    margin-bottom: 24px; 
    color: var(--c-primary);
}
.info-card h3 { 
    font-size: 1.5rem; 
    color: var(--text-main); 
    margin-bottom: 20px; 
}
.info-card p { 
    color: var(--text-light); 
    margin-bottom: 24px; 
    font-size: 1rem; 
    line-height: 1.7;
}
.read-more { 
    color: var(--c-primary); 
    font-weight: 600; 
    font-size: 0.95rem; 
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.read-more:hover { 
    color: var(--c-accent);
}
.read-more::after {
    content: "→";
    transition: var(--transition-base);
}
.read-more:hover::after {
    transform: translateX(4px);
}

/* === Main Content Area === */
.main-content-area { 
    min-height: 400px; 
    margin-bottom: 100px; 
}
.section-header { 
    margin-bottom: 40px; 
    border-left: 4px solid var(--c-primary); 
    padding-left: 20px; 
}
.section-header h2 { 
    font-size: 1.9rem; 
    color: var(--text-main); 
}
.cat-desc { 
    margin-top: 8px; 
    color: var(--text-light); 
    font-size: 1rem; 
}

/* === Post Grid (文章列表) === */
.post-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); 
    gap: 36px; 
}
.grid-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition-base);
    border: 1px solid var(--border-color);
    display: flex; 
    flex-direction: column;
}
.grid-card:hover { 
    transform: translateY(-6px); 
    box-shadow: var(--shadow-hover); 
    border-color: rgba(183, 137, 76, 0.15);
}

/* 封面图处理 */
.card-cover-wrapper {
    display: block;
    width: 100%;
    height: 220px; /* 略加高，适配门业图片展示 */
    background: #f1eeea;
    overflow: hidden;
    position: relative;
}
.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: var(--transition-base);
}
.grid-card:hover .card-img { 
    transform: scale(1.08); 
}

/* 无图占位 */
.card-img-placeholder {
    width: 100%; 
    height: 100%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    background: linear-gradient(135deg, #f1eeea 0%, #e8e2db 100%);
    color: var(--c-secondary); 
    font-weight: 700; 
    font-size: 1.3rem;
}

.card-body { 
    padding: 30px; 
    display: flex; 
    flex-direction: column; 
    flex: 1; 
}
.card-meta { 
    display: flex; 
    justify-content: space-between; 
    font-size: 0.9rem; 
    color: var(--text-lighter); 
    margin-bottom: 16px; 
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.cat-tag { 
    color: var(--c-primary); 
    font-weight: 600; 
}
.grid-card h3 { 
    font-size: 1.3rem; 
    margin-bottom: 14px; 
    line-height: 1.5; 
    color: var(--text-main); 
}
.grid-card h3 a:hover { 
    color: var(--c-accent); 
}
.excerpt { 
    font-size: 0.95rem; 
    color: var(--text-light); 
    flex-grow: 1; 
    margin-bottom: 20px; 
    line-height: 1.7;
}

.card-tags { 
    margin-top: auto; 
    padding-top: 20px; 
    border-top: 1px solid #f5f2ef; 
}
.tag-badge { 
    font-size: 0.8rem; 
    color: var(--text-light); 
    margin-right: 10px; 
    padding: 4px 10px;
    background-color: #f5f2ef;
    border-radius: 20px;
}
.tag-badge:hover { 
    color: var(--bg-white);
    background-color: var(--c-primary);
}

/* 分页 */
.pagination { 
    display: flex; 
    justify-content: center; 
    gap: 12px; 
    margin-top: 60px; 
}
.page-btn {
    width: 44px; 
    height: 44px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-sm); 
    color: var(--text-main);
    background: var(--bg-white);
    transition: var(--transition-base);
}
.page-btn:hover { 
    background: var(--c-primary); 
    color: #fff; 
    border-color: var(--c-primary); 
    transform: translateY(-2px);
}
.page-current { 
    display: flex; 
    align-items: center; 
    padding: 0 16px; 
    font-weight: 700; 
    color: var(--text-main); 
    font-size: 1.1rem;
}

/* === 文章详情页 === */
.single-post { 
    background: var(--bg-white); 
    padding: 48px; 
    border-radius: var(--radius-lg); 
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}
.single-header { 
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 24px; 
    margin-bottom: 36px; 
}
.breadcrumb { 
    font-size: 0.95rem; 
    color: var(--text-lighter); 
    margin-bottom: 18px; 
}
.breadcrumb a {
    color: var(--c-secondary);
}
.breadcrumb a:hover {
    color: var(--c-primary);
}
.single-header h1 { 
    font-size: 2.2rem; 
    color: var(--text-main); 
    margin-bottom: 20px; 
    line-height: 1.4; 
}
.meta-line { 
    font-size: 1rem; 
    color: var(--text-light); 
    display: flex; 
    gap: 24px; 
}

/* Markdown 内容样式 */
.markdown-body { 
    color: var(--text-main); 
    font-size: 1.05rem; 
    line-height: 1.8; 
}

.markdown-body h2 { 
    font-size: 1.6rem; 
    color: var(--text-main); 
    margin: 1.8em 0 1em; 
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 12px;
    position: relative;
}
.markdown-body h2::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 1px;
    background-color: var(--c-accent);
}

.markdown-body p { 
    margin-bottom: 1.8em; 
}

/* HR 样式 */
.markdown-body hr {
    margin: 2em 0;
    height: 1px;
    border: none;
    background-color: var(--border-color);
}

.markdown-body img { 
    max-width: 100%; 
    border-radius: var(--radius-sm); 
    box-shadow: 0 6px 20px rgba(93, 64, 55, 0.1); 
    margin: 24px 0;
}

.markdown-body a { 
    color: var(--c-primary); 
    border-bottom: 1px solid rgba(93, 64, 55, 0.2); 
}
.markdown-body a:hover { 
    border-bottom-color: var(--c-accent);
    color: var(--c-accent);
}

.markdown-body blockquote { 
    border-left: 4px solid var(--c-accent); 
    background: #f5f2ef; 
    padding: 20px 24px; 
    color: var(--text-light); 
    margin: 24px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.post-tags-container { 
    margin-top: 48px; 
    padding-top: 24px; 
    border-top: 1px solid var(--border-color); 
}
.tags-label { 
    font-weight: 700; 
    margin-right: 12px; 
    color: var(--text-main); 
}
.tag-pill { 
    display: inline-block; 
    background: #f5f2ef; 
    padding: 6px 14px; 
    font-size: 0.9rem; 
    color: var(--text-light); 
    border-radius: 24px; 
    margin-right: 10px;
    margin-bottom: 8px;
    transition: var(--transition-base);
}
.tag-pill:hover { 
    background: var(--c-primary); 
    color: #fff; 
    transform: translateY(-2px);
}

/* post-cta 背景强制浅色（符合要求） */
.post-cta {
    margin-top: 48px; 
    background: #f9f7f5; /* 浅米色，非深色 */
    padding: 36px; 
    text-align: center; 
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.post-cta p { 
    font-weight: 600; 
    font-size: 1.15rem; 
    color: var(--text-main); 
    margin-bottom: 20px; 
}
.small-btn { 
    font-size: 0.95rem; 
    padding: 10px 28px; 
    background: var(--c-primary); 
    color: white; 
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}
.small-btn:hover {
    background: var(--c-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 64, 55, 0.15);
}

.post-navigation { 
    display: flex; 
    justify-content: space-between; 
    margin-top: 48px; 
    padding-top: 24px; 
    border-top: 1px solid var(--border-color); 
}
.nav-prev, .nav-next { 
    display: flex; 
    flex-direction: column; 
    max-width: 45%; 
}
.nav-prev small, .nav-next small { 
    color: var(--text-lighter); 
    margin-bottom: 6px; 
    font-size: 0.85rem; 
}
.nav-prev span, .nav-next span { 
    color: var(--text-main); 
    font-weight: 600; 
}
.nav-prev:hover span, .nav-next:hover span { 
    color: var(--c-accent); 
}

/* === FAQ & Footer === */
.faq-section { 
    background: var(--bg-white); 
    padding: 80px 0; 
    border-top: 1px solid var(--border-color); 
}
.faq-item { 
    border-bottom: 1px solid var(--border-color); 
    margin-bottom: 8px;
}
.faq-question { 
    padding: 24px 0; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    font-weight: 600; 
    color: var(--text-main); 
    transition: var(--transition-base);
}
.faq-question:hover { 
    color: var(--c-primary); 
}
.faq-question .arrow {
    color: var(--c-accent);
    font-size: 1.2rem;
    transition: var(--transition-base);
}
.faq-answer { 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.4s ease;
}
.faq-answer p { 
    padding-bottom: 24px; 
    color: var(--text-light); 
    line-height: 1.7;
}

.site-footer { 
    background: #2D2D2D; 
    color: #ccc; 
    padding: 80px 0 40px; 
}
.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 48px; 
    margin-bottom: 50px; 
}
.footer-col h4 { 
    color: #fff; 
    margin-bottom: 24px; 
    font-size: 1.2rem; 
    position: relative;
    padding-bottom: 12px;
}
.footer-col h4::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--c-accent);
}
.footer-col p { 
    margin-bottom: 12px; 
    font-size: 0.95rem; 
    line-height: 1.7;
}
.footer-col a { 
    display: block; 
    margin-bottom: 12px; 
    font-size: 0.95rem; 
    transition: var(--transition-base);
    color: #ccc;
}
.footer-col a:hover { 
    color: var(--c-accent);
    transform: translateX(4px);
}
.footer-bottom { 
    text-align: center; 
    padding-top: 36px; 
    border-top: 1px solid #444; 
    font-size: 0.9rem; 
    color: #999;
}

/* === 响应式适配 === */
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-menu-trigger { display: block; }
    
    .hero-content h1 { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .hero-section { padding: 80px 0; }
    
    .single-post { padding: 24px; }
    .single-header h1 { font-size: 1.8rem; }
    
    .post-grid { grid-template-columns: 1fr; gap: 24px; }
    .card-cover-wrapper { height: 180px; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 36px; }
    .faq-section { padding: 60px 0; }
    .info-card { padding: 36px 24px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero-buttons { flex-direction: column; gap: 16px; padding: 0 20px; }
    .btn { padding: 12px 24px; }
    .single-post { padding: 16px; }
    .post-cta { padding: 24px 16px; }
    .hero-content h1 { font-size: 1.8rem; }
}