/* ============================================================
 * Zehga z-home 公共样式（reset / header / nav / mobile / footer）
 * 各页面专属样式仍保留在各自模板的 <style> 中
 * ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Microsoft YaHei", sans-serif;
    color: #1a1a1a;
    background: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.hl {
    display: flex;
    align-items: center;
    gap: 48px;
    height: 100%;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #1a1a1a;
    cursor: pointer;
    white-space: nowrap;
}

.logo img {
    width: autox;
    height: 40px;
    border-radius: 4px;
    margin-right: 8px;
}

.navs {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-item .nav-text {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 18px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-item:hover .nav-text {
    color: #1a1a1a;
    font-weight: 600;
}

.nav-item.active .nav-text {
    color: #1a1a1a;
    font-weight: 600;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: #fff;
    min-width: 140px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 4px 4px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    padding: 8px 0;
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown .dropdown-item {
    display: block;
    padding: 10px 24px;
    font-size: 13px;
    color: #555;
    white-space: nowrap;
    transition: all 0.2s;
    text-align: center;
}

.nav-dropdown .dropdown-item:hover {
    color: #1a1a1a;
    background: #f7f7f7;
    font-weight: 600;
}

.hr {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
}

.header-phone {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    width: 24px;
    background: #1a1a1a;
    transition: all 0.3s;
    margin: 0 auto;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========== MOBILE NAV ========== */
.mobile-nav {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 999;
    display: flex;
    flex-direction: column;
    padding: 20px 28px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-nav.open {
    transform: translateX(0);
}

.m-nav-link {
    display: block;
    padding: 16px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.m-nav-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.m-arrow {
    font-size: 20px;
    font-weight: 300;
    transition: transform 0.3s;
}

.m-nav-item.open .m-arrow {
    transform: rotate(45deg);
}

.m-sub {
    display: none;
    padding-left: 16px;
}

.m-nav-item.open .m-sub {
    display: block;
}

.m-sub-link {
    display: block;
    padding: 12px 0;
    font-size: 14px;
    color: #777;
    border-bottom: 1px solid #f5f5f5;
}

.m-nav-phone {
    margin-top: 28px;
    font-size: 15px;
    color: #999;
}

/* ========== FOOTER ========== */
footer {
    background: #303030;
    color: rgba(255, 255, 255, 0.7);
}

.footer {
    max-width: 1400px;
    margin: 0 auto;
    padding: 56px 40px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-logo {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

.footer-link {
    cursor: pointer;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #fff;
}

.footer-phone {
    color: rgba(255, 255, 255, 0.75);
}

.footer-phone strong {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 1px;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-social {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
}

.footer-social svg {
    width: 18px;
    height: 18px;
    fill: rgba(255, 255, 255, 0.7);
    transition: fill 0.25s;
}

.footer-social:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.footer-social:hover svg {
    fill: #fff;
}

.footer-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 40px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
}

/* ========== SCROLL FADE ANIMATION ========== */
.fade-in {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .header {
        padding: 0 20px;
    }

    .navs {
        display: none;
    }

    .header-phone {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .footer {
        flex-direction: column;
        gap: 24px;
        padding: 40px 24px 28px;
        text-align: center;
    }

    .footer-left {
        align-items: center;
    }
}
