/* safew 官网主题 — 青绿 + 珊瑚强调色 */
:root {
    --primary: #0f766e;
    --primary-dark: #115e59;
    --primary-light: #14b8a6;
    --accent: #f97316;
    --accent-soft: rgba(249, 115, 22, 0.12);
    --surface: #ffffff;
    --surface-alt: #f0fdfa;
    --surface-muted: #ecfdf5;
    --text: #134e4a;
    --text-muted: #5f7a78;
    --border: #99f6e4;
    --border-soft: #ccfbf1;
    --shadow-sm: 0 1px 3px rgba(15, 118, 110, 0.08);
    --shadow-md: 0 8px 24px rgba(15, 118, 110, 0.1);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.25s ease;
    --container-max: 1140px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body,
.safew-body {
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    color: var(--text);
    line-height: 1.65;
    background: var(--surface);
    margin: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* —— 导航 —— */
.safew-nav.z1fde5navbar,
.z1fde5navbar {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    padding: 0.65rem 0;
}

.z1fde5navbar-brand img {
    height: 42px;
    width: auto;
}

.z1fde5nav-link,
.safew-nav .nav-link {
    color: var(--text) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.45rem 0.85rem !important;
    border-radius: 8px;
    transition: color var(--transition), background var(--transition);
}

.z1fde5nav-link:hover,
.safew-nav .nav-link:hover {
    color: var(--primary) !important;
    background: var(--surface-muted);
}

.navbar-toggler {
    border: 1px solid var(--border-soft);
    padding: 0.4rem 0.55rem;
}

.navbar-collapse {
    background: var(--surface);
    padding: 0.75rem;
    border-radius: var(--radius);
}

@media (min-width: 992px) {
    .navbar-collapse {
        background: transparent;
        padding: 0;
        box-shadow: none;
    }
}

/* —— 按钮 —— */
.safew-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    transition: transform var(--transition), box-shadow var(--transition);
}

.safew-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 118, 110, 0.35);
    color: #fff !important;
}

.safew-btn-outline {
    background: #fff;
    color: var(--primary) !important;
    border: 2px solid var(--primary);
    border-radius: 10px;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
}

.safew-btn-outline:hover {
    background: var(--surface-muted);
    color: var(--primary-dark) !important;
}

.safew-btn-ghost {
    background: rgba(255, 255, 255, 0.15);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 10px;
    font-weight: 600;
}

.safew-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff !important;
}

/* —— 首屏 —— */
.safew-hero.z1fde5hero-section,
.z1fde5hero-section.safew-hero {
    background: linear-gradient(145deg, #0f766e 0%, #134e4a 55%, #042f2e 100%);
    color: #fff;
    padding: clamp(3rem, 8vw, 5.5rem) 0;
    overflow: hidden;
    position: relative;
}

.safew-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(20, 184, 166, 0.25), transparent 45%);
    pointer-events: none;
}

.safew-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

@media (min-width: 992px) {
    .safew-hero-grid {
        grid-template-columns: 1.05fr 0.95fr;
        gap: 3rem;
    }
}

.safew-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    margin-bottom: 1rem;
}

.safew-hero-title,
.z1fde5hero-title {
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.safew-hero-lead,
.z1fde5hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    opacity: 0.92;
    margin-bottom: 1.5rem;
    max-width: 36em;
}

.safew-hero-lead strong {
    font-weight: 600;
    color: #ccfbf1;
}

.safew-hero-cta,
.z1fde5hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.safew-hero-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
}

.safew-hero-img,
.z1fde5hero-image {
    max-width: 280px;
    margin: 0 auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.z1fde5hero-image-shadow {
    display: none;
}

/* —— 区块通用 —— */
.safew-section {
    padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.safew-section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2rem;
}

.safew-section-head h2 {
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.safew-section-head p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.98rem;
}

.safew-section-head-light h2,
.safew-section-head-light p {
    color: #fff;
}

.safew-section-head-left {
    text-align: left;
    margin-left: 0;
    max-width: none;
}

/* —— 产品亮点 Bento —— */
.safew-features {
    background: var(--surface-alt);
}

.safew-panel {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 1.35rem 1.5rem;
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
    overflow: hidden;
}

.safew-panel:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-md);
}

.safew-panel-accent {
    border-left: 4px solid var(--accent);
}

.safew-panel-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: block;
}

.safew-panel h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.safew-panel p {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin: 0;
}

.safew-panel-wide {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.safew-panel-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: #fff;
}

.safew-stat-num {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.safew-stat-txt {
    font-size: 0.88rem;
    opacity: 0.9;
}

/* —— 服务概览 —— */
.safew-metrics {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
}

.safew-metric-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    height: 100%;
}

.safew-metric-value,
.z1fde5stat-number {
    display: block;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 700;
    line-height: 1.2;
}

.safew-metric-label,
.z1fde5stat-label {
    display: block;
    font-size: 0.85rem;
    opacity: 0.88;
    margin-top: 0.25rem;
}

/* —— 下载区 —— */
.safew-download,
.z1fde5download-section {
    background: var(--surface);
}

.safew-dl-card,
.z1fde5download-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    position: relative;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.safew-dl-featured {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.safew-dl-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--accent);
    color: #fff;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
}

.safew-dl-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.safew-dl-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
}

.safew-dl-win { background: #2563eb; }
.safew-dl-android { background: #16a34a; }
.safew-dl-ios { background: #475569; }

.safew-dl-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.15rem;
    color: var(--primary-dark);
}

.safew-dl-list,
.z1fde5download-info {
    list-style: none;
    padding: 0.85rem 1rem;
    margin: 0 0 1rem;
    background: var(--surface-muted);
    border-radius: var(--radius);
    flex-grow: 1;
}

.safew-dl-list li,
.z1fde5info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.safew-dl-list li:last-child {
    margin-bottom: 0;
}

.safew-dl-list i {
    color: var(--primary);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.safew-dl-tip {
    margin-top: 1.5rem;
    padding: 0.85rem 1.1rem;
    background: var(--accent-soft);
    border-radius: var(--radius);
    border-left: 3px solid var(--accent);
    font-size: 0.9rem;
    color: var(--text);
}

.safew-dl-tip p {
    margin: 0;
}

/* —— 知识区 —— */
.safew-knowledge {
    background: var(--surface-muted);
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.safew-knowledge-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-soft);
}

.safew-knowledge-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.safew-knowledge-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.35rem;
}

.safew-knowledge-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* —— 安全 —— */
.safew-security,
.z1fde5security-section {
    background: var(--surface-alt);
}

.safew-sec-card,
.z1fde5security-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 1.25rem;
    height: 100%;
    text-align: center;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.safew-sec-icon,
.z1fde5security-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    font-size: 1.2rem;
}

.safew-sec-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.35rem;
}

.safew-sec-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.safew-cert,
.z1fde5certificate-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    height: 100%;
}

.safew-cert i {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.safew-cert h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.safew-cert p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

/* —— FAQ —— */
.safew-faq {
    background: var(--surface);
}

.safew-faq-card {
    background: var(--surface-alt);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 1.15rem 1.25rem;
    height: 100%;
}

.safew-faq-card h5 {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.4rem;
}

.safew-faq-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
}

/* —— 文章 —— */
.safew-articles {
    background: var(--surface-muted);
}

.safew-article-card {
    border: 1px solid var(--border-soft) !important;
    border-radius: var(--radius) !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm) !important;
}

.safew-article-thumb,
.z1fde5thumb-home {
    width: 100%;
    height: 110px;
    object-fit: cover;
}

.safew-article-card .card-body {
    padding: 0.75rem !important;
}

.safew-article-link {
    color: var(--primary-dark);
    font-weight: 500;
}

.safew-article-link:hover {
    color: var(--primary);
}

/* —— 页脚 —— */
.safew-footer,
.z1fde5footer {
    background: #042f2e;
    color: #99f6e4;
    padding: 2.5rem 0 1.5rem;
}

.z1fde5footer-title,
.footer-title {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.z1fde5footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.z1fde5footer-link,
.safew-footer a {
    color: #99f6e4;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color var(--transition);
}

.z1fde5footer-link:hover,
.safew-footer a:hover {
    color: #fff;
}

.z1fde5footer-bottom,
.footer-bottom {
    border-top: 1px solid rgba(153, 246, 228, 0.2);
    padding-top: 1rem;
    margin-top: 1.5rem;
    color: #5eead4;
    font-size: 0.85rem;
}

.safew-friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* —— 列表 / 内页 —— */
.z1fde5pages .pagelist,
.pagebar .pagelist {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.pagebar .pagelist li {
    display: inline-flex;
    margin: 0;
}

.listbox .card,
article.card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    overflow: hidden;
}

.z1fde5article-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.z1fde5article-content img {
    max-width: 100%;
    height: auto;
}

.z1fde5thumb-list,
.z1fde5thumb-related {
    width: 100%;
    height: 84px;
    object-fit: cover;
    border-radius: 8px;
}

.z1fde5thumb-side {
    width: 100%;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
}

.z1fde5thumb-cover {
    max-width: 100% !important;
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    border-radius: var(--radius);
}

/* 兼容旧类名 */
.z1fde5feature-card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.z1fde5stat-item {
    text-align: center;
}

/* —— 移动端 —— */
@media (max-width: 991px) {
    .safew-hero-cta .btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 140px;
    }

    .safew-section-head {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 767px) {
    .z1fde5navbar {
        padding: 0.5rem 0;
    }

    .z1fde5navbar .navbar-collapse {
        margin-top: 0.5rem;
        max-height: 70vh;
        overflow-y: auto;
        border: 1px solid var(--border-soft);
    }

    .safew-hero-cta,
    .z1fde5hero-buttons {
        flex-direction: column;
    }

    .safew-hero-cta .btn,
    .z1fde5hero-buttons .btn {
        width: 100%;
        flex: none;
    }

    .safew-dl-head {
        flex-wrap: wrap;
    }

    .safew-dl-card .btn {
        white-space: normal;
    }

    .safew-metric-item {
        padding: 1rem 0.65rem;
    }

    .safew-article-thumb,
    .z1fde5thumb-home {
        height: 96px;
    }

    #article h3.h6,
    #article .h6 {
        font-size: 0.9rem;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .listbox .e2 li {
        padding-bottom: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }

    .listbox .e2 li h2.h5 {
        font-size: 1rem;
        line-height: 1.35;
    }

    .z1fde5thumb-list,
    .z1fde5thumb-related {
        height: 72px !important;
    }

    .z1fde5thumb-side {
        height: 50px !important;
    }

    .z1fde5thumb-cover {
        max-height: 170px !important;
    }

    aside .card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 575px) {
    .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .safew-panel {
        padding: 1.1rem;
    }

    .safew-dl-card {
        padding: 1.1rem;
    }

    .safew-article-thumb,
    .z1fde5thumb-home {
        height: 88px;
    }

    .z1fde5thumb-list,
    .z1fde5thumb-related {
        height: 64px !important;
    }

    .pagebar .pagelist {
        gap: 0.35rem;
    }
}

/* 防止边框溢出 */
.safew-panel,
.safew-dl-card,
.safew-sec-card,
.safew-faq-card,
.safew-article-card,
.card {
    max-width: 100%;
}

.row {
    margin-left: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
    margin-right: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
}

.btn {
    max-width: 100%;
}
