/* 导航菜单增强样式 */
/* 头部导航优化美化 */

/* 基础导航栏样式 */
.main-header-section {
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1000;
}

.main-header-section:hover {
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.12);
}

/* 站点标题美化 */
.header-title a {
    font-weight: 700;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.header-title a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--wp--preset--color--primary), #3498db);
    transition: width 0.3s ease;
}

.header-title a:hover::after {
    width: 100%;
}

/* 导航菜单美化 */
.header-main-menu {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-main-menu li {
    position: relative;
    transition: all 0.3s ease;
}

.header-main-menu a {
    font-weight: 500;
    font-size: 16px;
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 悬停效果 */
.header-main-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
    transition: left 0.5s ease;
}

.header-main-menu a:hover::before {
    left: 100%;
}

.header-main-menu a:hover {
    background: rgba(52, 152, 219, 0.08);
    color: var(--wp--preset--color--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

/* 当前页面高亮 */
.header-main-menu .current-menu-item a,
.header-main-menu .current_page_item a {
    background: linear-gradient(135deg, var(--wp--preset--color--primary), #3498db);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.header-main-menu .current-menu-item a:hover,
.header-main-menu .current_page_item a:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-1px);
}

/* 子菜单样式 */
.header-main-menu ul {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1001;
}

.header-main-menu li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-main-menu ul li {
    width: 100%;
}

.header-main-menu ul a {
    display: block;
    padding: 12px 20px;
    color: #333;
    font-weight: 400;
    border-radius: 0;
    transform: none;
    box-shadow: none;
}

.header-main-menu ul a:hover {
    background: #f8f9fa;
    color: var(--wp--preset--color--primary);
    transform: none;
    box-shadow: none;
}

/* 搜索框美化 */
.header-search .wp-block-search {
    max-width: 200px;
}

.header-search .wp-block-search__input {
    border: 2px solid #e9ecef;
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.header-search .wp-block-search__input:focus {
    border-color: var(--wp--preset--color--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

.header-search .wp-block-search__button {
    background: var(--wp--preset--color--primary);
    border: none;
    border-radius: 30px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.header-search .wp-block-search__button:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* 按钮美化 */
.header-actions .wp-block-button__link {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.header-actions .wp-block-button__link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.header-actions .wp-block-button__link:hover::before {
    left: 100%;
}

.header-actions .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .header-main-menu {
        gap: 15px;
    }
    
    .header-main-menu a {
        font-size: 15px;
        padding: 8px 12px;
    }
    
    .header-search .wp-block-search {
        max-width: 150px;
    }
}

@media (max-width: 768px) {
    .main-header-section {
        padding: 10px 0 !important;
    }
    
    .header-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-menu {
        width: 100%;
        justify-content: center;
    }
    
    .header-main-menu {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .header-main-menu a {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .header-search {
        display: none;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .header-actions .wp-block-button__link {
        font-size: 14px;
        padding: 6px 16px !important;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 18px !important;
    }
    
    .header-main-menu {
        gap: 5px;
    }
    
    .header-main-menu a {
        font-size: 13px;
        padding: 5px 8px;
    }
    
    .header-actions .wp-block-button__link {
        font-size: 13px;
        padding: 5px 12px !important;
    }
}

/* 滚动时的头部效果 */
.scrolled .main-header-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 25px rgba(0, 0, 0, 0.1);
}

/* 动画效果 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-header-section {
    animation: fadeInDown 0.6s ease-out;
}

/* 加载动画 */
.header-loading {
    position: relative;
    overflow: hidden;
}

.header-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}