/* ============================================================
   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, #f7f7fb 0%, #e9eefc 52%, #f6ecff 100%);
}

.author-profile h1 {
    color: #3f2a78;
    text-shadow: 0 2px 10px rgba(121, 87, 255, 0.16);
}

.author-profile img.rounded-circle {
    border: 4px solid #fff4fd;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(89, 55, 170, 0.16), 0 0 0 6px rgba(255, 255, 255, 0.72), 0 0 30px rgba(124, 92, 255, 0.2);
    filter: saturate(1.06) contrast(1.02);
}

.author-profile .badge.bg-light {
    background: #f1ebff !important;
    color: #5b3ea8 !important;
    border-color: #d9c9ff !important;
    border-style: solid;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(122, 92, 255, 0.12);
    transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.author-profile .badge.bg-light:hover {
    background: #7c5cff !important;
    color: #fff7ff !important;
    box-shadow: 0 0 24px rgba(124, 92, 255, 0.4), 0 8px 18px rgba(124, 92, 255, 0.28);
}

/* ============================================
   2. Author Box (AuthorBoxSection)
   ============================================ */
.author-box {
    border-inline-start: 4px solid #ff6b9f;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(255, 107, 159, 0.08);
    transition: all 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.author-box:hover {
    box-shadow: 0 14px 30px rgba(44, 25, 84, 0.14), 0 0 24px rgba(255, 107, 159, 0.26);
}

.author-box img {
    border-radius: 16px;
    filter: saturate(1.04);
    transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), filter 0.26s ease;
}

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

/* ============================================
   3. Author Posts List (AuthorPostsListSection)
   ============================================ */
.author-posts-list .card {
    transition: all 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(63, 42, 120, 0.08);
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 34px rgba(41, 28, 84, 0.16), 0 0 24px rgba(39, 209, 201, 0.22);
}

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

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

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

.author-card {
    transition: all 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px dashed #d9dff5;
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(56, 43, 102, 0.08);
    backdrop-filter: blur(6px);
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 38px rgba(37, 27, 74, 0.18), 0 0 28px rgba(255, 154, 60, 0.24);
}

.author-card img.rounded-circle {
    border: 3px solid #efe7ff;
    border-radius: 20px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.8);
    transition: border-color 0.34s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.34s ease;
}

.author-card:hover img.rounded-circle {
    border-color: #ff9a3c;
    box-shadow: 0 0 0 4px rgba(255, 154, 60, 0.16), 0 0 24px rgba(255, 154, 60, 0.32);
}

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

.faq-section h2 {
    font-size: 1.75rem;
    color: #3c276d;
    text-shadow: 0 2px 8px rgba(124, 92, 255, 0.12);
}

/* FAQ item */
.faq-list .faq-item {
    border: 1px dashed rgba(124, 92, 255, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 18px rgba(53, 36, 104, 0.06);
    transition: all 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.faq-list .faq-item:hover {
    box-shadow: 0 12px 26px rgba(48, 32, 96, 0.12), 0 0 24px rgba(39, 209, 201, 0.2) !important;
    transform: translateY(-2px);
}

.faq-list .faq-item[open] {
    border-color: rgba(124, 92, 255, 0.34);
    background: linear-gradient(90deg, #eef8ff 0%, #fdf6ff 100%);
    box-shadow: 0 16px 32px rgba(73, 47, 146, 0.12), 0 0 24px rgba(124, 92, 255, 0.18);
}

/* 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: #3f3567;
}

.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: #7c5cff;
    text-shadow: 0 0 16px rgba(124, 92, 255, 0.32);
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), color 0.34s ease, text-shadow 0.34s ease;
    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: #ff6b9f;
    text-shadow: 0 0 14px rgba(255, 107, 159, 0.24);
}

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

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

/* ============================================
   6. Sidebar Widgets (SidebarWidgetsSection)
   ============================================ */
.sidebar-widgets .card {
    transition: all 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(55, 40, 110, 0.08);
}

.sidebar-widgets .card:hover {
    box-shadow: 0 16px 30px rgba(42, 30, 88, 0.14), 0 0 24px rgba(255, 154, 60, 0.24);
}

.sidebar-widgets h5 {
    color: #3d2c70;
    text-shadow: 0 1px 6px rgba(124, 92, 255, 0.12);
}

.sidebar-widgets .badge {
    transition: all 0.26s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(124, 92, 255, 0.1);
}

.sidebar-widgets .badge:hover {
    background-color: #27d1c9 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(39, 209, 201, 0.4), 0 8px 16px rgba(39, 209, 201, 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: #7c5cff !important;
}

/* ============================================
   7. Pagination (PaginationSection)
   ============================================ */
.pagination .page-link {
    color: #7c5cff;
    border-color: #d7cff9;
    border-style: solid;
    border-radius: 12px;
    background-color: #fcfbff;
    box-shadow: 0 6px 14px rgba(75, 52, 147, 0.06);
    transition: all 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.pagination .page-link:hover {
    background-color: #f2ecff;
    color: #4f37a1;
    border-color: #7c5cff;
    box-shadow: 0 0 24px rgba(124, 92, 255, 0.24), 0 10px 18px rgba(124, 92, 255, 0.14);
}

.pagination .page-item.active .page-link {
    background-color: #7c5cff;
    border-color: #7c5cff;
    color: #fff9ff;
    box-shadow: 0 0 24px rgba(124, 92, 255, 0.4), 0 10px 20px rgba(124, 92, 255, 0.24);
}

.pagination .page-item.disabled .page-link {
    color: #aea6c9;
    background-color: #f4f1fb;
    border-color: #e5dff6;
    opacity: 0.82;
}

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

.search-box-section .input-group-lg .form-control {
    border-radius: 18px 0 0 18px;
    padding-inline-start: 1.5rem;
    border-color: #d6d9ef;
    border-style: solid;
    box-shadow: inset 0 1px 2px rgba(60, 44, 110, 0.04), 0 8px 16px rgba(62, 46, 119, 0.06);
    caret-color: #ff6b9f;
    outline-color: #7c5cff;
}

.search-box-section .input-group-lg .btn {
    border-radius: 0 18px 18px 0;
    background: linear-gradient(135deg, #7c5cff 0%, #27d1c9 100%);
    border-color: #7c5cff;
    border-style: solid;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(84, 63, 170, 0.18);
}

.search-box-section .badge {
    transition: all 0.26s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 999px;
}

.search-box-section .badge:hover {
    background-color: #ff6b9f !important;
    color: #fff8fc !important;
    border-color: #ff6b9f !important;
    box-shadow: 0 0 24px rgba(255, 107, 159, 0.36), 0 8px 16px rgba(255, 107, 159, 0.2);
}

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

.search-result {
    transition: all 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 14px;
}

.search-result:hover {
    transform: translateX(3px);
    box-shadow: 0 14px 26px rgba(49, 35, 98, 0.12), 0 0 24px rgba(39, 209, 201, 0.16);
}

.search-result h2 a:hover {
    color: #7c5cff !important;
    text-shadow: 0 0 14px rgba(124, 92, 255, 0.18);
}

.search-result mark {
    background-color: #ffe88f;
    color: #5d4200;
    padding-inline: 2px;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 0 0 1px rgba(255, 210, 76, 0.3), 0 0 14px rgba(255, 210, 76, 0.18);
}

/* ============================================
   10. Error Page (Error404Section)
   ============================================ */
.error-page h1 {
    background: linear-gradient(135deg, #ff6b9f, #7c5cff 55%, #27d1c9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 6px 34px rgba(124, 92, 255, 0.26), 0 0 24px rgba(255, 107, 159, 0.18);
    filter: saturate(1.08);
}

.recommended-links .badge {
    transition: all 0.26s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px dashed #d7cff9;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(76, 56, 146, 0.08);
}

.recommended-links .badge:hover {
    background-color: #7c5cff !important;
    color: #fff9ff !important;
    border-color: #7c5cff !important;
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(124, 92, 255, 0.4), 0 10px 18px rgba(124, 92, 255, 0.22);
}

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

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

article :is(h2.h4) {
    color: #4f37a1;
    border-bottom: 2px dashed #ddd4fb;
    padding-bottom: var(--space-xs);
    margin-bottom: var(--space-sm);
    text-shadow: 0 1px 6px rgba(124, 92, 255, 0.1);
}

article .alert-info {
    background-color: #eefcff;
    border-color: #9be9e4;
    border-style: solid;
    color: #295f71;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(39, 209, 201, 0.1);
}

article .list-group-item {
    background: rgba(255, 255, 255, 0);
    transition: all 0.26s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 12px;
}

article .list-group-item:hover {
    background: #f4efff;
    padding-inline-start: var(--space-sm);
    box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.08), 0 8px 16px rgba(124, 92, 255, 0.06);
}

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

.posts-grid .card {
    transition: all 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #dddaf2;
    border-style: solid;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(58, 43, 111, 0.08);
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 34px rgba(42, 29, 88, 0.16), 0 0 24px rgba(255, 107, 159, 0.22);
    border-color: #ff6b9f;
}

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

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

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

.posts-grid .card-title a:hover {
    color: #7c5cff !important;
    text-shadow: 0 0 16px rgba(124, 92, 255, 0.18);
}

/* ============================================
   13. Related Posts (RelatedPostsSection)
   ============================================ */
.related-posts h3 {
    border-bottom: 3px solid #27d1c9;
    padding-bottom: var(--space-xs);
    display: inline-block;
    color: #3d2d72;
    text-shadow: 0 1px 6px rgba(39, 209, 201, 0.12);
}

.related-card {
    transition: all 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(53, 39, 105, 0.08);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 30px rgba(40, 28, 84, 0.14), 0 0 24px rgba(39, 209, 201, 0.24);
}

.related-card img {
    transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1), filter 0.52s ease;
    border-radius: 14px;
}

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

/* ============================================
   14. Social Share (SocialShareSection)
   ============================================ */
.social-share .btn {
    min-width: 40px;
    transition: all 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(55, 41, 106, 0.08);
    accent-color: #7c5cff;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(124, 92, 255, 0.24), 0 10px 18px rgba(46, 33, 91, 0.14);
    filter: brightness(1.03) saturate(1.08);
}

.social-share [data-copy-url].copied {
    background-color: #27d1c9;
    color: #faffff;
    border-color: #27d1c9;
    border-style: solid;
    box-shadow: 0 0 24px rgba(39, 209, 201, 0.4), 0 10px 18px rgba(39, 209, 201, 0.22);
}

/* ============================================
   15. Bootstrap Accordion override
   ============================================ */
.accordion-button:not(.collapsed) {
    background-color: #f2eeff;
    color: #4f37a1;
    box-shadow: inset 0 -1px 0 rgba(124, 92, 255, 0.08), 0 8px 18px rgba(124, 92, 255, 0.08);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(124, 92, 255, 0.18), 0 0 24px rgba(124, 92, 255, 0.18);
    outline-color: #7c5cff;
    outline-style: solid;
}

/* ============================================
   16. Modal (用于 SocialShare 微信二维码)
   ============================================ */
.modal-content {
    border: none;
    border-radius: 18px;
    box-shadow: 0 24px 48px rgba(31, 21, 63, 0.24), 0 0 32px rgba(124, 92, 255, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 241, 255, 0.98) 100%);
    backdrop-filter: blur(12px);
}

/* ============================================
   17. Tooltip (Bootstrap)
   ============================================ */
.tooltip-inner {
    background-color: #31215c;
    color: #fff8ff;
    border-radius: 10px;
    font-size: 0.85rem;
    box-shadow: 0 10px 22px rgba(28, 19, 56, 0.24), 0 0 20px rgba(124, 92, 255, 0.16);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

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