/* 页面详情组件样式 */
.page-detail-component {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 面包屑导航 */
.page-breadcrumb {
    margin: 2rem 0 1.5rem;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    color: #718096;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-link {
    color: #3182ce;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: #2c5aa0;
    text-decoration: underline;
}

.breadcrumb-current {
    color: #2d3748;
    font-weight: 500;
}

.breadcrumb-separator {
    color: #cbd5e0;
}

/* 页面头部 */
.page-header {
    margin-bottom: 3rem;
}

.page-title-section {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.2;
    margin: 0 0 1rem 0;
}

.page-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-template-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #ebf8ff;
    color: #3182ce;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #bee3f8;
}

.badge-icon {
    font-size: 1rem;
}

.page-update-time {
    color: #718096;
    font-size: 0.875rem;
}

/* 特色图片 */
.page-featured-image {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

.featured-image {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 1.5rem 1.5rem 1rem;
    font-size: 0.875rem;
    text-align: center;
}

/* 页面内容区域 */
.page-content-section {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    margin-bottom: 3rem;
}

.page-content {
    min-width: 0; /* 防止内容溢出 */
}

.page-content-main {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #2d3748;
}

/* 页面内容样式 */
.page-content-main h2 {
    font-size: 2rem;
    color: #1a202c;
    margin: 2.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.page-content-main h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin: 2rem 0 1rem 0;
}

.page-content-main h4 {
    font-size: 1.25rem;
    color: #2d3748;
    margin: 1.5rem 0 0.75rem 0;
}

.page-content-main p {
    margin-bottom: 1.5rem;
}

.page-content-main ul,
.page-content-main ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.page-content-main li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.page-content-main blockquote {
    border-left: 4px solid #3182ce;
    background: #f7fafc;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #4a5568;
}

.page-content-main table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.page-content-main th {
    background: #f7fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 1px solid #e2e8f0;
}

.page-content-main td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.page-content-main tr:last-child td {
    border-bottom: none;
}

.page-content-main .wp-block-image {
    margin: 2rem 0;
}

.page-content-main .wp-block-image img {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-content-main .wp-block-gallery {
    margin: 2rem 0;
    display: grid;
    gap: 1rem;
}

/* 子页面区域 */
.child-pages-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.child-pages-title {
    font-size: 1.75rem;
    color: #1a202c;
    margin: 0 0 2rem 0;
    text-align: center;
}

.child-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.child-page-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.child-page-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #3182ce;
}

.child-page-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.child-page-title a {
    color: #2d3748;
    text-decoration: none;
}

.child-page-title a:hover {
    color: #3182ce;
}

.child-page-excerpt {
    color: #718096;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.child-page-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #3182ce;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.child-page-link:hover {
    color: #2c5aa0;
    transform: translateX(4px);
}

.link-arrow {
    font-size: 1.125rem;
}

/* 侧边栏 */
.page-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

/* 页面底部 */
.page-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.page-meta-info {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    color: #718096;
    font-size: 0.875rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-label {
    color: #a0aec0;
}

.meta-value {
    color: #4a5568;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .page-content-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .page-sidebar {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .page-detail-component {
        padding: 0 0.75rem;
    }
    
    .page-title {
        font-size: 2.25rem;
    }
    
    .page-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .page-featured-image {
        margin: 1.5rem 0;
    }
    
    .image-caption {
        position: static;
        background: #f7fafc;
        color: #718096;
        padding: 1rem;
        margin-top: -4px;
    }
    
    .page-content-main {
        font-size: 1rem;
    }
    
    .page-content-main h2 {
        font-size: 1.75rem;
    }
    
    .page-content-main h3 {
        font-size: 1.375rem;
    }
    
    .child-pages-grid {
        grid-template-columns: 1fr;
    }
    
    .page-meta-info {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .breadcrumb-list {
        font-size: 0.8rem;
    }
    
    .page-content-main h2 {
        font-size: 1.5rem;
    }
    
    .child-pages-section {
        margin-top: 3rem;
    }
}