/* ============================================================
   MODULE.CSS v3.0 - 组件样式
   ============================================================
   匹配 Section 模板:
   - AuthorBoxSection / AuthorProfileSection / AuthorPostsListSection / MainAuthorsSection
   - FaqSection
   - SidebarWidgetsSection
   - PaginationSection
   - SearchBoxSection / SearchResultsSection
   - Error404Section
   - LegalArticleSection
   - PostListSection / RelatedPostsSection
   - SocialShareSection
   ============================================================ */

/* ============================================
   1. Author Profile (AuthorProfileSection)
   ============================================ */
.author-profile {
    background: linear-gradient(135deg, #f7f7f5 0%, #ebeef4 52%, #fdfcf9 100%);
}

.author-profile h1 {
    color: #2f3e56;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.author-profile img.rounded-circle {
    border: 4px solid #fdfaf2;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(47, 62, 86, 0.08), 0 10px 18px rgba(119, 133, 158, 0.14);
    filter: saturate(1.03) contrast(1.01);
}

.author-profile .badge.bg-light {
    background: #eef2f7 !important;
    color: #355070 !important;
    border-color: #d8e0ea !important;
    border-style: solid;
    border-radius: 4px;
    transition: all 0.18s ease-out;
}

.author-profile .badge.bg-light:hover {
    background: #ff7a59 !important;
    color: #fffdf9 !important;
}

/* ============================================
   2. Author Box (AuthorBoxSection)
   ============================================ */
.author-box {
    border-inline-start: 4px solid #ff7a59;
    border-radius: 5px;
    transition: all 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.author-box:hover {
    box-shadow: 0 1px 4px rgba(53, 80, 112, 0.08), 0 8px 16px rgba(255, 122, 89, 0.12);
}

.author-box img {
    border-radius: 4px;
    transition: transform 0.2s ease-out, filter 0.2s ease-out;
    filter: saturate(1.02);
}

.author-box:hover img {
    transform: scale(1.05);
    filter: saturate(1.08);
}

/* ============================================
   3. Author Posts List (AuthorPostsListSection)
   ============================================ */
.author-posts-list .card {
    transition: all 0.24s ease;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(41, 51, 71, 0.06);
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 3px 8px rgba(41, 51, 71, 0.08), 0 12px 22px rgba(0, 168, 150, 0.12);
}

.author-posts-list .card-img-top {
    transition: transform 0.34s ease, filter 0.34s ease;
    filter: saturate(1.01);
}

.author-posts-list .card:hover .card-img-top {
    transform: scale(1.05);
    filter: saturate(1.08);
}

/* ============================================
   4. Main Authors (MainAuthorsSection)
   ============================================ */
.main-authors-section {
    background: #f1f3f6;
}

.author-card {
    transition: all 0.24s ease;
    border: 1px solid #dde4ec;
    border-style: solid;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(47, 62, 86, 0.05);
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 4px 10px rgba(47, 62, 86, 0.08), 0 14px 24px rgba(124, 92, 255, 0.14);
    border-color: #cfc8ff;
}

.author-card img.rounded-circle {
    border: 3px solid #edf1f5;
    border-radius: 5px;
    transition: border-color 0.24s ease, box-shadow 0.24s ease;
}

.author-card:hover img.rounded-circle {
    border-color: #7c5cff;
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.08);
}

/* ============================================
   5. FAQ (FaqSection) - <details>/<summary>
   ============================================ */
.faq-section {
    background: linear-gradient(180deg, #f3f5f8 0%, #fcfbf8 100%);
}

.faq-section h2 {
    font-size: 1.75rem;
    color: #2f3e56;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* FAQ item */
.faq-list .faq-item {
    border: 1px solid rgba(63, 78, 100, 0.09);
    border-style: solid;
    border-radius: 5px;
    transition: all 0.24s ease;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(47, 62, 86, 0.03);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(2px);
}

.faq-list .faq-item:hover {
    box-shadow: 0 2px 6px rgba(47, 62, 86, 0.08), 0 10px 18px rgba(255, 122, 89, 0.08) !important;
    transform: translateY(-2px);
    border-color: rgba(255, 122, 89, 0.18);
}

.faq-list .faq-item[open] {
    border-color: rgba(0, 168, 150, 0.24);
    background: linear-gradient(90deg, #eefbf8 0%, #fffdfa 100%);
    box-shadow: 0 2px 6px rgba(0, 168, 150, 0.08);
}

/* summary */
.faq-list .faq-item summary {
    list-style: none;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1.6;
    padding-inline-end: 2rem;
    position: relative;
    user-select: none;
    color: #334155;
}

.faq-list .faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-list .faq-item summary::marker {
    content: '';
}

.faq-list .faq-item summary::after {
    content: '+';
    position: absolute;
    inset-inline-end: 0.25rem;
    inset-block-start: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 300;
    color: #ff7a59;
    transition: transform 0.22s ease, color 0.22s ease;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.faq-list .faq-item[open] summary::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
    color: #00a896;
}

/* Q number */
.faq-list .faq-q-num {
    font-weight: 700;
    font-size: 0.95rem;
    color: #7c5cff;
}

/* Answer */
.faq-list .faq-answer {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #4a5568;
    animation: faqFadeIn 0.24s ease;
}

@keyframes faqFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   6. Sidebar Widgets (SidebarWidgetsSection)
   ============================================ */
.sidebar-widgets .card {
    transition: all 0.24s ease;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(47, 62, 86, 0.05);
}

.sidebar-widgets .card:hover {
    box-shadow: 0 2px 6px rgba(47, 62, 86, 0.08), 0 10px 16px rgba(124, 92, 255, 0.09);
}

.sidebar-widgets h5 {
    color: #2f3e56;
}

.sidebar-widgets .badge {
    transition: all 0.18s ease-out;
    cursor: pointer;
    border-radius: 4px;
}

.sidebar-widgets .badge:hover {
    background-color: #7c5cff !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(124, 92, 255, 0.14);
}

.sidebar-widgets ul li:last-child {
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.sidebar-widgets ul li a:hover .small {
    color: #00a896 !important;
}

/* ============================================
   7. Pagination (PaginationSection)
   ============================================ */
.pagination .page-link {
    color: #355070;
    border-color: #d8e0ea;
    border-style: solid;
    border-radius: 4px;
    transition: all 0.18s ease-out;
    box-shadow: 0 1px 2px rgba(47, 62, 86, 0.04);
}

.pagination .page-link:hover {
    background-color: #eef2f7;
    color: #2f3e56;
    border-color: #ff7a59;
    box-shadow: 0 2px 5px rgba(255, 122, 89, 0.1);
}

.pagination .page-item.active .page-link {
    background-color: #ff7a59;
    border-color: #ff7a59;
    color: #fffaf6;
    box-shadow: 0 2px 6px rgba(255, 122, 89, 0.16);
}

.pagination .page-item.disabled .page-link {
    color: #9aa6b2;
    opacity: 0.78;
}

/* ============================================
   8. Search Box (SearchBoxSection)
   ============================================ */
.search-box-section {
    background: #f1f3f6;
}

.search-box-section .input-group-lg .form-control {
    border-radius: 6px 0 0 6px;
    padding-inline-start: 1.5rem;
    border-color: #d8e0ea;
    border-style: solid;
    caret-color: #ff7a59;
    outline-color: #ff7a59;
    box-shadow: inset 0 1px 2px rgba(47, 62, 86, 0.04);
    transition: all 0.2s ease;
}

.search-box-section .input-group-lg .btn {
    border-radius: 0 6px 6px 0;
    background: linear-gradient(135deg, #ff7a59 0%, #ff9f5a 100%);
    border-color: #ff7a59;
    border-style: solid;
    color: #fffdf8;
    box-shadow: 0 1px 3px rgba(255, 122, 89, 0.12);
    transition: all 0.2s ease;
}

.search-box-section .badge {
    transition: all 0.18s ease-out;
    border-radius: 4px;
}

.search-box-section .badge:hover {
    background-color: #00a896 !important;
    color: #fff !important;
    border-color: #00a896 !important;
    border-style: solid !important;
}

/* ============================================
   9. Search Results (SearchResult
sSection)
   ============================================ */
.search-results-section {
    background: #f8f8f6;
}

.search-result {
    transition: all 0.24s ease;
    border-radius: 5px;
}

.search-result:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 6px rgba(47, 62, 86, 0.07), 0 10px 16px rgba(0, 168, 150, 0.08);
}

.search-result h2 a:hover {
    color: #7c5cff !important;
}

.search-result mark {
    background-color: #ffe48a;
    color: #5a4300;
    padding-inline: 2px;
    border-radius: 3px;
    font-weight: 600;
    box-shadow: inset 0 -1px 0 rgba(255, 159, 90, 0.35);
}

/* ============================================
   10. Error Page (Error404Section)
   ============================================ */
.error-page h1 {
    background: linear-gradient(135deg, #7c5cff, #00a896);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 6px 24px rgba(124, 92, 255, 0.16);
    filter: saturate(1.08);
}

.recommended-links .badge {
    transition: all 0.18s ease-out;
    border: 1px solid #d8e0ea;
    border-style: solid;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(47, 62, 86, 0.04);
}

.recommended-links .badge:hover {
    background-color: #ff7a59 !important;
    color: #fff !important;
    border-color: #ff7a59 !important;
    border-style: solid !important;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(255, 122, 89, 0.14);
}

.recommended-links .badge:hover .text-warning {
    color: #ffe48a !important;
}

/* ============================================
   11. Legal Article (LegalArticleSection)
   ============================================ */
.legal-article-section,
main:has(> .container > article.bg-white) {
    background: #f3f5f8;
}

article :is(h2.h4) {
    color: #355070;
    border-bottom: 2px solid #d8e0ea;
    padding-bottom: var(--space-xs);
    margin-bottom: var(--space-sm);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

article .alert-info {
    background-color: #eefbf8;
    border-color: #bfece5;
    border-style: solid;
    color: #20665e;
    border-radius: 5px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

article .list-group-item {
    background: transparent;
    transition: all 0.18s ease-out;
    border-radius: 4px;
}

article .list-group-item:hover {
    background: #eef2f7;
    padding-inline-start: var(--space-sm);
    box-shadow: inset 3px 0 0 rgba(124, 92, 255, 0.22);
}

/* ============================================
   12. Post List (PostListSection - Category page)
   ============================================ */
.posts-grid {
    /* Container nếu cần */
}

.posts-grid .card {
    transition: all 0.24s ease;
    border: 1px solid #dde4ec;
    border-style: solid;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(47, 62, 86, 0.05);
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 3px 8px rgba(47, 62, 86, 0.08), 0 12px 20px rgba(124, 92, 255, 0.11);
    border-color: #7c5cff;
}

.posts-grid .card-img-top {
    transition: transform 0.34s ease, filter 0.34s ease;
    filter: saturate(1.01);
}

.posts-grid .card:hover .card-img-top {
    transform: scale(1.05);
    filter: saturate(1.08);
}

.posts-grid .card-title a {
    transition: color 0.18s ease-out, text-shadow 0.18s ease-out;
}

.posts-grid .card-title a:hover {
    color: #ff7a59 !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ============================================
   13. Related Posts (RelatedPostsSection)
   ============================================ */
.related-posts h3 {
    border-bottom: 3px solid #00a896;
    padding-bottom: var(--space-xs);
    display: inline-block;
    color: #2f3e56;
}

.related-card {
    transition: all 0.24s ease;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(47, 62, 86, 0.04);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 2px 6px rgba(47, 62, 86, 0.08), 0 10px 18px rgba(0, 168, 150, 0.11);
}

.related-card img {
    transition: transform 0.34s ease, filter 0.34s ease;
    border-radius: 4px;
    filter: saturate(1.01);
}

.related-card:hover img {
    transform: scale(1.05);
    filter: saturate(1.07);
}

/* ============================================
   14. Social Share (SocialShareSection)
   ============================================ */
.social-share .btn {
    min-width: 40px;
    transition: all 0.18s ease-out;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(47, 62, 86, 0.04);
    accent-color: #7c5cff;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(47, 62, 86, 0.08), 0 6px 12px rgba(255, 122, 89, 0.1);
    filter: saturate(1.05);
}

.social-share [data-copy-url].copied {
    background-color: #00a896;
    color: #fff;

    border-color: #00a896;
    border-style: solid;
}

/* ============================================
   15. Bootstrap Accordion override
   ============================================ */
.accordion-button:not(.collapsed) {
    background-color: #eefbf8;
    color: #20665e;
    box-shadow: inset 0 -1px 0 rgba(0, 168, 150, 0.1);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(124, 92, 255, 0.14);
    outline-color: rgba(124, 92, 255, 0.24);
}

/* ============================================
   16. Modal (用于 SocialShare 微信二维码)
   ============================================ */
.modal-content {
    border: none;
    border-radius: 6px;
    box-shadow: 0 8px 18px rgba(47, 62, 86, 0.12), 0 20px 36px rgba(47, 62, 86, 0.1);
    background: linear-gradient(180deg, #ffffff 0%, #f8f8f6 100%);
    backdrop-filter: blur(6px);
}

/* ============================================
   17. Tooltip (Bootstrap)
   ============================================ */
.tooltip-inner {
    background-color: #2f3e56;
    color: #fffdf8;
    border-radius: 4px;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(47, 62, 86, 0.16);
}

/* ============================================
   18. Responsive
   ============================================ */
@media (max-width: 767.98px) {
    .faq-section h2 {
        font-size: 1.4rem;
    }

    .faq-list .faq-item summary {
        font-size: 0.95rem;
        padding-inline-end: 1.5rem;
    }

    .faq-list .faq-answer {
        font-size: 0.88rem;
    }

    .author-profile h1 {
        font-size: 1.5rem;
    }

    .author-profile .col-md-3 img {
        width: 120px !important;
        height: 120px !important;
    }

    .error-page h1 {
        font-size: 5rem !important;
    }

    .search-box-section .input-group-lg .form-control,
    .search-box-section .input-group-lg .btn {
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .related-posts .row > [class*="col-"] {
        margin-bottom: var(--space-sm);
    }

    .pagination .page-link {
        padding: 0.4rem 0.7rem;
        font-size: 0.9rem;
    }
}