/*
Theme Name: GEO 博客子主题
Theme URI: https://geo.khb.com
Description: GEO 优化博客的 Astra 子主题，包含自定义样式和图片资源
Author: GEO 优化博客
Author URI: https://geo.khb.com
Template: astra
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: geo-child
*/

/* ========== 全局变量 ========== */
:root {
    --geo-primary: #1a56db;
    --geo-primary-dark: #1e3a8a;
    --geo-accent: #7c3aed;
    --geo-gradient: linear-gradient(135deg, #1a56db 0%, #7c3aed 100%);
    --geo-text: #1f2937;
    --geo-text-light: #6b7280;
    --geo-bg: #ffffff;
    --geo-bg-light: #f9fafb;
    --geo-border: #e5e7eb;
    --geo-radius: 12px;
    --geo-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --geo-shadow-hover: 0 12px 40px rgba(0,0,0,0.15);
}

/* ========== 全局样式 ========== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif !important;
    color: var(--geo-text) !important;
    line-height: 1.8 !important;
}

a {
    color: var(--geo-primary) !important;
    transition: all 0.3s ease !important;
}

a:hover {
    color: var(--geo-accent) !important;
}

/* ========== Header / 导航栏 ========== */
.site-header {
    background: rgba(255,255,255,0.97) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    border-bottom: 1px solid var(--geo-border) !important;
}

.site-header .site-title a,
.site-header .ast-site-identity .site-title a {
    font-weight: 800 !important;
    font-size: 1.5rem !important;
    color: var(--geo-text) !important;
    letter-spacing: -0.02em !important;
}

.site-header .site-title a:hover {
    color: var(--geo-primary) !important;
}

.site-header .ast-site-identity .site-description {
    color: var(--geo-text-light) !important;
    font-size: 0.85rem !important;
}

/* Logo 图片 */
.custom-logo-link img {
    max-height: 45px !important;
    width: auto !important;
}

/* 导航菜单 */
.main-header-menu .menu-item > a {
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    color: var(--geo-text) !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.main-header-menu .menu-item > a:hover {
    color: var(--geo-primary) !important;
    background: rgba(26, 86, 219, 0.06) !important;
}

.main-header-menu .current-menu-item > a {
    color: var(--geo-primary) !important;
    background: rgba(26, 86, 219, 0.08) !important;
}

/* ========== Hero 横幅区域 ========== */
.geo-hero-banner {
    position: relative;
    background: url('images/hero-banner.jpg') center center / cover no-repeat;
    padding: 100px 0 90px;
    text-align: center;
    overflow: hidden;
}

.geo-hero-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(26,86,219,0.85) 0%, rgba(124,58,237,0.80) 100%);
    z-index: 1;
}

.geo-hero-banner .container {
    position: relative;
    z-index: 2;
}

.geo-hero-banner h1 {
    font-size: 3rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin-bottom: 16px !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
}

.geo-hero-banner .hero-subtitle {
    font-size: 1.25rem !important;
    color: rgba(255,255,255,0.9) !important;
    max-width: 650px;
    margin: 0 auto 30px !important;
    line-height: 1.6 !important;
}

.geo-hero-banner .hero-tags {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.geo-hero-banner .hero-tag {
    display: inline-block;
    background: rgba(255,255,255,0.2) !important;
    color: #ffffff !important;
    padding: 8px 20px !important;
    border-radius: 50px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.geo-hero-banner .hero-tag:hover {
    background: rgba(255,255,255,0.35) !important;
    transform: translateY(-2px) !important;
}

/* ========== 文章卡片 ========== */
.ast-article-post {
    background: var(--geo-bg) !important;
    border: 1px solid var(--geo-border) !important;
    border-radius: var(--geo-radius) !important;
    overflow: hidden !important;
    transition: all 0.4s ease !important;
    margin-bottom: 30px !important;
}

.ast-article-post:hover {
    box-shadow: var(--geo-shadow-hover) !important;
    transform: translateY(-4px) !important;
    border-color: rgba(26,86,219,0.2) !important;
}

/* 文章封面图 */
.ast-article-post .post-thumb img,
.ast-article-post .ast-featured-img img {
    width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
    transition: transform 0.6s ease !important;
}

.ast-article-post:hover .post-thumb img,
.ast-article-post:hover .ast-featured-img img {
    transform: scale(1.05) !important;
}

/* 文章标题 */
.ast-article-post .entry-title {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin-bottom: 12px !important;
}

.ast-article-post .entry-title a {
    color: var(--geo-text) !important;
}

.ast-article-post .entry-title a:hover {
    color: var(--geo-primary) !important;
}

/* 文章摘要 */
.ast-article-post .entry-content p,
.ast-article-post .post-content p {
    color: var(--geo-text-light) !important;
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
}

/* 文章 Meta 信息 */
.ast-article-post .ast-post-meta,
.ast-article-post .posted-on {
    color: var(--geo-text-light) !important;
    font-size: 0.85rem !important;
}

/* ========== 侧边栏 ========== */
.widget {
    background: var(--geo-bg-light) !important;
    padding: 24px !important;
    border-radius: var(--geo-radius) !important;
    border: 1px solid var(--geo-border) !important;
    margin-bottom: 24px !important;
}

.widget-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: var(--geo-text) !important;
    padding-bottom: 12px !important;
    margin-bottom: 16px !important;
    border-bottom: 2px solid var(--geo-primary) !important;
}

/* ========== 分页 ========== */
.pagination .page-numbers {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    height: 40px !important;
    padding: 0 14px !important;
    margin: 0 4px !important;
    border: 1px solid var(--geo-border) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.pagination .page-numbers.current {
    background: var(--geo-primary) !important;
    color: #ffffff !important;
    border-color: var(--geo-primary) !important;
}

.pagination .page-numbers:hover:not(.current) {
    border-color: var(--geo-primary) !important;
    color: var(--geo-primary) !important;
}

/* ========== 文章详情页 ========== */
.single .ast-article-single {
    background: var(--geo-bg) !important;
    border: 1px solid var(--geo-border) !important;
    border-radius: var(--geo-radius) !important;
    padding: 40px !important;
}

.single .entry-title {
    font-size: 2.2rem !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    margin-bottom: 20px !important;
}

.single .entry-content {
    font-size: 1.05rem !important;
    line-height: 1.9 !important;
}

.single .entry-content h2 {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    margin: 40px 0 20px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid var(--geo-border) !important;
}

.single .entry-content h3 {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: var(--geo-primary) !important;
    margin: 30px 0 15px !important;
}

.single .entry-content blockquote {
    border-left: 4px solid var(--geo-primary) !important;
    background: var(--geo-bg-light) !important;
    padding: 20px 24px !important;
    margin: 24px 0 !important;
    border-radius: 0 8px 8px 0 !important;
    font-style: italic !important;
    color: var(--geo-text-light) !important;
}

.single .entry-content pre {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    padding: 20px !important;
    border-radius: 10px !important;
    overflow-x: auto !important;
}

.single .entry-content code {
    background: var(--geo-bg-light) !important;
    padding: 3px 8px !important;
    border-radius: 5px !important;
    font-size: 0.9em !important;
    color: #e11d48 !important;
}

/* ========== Footer ========== */
.site-footer {
    background: #111827 !important;
    color: #9ca3af !important;
}

.site-footer a {
    color: #d1d5db !important;
}

.site-footer a:hover {
    color: #ffffff !important;
}

.footer-bar {
    border-top: 1px solid #374151 !important;
}

/* ========== 404 页面 ========== */
.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-404 .page-title {
    font-size: 8rem !important;
    font-weight: 900 !important;
    background: var(--geo-gradient);
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    margin-bottom: 20px !important;
}

/* ========== 搜索框 ========== */
.search-form .search-field {
    border: 2px solid var(--geo-border) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-size: 1rem !important;
    transition: border-color 0.3s ease !important;
}

.search-form .search-field:focus {
    border-color: var(--geo-primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(26,86,219,0.15) !important;
}

.search-form .search-submit {
    background: var(--geo-primary) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
}

.search-form .search-submit:hover {
    background: var(--geo-primary-dark) !important;
}

/* ========== 按钮通用 ========== */
button, .button, .wp-block-button__link, input[type="submit"] {
    background: var(--geo-primary) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 28px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

button:hover, .button:hover, .wp-block-button__link:hover, input[type="submit"]:hover {
    background: var(--geo-primary-dark) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(26,86,219,0.3) !important;
}

/* ========== 标签云 ========== */
.tagcloud a {
    display: inline-block !important;
    padding: 6px 16px !important;
    margin: 4px !important;
    background: var(--geo-bg-light) !important;
    border: 1px solid var(--geo-border) !important;
    border-radius: 50px !important;
    font-size: 0.85rem !important;
    color: var(--geo-text-light) !important;
    transition: all 0.3s ease !important;
}

.tagcloud a:hover {
    background: var(--geo-primary) !important;
    color: #ffffff !important;
    border-color: var(--geo-primary) !important;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .geo-hero-banner {
        padding: 60px 0 50px !important;
    }
    
    .geo-hero-banner h1 {
        font-size: 2rem !important;
    }
    
    .geo-hero-banner .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .single .ast-article-single {
        padding: 24px !important;
    }
    
    .single .entry-title {
        font-size: 1.6rem !important;
    }
}

/* ========== 平滑滚动 ========== */
html {
    scroll-behavior: smooth !important;
}

/* ========== 选中文字颜色 ========== */
::selection {
    background: rgba(26,86,219,0.2) !important;
    color: var(--geo-primary-dark) !important;
}
