/**
 * EverBen Components Styles
 * 组件样式表 - 用于 Header、Navigation、Footer
 */

/* ==================== CSS 变量 ==================== */
:root {
    --primary-color: #1C7C74;
    --primary-dark: #155952;
    --cta-color: #FBBF24;
    --cta-hover: #F59E0B;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
}

/* ==================== 基础重置 ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
	 padding-top: 110px; /* ← 从 70px 改为 110px (联系栏40px + 导航条70px) */ */
}

/* ==================== 顶部联系栏 ==================== */
.header-contact-bar {
    background: linear-gradient(135deg, #1C7C74 0%, #155952 100%);
    color: var(--white);
    padding: 8px 0;
    font-size: 13px;
	 height: 40px; /* ← 新增：固定高度 */
	  position: fixed;       /* 固定定位 */
    top: 0;               /* 初始在顶部 */
    left: 0;
    width: 100%;
    z-index: 1001;        /* 比导航条高一级 */
    transition: top 0.3s ease-in-out; /* 过渡动画 */
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-item {
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.3s;
	 /* 新增 */
    padding: 4px 12px;
    border-radius: 4px;
    background-color: var(--cta-color);  /* 默认黄色 #FBBF24 */
}

.contact-item:hover {
    opacity: 0.8;
    text-decoration: none;
	background-color: var(--cta-hover);   /* 悬停橙色 #F59E0B */
}

.contact-icon {
    font-size: 14px;
}

.cta-link {
    background-color: var(--cta-color);
    color: #333;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
}

.cta-link:hover {
    background-color: var(--cta-hover);
    opacity: 1;
}

.company-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.building-icon {
    font-size: 16px;
}

/* ==================== 主导航区域 ==================== */
.main-navigation {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;    /* 固定在顶部，永远可见 */
     top: 40px;  /* ← 从 top: 0 改为 top: 40px，在联系栏下方 */
    left: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

/* ==================== 桌面端导航菜单 ==================== */
.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 5px;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 25px 15px;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-item > a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.nav-item.nav-cta > a {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 5px;
}

.nav-item.nav-cta > a:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

/* 下拉菜单 */
.has-dropdown .dropdown-trigger {
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s;
}

.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 280px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 10px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.dropdown-menu li a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    text-decoration: none;
}

/* ==================== 移动端菜单按钮 ==================== */
.mobile-menu-toggle {
 position: relative;
    z-index: 1002;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-close-item {
    display: none;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-dark);
    cursor: pointer;
    padding: 10px;
    width: 100%;
    text-align: right;
}

/* ==================== 移动端遮罩层 ==================== */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.nav-overlay.active {
    display: block;
}

/* ==================== 页脚区域 ==================== */
.site-footer {
    background: linear-gradient(135deg, #1C7C74 0%, #155952 100%);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}



.footer-column h4 {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.footer-column p {
    color: #aaaaaa;
    line-height: 1.8;
    margin-bottom: 10px;
}

/* 默认（移动端）：可以自动换行 */
.footer-column p.email-line {
}

/* 桌面端（>992px）：不换行 */
@media screen and (min-width: 993px) {
    .footer-column p.email-line {
        white-space: nowrap;
    }
}

/* 链接也支持自动换行 */
.footer-column ul li a {
    word-wrap: break-word; /* 长单词/链接自动换行 */
}


.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #aaaaaa;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 14px;
}

.footer-column ul li a:hover {
    color: var(--cta-color);
    text-decoration: none;
}

.footer-column a {
    color: #aaaaaa;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--cta-color);
    text-decoration: none;
}

/* 页脚底部版权 */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}

.footer-bottom p {
    color: #ffffff !important;
    margin-bottom: 0;
}

/* ==================== 回到顶部按钮 ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* ==================== 响应式设计 ==================== */
@media screen and (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-close-item {
        display: block;
    }

    .nav-menu {
        position: fixed;
       top: 110px;              /* ← 从 top: 0 改为 top: 110px */
        right: -300px;
        width: 300px;
         height: calc(100% - 110px); /* ← 从 height: 100% 减去顶部高度 */
        background-color: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        margin: 0;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
        transition: right 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-item {
        border-bottom: 1px solid var(--border-color);
    }

    .nav-item > a {
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-item.nav-cta > a {
        background-color: transparent;
        color: var(--primary-color);
        justify-content: flex-start;
        padding: 15px 20px;
        border-radius: 0;
    }

    .has-dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .has-dropdown.active .dropdown-menu {
        max-height: 500px;
    }

    .dropdown-menu li a {
        padding: 12px 20px 12px 40px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .contact-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .contact-left {
        justify-content: center;
    }

    .company-name {
        display: none;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media screen and (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .contact-left {
        flex-direction: column;
        gap: 8px;
    }

    .nav-menu {
        width: 100%;
        right: -100%;
    }
}