/* ============================================================
   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(128deg, #fff8ef 0%, #fde7cc 38%, #efe2ff 100%);
}

.author-profile h1 {
    color: #5c2f86;
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.7);
}

.author-profile img.rounded-circle {
    border: 4px solid #fff6ea;
    border-radius: 38%;
    box-shadow: 0 10px 24px rgba(92, 47, 134, 0.16), 0 2px 8px rgba(255, 122, 61, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.75);
    filter: saturate(1.05) contrast(1.02);
}

.author-profile .badge.bg-light {
    background: linear-gradient(135deg, #fff3df 0%, #f7e8ff 100%) !important;
    color: #6a3f22 !important;
    border-color: #d79b62 !important;
    border-style: solid;
    border-radius: 999px;
    transition: all 0.48s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 4px 10px rgba(138, 82, 180, 0.08);
}

.author-profile .badge.bg-light:hover {
    background: linear-gradient(135deg, #ff8b4d 0%, #8a52b4 100%) !important;
    color: #fffaf4 !important;
    box-shadow: 0 8px 18px rgba(138, 82, 180, 0.22);
}

/* ============================================
   2. Author Box (AuthorBoxSection)
   ============================================ */
.author-box {
    border-inline-start: 4px solid #ff8b4d;
    border-image: linear-gradient(180deg, #ffb36d 0%, #ff8b4d 48%, #8a52b4 100%) 1;
    border-radius: 0 20px 20px 0;
    transition: all 0.52s cubic-bezier(0.22, 1, 0.36, 1);
    background: linear-gradient(135deg, rgba(255, 246, 234, 0.85) 0%, rgba(247, 232, 255, 0.7) 100%);
}

.author-box:hover {
    box-shadow: 0 14px 34px rgba(92, 47, 134, 0.14), 0 4px 14px rgba(255, 139, 77, 0.16);
}

.author-box img {
    transition: transform 0.48s cubic-bezier(0.22, 1, 0.36, 1), filter 0.48s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 34%;
    filter: saturate(1.04);
}

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

/* ============================================
   3. Author Posts List (AuthorPostsListSection)
   ============================================ */
.author-posts-list .card {
    transition: all 0.52s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    border-color: #e7c59f;
    border-style: solid;
    border-radius: 24px 10px 24px 10px;
    background: linear-gradient(145deg, #fffaf2 0%, #fff1df 55%, #f8ecff 100%);
    box-shadow: 0 6px 18px rgba(106, 63, 34, 0.06);
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 36px rgba(92, 47, 134, 0.16), 0 6px 18px rgba(255, 139, 77, 0.18);
}

.author-posts-list .card-img-top {
    transition: transform 0.58s cubic-bezier(0.22, 1, 0.36, 1), filter 0.58s cubic-bezier(0.22, 1, 0.36, 1);
    filter: saturate(1.02);
}

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

/* ============================================
   4. Main Authors (MainAuthorsSection)
   ============================================ */
.main-authors-section {
    background: linear-gradient(180deg, #f7ecff 0%, #fff6ea 56%, #ffe8d3 100%);
}

.author-card {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #d7b4ef;
    border-style: solid;
    border-radius: 28px 12px 28px 12px;
    background: linear-gradient(135deg, #ffffff 0%, #fff3e5 62%, #f5e9ff 100%);
    box-shadow: 0 8px 22px rgba(92, 47, 134, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 42px rgba(92, 47, 134, 0.16), 0 10px 22px rgba(255, 139, 77, 0.16);
}

.author-card img.rounded-circle {
    border: 3px solid #ffe5c8;
    border-radius: 36%;
    transition: border-color 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 6px 14px rgba(255, 139, 77, 0.12);
}

.author-card:hover img.rounded-circle {
    border-color: #8a52b4;
    box-shadow: 0 10px 22px rgba(138, 82, 180, 0.2);
}

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

.faq-section h2 {
    font-size: 1.75rem;
    color: #5c2f86;
    text-shadow: 0 2px 10px rgba(138, 82, 180, 0.08);
}

/* FAQ item */
.faq-list .faq-item {
    border: 1px solid rgba(138, 82, 180, 0.16);
    border-style: solid;
    border-radius: 22px 8px 22px 8px;
    background: linear-gradient(135deg, rgba(255, 250, 242, 0.96) 0%, rgba(247, 232, 255, 0.88) 100%);
    transition: all 0.52s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(92, 47, 134, 0.05);
}

.faq-list .faq-item:hover {
    box-shadow: 0 16px 30px rgba(92, 47, 134, 0.12), 0 4px 14px rgba(255, 139, 77, 0.14) !important;
    transform: translateY(-2px);
}

.faq-list .faq-item[open] {
    border-color: rgba(255, 139, 77, 0.42);
    background: linear-gradient(90deg, #fff0dc 0%, #f5e7ff 54%, #ffffff 100%);
    box-shadow: 0 16px 34px rgba(138, 82, 180, 0.12);
}

/* 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: #45215f;
}

.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: #ff8b4d;
    text-shadow: 0 2px 10px rgba(255, 139, 77, 0.2);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), color 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    line-height: 1;
}

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

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

/* Answer */
.faq-list .faq-answer {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #6a3f22;
    animation: faqFadeIn 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ============================================
   6. Sidebar Widgets (SidebarWidgetsSection)
   ============================================ */
.sidebar-widgets .card {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    border-color: #dfbfd3;
    border-style: solid;
    border-radius: 22px 10px 22px 10px;
    background: linear-gradient(145deg, #fffaf4 0%, #fff0df 45%, #f7ebff 100%);
    box-shadow: 0 8px 18px rgba(92, 47, 134, 0.06);
}

.sidebar-widgets .card:hover {
    box-shadow: 0 16px 34px rgba(92, 47, 134, 0.12), 0 5px 14px rgba(255, 139, 77, 0.14);
}

.sidebar-widgets h5 {
    color: #5c2f86;
}

.sidebar-widgets .badge {
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff3df 0%, #f5e8ff 100%);
    color: #6a3f22;
    box-shadow: 0 4px 10px rgba(106, 63, 34, 0.06);
}

.sidebar-widgets .badge:hover {
    background-color: #8a52b4 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(138, 82, 180, 0.2);
}

.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: #ff8b4d !important;
}

/* ============================================
   7. Pagination (PaginationSection)
   ============================================ */
.pagination .page-link {
    color: #8a52b4;
    border-color: #ddb6a0;
    border-style: solid;
    border-radius: 16px 6px 16px 6px;
    background: linear-gradient(135deg, #fffaf3 0%, #fff0dd 100%);
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 4px 12px rgba(106, 63, 34, 0.05);
}

.pagination .page-link:hover {
    background-color: #f7e8ff;
    color: #5c2f86;
    border-color: #8a52b4;
    box-shadow: 0 10px 20px rgba(138, 82, 180, 0.14);
}

.pagination .page-item.active .page-link {
    background-color: #8a52b4;
    background-image: linear-gradient(135deg, #ff8b4d 0%, #8a52b4 100%);
    border-color: #8a52b4;
    color: #fff7f0;
    box-shadow: 0 12px 22px rgba(138, 82, 180, 0.2);
}

.pagination .page-item.disabled .page-link {
    color: #b69c88;
    background: linear-gradient(135deg, #fbf4ec 0%, #f6ede6 100%);
    opacity: 0.78;
}

/* ============================================
   8. Search Box (SearchBoxSection)
   ============================================ */
.search-box-section {
    background: linear-gradient(180deg, #fff5e8 0%, #f7ecff 100%);
}

.search-box-section .input-group-lg .form-control {
    border-radius: 999px 0 0 999px;
    padding-inline-start: 1.5rem;
    border-color: #d8b5ef;
    border-style: solid;
    background: linear-gradient(135deg, #ffffff 0%, #fff7ef 100%);
    color: #5a3420;
    caret-color: #ff8b4d;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 8px 18px rgba(92, 47, 134, 0.05);
}

.search-box-section .input-group-lg .btn {
    border-radius: 0 999px 999px 0;
    background: linear-gradient(135deg, #ff9a5f 0%, #8a52b4 100%);
    border-color: #8a52b4;
    border-style: solid;
    color: #fff8f2;
    box-shadow: 0 10px 20px rgba(138, 82, 180, 0.18);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.search-box-section .badge {
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 999px;
    background: linear-gradient(135deg, #fff2df 0%, #f6e9ff 100%);
    color: #6a3f22;
    border-color: #e0b58a !important;
    border-style: solid !important;
}

.search-box-section .badge:hover {
    background-color: #8a52b4 !important;
    color: #fff !important;
    border-color: #8a52b4 !important;
    box-shadow: 0 10px 18px rgba(138, 82, 180, 0.18);
}

/* ============================================
   9. Search Results (SearchResult
sSection)
   ============================================ */
.search-results-section {
    background: linear-gradient(180deg, #fffdf9 0%, #fff4e6 50%, #f8eeff 100%);
}

.search-result {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 22px 8px 22px 8px;
    background: linear-gradient(135deg, rgba(255, 250, 244, 0.72) 0%, rgba(247, 235, 255, 0.6) 100%);
}

.search-result:hover {
    transform: translateX(3px);
    box-shadow: 0 16px 30px rgba(92, 47, 134, 0.12), 0 4px 14px rgba(255, 139, 77, 0.14);
}

.search-result h2 a:hover {
    color: #8a52b4 !important;
}

.search-result mark {
    background: linear-gradient(135deg, #ffd87a 0%, #ffb95e 100%);
    color: #5a321d;
    padding-inline: 2px;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 185, 94, 0.22);
}

/* ============================================
   10. Error Page (Error404Section)
   ============================================ */
.error-page h1 {
    background: linear-gradient(135deg, #ff9a5f 0%, #ff6f61 36%, #8a52b4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 8px 28px rgba(138, 82, 180, 0.18);
    filter: drop-shadow(0 10px 20px rgba(255, 139, 77, 0.12));
}

.recommended-links .badge {
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #dfbeaa;
    border-style: solid;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff6ea 0%, #f6eaff 100%);
    color: #6a3f22;
    box-shadow: 0 4px 12px rgba(92, 47, 134, 0.06);
}

.recommended-links .badge:hover {
    background-color: #8a52b4 !important;
    color: #fff !important;
    border-color: #8a52b4 !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(138, 82, 180, 0.18), 0 4px 12px rgba(255, 139, 77, 0.12);
}

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

/* ============================================
   11. Legal Article (LegalArticleSection)
   ============================================ */
.legal-article-section,
main:has(> .container > article.bg-white) {
    background: linear-gradient(180deg, #fff6ea 0%, #f8ecff 100%);
}

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

article .alert-info {
    background-color: #fff1de;
    background-image: linear-gradient(135deg, #fff3e2 0%, #f4e8ff 100%);
    border-color: #d7b4ef;
    color: #5c2f86;
    border-style: solid;
    border-radius: 20px 8px 20px 8px;
    box-shadow: 0 10px 22px rgba(92, 47, 134, 0.08);
}

article .list-group-item {
    background: transparent;
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
    border-color: rgba(223, 190, 170, 0.7);
}

article .list-group-item:hover {
    background: linear-gradient(90deg, #fff4e7 0%, #f7ebff 100%);
    padding-inline-start: var(--space-sm);
    border-radius: 16px 6px 16px 6px;
}

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

.posts-grid .card {
    transition: all 0.52s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #dfbfd3;
    border-style: solid;
    overflow: hidden;
    border-radius: 26px 10px 26px 10px;
    background: linear-gradient(145deg, #fffaf3 0%, #fff0e0 48%, #f7ebff 100%);
    box-shadow: 0 8px 20px rgba(92, 47, 134, 0.06);
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 38px rgba(92, 47, 134, 0.14), 0 8px 18px rgba(255, 139, 77, 0.16);
    border-color: #8a52b4;
}

.posts-grid .card-img-top {
    transition: transform 0.58s cubic-bezier(0.22, 1, 0.36, 1), filter 0.58s cubic-bezier(0.22, 1, 0.36, 1);
    filter: saturate(1.03);
}

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

.posts-grid .card-title a {
    transition: color 0.46s cubic-bezier(0.22, 1, 0.36, 1), text-shadow 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

.posts-grid .card-title a:hover {
    color: #8a52b4 !important;
    text-shadow: 0 4px 10px rgba(138, 82, 180, 0.12);
}

/* ============================================
   13. Related Posts (RelatedPostsSection)
   ============================================ */
.related-posts h3 {
    border-bottom: 3px solid #ff8b4d;
    border-image: linear-gradient(90deg, #ffb36d 0%, #ff8b4d 52%, #8a52b4 100%) 1;
    padding-bottom: var(--space-xs);
    display: inline-block;
    color: #5c2f86;
}

.related-card {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 22px 8px 22px 8px;
    background: linear-gradient(135deg, #fffaf3 0%, #f8ecff 100%);
    box-shadow: 0 8px 18px rgba(92, 47, 134, 0.06);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 34px rgba(92, 47, 134, 0.14), 0 5px 14px rgba(255, 139, 77, 0.14);
}

.related-card img {
    transition: transform 0.58s cubic-bezier(0.22, 1, 0.36, 1), filter 0.58s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 18px 6px 18px 6px;
    filter: saturate(1.03);
}

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

/* ============================================
   14. Social Share (SocialShareSection)
   ============================================ */
.social-share .btn {
    min-width: 40px;
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 16px 6px 16px 6px;
    box-shadow: 0 6px 14px rgba(92, 47, 134, 0.08);
    accent-color: #8a52b4;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(92, 47, 134, 0.14), 0 4px 12px rgba(255, 139, 77, 0.12);
    filter: saturate(1.08);
}

.social-share [data-copy-url].copied {
    background-color: #4d9a74;
    background-image: linear-gradient(135deg, #6bc48f 0%, #4d9a74 100%);
    color: #fff;

    border-color: #4d9a74;
    border-style: solid;
}

/* ============================================
   15. Bootstrap Accordion override
   ============================================ */
.accordion-button:not(.collapsed) {
    background-color: #fff0de;
    background-image: linear-gradient(135deg, #fff2e1 0%, #f4e8ff 100%);
    color: #5c2f86;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(138, 82, 180, 0.18);
    outline-color: rgba(255, 139, 77, 0.35);
    outline-style: solid;
}

/* ============================================
   16. Modal (用于 SocialShare 微信二维码)
   ============================================ */
.modal-content {
    border: none;
    border-radius: 28px 12px 28px 12px;
    box-shadow: 0 28px 60px rgba(92, 47, 134, 0.18), 0 10px 24px rgba(255, 139, 77, 0.12);
    background: linear-gradient(145deg, #fffaf4 0%, #fff0df 48%, #f8ecff 100%);
    backdrop-filter: blur(10px) saturate(1.05);
}

/* ============================================
   17. Tooltip (Bootstrap)
   ============================================ */
.tooltip-inner {
    background-color: #4b245f;
    background-image: linear-gradient(135deg, #6f3f97 0%, #4b245f 100%);
    color: #fff7f1;
    border-radius: 12px 4px 12px 4px;
    font-size: 0.85rem;
    box-shadow: 0 10px 22px rgba(75, 36, 95, 0.2);
}

/* ============================================
   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;
    }
}