/* ============================================================
   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, #f7fbff 0%, #edf4fb 42%, #f5f1ff 100%);
}

.author-profile h1 {
    color: #35506f;
}

.author-profile img.rounded-circle {
    border: 4px solid #fdfefe;
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(74, 109, 148, 0.14), 0 2px 8px rgba(124, 95, 189, 0.12);
}

.author-profile .badge.bg-light {
    background: linear-gradient(135deg, #eef5fb 0%, #e9f0ff 50%, #f4efff 100%) !important;
    color: #48627f !important;
    border-color: #c9d8eb !important;
    border-style: solid !important;
    border-image: linear-gradient(135deg, #d4e3f4 0%, #c9d7ff 50%, #dccdf6 100%) 1;
    border-radius: 999px;
    transition: all 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.author-profile .badge.bg-light:hover {
    background: linear-gradient(135deg, #6a90c9 0%, #7a82d9 50%, #8d72c9 100%) !important;
    color: #fbfdff !important;
}

/* ============================================
   2. Author Box (AuthorBoxSection)
   ============================================ */
.author-box {
    border-inline-start: 4px solid #7e8fce;
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(72, 102, 138, 0.08), 0 1px 4px rgba(130, 112, 176, 0.08);
    transition: all 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

.author-box:hover {
    box-shadow: 0 16px 36px rgba(77, 108, 145, 0.16), 0 4px 12px rgba(134, 113, 184, 0.14);
}

.author-box img {
    border-radius: 16px;
    filter: saturate(1.03) contrast(1.01);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ============================================
   3. Author Posts List (AuthorPostsListSection)
   ============================================ */
.author-posts-list .card {
    background: linear-gradient(180deg, #fcfdff 0%, #f3f8fd 100%);
    border-color: #d7e3ee;
    border-style: solid;
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(84, 111, 142, 0.08), 0 2px 6px rgba(117, 131, 177, 0.08);
    transition: all 0.52s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 38px rgba(80, 112, 147, 0.17), 0 6px 16px rgba(121, 103, 175, 0.14);
}

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

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

/* ============================================
   4. Main Authors (MainAuthorsSection)
   ============================================ */
.main-authors-section {
    background: linear-gradient(180deg, #f3f8fc 0%, #eef3fb 54%, #f6f2ff 100%);
}

.author-card {
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fe 100%);
    transition: all 0.52s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #d5e1ed;
    border-style: solid;
    border-image: linear-gradient(135deg, #d6e4ef 0%, #d8ddf6 50%, #ddd4f6 100%) 1;
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(77, 105, 139, 0.08), 0 2px 6px rgba(127, 111, 179, 0.08);
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 42px rgba(79, 109, 147, 0.18), 0 8px 20px rgba(129, 109, 183, 0.14);
}

.author-card img.rounded-circle {
    border: 3px solid #e7eef7;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(82, 110, 144, 0.12);
    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);
}

.author-card:hover img.rounded-circle {
    border-color: #8093d3;
}

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

.faq-section h2 {
    font-size: 1.75rem;
    color: #35506f;
    text-shadow: 0 2px 10px rgba(103, 128, 170, 0.14);
}

/* FAQ item */
.faq-list .faq-item {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    border: 1px solid rgba(108, 130, 158, 0.16);
    border-style: solid;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(78, 109, 145, 0.06), 0 2px 5px rgba(125, 112, 179, 0.06);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
}

.faq-list .faq-item:hover {
    box-shadow: 0 16px 32px rgba(79, 108, 143, 0.14), 0 6px 14px rgba(124, 108, 177, 0.1) !important;
    transform: translateY(-2px);
}

.faq-list .faq-item[open] {
    border-color: rgba(121, 141, 210, 0.34);
    background: linear-gradient(90deg, #eef5ff 0%, #f6f3ff 52%, #ffffff 100%);
}

.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: #415b77;
}

.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: #7387c9;
    text-shadow: 0 2px 10px rgba(115, 135, 201, 0.24);
    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: #7387c9;
}

/* Answer */
.faq-list .faq-answer {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #5a6e85;
    animation: faqFadeIn 0.5s 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 {
    background: linear-gradient(180deg, #ffffff 0%, #f5f9fd 100%);
    border-color: #d7e3ee;
    border-style: solid;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(80, 109, 141, 0.07), 0 2px 6px rgba(127, 113, 177, 0.06);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-widgets .card:hover {
    box-shadow: 0 16px 34px rgba(79, 108, 145, 0.15), 0 6px 14px rgba(126, 108, 177, 0.11);
}

.sidebar-widgets h5 {
    color: #35506f;
}

.sidebar-widgets .badge {
    background: linear-gradient(135deg, #eef4fb 0%, #f5f1ff 100%);
    color: #506982;
    border-color: #d3deeb;
    border-style: solid;
    border-radius: 999px;
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
}

.sidebar-widgets .badge:hover {
    background-color: #7b8fd1 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(115, 136, 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: #7387c9 !important;
}

/* ============================================
   7. Pagination (PaginationSection)
   ============================================ */
.pagination .page-link {
    color: #6f84c8;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8fd 100%);
    border-color: #d4deea;
    border-style: solid;
    border-radius: 14px;
    box-shadow: 0 6px 14px rgba(84, 111, 142, 0.06);
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

.pagination .page-link:hover {
    background-color: #eef4fb;
    color: #546b92;
    border-color: #7d90cf;
    box-shadow: 0 10px 20px rgba(107, 129, 190, 0.16);
}

.pagination .page-item.active .page-link {
    background-color: #7d90cf;
    background-image: linear-gradient(135deg, #6b8cc3 0%, #7d90cf 52%, #8c74c4 100%);
    border-color: #7d90cf;
    color: #fff;
    box-shadow: 0 12px 24px rgba(118, 136, 200, 0.24);
}

.pagination .page-item.disabled .page-link {
    color: #a5b1bf;
    opacity: 0.72;
}

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

.search-box-section .input-group-lg .form-control {
    border-radius: 999px 0 0 999px;
    border-color: #d2deea;
    border-style: solid;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    color: #4c657e;
    caret-color: #7286c8;
    box-shadow: inset 0 1px 2px rgba(90, 112, 139, 0.05), 0 8px 18px rgba(82, 109, 141, 0.06);
    padding-inline-start: 1.5rem;
}

.search-box-section .input-group-lg .btn {
    border-radius: 0 999px 999px 0;
    border-color: #7a8fcd;
    border-style: solid;
    background: linear-gradient(135deg, #6d8cc3 0%, #7c90d0 50%, #8e74c5 100%);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(113, 132, 194, 0.2);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.search-box-section .badge {
    background: linear-gradient(135deg, #eef4fb 0%, #f4f0ff 100%);
    color: #526a82;
    border-color: #d2deea;
    border-style: solid;
    border-radius: 999px;
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

.search-box-section .badge:hover {
    background-color: #7c90cf !important;
    color: #fff !important;
    border-color: #7c90cf !important;
    box-shadow: 0 10px 22px rgba(113, 133, 196, 0.2);
}

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

.search-result {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    border-color: #d6e2ed;
    border-style: solid;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(79, 109, 144, 0.06), 0 2px 6px rgba(122, 110, 175, 0.06);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.search-result:hover {
    transform: translateX(3px);
    box-shadow: 0 14px 30px rgba(77, 108, 144, 0.14), 0 5px 12px rgba(122, 108, 176, 0.1);
}

.search-result h2 a:hover {
    color: #7387c9 !important;
}

.search-result mark {
    background: linear-gradient(90deg, #fff0b8 0%, #ffe59a 50%, #ffd67d 100%);
    color: #6a5730;
    padding-inline: 2px;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: inset 0 -1px 0 rgba(184, 140, 57, 0.16);
}

/* ============================================
   10. Error Page (Error404Section)
   ============================================ */
.error-page h1 {
    background: linear-gradient(135deg, #6b8cc3 0%, #7b90d1 52%, #8d74c5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 10px 30px rgba(114, 132, 198, 0.22);
}

.recommended-links .badge {
    background: linear-gradient(135deg, #ffffff 0%, #f3f8fd 100%);
    color: #526a82 !important;
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #d5dfeb;
    border-style: solid;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(82, 109, 141, 0.06);
}

.recommended-links .badge:hover {
    background-color: #7b8fd1 !important;
    color: #fff !important;
    border-color: #7b8fd1 !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(114, 132, 196, 0.22);
}

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

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

article :is(h2.h4) {
    color: #546b92;
    border-bottom: 2px solid #d7e2ee;
    padding-bottom: var(--space-xs);
    margin-bottom: var(--space-sm);
}

article .alert-info {
    background: linear-gradient(135deg, #eef5ff 0%, #f6f3ff 100%);
    border-color: #cfdcff;
    border-style: solid;
    color: #52698f;
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(112, 132, 194, 0.08);
}

article .list-group-item {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(244, 248, 253, 0.8) 100%);
    border-color: rgba(212, 222, 234, 0.8);
    border-style: solid;
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

article .list-group-item:hover {
    background: linear-gradient(180deg, #f5f9fd 0%, #eef4fb 100%);
    padding-inline-start: var(--space-sm);
}

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

.posts-grid .card {
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fe 100%);
    transition: all 0.52s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #d7e2ee;
    border-style: solid;
    border-image: linear-gradient(135deg, #d6e3ef 0%, #d6ddf2 48%, #ddd4f5 100%) 1;
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(79, 109, 143, 0.08), 0 2px 6px rgba(123, 109, 175, 0.07);
    overflow: hidden;
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 38px rgba(79, 109, 145, 0.17), 0 6px 16px rgba(122, 108, 177, 0.13);
    border-color: #7b8fd1;
}

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

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

.posts-grid .card-title a {
    color: #425b76;
    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: #7387c9 !important;
}

/* ============================================
   13. Related Posts (RelatedPostsSection)
   ============================================ */
.related-posts h3 {
    color: #3e5874;
    border-bottom: 3px solid #8a78c4;
    padding-bottom: var(--space-xs);
    display: inline-block;
    text-shadow: 0 2px 10px rgba(126, 114, 187, 0.12);
}

.related-card {
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
    border-color: #d6e1ed;
    border-style: solid;
    border-radius: 18px;
    box-shadow: 0 10px 22px rgba(80, 109, 143, 0.07), 0 2px 6px rgba(124, 109, 176, 0.06);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 34px rgba(80, 109, 144, 0.15), 0 6px 14px rgba(124, 108, 177, 0.11);
}

.related-card img {
    border-radius: 16px;
    filter: saturate(1.04);
    transition: transform 0.56s cubic-bezier(0.22, 1, 0.36, 1), filter 0.56s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ============================================
   14. Social Share (SocialShareSection)
   ============================================ */
.social-share .btn {
    min-width: 40px;
    border-radius: 14px;
    border-color: #d5deea;
    border-style: solid;
    box-shadow: 0 8px 18px rgba(82, 109, 141, 0.07);
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(83, 111, 145, 0.15), 0 4px 10px rgba(123, 108, 176, 0.12);
}

.social-share [data-copy-url].copied {
    background-color: #6db7a4;
    background-image: linear-gradient(135deg, #62b29d 0%, #72c0ab 100%);
    color: #fff;
    border-color: #6db7a4;
}

/* ============================================
   15. Bootstrap Accordion override
   ============================================ */
.accordion-button:not(.collapsed) {
    background-color: #eef5ff;
    background-image: linear-gradient(135deg, #eef5ff 0%, #f5f2ff 100%);
    color: #546b92;
    box-shadow: none;
}

.accordion-button:focus {
    outline-color: #8fa2d8;
    box-shadow: 0 0 0 0.2rem rgba(122, 143, 207, 0.2);
}

/* ============================================
   16. Modal (用于 SocialShare 微信二维码)
   ============================================ */
.modal-content {
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
    border: none;
    border-radius: 22px;
    box-shadow: 0 22px 48px rgba(78, 108, 144, 0.2), 0 10px 24px rgba(124, 109, 177, 0.12);
    backdrop-filter: blur(10px);
}

/* ============================================
   17. Tooltip (Bootstrap)
   ============================================ */
.tooltip-inner {
    background-color: #3f5974;
    background-image: linear-gradient(135deg, #415c77 0%, #546b92 55%, #7667a8 100%);
    color: #fdfefe;
    border-radius: 12px;
    font-size: 0.85rem;
    box-shadow: 0 10px 22px rgba(63, 89, 116, 0.22);
}

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