/* ==================== 共享布局补充 (detail.css) ==================== */
.main-nav a.active {
    color: var(--green-primary);
}

.main-nav a.active::after {
    width: 100%;
}

.page-main {
    min-height: 60vh;
}

/* 滚动淡入 */
.post-card, .recipe-card, .trending-card, .category-card, .subpage-hero {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.post-card.revealed, .recipe-card.revealed, .trending-card.revealed,
.category-card.revealed, .subpage-hero.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* 子页面横幅 */
.subpage-hero {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-primary) 55%, var(--green-light) 100%);
    padding: 56px 0 48px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.subpage-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M40 40c0-11 9-20 20-20s20 9 20 20-9 20-20 20-20-9-20-20zm-40 0c0-11 9-20 20-20s20 9 20 20-9 20-20 20S0 51 0 40z'/%3E%3C/g%3E%3C/svg%3E");
}

.subpage-hero .container {
    position: relative;
    z-index: 1;
}

.breadcrumb {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.breadcrumb a {
    opacity: 0.9;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.subpage-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 40px;
    font-weight: 900;
    margin-bottom: 12px;
}

.subpage-hero p {
    font-size: 17px;
    max-width: 640px;
    opacity: 0.92;
}

/* 内容区通用 */
.content-section {
    padding: 56px 0;
}

.content-section.alt {
    background: var(--white);
}

/* 文章/食谱详情 */
.detail-hero {
    height: 280px;
    border-radius: var(--radius-lg);
    margin: 0 0 32px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.detail-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M30 30c0-5.5 4.5-10 10-10s10 4.5 10 10-4.5 10-10 10-10-4.5-10-10z'/%3E%3C/g%3E%3C/svg%3E");
}

.article-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-body {
    max-width: 760px;
    margin: 0 auto;
}

.article-body > p {
    font-size: 17px;
    line-height: 1.9;
    margin-bottom: 22px;
    color: var(--text-medium);
}

.article-body h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--green-dark);
    margin: 36px 0 14px;
}

.article-body ul.tips {
    margin: 0 0 22px;
    padding-left: 0;
    list-style: none;
}

.article-body ul.tips li {
    position: relative;
    padding: 8px 0 8px 30px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-medium);
    border-bottom: 1px dashed var(--border);
}

.article-body ul.tips li::before {
    content: '\01F33F';
    position: absolute;
    left: 0;
    top: 8px;
}

.article-body blockquote {
    border-left: 4px solid var(--green-primary);
    background: var(--green-pale);
    padding: 16px 22px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--green-dark);
    font-size: 17px;
}

/* 食谱双栏 */
.recipe-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 48px;
    max-width: 980px;
    margin: 0 auto;
    align-items: start;
}

.ingredients-box {
    background: var(--green-pale);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    position: sticky;
    top: 100px;
}

.ingredients-box h3,
.steps-box h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    color: var(--green-dark);
    margin-bottom: 16px;
}

.ingredients-box ul {
    list-style: none;
}

.ingredients-box li {
    padding: 8px 0 8px 24px;
    position: relative;
    font-size: 15px;
    color: var(--text-dark);
    border-bottom: 1px dashed var(--border);
}

.ingredients-box li::before {
    content: '\01F984';
    position: absolute;
    left: 0;
}

.steps-box ol {
    list-style: none;
    counter-reset: step;
}

.steps-box li {
    counter-increment: step;
    position: relative;
    padding: 0 0 22px 52px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-medium);
}

.steps-box li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 34px;
    height: 34px;
    background: var(--green-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
}

.recipe-notes {
    background: var(--cream-dark);
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    margin-top: 24px;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.recipe-notes h4 {
    color: var(--terracotta);
    margin-bottom: 8px;
    font-size: 16px;
}

.recipe-notes p {
    font-size: 15px;
    color: var(--text-medium);
}

/* 相关文章 */
.related-section {
    background: var(--cream-dark);
    padding: 56px 0;
}

.related-section .section-title {
    font-size: 26px;
}

@media (max-width: 768px) {
    .recipe-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .ingredients-box {
        position: static;
    }
    .subpage-hero h1 {
        font-size: 30px;
    }
}
