/* ============================================================
   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, #fbfcfe 0%, #e9edf3 100%);
}

.author-profile h1 {
    color: #2a3442;
}

.author-profile img.rounded-circle {
    border: 4px solid #f8fafc;
    border-radius: 22px;
    box-shadow: 0 6px 14px rgba(24, 34, 48, 0.08), 0 24px 44px -16px rgba(24, 34, 48, 0.18);
}

.author-profile .badge.bg-light {
    background: #e6ebf1 !important;
    color: #39485b !important;
    border-radius: 999px;
    transition: all 0.36s ease;
}

.author-profile .badge.bg-light:hover {
    background: #4e7ca1 !important;
    color: #fdfefe !important;
}

/* ============================================
   2. Author Box (AuthorBoxSection)
   ============================================ */
.author-box {
    border-inline-start: 4px solid #6e8ca8;
    border-radius: 18px;
    transition: all 0.4s ease;
}

.author-box:hover {
    box-shadow: 0 8px 18px rgba(20, 28, 40, 0.06), 0 24px 46px -18px rgba(20, 28, 40, 0.16);
}

.author-box img {
    border-radius: 18px;
    transition: transform 0.34s ease;
}

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

/* ============================================
   3. Author Posts List (AuthorPostsListSection)
   ============================================ */
.author-posts-list .card {
    transition: all 0.42s ease;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(21, 29, 40, 0.04), 0 18px 34px -20px rgba(21, 29, 40, 0.12);
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(18, 27, 39, 0.08), 0 28px 52px -18px rgba(18, 27, 39, 0.2);
}

.author-posts-list .card-img-top {
    transition: transform 0.5s ease;
    border-radius: 20px 20px 0 0;
}

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

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

.author-card {
    transition: all 0.4s ease;
    border: 1px solid #d5dde7;
    border-style: solid;
    border-radius: 22px;
    box-shadow: 0 4px 10px rgba(19, 26, 38, 0.04), 0 18px 36px -22px rgba(19, 26, 38, 0.1);
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(17, 24, 36, 0.08), 0 32px 56px -20px rgba(17, 24, 36, 0.2);
}

.author-card img.rounded-circle {
    border: 3px solid #e1e7ee;
    border-radius: 20px;
    transition: border-color 0.4s ease;
}

.author-card:hover img.rounded-circle {
    border-color: #5e86ab;
}

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

.faq-section h2 {
    font-size: 1.75rem;
    color: #273241;
}

/* FAQ item */
.faq-list .faq-item {
    border: 1px solid rgba(46, 62, 82, 0.09);
    border-style: solid;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 2px 6px rgba(23, 31, 44, 0.03), 0 14px 28px -24px rgba(23, 31, 44, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.faq-list .faq-item:hover {
    box-shadow: 0 8px 18px rgba(22, 30, 42, 0.06) !important, 0 26px 42px -18px rgba(22, 30, 42, 0.14) !important;
    transform: translateY(-2px);
}

.faq-list .faq-item[open] {
    border-color: rgba(94, 134, 171, 0.28);
    background: linear-gradient(90deg, #eef4f9 0%, #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: #314052;
}

.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: #5b7fa0;
    text-shadow: 0 2px 10px rgba(91, 127, 160, 0.2);
    transition: transform 0.4s 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: #5b7fa0;
}

/* Answer */
.faq-list .faq-answer {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #4a596b;
    animation: faqFadeIn 0.4s 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.42s ease;
    background: linear-gradient(180deg, #252e3a 0%, #2f3947 100%);
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(10, 14, 20, 0.12), 0 20px 38px -18px rgba(10, 14, 20, 0.24);
}

.sidebar-widgets .card:hover {
    box-shadow: 0 10px 20px rgba(11, 16, 24, 0.16), 0 28px 46px -20px rgba(11, 16, 24, 0.28);
}

.sidebar-widgets h5 {
    color: #eef3f8;
}

.sidebar-widgets .badge {
    transition: all 0.32s ease;
    cursor: pointer;
    border-radius: 999px;
}

.sidebar-widgets .badge:hover {
    background-color: #6f90ad !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(111, 144, 173, 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: #9ab5cb !important;
}

/* ============================================
   7. Pagination (PaginationSection)
   ============================================ */
.pagination .page-link {
    color: #5a7d9d;
    border-color: #ccd6e1;
    border-style: solid;
    border-radius: 14px;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(20, 28, 38, 0.03);
    transition: all 0.34s ease;
}

.pagination .page-link:hover {
    background-color: #eef2f6;
    color: #3f5b77;
    border-color: #6c8cab;
    box-shadow: 0 6px 14px rgba(20, 28, 38, 0.06);
}

.pagination .page-item.active .page-link {
    background-color: #5e82a3;
    border-color: #5e82a3;
    color: #fefefe;
    box-shadow: 0 8px 18px rgba(94, 130, 163, 0.24);
}

.pagination .page-item.disabled .page-link {
    color: #9aa7b6;
    background-color: #f6f8fa;
    border-color: #dde4eb;
    opacity: 0.82;
}

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

.search-box-section .input-group-lg .form-control {
    border-radius: 20px 0 0 20px;
    padding-inline-start: 1.5rem;
    border-color: #cfd8e2;
    border-style: solid;
    box-shadow: 0 4px 10px rgba(22, 30, 40, 0.03);
    caret-color: #5f83a5;
    outline-color: rgba(95, 131, 165, 0.35);
}

.search-box-section .input-group-lg .btn {
    border-radius: 0 20px 20px 0;
    background: linear-gradient(135deg, #5f83a5 0%, #3f5b76 100%);
    border-color: #5f83a5;
    border-style: solid;
    box-shadow: 0 6px 14px rgba(63, 91, 118, 0.18);
    transition: all 0.34s ease;
}

.search-box-section .badge {
    transition: all 0.32s ease;
    border-radius: 999px;
}

.search-box-section .badge:hover {
    background-color: #5f83a5 !important;
    color: #fff !important;
    border-color: #5f83a5 !important;
    box-shadow: 0 6px 14px rgba(95, 131, 165, 0.18);
}

/* ============================================
   9. Search Results (SearchResultsSection)
   ============================================ */
.search-results-section {
    background: #f9fbfc;
}

.search-result {
    transition: all 0.4s ease;
    border-radius: 18px;
}

.search-result:hover {
    transform: translateX(3px);
    box-shadow: 0 8px 18px rgba(20, 29, 40, 0.06), 0 24px 40px -20px rgba(20, 29, 40, 0.16);
}

.search-result h2 a:hover {
    color: #567b9c !important;
}

.search-result mark {
    background-color: #dbe8f2;
    color: #2f4358;
    padding-inline: 2px;
    border-radius: 6px;
    font-weight: 600;
}

/* ============================================
   10. Error Page (Error404Section)
   ============================================ */
.error-page h1 {
    background: linear-gradient(135deg, #6d90af, #2d3b4b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 6px 24px rgba(45, 59, 75, 0.18);
    filter: drop-shadow(0 10px 24px rgba(45, 59, 75, 0.12));
}

.recommended-links .badge {
    transition: all 0.32s ease;
    border: 1px solid #d0d8e2;
    border-style: solid;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(18, 26, 37, 0.03);
}

.recommended-links .badge:hover {
    background-color: #5f83a5 !important;
    color: #fff !important;
    border-color: #5f83a5 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(95, 131, 165, 0.2);
}

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

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

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

article .alert-info {
    background-color: #edf3f8;
    border-color: #c7d5e2;
    border-style: solid;
    color: #3e5872;
    border-radius: 18px;
    box-shadow: 0 4px 10px rgba(23, 31, 42, 0.04);
}

article .list-group-item {
    background: transparent;
    transition: all 0.32s ease;
    border-radius: 14px;
}

article .list-group-item:hover {
    background: #f3f6f9;
    padding-inline-start: var(--space-sm);
}

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

.posts-grid .card {
    transition: all 0.42s ease;
    border: 1px solid #d7e0e8;
    border-style: solid;
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 3px 8px rgba(18, 27, 38, 0.04), 0 18px 34px -22px rgba(18, 27, 38, 0.12);
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 22px rgba(18, 27, 38, 0.08), 0 30px 52px -20px rgba(18, 27, 38, 0.2);
    border-color: #6a8ba8;
}

.posts-grid .card-img-top {
    transition: transform 0.5s ease;
    border-radius: 22px 22px 0 0;
}

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

.posts-grid .card-title a {
    transition: color 0.32s ease;
}

.posts-grid .card-title a:hover {
    color: #567b9c !important;
}

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

.related-card {
    transition: all 0.4s ease;
    border-radius: 20px;
    box-shadow: 0 3px 8px rgba(18, 27, 38, 0.04), 0 16px 30px -22px rgba(18, 27, 38, 0.11);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(19, 28, 39, 0.08), 0 26px 42px -18px rgba(19, 28, 39, 0.16);
}

.related-card img {
    transition: transform 0.5s ease;
    border-radius: 20px 20px 0 0;
}

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

/* ============================================
   14. Social Share (SocialShareSection)
   ============================================ */
.social-share .btn {
    min-width: 40px;
    transition: all 0.32s ease;
    border-radius: 16px;
    box-shadow: 0 3px 8px rgba(18, 26, 36, 0.04);
    accent-color: #5f83a5;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(18, 26, 36, 0.08), 0 18px 32px -18px rgba(18, 26, 36, 0.14);
}

.social-share [data-copy-url].copied {
    background-color: #5f8f78;
    color: #fff;
    border-color: #5f8f78;
}

/* ============================================
   15. Bootstrap Accordion override
   ============================================ */
.accordion-button:not(.collapsed) {
    background-color: #edf3f8;
    color: #3d5975;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(95, 131, 165, 0.18);
    outline-color: rgba(95, 131, 165, 0.22);
}

/* ============================================
   16. Modal (用于 SocialShare 微信二维码)
   ============================================ */
.modal-content {
    border: none;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fa 100%);
    box-shadow: 0 10px 24px rgba(17, 24, 36, 0.08), 0 36px 64px -24px rgba(17, 24, 36, 0.22);
    backdrop-filter: blur(10px);
}

/* ============================================
   17. Tooltip (Bootstrap)
   ============================================ */
.tooltip-inner {
    background-color: #2a3442;
    color: #f4f7fa;
    border-radius: 12px;
    font-size: 0.85rem;
    box-shadow: 0 8px 18px rgba(15, 22, 32, 0.14);
}

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