/**
 * Beyond Compare 网站统一组件样式
 * 导航栏和页脚的统一样式
 */

/* ========== 导航栏样式 ========== */
.header {
    background: linear-gradient(180deg, rgba(30, 30, 30, 0.95) 0%, rgba(26, 26, 26, 0.92) 100%);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.85;
}

.logo-img {
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 2px 8px rgba(221, 52, 52, 0.3));
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
    line-height: 1.1;
}

.logo-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
}

/* 导航菜单 */
.nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    margin-right: 32px;
}

.nav-menu li a {
    display: block;
    padding: 8px 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: #fff;
}

/* 下拉菜单 */
.nav-menu li.has-dropdown {
    position: relative;
}

.nav-menu li.has-dropdown > a {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-menu li.has-dropdown > a .dropdown-arrow {
    width: 10px;
    height: 10px;
    transition: transform 0.3s ease;
}

.nav-menu li.has-dropdown:hover > a .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: auto;
    background: rgba(26, 26, 26, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.nav-menu li.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 24px 10px 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 8px 0;
}

.dropdown-label {
    padding: 8px 20px 4px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 导航按钮 */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.75);
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-red), #c42e2e);
    color: #fff;
    box-shadow: 0 4px 14px rgba(221, 52, 52, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e63939, var(--color-red));
    box-shadow: 0 6px 20px rgba(221, 52, 52, 0.45);
    transform: translateY(-1px);
}

/* 汉堡菜单按钮 */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger.active {
    background: rgba(221, 52, 52, 0.15);
    border-color: rgba(221, 52, 52, 0.3);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 移动端菜单 */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 20px;
    z-index: 999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

body.mobile-menu-open {
    overflow: hidden;
}

.mobile-menu ul {
    list-style: none;
    margin-bottom: 24px;
}

.mobile-menu ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-menu ul li:last-child {
    border-bottom: none;
}

.mobile-menu ul li.mobile-section-title {
    padding: 16px 16px 8px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: none;
}

.mobile-menu ul li.mobile-section-title:not(:first-of-type) {
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
}

.mobile-menu ul li a {
    display: flex;
    align-items: center;
    padding: 18px 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.25s ease;
    border-radius: 12px;
    margin: 4px 0;
}

.mobile-menu ul li a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

.mobile-menu ul li a.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(221, 52, 52, 0.15) 0%, rgba(221, 52, 52, 0.05) 100%);
}

.mobile-menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu-buttons .btn {
    text-align: center;
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
}

/* ========== 页脚样式 ========== */
.footer {
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    color: rgba(255, 255, 255, 0.6);
    padding: 60px 0 30px;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-info {
    flex: 1;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-brand img {
    width: 36px;
    height: 36px;
}

.footer-brand-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.footer-brand-by {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-left: 6px;
    font-weight: 400;
}

.footer-desc {
    font-size: 12px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.4);
    max-width: 500px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.footer-contact-item:hover {
    color: #fff;
}

.footer-contact-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 0;
    font-size: 12px;
}

.footer-links-label {
    color: rgba(255, 255, 255, 0.25);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.3);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: rgba(255, 255, 255, 0.6);
}

.footer-links-divider {
    color: rgba(255, 255, 255, 0.15);
    margin: 0 2px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copyright {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.footer-reseller {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
}

/* ========== 响应式样式 ========== */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 24px;
    }

    .nav-menu {
        margin-right: 20px;
    }

    .nav-menu li a {
        padding: 8px 14px;
        font-size: 13px;
    }
}

@media (max-width: 900px) {
    .header-container {
        padding: 0 20px;
    }

    .nav-menu,
    .nav-buttons {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

@media (max-width: 700px) {
    .footer-main {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .footer-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-brand {
        justify-content: center;
        margin-bottom: 10px;
    }

    .footer-desc {
        text-align: center;
        font-size: 11px;
        line-height: 1.6;
    }

    .footer-contact {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
        width: 100%;
    }

    .footer-contact-item {
        font-size: 12px;
    }

    .footer-contact-item svg {
        width: 12px;
        height: 12px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 4px 6px;
        padding: 16px 0;
    }

    .footer-links-label {
        width: 100%;
        margin-bottom: 4px;
    }

    .footer-links-divider {
        display: none;
    }

    .footer-links a {
        padding: 4px 8px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 4px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding-top: 16px;
    }

    .footer-copyright,
    .footer-reseller {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 16px;
        height: 64px;
    }

    .logo-img {
        width: 36px;
        height: 36px;
    }

    .logo-title {
        font-size: 17px;
    }

    .logo-subtitle {
        font-size: 10px;
    }

    .mobile-menu {
        top: 64px;
        padding: 16px;
    }

    .hamburger {
        width: 40px;
        height: 40px;
    }
}
