/* 問答社區樣式 - 參考JustNews */

:root {
    --qaa-primary-color: #28c76f;
    --qaa-primary-rgba: rgba(40, 199, 111, 0.1);
}

/* 主容器樣式 */
.qaa-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* 標題樣式 */
.qaa-section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.qaa-section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--qaa-primary-color, #28c76f);
}

/* 搜索框樣式 */
.qaa-search-box {
    margin-bottom: 25px;
}

.qaa-search-box .form-control {
    border: 1px solid #eee;
    box-shadow: none;
    border-radius: 5px 0 0 5px;
    height: 46px;
}

.qaa-search-box .btn {
    border-radius: 0 5px 5px 0;
    height: 46px;
}

/* 問題卡片樣式 - 移除色塊效果 */
.qaa-item {
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 15px;
    padding: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    background: transparent;
}

.qaa-item:hover {
    box-shadow: none;
    transform: none;
    background-color: #f9f9f9;
    transition: background-color 0.3s;
}

.qaa-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.qaa-item-category a {
    display: inline-block;
    padding: 3px 10px;
    font-size: 13px;
    border-radius: 30px;
    background-color: var(--qaa-primary-rgba, rgba(40, 199, 111, 0.1));
    color: var(--qaa-primary-color, #28c76f);
    text-decoration: none;
}

.qaa-item-meta {
    color: #888;
    font-size: 13px;
}

.qaa-item-meta i {
    margin-right: 3px;
}

.qaa-item-meta span + span {
    margin-left: 15px;
}

.qaa-item-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.qaa-item-title a {
    color: #333;
    text-decoration: none;
}

.qaa-item-title a:hover {
    color: var(--qaa-primary-color, #28c76f);
}

.qaa-item-info {
    color: #888;
    font-size: 13px;
}

.qaa-item-info i {
    margin-right: 3px;
}

/* 調整左側發佈時間字號 */
.qaa-item-author, .qaa-item-date {
    color: #888;
    font-size: 13px;
}

/* 無問題狀態 */
.qaa-no-items {
    background: transparent;
    border: none;
    padding: 30px 0;
    text-align: center;
}

.qaa-no-items i {
    color: #ccc;
    margin-bottom: 15px;
}

.qaa-no-items p {
    font-size: 16px;
    color: #888;
    margin-bottom: 20px;
}

/* 側邊欄樣式 */
.qaa-sidebar {
    margin-bottom: 30px;
}

.qaa-sidebar-card {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}

.qaa-sidebar-card:first-child {
    margin-top: 0;
}

/* 无边框的侧边栏卡片 */
.qaa-sidebar-card.border-0 {
    border: none !important;
    box-shadow: none !important;
    padding: 0;
    margin-bottom: 20px;
}

.qaa-sidebar-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.qaa-sidebar-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--qaa-primary-color, #28c76f);
}

.qaa-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.qaa-category-list li {
    margin-bottom: 10px;
    position: relative;
}

.qaa-category-list li a {
    color: #555;
    display: block;
    padding: 5px 0;
    text-decoration: none;
    transition: all 0.3s;
}

.qaa-category-list li a:hover {
    color: var(--qaa-primary-color, #28c76f);
}

.qaa-category-list li.active > a {
    color: var(--qaa-primary-color, #28c76f);
    font-weight: 600;
}

.qaa-sub-category {
    list-style: none;
    padding-left: 20px;
    margin-top: 8px;
}

/* 問題分類標籤樣式 */
.qaa-category-tabs {
    margin-bottom: 25px;
}

.qaa-category-tabs .nav-tabs {
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.qaa-category-tabs .nav-link {
    color: #555;
    font-size: 16px;
    padding: 10px 20px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
}

.qaa-category-tabs .nav-link:hover,
.qaa-category-tabs .nav-link.active {
    color: var(--qaa-primary-color, #28c76f);
    border-bottom: 2px solid var(--qaa-primary-color, #28c76f);
    background: transparent;
}

/* 問題列表容器 */
.qaa-questions-container {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    padding: 15px;
    margin-top: 5px;
}

/* 分頁樣式 */
.qaa-pagination {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 問題詳情頁樣式 */
.qaa-question-detail {
    background: #fff;
    border-radius: 6px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #eee;
}

.qaa-question-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
    color: #333;
}

.qaa-question-content {
    font-size: 16px;
    line-height: 1.7;
    margin-top: 20px;
    color: #444;
}

.qaa-question-content p {
    margin-bottom: 15px;
}

.qaa-question-content img {
    max-width: 100%;
    height: auto;
}

/* 回答樣式 */
.qaa-answers-section {
    margin-top: 30px;
}

.qaa-answers-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.qaa-answer {
    background: #fff;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.qaa-answer-content {
    padding: 20px;
    font-size: 16px;
    line-height: 1.7;
    color: #444;
}

.qaa-answer-meta {
    padding: 15px 20px;
    border-top: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qaa-answer-author {
    color: #888;
    font-size: 14px;
}

.qaa-vote-btn {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s;
}

/* 提問表單樣式 */
.qaa-form-card {
    background: #fff;
    border-radius: 6px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #eee;
}

.qaa-form-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.qaa-tips-card {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #eee;
}

.qaa-tips-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.qaa-tips-list {
    padding-left: 20px;
    margin-bottom: 0;
}

.qaa-tips-list li {
    margin-bottom: 8px;
    color: #666;
}

.qaa-tips-list li:last-child {
    margin-bottom: 0;
}

/* 按鈕樣式 */
.qaa-btn {
    border-radius: 4px;
    padding: 8px 20px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: none;
}

.qaa-btn-primary {
    background-color: var(--qaa-primary-color, #28c76f);
    color: #fff;
    border: 2px solid var(--qaa-primary-color, #28c76f);
    width: 100%;
}

.qaa-btn-primary:hover {
    background-color: #fff;
    color: var(--qaa-primary-color, #28c76f);
    border-color: var(--qaa-primary-color, #28c76f);
}

.qaa-btn-outline {
    background-color: transparent;
    border: 1px solid #ddd;
    color: #666;
}

.qaa-btn-outline:hover {
    border-color: var(--qaa-primary-color, #28c76f);
    color: var(--qaa-primary-color, #28c76f);
}

/* 最新文章樣式 - 與博客详情页的Latests区块完全一致 */
.latest-blog {
    display: flex;
    flex-wrap: wrap;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid hsl(var(--black)/0.1);
}

.latest-blog:last-of-type {
    padding-bottom: 0px;
    margin-bottom: 0px;
    border-bottom: 0;
}

.latest-blog__thumb {
    width: 80px;
    max-height: 80px;
    display: flex;
    border-radius: 5px;
    overflow: hidden;
}

.latest-blog__thumb a {
    display: block;
    height: 100%;
    width: 100%;
}

.latest-blog__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.latest-blog__content {
    width: calc(100% - 80px);
    padding-left: 15px;
}

.latest-blog__title {
    margin-bottom: 5px;
}

.latest-blog__title a {
    font-weight: 500;
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    background-image: linear-gradient(to right, hsl(var(--base)) 0%, hsl(var(--base)) 100%);
    background-position: 0 calc(100% - 0.02em);
    background-size: 0 2px;
    transition: background-size 0.25s cubic-bezier(0.785, 0.135, 0.15, 0.86) 0s;
    padding: 0;
    display: inline;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.latest-blog__title a:hover {
    background-size: 100% 2px;
    color: inherit;
}

.latest-blog__date {
    color: #888;
    font-size: 13px;
}

/* 熱門問題樣式 */
.popular-widget-box .latest-blog {
    margin-bottom: 15px;
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
}

.popular-widget-box .latest-blog:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.popular-widget-box .latest-blog__thumb {
    width: 40px;
    max-height: 40px;
    display: flex;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 10px;
}

.popular-widget-box .latest-blog__content {
    width: calc(100% - 50px);
    padding-left: 0;
}

.popular-widget-box .latest-blog__title {
    margin-bottom: 5px;
}

.popular-widget-box .latest-blog__title a {
    font-weight: 500;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    color: #333;
    text-decoration: none;
    background-image: linear-gradient(to right, var(--qaa-primary-color, #28c76f) 0%, var(--qaa-primary-color, #28c76f) 100%);
    background-position: 0 calc(100% - 0.02em);
    background-size: 0 2px;
    transition: background-size 0.25s cubic-bezier(0.785, 0.135, 0.15, 0.86) 0s;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.popular-widget-box .latest-blog__title a:hover {
    background-size: 100% 2px;
    color: inherit;
}

.popular-widget-box .latest-blog__date {
    color: #888;
    font-size: 13px;
}

/* 響應式樣式 */
@media (max-width: 991px) {
    .qaa-sidebar {
        margin-top: 30px;
    }
    .qaa-banner-carousel {
        margin-bottom: 20px;
    }
    .qaa-banner-carousel .carousel-inner img {
        height: 300px;
    }
}

@media (max-width: 767px) {
    .qaa-question-title {
        font-size: 20px;
    }
    
    .qaa-section-title {
        font-size: 20px;
    }
    
    .qaa-item-title {
        font-size: 16px;
    }
    
    .qaa-form-card,
    .qaa-question-detail {
        padding: 15px;
    }
    .qaa-banner-carousel .carousel-inner img {
        height: 180px;
    }
}

/* Banner 輪播區塊樣式 */
.qaa-banner-carousel {
    width: 100%;
    margin-bottom: 5px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    background: #fff;
    max-width: 100%; /* 确保最大宽度为100% */
}
.qaa-banner-carousel .carousel-inner img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 10px;
}
.qaa-banner-carousel .carousel-indicators li {
    background-color: #28c76f;
}
.qaa-banner-carousel .carousel-control-prev-icon,
.qaa-banner-carousel .carousel-control-next-icon {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* H1标题样式 */
.qaa-main-title {
    display: none;
}

/* Banner标题样式 */
.banner-title {
    display: none;
} 