:root {
    --primary: #15336e;
    --secondary: #866A2D;
    --accent: #c9a145;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --transition: all 0.3s ease;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f6f7;
    color: #333;
    line-height: 1.6;
}

.w {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
}

.space {
    height: 60px;
}

.header-placeholder {
    height: 80px;
    background: linear-gradient(to right, var(--primary), #2a5298);
}

/* 页面标题区域 */
.page-banner {
    position: relative;
    height: 40vh;
    min-height: 300px;
    overflow: hidden;
    border-radius: 0 0 20px 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-content {
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 20px;
}

.banner-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-content p {
    font-size: 1.4rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* 疑问分类导航 */
.faq-categories {
    background: white;
    padding: 30px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.categories-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.category-btn {
    padding: 12px 25px;
    background-color: var(--light-gray);
    border: none;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: var(--transition);
}

.category-btn:hover, .category-btn.active {
    background: linear-gradient(to right, var(--secondary), var(--accent));
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(134, 106, 45, 0.3);
}

/* 疑问解答区域 */
.faq-container {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    /*margin-bottom: 20px; !* 添加间距 *!*/
    /*padding-top: 40px; !* 防止 category 遮挡 question *!*/
}

.faq-item:hover {
    box-shadow: var(--shadow-hover);
}

.faq-question {
    padding: 25px 70px 25px 30px;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--secondary);
}

.faq-question::after {
    content: '\e619'; /* 这是 layui iconfont 的 Unicode 编码，例如向下箭头 */
    font-family: "layui-icon"; /* 使用 Layui 的字体 */
    font-style: normal;
    font-weight: normal;
    display: inline-block;
    vertical-align: middle;
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    transition: var(--transition);
    color: var(--accent);
}

.faq-item.active .faq-question::after {
    transform: translateY(-50%) rotate(180deg);
}

.faq-answer {
    padding: 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
    color: var(--gray);
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    padding: 0 30px 30px;
    max-height: 500px;
}

.faq-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--light-gray);
    padding: 3px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1; /* 确保层级正确 */
}

/* 侧边栏 */
.faq-sidebar {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-size: 1.5rem;
    color: var(--primary);
    padding-bottom: 15px;
    margin-bottom: 25px;
    border-bottom: 3px solid var(--accent);
    position: relative;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--secondary);
}

.popular-questions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.popular-item {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--light-gray);
}

.popular-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-rank {
    flex: 0 0 30px;
    height: 30px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--dark);
}

.popular-item:nth-child(1) .popular-rank {
    background: var(--accent);
    color: white;
}

.popular-item:nth-child(2) .popular-rank {
    background: #c9a145cc;
    color: white;
}

.popular-item:nth-child(3) .popular-rank {
    background: #c9a14599;
    color: white;
}

.popular-content {
    flex: 1;
}

.popular-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.popular-title:hover {
    color: var(--secondary);
}

.popular-date {
    color: var(--gray);
    font-size: 0.9rem;
}

.search-box {
    position: relative;
    margin-bottom: 30px;
}

.search-box input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid var(--light-gray);
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 161, 69, 0.2);
}

.search-box button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--secondary);
    transform: translateY(-50%) scale(1.05);
}

/* 问题提交表单 */
.submit-form {
    background: linear-gradient(to bottom, rgba(26, 42, 108, 0.03), rgba(26, 42, 108, 0.08));
    padding: 30px;
    border-radius: 12px;
    border-top: 3px solid var(--accent);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 161, 69, 0.2);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.submit-btn {
    background: linear-gradient(to right, var(--secondary), var(--accent));
    color: white;
    border: none;
    padding: 14px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(134, 106, 45, 0.3);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .faq-container {
        grid-template-columns: 2fr 1fr;
    }
}

@media (max-width: 992px) {
    .faq-container {
        grid-template-columns: 1fr;
    }

    .faq-sidebar {
        position: static;
    }

    .banner-content h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .faq-question {
        padding: 20px 50px 20px 20px;
        font-size: 1.2rem;
    }

    .faq-question::after {
        right: 20px;
    }

    .banner-content h1 {
        font-size: 2.2rem;
    }

    .banner-content p {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .banner-content h1 {
        font-size: 1.8rem;
    }

    .faq-question {
        padding: 18px 45px 18px 18px;
        font-size: 1.1rem;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 60px;
}
