/**
 * 星伦数智AI产品团队 - 通用头部导航样式
 * 与 index.html 保持完全一致的 Tailwind 风格
 */

/* 顶部导航 */
.main-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.main-header > .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo区域 - 完全匹配 index.html */
.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.header-logo img {
    height: 2.5rem;
    width: auto;
    object-fit: contain;
}

.header-logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #165DFF, #722ED1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo-icon i {
    color: white;
    font-size: 1.25rem;
}

.header-logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #165DFF;
    margin: 0;
}

/* 主导航菜单 - 完全匹配 index.html */
.header-nav {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 768px) {
    .header-nav {
        display: flex;
    }
}

/* 导航项 - 完全匹配 index.html 的 px-4 py-2 */
.nav-item {
    position: relative;
}

.nav-item > a,
.nav-item > button {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-item > a:hover,
.nav-item > button:hover {
    background: #f3f4f6;
    color: #165DFF;
}

/* 图标间距 - 匹配 index.html 的 mr-1 */
.nav-item > a > i:first-child,
.nav-item > button > i:first-child {
    margin-right: 0.25rem;
}

/* 下拉箭头 - 匹配 index.html 的 text-xs ml-1 */
.nav-item > button > i.fa-chevron-down {
    font-size: 0.75rem;
    margin-left: 0.25rem;
    transition: transform 0.2s;
}

.nav-item:hover > button > i.fa-chevron-down {
    transform: rotate(180deg);
}

/* 下拉菜单 - 完全匹配 index.html 的 w-56 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    width: 14rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    padding: 0.5rem 0;
    z-index: 100;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-menu a:hover {
    background: #eff6ff;
}

/* 下拉菜单图标容器 - 匹配 index.html 的 w-8 h-8 */
.dropdown-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dropdown-icon.blue {
    background: #dbeafe;
}

.dropdown-icon.purple {
    background: #f3e8ff;
}

.dropdown-icon.green {
    background: #dcfce7;
}

/* 下拉菜单图标 - 匹配 index.html 的 text-sm */
.dropdown-icon i {
    font-size: 0.875rem;
}

.dropdown-icon.blue i {
    color: #3b82f6;
}

.dropdown-icon.purple i {
    color: #a855f7;
}

.dropdown-icon.green i {
    color: #22c55e;
}

.dropdown-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2937;
}

.dropdown-desc {
    font-size: 0.75rem;
    color: #6b7280;
}

/* 移动端菜单按钮 - 匹配 index.html 的 w-10 h-10 */
.mobile-menu-btn {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn:hover {
    color: #165DFF;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn i {
    font-size: 1.25rem;
}

/* 移动端菜单 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 1000;
    overflow-y: auto;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu > .container {
    display: block;
    padding: 1rem;
}

/* 移动端首页链接 */
.mobile-menu > .container > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    color: #165DFF;
    font-weight: 500;
    text-decoration: none;
}

/* 移动端导航分区 */
.mobile-nav-section {
    margin-bottom: 1rem;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.mobile-nav-header.blue {
    color: #2563eb;
}

.mobile-nav-header.purple {
    color: #9333ea;
}

.mobile-nav-header.green {
    color: #16a34a;
}

.mobile-nav-links {
    margin-left: 1.5rem;
}

.mobile-nav-links a {
    display: block;
    padding: 0.5rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 0.5rem;
}

.mobile-nav-links a:hover {
    color: #165DFF;
    background: #f9fafb;
}

/* 颜色工具类 */
.text-primary {
    color: #165DFF !important;
}

.text-blue-500 {
    color: #3b82f6 !important;
}

.text-purple-500 {
    color: #a855f7 !important;
}

.text-green-500 {
    color: #22c55e !important;
}
