/*
Theme Name: Aisi Assistant Theme
Theme URI: https://example.com/
Author: Your Name
Author URI: https://example.com/
Description: 爱思助手官网主题 - 专业苹果设备管理与刷机工具
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aisi-theme
Tags: one-column, custom-logo, custom-menu, featured-images
*/

/* ============ 基础滚动与锚点偏移 ============ */
html { scroll-behavior: smooth; }
#download,#products,#features,#tutorial,#firmware,#faq,#changelog { scroll-margin-top: 90px; }

/* ============ 头部：sticky 自适应高度 ============ */
header {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    height: auto !important;
    min-height: 64px;
    overflow: visible !important;
    background: #fff !important;
    box-shadow: 0 2px 10px rgba(20,50,110,.08);
}
body { padding-top: 0 !important; }
body > .banner { margin-top: 0 !important; }

header .wrapper { height: auto !important; min-height: 64px; }
header .logo { height: auto !important; }
header .logo img { max-height: 38px; width: auto; display: block; }

header .menu { height: auto !important; overflow: visible !important; }
header .menu nav {
    position: relative;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap;
    height: auto !important;
    min-height: 64px;
    overflow: visible !important;
}
header .menu nav > a {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: auto !important;
    min-height: 40px;
    padding: 6px 13px !important;
    margin: 0 !important;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5 !important;
    color: #333 !important;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    overflow: visible !important;
    background: transparent;
    transition: color .2s;
}
header .menu nav > a:hover,
header .menu nav > a.active { color: #2b7fff !important; }
header .menu nav > a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 0;
    height: 3px;
    border-radius: 2px;
    background: #2b7fff;
    transform: translateX(-50%);
    transition: width .25s ease;
}
header .menu nav > a:hover::after,
header .menu nav > a.active::after { width: 22px; }
header .menu nav > span { display: none !important; }

/* ============ 移动端：汉堡菜单竖排 ============ */
@media (max-width: 980px) {
    header .menu nav { display: block !important; min-height: 0; }
    header .menu nav > a {
        display: block !important;
        padding: 13px 18px !important;
        min-height: 0;
        border-top: 1px solid #f0f3f8;
    }
    header .menu nav > a::after { display: none; }
}

/* ============ 通用版块样式 ============ */
.a-sec { padding: 70px 0; background: #fff; }
.a-sec--gray { background: #f6f8fc; }
.a-sec .tit_header { text-align: center; margin-bottom: 40px; }

.a-grid { display: grid; gap: 22px; }
.a-grid--4 { grid-template-columns: repeat(4, 1fr); }
.a-grid--3 { grid-template-columns: repeat(3, 1fr); }
.a-grid--2 { grid-template-columns: repeat(2, 1fr); }

.a-card {
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 14px;
    padding: 28px 24px;
    box-shadow: 0 6px 18px rgba(23,66,153,.05);
    transition: transform .25s ease, box-shadow .25s ease;
}
.a-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(23,66,153,.12); }
.a-card h3 { margin: 0 0 10px; font-size: 18px; color: #1a1a1a; font-weight: 600; }
.a-card p { margin: 0; font-size: 14px; line-height: 1.8; color: #70798b; }
.a-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 16px;
    background: linear-gradient(135deg,#e8f1ff,#d5e6ff);
}

/* 教程卡片 */
.a-tuto ol { margin: 12px 0 0; padding-left: 20px; }
.a-tuto ol li { font-size: 14px; line-height: 1.9; color: #70798b; }
.a-tuto .a-link {
    display: inline-block; margin-top: 16px;
    font-size: 14px; color: #2b7fff; text-decoration: none;
}
.a-tuto .a-link:hover { text-decoration: underline; }

/* 数据条 */
.a-stats { background: linear-gradient(120deg,#2b7fff,#5a9bff); padding: 44px 0; }
.a-stats .wrapper { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 20px; text-align: center; }
.a-stats-item strong { display: block; font-size: 34px; color: #fff; line-height: 1.2; font-weight: 700; }
.a-stats-item span { display: block; margin-top: 8px; font-size: 14px; color: rgba(255,255,255,.85); }

/* 固件表格 */
.a-table-wrap { overflow-x: auto; border-radius: 14px; box-shadow: 0 6px 18px rgba(23,66,153,.06); }
.a-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; min-width: 760px; }
.a-table th { background: #eef4ff; color: #2b3a55; font-weight: 600; text-align: left; padding: 15px 18px; white-space: nowrap; }
.a-table td { padding: 14px 18px; border-top: 1px solid #f0f3f8; color: #4a5568; white-space: nowrap; }
.a-table tbody tr:hover { background: #f8fbff; }
.a-tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; background: #e8f1ff; color: #2b7fff; }
.a-tag--green { background: #e7f8ee; color: #17a673; }
.a-tag--gray { background: #f1f3f7; color: #8a94a6; }
.a-btn {
    display: inline-block; padding: 7px 18px; border-radius: 20px;
    background: #2b7fff; color: #fff; font-size: 13px;
    text-decoration: none; transition: background .2s;
}
.a-btn:hover { background: #1668e3; color: #fff; }

/* FAQ */
.a-faq { background: #fff; border: 1px solid #eef1f6; border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.a-faq summary {
    list-style: none; cursor: pointer; padding: 18px 52px 18px 22px;
    font-size: 16px; font-weight: 600; color: #1a1a1a; position: relative;
}
.a-faq summary::-webkit-details-marker { display: none; }
.a-faq summary::after {
    content: "+"; position: absolute; right: 22px; top: 50%;
    transform: translateY(-50%); font-size: 22px; color: #2b7fff; font-weight: 400; line-height: 1;
}
.a-faq[open] summary::after { content: "\2212"; }
.a-faq[open] summary { color: #2b7fff; }
.a-faq-body {
    padding: 16px 22px 20px; font-size: 14px;
    line-height: 1.9; color: #70798b; border-top: 1px solid #f2f5fa;
}

/* 更新日志时间线 */
.a-timeline { position: relative; }
.a-timeline::before {
    content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px;
    width: 2px; background: linear-gradient(#2b7fff,#dbe7ff);
}
.a-tl-item { position: relative; padding-left: 34px; margin-bottom: 28px; }
.a-tl-item:last-child { margin-bottom: 0; }
.a-tl-dot {
    position: absolute; left: 0; top: 4px;
    width: 20px; height: 20px; border-radius: 50%;
    background: #fff; border: 4px solid #2b7fff;
    box-sizing: border-box; z-index: 1;
}
.a-tl-content { background: #fff; border: 1px solid #eef1f6; border-radius: 12px; padding: 20px 24px; }
.a-tl-content h3 { margin: 0 0 12px; font-size: 17px; color: #1a1a1a; }
.a-tl-content h3 span { font-size: 13px; font-weight: 400; color: #98a2b3; margin-left: 10px; }
.a-tl-content ul { margin: 0; padding-left: 20px; }
.a-tl-content ul li { font-size: 14px; line-height: 1.9; color: #70798b; }

/* 响应式 */
@media (max-width: 1100px) {
    .a-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .a-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
    .a-grid--4, .a-grid--3, .a-grid--2 { grid-template-columns: 1fr; }
    .a-sec { padding: 48px 0; }
    .a-stats-item strong { font-size: 26px; }
}