/*
 Theme Name: Astra Child
 Theme URI: https://example.com/
 Description: Astra子主题，包含登录页面、搜索页面和搜索结果页面
 Author: Your Name
 Author URI: https://example.com/
 Template: astra
 Version: 1.0.0
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: astra-child
*/

/* 自定义样式 */


/* ======  font-awesome 样式兼容 ====== */
/* 兼容旧版 fa 类 */



/* ====== 全局样式 ======= */
body {
    margin: 0;
    padding: 0;
}

.ast-container {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.ast-plain-container.ast-no-sidebar #primary {
    margin: 0;
}

.ast-primary-header-bar .site-primary-header-wrap {
    padding: 0 20px;
    height: 60px;
    min-height: 60px;
    max-height: 60px;
}

#primary.content-area {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    margin-top: 0; /* Ensure margin-top is always 0 */
}

#main.site-main {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}


/* ====== 导航栏模块样式 ====== */
/* 顶部导航栏固定定位 */
.ast-primary-header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.site-logo-img {
    position: absolute;
}

/* 页面内容顶部留出导航栏空间 */
body {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 60px;
}
.custom-user-info {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding-left: 15px;
}

.custom-user-info .user-avatar {
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.custom-user-info .user-name {
    margin-right: 12px;
    font-weight: 500;
}

.custom-user-info .user-links {
    display: flex;
    gap: 15px;
}

.custom-user-info a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.custom-user-info a:hover {
    color: #0073aa;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .ast-primary-header-bar .main-navigation ul {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: flex-end !important;
        overflow-x: auto;
        background: none !important;
    }
    .ast-primary-header-bar .main-navigation li {
        flex-shrink: 0;
        width: auto !important;
        white-space: nowrap;
        margin: 0;
    }
    .menu-item-user-info {
        margin: 0;
    }
}


/* ====== 文章详情页面样式 ====== */
#page .site-content {
    display: flex;
    flex-direction: column;
}

body.single #page .site-content {
    align-items: center;
}


/* ====== 首页搜索页面样式 ====== */
/* 首页布局样式 */
.home #primary.content-area {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.search-form-custom {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}


/* ====== 搜索详情页面（分析、优化、洞察）样式 ====== */
.custom-container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: stretch;
}

/* 添加响应式布局样式 */
.custom-sidebar {
    flex: 0 0 250px;
    margin-right: 20px;
    height: 100%;
}

.custom-content {
    flex: 1;
}

/* 文章分割线样式 */
.post-divider {
    margin: 30px 0;
    border: 0;
    height: 1px;
    background: #eee;
}


/* ====== 顶部导航栏用户菜单样式 ====== */
/* .menu-item-user-settings .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
}

.menu-item-user-settings .user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 120px;
    z-index: 1000;
}

.menu-item-user-settings .dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.menu-item-user-settings .dropdown-item:last-child {
    border-bottom: none;
}

.menu-item-user-settings .dropdown-item:hover {
    background-color: #f5f5f5;
}

.menu-item-user-settings .custom-user-info {
    position: relative;
} */

/* 移动端适配样式 */
@media (max-width: 768px) {
    .custom-container {
        flex-direction: column;
        height: calc(100vh - 60px);
        overflow: hidden;
    }
    
    .post-item {
        margin-bottom: 20px;
    }
    
    .post-meta {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .custom-content {
        padding: 0 5px;
    }
    
    .post-item h2 {
        font-size: 20px;
    }
}


/* ====== 左侧菜单样式 ====== */

/* 新增样式：左侧菜单自适应高度和高亮显示 */
.custom-sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 250px;
    height: calc(100vh - 60px);
    padding: 0;
    margin: 0;
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    z-index: 999;
    overflow-y: auto;
}

/* 主内容区域留出左侧导航栏空间 */
.custom-content {
    margin-left: 250px;
}

.sidebar-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.nav-item.active .nav-link {
    background-color: #f0f0f0;
    color: #000;
    font-weight: bold;
}

.nav-link:hover {
    background-color: #f0f0f0;
}

.nav-item.active .nav-link:hover {
    background-color: #f0f0f0;
}

/* ====== 文章列表样式 ====== */
.post-item {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.post-item h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.post-item h2 a {
    color: #333;
    text-decoration: none;
}

.post-item h2 a:hover {
    color: #0073aa;
}

.post-meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.post-excerpt {
    color: #888;
    font-size: 0.95em;
    line-height: 1.6;
}

.post-divider {
    margin: 30px 0;
}

/* 移动端样式覆盖 */
@media (max-width: 768px) {
    .custom-sidebar {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        height: auto;
        margin-right: 0;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        margin-bottom: 0;
        flex-shrink: 0;
        padding: 10px 0;
        flex: 0 0 auto
    }
    
    .custom-content {
        margin-left: 0;
        padding: 0 10px;
        flex: 1;
        overflow-y: auto;
    }
    
    .sidebar-navigation ul {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding: 0 10px;
        margin: 0;
    }
    
    .nav-item {
        margin-bottom: 0;
        flex-shrink: 0;
        border: none;
    }
    
    .nav-link {
        padding: 8px 12px;
        white-space: nowrap;
        border-radius: 20px;
        background-color: transparent;
        font-size: 14px;
        text-decoration: none;
    }
    
    .nav-item.active .nav-link {
        background-color: #f0f0f0;
    }

    /* .custom-logo-link > img,
    .site-logo-img img {
        transform: scale(0.7);
    } */
}

@media (max-width: 480px) {
    .custom-sidebar {
        padding: 5px 0;
        flex: 0 0 auto;
    }
    
    .sidebar-navigation ul {
        padding: 0 5px;
        border: none;
    }
    
    .nav-link {
        padding: 6px 10px;
        font-size: 12px;
    }

    /* .custom-logo-link > img,
    .site-logo-img img {
        transform: scale(0.4);
    } */
}

/* ====== 导航栏Logo响应式缩放 ====== */
/* .custom-logo-link > img,
.site-logo-img img {
    transition: transform 0.3s ease;
    transform-origin: left center;
} */
