/*
Theme Name: Korra Theme
Description: KORRA 独立站 WordPress 复刻定制主题（开发中，样式基于 web_01 设计 1:1 复刻）
Version: 0.2.0
Author: Codex
Text Domain: korra-theme
*/

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Roboto", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    text-rendering: optimizeLegibility;
}

/* 轮播/新闻切换时的进入动画 */
.case-enter {
    animation: korraCaseEnter 0.7s ease both;
}

@keyframes korraCaseEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Hero 文字层进入动画复用 */
.js-hero-text .case-enter {
    display: block;
}
/* 导航下拉（hover 展开） */
.korra-nav-item:hover > a {
    background: rgba(255, 255, 255, 0.1);
    color: #ff6500;
}

.korra-nav-item:hover .korra-mega,
.korra-nav-item:hover .korra-dropdown-panel {
    display: block;
}

/* FAQ details 默认样式 */
details > summary {
    list-style: none;
}

details > summary::-webkit-details-marker {
    display: none;
}
/* 顶部信息条滚动收起（复刻 isScrolled / topBarCollapsed） */
.korra-topbar {
    transition: margin-top 0.3s ease-in-out;
}

.korra-scrolled .korra-topbar {
    margin-top: -40px;
}

/* Mega menu 垂直定位：默认贴主导航底部（顶条 40px + 导航 72px = 112px） */
.korra-mega {
    top: 112px;
}

/* 顶条收起后：紧贴导航（72px） */
.korra-scrolled .korra-mega {
    top: 72px;
}

/* 登录 WP 后台：管理工具条占 32px，整体下移 */
body.admin-bar .korra-mega {
    top: 144px;
}

body.admin-bar .korra-scrolled .korra-mega {
    top: 104px;
}
/* 登录 WP 后台时：管理工具条固定在顶部 32px，固定导航需让位 */
body.admin-bar #korra-site-header {
    top: 32px;
}

/* ===== 详情富文本排版（web01 rich-content 同款）===== */
.korra-rich { color: #6b7075; font-size: 14px; line-height: 1.75; }
.korra-rich h1, .korra-rich h2, .korra-rich h3 { color: #213447; font-weight: 700; margin: 18px 0 8px; }
.korra-rich h2 { font-size: 18px; }
.korra-rich h3 { font-size: 15px; }
.korra-rich p { margin: 8px 0; }
.korra-rich strong { color: #213447; }
.korra-rich ul, .korra-rich ol { padding-left: 20px; margin: 8px 0; }
.korra-rich ul { list-style: disc; }
.korra-rich ol { list-style: decimal; }
.korra-rich li { margin: 4px 0; }
.korra-rich img { max-width: 100%; height: auto; border-radius: 10px; }
.korra-rich table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.korra-rich th, .korra-rich td { border: 1px solid #e3e8ef; padding: 10px 14px; text-align: left; }
.korra-rich th { background: #f8f9fb; color: #213447; font-weight: 600; }
.korra-rich tr:nth-child(even) td { background: #fafbfc; }
.korra-rich a { color: #ff6500; text-decoration: underline; }
.korra-rich iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; margin: 2rem 0 0; }

/* 手机端：富文本内超宽表格改为容器内横向滚动，避免撑破页面 */
@media (max-width: 640px) {
    .korra-rich table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .korra-rich thead, .korra-rich tbody, .korra-rich tr { width: max-content; min-width: 100%; }
}


/* WP.com/Jetpack 注入模块兜底隐藏（分享/点赞/相关文章已禁用，此为防 JS 注入的最后防线） */
#jp-relatedposts, .jp-relatedposts, .sharedaddy, .post-likes-widget, .wpl-likebox, div.sd-block { display: none !important; }

/* Product Tag 聚合页分页 */
.korra-tag-pagination {
    margin-top: 32px;
}

.korra-tag-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.korra-tag-pagination .nav-links a,
.korra-tag-pagination .nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e1e1de;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #213447;
    background: #fff;
    transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.korra-tag-pagination .nav-links a:hover {
    border-color: #ff6500;
    color: #ff6500;
}

.korra-tag-pagination .nav-links .current {
    border-color: #213447;
    background: #213447;
    color: #fff;
}
