/*
Theme Name: Astra Child - KaWorld
Description: 优雅的Astra子主题，专为卡世界网站优化
Author: KaWorld Team
Template: astra
Version: 1.0.0
Text Domain: astra-child-kaworld
*/

/* 父主题样式通过functions.php加载 */

/* ===== CSS变量定义 ===== */
:root {
    --kaworld-primary-color: #2563eb;
    --kaworld-secondary-color: #64748b;
    --kaworld-accent-color: #10b981;
    --kaworld-text-color: #374151;
    --kaworld-light-bg: #f8fafc;
    --kaworld-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --kaworld-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ===== 只应用于文章页面的样式 ===== */
/* 文章内容区域基础样式 */
.single .entry-content {
    font-size: 17px;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    color: var(--kaworld-text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ===== H标题优雅设置 - 只应用于文章页面 ===== */
.single .entry-content h1,
.single .entry-content h2,
.single .entry-content h3,
.single .entry-content h4,
.single .entry-content h5,
.single .entry-content h6 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    color: #1f2937;
}

.single .entry-content h1 {
    font-size: 2.25rem;
    margin-top: 0;
}

.single .entry-content h2 {
    font-size: 1.875rem;
    border-bottom: 2px solid var(--kaworld-primary-color);
    padding-bottom: 0.5rem;
}

.single .entry-content h3 {
    font-size: 1.5rem;
    color: var(--kaworld-primary-color);
}

.single .entry-content h4 {
    font-size: 1.25rem;
}

.single .entry-content h5 {
    font-size: 1.125rem;
}

.single .entry-content h6 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== 区块间距优化 - 只应用于文章页面 ===== */
.single .entry-content > * {
    margin-bottom: 1.75rem;
}

.single .entry-content > *:last-child {
    margin-bottom: 0;
}

/* 段落间距 - 只应用于文章页面 */
.single .entry-content p {
    margin-bottom: 1.5rem;
}

/* 列表间距 - 只应用于文章页面 */
.single .entry-content ul,
.single .entry-content ol {
    margin-bottom: 1.75rem;
    padding-left: 1.5rem;
}

.single .entry-content li {
    margin-bottom: 0.5rem;
}

/* ===== 图片优雅设置 ===== */
/* 只在文章页面的图片应用特殊样式和阴影 */
.single .entry-content img {
    width: 80%;
    height: auto;
    max-width: 80%;
    display: block;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: var(--kaworld-shadow-lg);
}

/* 只在文章页面应用图片容器样式 */
.single .entry-content .wp-block-image {
    text-align: center;
    margin: 2.5rem auto;
}

.single .entry-content .wp-block-image.aligncenter {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.single .entry-content figure {
    text-align: center;
    margin: 2.5rem auto;
}

/* 图片说明文字 - 只应用于文章页面 */
.single .entry-content figcaption {
    font-size: 0.875rem;
    color: var(--kaworld-secondary-color);
    text-align: center;
    margin-top: 0.75rem;
    font-style: italic;
}

/* ===== 表格优化 - 只应用于文章页面 ===== */
.single .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.single .entry-content th,
.single .entry-content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.single .entry-content th {
    background-color: var(--kaworld-light-bg);
    font-weight: 600;
    color: var(--kaworld-text-color);
}

/* ===== 引用块优化 - 只应用于文章页面 ===== */
.single .entry-content blockquote {
    border-left: 4px solid var(--kaworld-primary-color);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background-color: var(--kaworld-light-bg);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    position: relative;
}

.single .entry-content blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--kaworld-primary-color);
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    opacity: 0.3;
}

/* ===== 按钮优化 - 只应用于文章页面 ===== */
.single .entry-content .wp-block-button__link,
.single .entry-content .uagb-buttons-repeater {
    background-color: var(--kaworld-primary-color);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid var(--kaworld-primary-color);
}

.single .entry-content .wp-block-button__link:hover,
.single .entry-content .uagb-buttons-repeater:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
}

/* ===== 响应式设计 - 只应用于文章页面 ===== */
@media (max-width: 768px) {
    .single .entry-content {
        font-size: 16px;
        padding: 0 1rem;
    }

    /* 移动端标题样式 - 只应用于文章页面 */
    .single .entry-content h1 {
        font-size: 1.875rem;
    }

    .single .entry-content h2 {
        font-size: 1.5rem;
    }

    .single .entry-content h3 {
        font-size: 1.25rem;
    }

    /* 移动端图片样式 - 只应用于文章页面 */
    .single .entry-content img {
        width: 90% !important;
        max-width: 90% !important;
    }

    .single .entry-content figure img,
    .single .entry-content .wp-block-image img {
        width: 90% !important;
        max-width: 90% !important;
    }
}
