/*
 ==========================================================================
 Alterna — Premium Polish Layer (v6)
 高级感视觉打磨层：仅增强视觉，不改变任何布局结构。
 停用方法：在子主题或代码片段中加
   add_filter( 'alterna_premium_polish', '__return_false' );
 ==========================================================================
 */

/* --------------------------------------------------------------------------
   0. 基础排版 —— 更有质感的中文排版
   -------------------------------------------------------------------------- */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }

body {
    font-size: 15px;
    line-height: 1.8;
    letter-spacing: .01em;
    color: #33383d;
}

h1, h2, h3, h4, h5, h6, .entry-title {
    letter-spacing: .01em;
    color: #1c2126;
}

h1, .entry-title { line-height: 1.35; }

p { margin-bottom: 1.25em; }

::selection { background: rgba(0, 0, 0, .12); }

/* 正文链接 —— 精致的下划线动效 */
.entry-content a:not(.btn):not(.more-link) {
    color: inherit;
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 100% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size .25s ease, color .25s ease;
}
.entry-content a:not(.btn):not(.more-link):hover { color: #c8392b; background-size: 0 1px; }

/* --------------------------------------------------------------------------
   1. 顶部导航 —— 挺拔、有呼吸感
   -------------------------------------------------------------------------- */
header.header-style-7 {
    box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 4px 24px rgba(0, 0, 0, .04);
    -webkit-transition: box-shadow .3s ease;
    transition: box-shadow .3s ease;
}

.navbar .nav > li > a {
    letter-spacing: .04em;
    -webkit-transition: color .2s ease;
    transition: color .2s ease;
}

/* 导航下拉菜单 —— 圆角 + 柔和阴影 + 淡入 */
.navbar .dropdown-menu {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(20, 28, 38, .14);
    padding: 6px 0;
    -webkit-animation: alternaDropdown .18s ease-out;
    animation: alternaDropdown .18s ease-out;
    margin-top: 0;
}
.navbar .dropdown-menu > li > a { padding: 9px 22px; -webkit-transition: all .15s ease; transition: all .15s ease; }
.navbar .dropdown-menu > li > a:hover { padding-left: 28px; }
@-webkit-keyframes alternaDropdown { from { opacity: 0; -webkit-transform: translateY(6px); } to { opacity: 1; -webkit-transform: none; } }
@keyframes alternaDropdown { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   2. 页头横幅（page-header）—— 大气的留白节奏
   -------------------------------------------------------------------------- */
.page-header-wrap .page-header-content { letter-spacing: .06em; }

/* 面包屑更轻盈 */
.breadcrumb, .breadcrumbs { font-size: 13px; opacity: .8; }
.breadcrumb a, .breadcrumbs a { -webkit-transition: opacity .2s ease; transition: opacity .2s ease; }
.breadcrumb a:hover, .breadcrumbs a:hover { opacity: .6; }

/* --------------------------------------------------------------------------
   3. 按钮 —— 从"能用"到"想点"
   -------------------------------------------------------------------------- */
.btn-theme,
.btn.btn-theme,
input[type="submit"].btn-theme {
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .14);
    -webkit-transition: all .22s cubic-bezier(.4, 0, .2, 1);
    transition: all .22s cubic-bezier(.4, 0, .2, 1);
    letter-spacing: .05em;
}
.btn-theme:hover, .btn.btn-theme:hover,
input[type="submit"].btn-theme:hover {
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
}
.btn-theme:active, .btn.btn-theme:active { -webkit-transform: translateY(0); transform: translateY(0); }

/* 悬浮咨询按钮 */
.float-btn {
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
    -webkit-transition: all .25s ease;
    transition: all .25s ease;
}
.float-btn:hover { -webkit-transform: scale(1.08); transform: scale(1.08); box-shadow: 0 10px 26px rgba(0, 0, 0, .28); }

/* --------------------------------------------------------------------------
   4. 博客 / 文章列表卡片 —— 悬浮层次感
   -------------------------------------------------------------------------- */
.entry-post {
    -webkit-transition: box-shadow .3s ease, -webkit-transform .3s ease;
    transition: box-shadow .3s ease, transform .3s ease;
}
.blog-list .entry-post:hover,
article.entry-post:hover {
    -webkit-transform: translateY(-3px);
    transform: translateY(-3px);
}

/* "阅读全文"链接 —— 箭头动效 */
.more-link {
    font-weight: 600;
    letter-spacing: .03em;
    position: relative;
    display: inline-block;
    -webkit-transition: letter-spacing .25s ease;
    transition: letter-spacing .25s ease;
}
.more-link:hover { letter-spacing: .1em; }

/* 文章 meta 信息 —— 更精致的分割 */
.post-meta { font-size: 13px; opacity: .72; }
.post-meta span + span::before,
.post-meta li + li::before { content: "·"; margin: 0 .6em; opacity: .5; }

/* --------------------------------------------------------------------------
   5. 单篇文章页 —— 沉浸式阅读
   -------------------------------------------------------------------------- */
.entry-content h2 { margin-top: 2.2em; padding-bottom: .35em; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.entry-content h3 { margin-top: 1.8em; }
.entry-content blockquote {
    border-left: 3px solid rgba(0, 0, 0, .55);
    font-size: 1.05em;
    color: #555c63;
    padding: .2em 1.4em;
    margin: 1.8em 0;
    background: rgba(0, 0, 0, .015);
    border-radius: 0 6px 6px 0;
}
.entry-content img { border-radius: 6px; }
.entry-content table { border-radius: 6px; overflow: hidden; }
.entry-content table th { background: rgba(0, 0, 0, .045); font-weight: 600; }

/* 作者卡 / 相关阅读 —— 卡片化 */
.post-about-author, .post-related, .related-post {
    border-radius: 10px;
    background: rgba(0, 0, 0, .018);
    padding: 4px 6px;
}

/* --------------------------------------------------------------------------
   6. 产品/作品卡片 —— 高级感的 hover 蒙层
   -------------------------------------------------------------------------- */
.portfolio-item, .portfolio-item-wrap, .type-portfolio {
    -webkit-transition: -webkit-transform .3s ease, box-shadow .3s ease;
    transition: transform .3s ease, box-shadow .3s ease;
}
.portfolio-item:hover, .portfolio-item-wrap:hover, .type-portfolio:hover {
    -webkit-transform: translateY(-4px);
    transform: translateY(-4px);
    box-shadow: 0 16px 44px rgba(20, 28, 38, .13);
}
.portfolio-item img, .portfolio-item-wrap img, .type-portfolio img {
    -webkit-transition: -webkit-transform .45s ease;
    transition: transform .45s ease;
}
.portfolio-item:hover img, .portfolio-item-wrap:hover img, .type-portfolio:hover img {
    -webkit-transform: scale(1.045);
    transform: scale(1.045);
}

/* --------------------------------------------------------------------------
   7. 页脚 —— 沉稳收尾
   -------------------------------------------------------------------------- */
footer .footer-content { font-size: 14px; opacity: .92; }
footer h4, footer .widget-title { letter-spacing: .05em; }
footer a { -webkit-transition: opacity .2s ease; transition: opacity .2s ease; }
footer a:hover { opacity: .65; }

/* --------------------------------------------------------------------------
   8. 微交互 —— 全站统一的过渡手感
   -------------------------------------------------------------------------- */
a img, .widget a img { -webkit-transition: opacity .25s ease; transition: opacity .25s ease; }
a:hover img { opacity: .88; }

@media (max-width: 991px) {
    /* 移动端不做位移悬浮，避免误触布局 */
    .entry-post:hover, .portfolio-item:hover, .portfolio-item-wrap:hover, .type-portfolio:hover { -webkit-transform: none; transform: none; }
    .btn-theme:hover, .btn.btn-theme:hover { -webkit-transform: none; transform: none; }
}

/* 尊重用户的动效偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { -webkit-transition-duration: .01ms !important; transition-duration: .01ms !important; -webkit-animation-duration: .01ms !important; animation-duration: .01ms !important; }
}
