/* ============================================================
   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%, #eef3f8 52%, #e6edf5 100%);
}

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

.author-profile img.rounded-circle {
    border: 4px solid #fdfefe;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(49, 70, 95, 0.08), 0 1px 3px rgba(49, 70, 95, 0.06);
}

.author-profile .badge.bg-light {
    background: #e8eef5 !important;
    color: #3b4f67 !important;
    border-radius: 4px;
    transition: all 0.22s ease-out;
}

.author-profile .badge.bg-light:hover {
    background: #5d7fa3 !important;
    color: #f8fbfd !important;
}

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

.author-box:hover {
    box-shadow: 0 6px 18px rgba(66, 88, 112, 0.1), 0 1px 3px rgba(66, 88, 112, 0.08);
}

.author-box img {
    border-radius: 5px;
    transition: transform 0.22s ease-in-out;
}

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

/* ============================================
   3. Author Posts List (AuthorPostsListSection)
   ============================================ */
.author-posts-list .card {
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(52, 70, 91, 0.04);
    transition: all 0.32s ease;
    overflow: hidden;
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 18px rgba(58, 80, 104, 0.1), 0 2px 5px rgba(58, 80, 104, 0.06);
}

.author-posts-list .card-img-top {
    filter: saturate(0.94) contrast(1.02);
    transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

.author-card {
    transition: all 0.3s ease;
    border: 1px solid #d8e1ea;
    border-style: solid;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(55, 74, 96, 0.04);
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 24px rgba(60, 82, 107, 0.12), 0 2px 6px rgba(60, 82, 107, 0.07);
}

.author-card img.rounded-circle {
    border: 3px solid #e6edf4;
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

.author-card:hover img.rounded-circle {
    border-color: #6e89a8;
}

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

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

/* FAQ item */
.faq-list .faq-item {
    border: 1px solid rgba(78, 97, 118, 0.12);
    border-style: solid;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 1px 2px rgba(67, 86, 106, 0.03);
    transition: all 0.28s ease;
    cursor: pointer;
}

.faq-list .faq-item:hover {
    box-shadow: 0 6px 16px rgba(61, 83, 107, 0.08) !important;
    transform: translateY(-2px);
}

.faq-list .faq-item[open] {
    border-color: rgba(102, 128, 156, 0.28);
    background: linear-gradient(90deg, #eef4f9 0%, #fbfcfe 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: #34495f;
}

.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: #607e9f;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
    transition: transform 0.28s 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: #5f7d9d;
}

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

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

/* ============================================
   6. Sidebar Widgets (SidebarWidgetsSection)
   ============================================ */
.sidebar-widgets .card {
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(59, 78, 98, 0.04);
    transition: all 0.3s ease;
}

.sidebar-widgets .card:hover {
    box-shadow: 0 6px 16px rgba(62, 84, 108, 0.09), 0 2px 4px rgba(62, 84, 108, 0.05);
}

.sidebar-widgets h5 {
    color: #31465e;
}

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

.sidebar-widgets .badge:hover {
    background-color: #6785a6 !important;
    color: #f9fbfd !important;
    transform: translateY(-1px);
}

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

/* ============================================
   7. Pagination (PaginationSection)
   ============================================ */
.pagination .page-link {
    color: #607e9f;
    border-color: #d3dde7;
    border-style: solid;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(60, 80, 101, 0.04);
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: #edf3f8;
    color: #425a75;
    border-color: #6f8baa;
}

.pagination .page-item.active .page-link {
    background-color: #6885a6;
    border-color: #6885a6;
    color: #fbfcfe;
    box-shadow: 0 4px 10px rgba(78, 105, 134, 0.16);
}

.pagination .page-item.disabled .page-link {
    color: #a1afbd;
    opacity: 0.82;
}

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

.search-box-section .input-group-lg .form-control {
    border-radius: 6px 0 0 6px;
    border-color: #d3dce6;
    outline-color: #8aa1b8;
    caret-color: #607e9f;
    transition: all 0.22s ease;
    padding-inline-start: 1.5rem;
}

.search-box-section .input-group-lg .btn {
    border-radius: 0 6px 6px 0;
    border-color: #6b88a8;
    background: linear-gradient(180deg, #7792b0 0%, #6582a3 100%);
    color: #f8fbfd;
    transition: all 0.22s ease;
}

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

.search-box-section .badge:hover {
    background-color: #6885a6 !important;
    color: #fbfcfe !important;
    border-color: #6885a6 !important;
}

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

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

.search-result:hover {
    transform: translateX(3px);
    box-shadow: 0 6px 14px rgba(62, 84, 108, 0.08), 0 1px 3px rgba(62, 84, 108, 0.05);
}

.search-result h2 a:hover {
    color: #6482a3 !important;
}

.search-result mark {
    background-color: #dfe8bf;
    color: #455768;
    padding-inline: 2px;
    border-radius: 3px;
    font-weight: 600;
}

/* ============================================
   10. Error Page (Error404Section)
   ============================================ */
.error-page h1 {
    background: linear-gradient(135deg, #6f8eae, #48627d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 6px 22px rgba(84, 108, 136, 0.18);
}

.recommended-links .badge {
    transition: all 0.22s ease;
    border: 1px solid #d3dde7;
    border-style: solid;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(64, 84, 105, 0.04);
}

.recommended-links .badge:hover {
    background-color: #6885a6 !important;
    color: #fbfcfe !important;
    border-color: #6885a6 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(69, 92, 118, 0.1);
}

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

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

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

article .alert-info {
    background-color: #edf3f8;
    border-color: #cfdce9;
    color: #3e5873;
    border-style: solid;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(64, 85, 107, 0.03);
}

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

article .list-group-item:hover {
    background: #f3f7fa;
    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.3s ease;
    border: 1px solid #d7e0e9;
    border-style: solid;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(56, 75, 95, 0.04);
    overflow: hidden;
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 18px rgba(60, 82, 106, 0.1), 0 2px 5px rgba(60, 82, 106, 0.06);
    border-color: #6e89a8;
}

.posts-grid .card-img-top {
    filter: saturate(0.95) contrast(1.03);
    transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

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

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

.related-card {
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(60, 79, 100, 0.04);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(61, 82, 105, 0.09), 0 2px 4px rgba(61, 82, 105, 0.05);
}

.related-card img {
    border-radius: 5px;
    filter: saturate(0.95);
    transition: transform 0.42s ease;
}

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

/* ============================================
   14. Social Share (SocialShareSection)
   ============================================ */
.social-share .btn {
    min-width: 40px;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(63, 82, 103, 0.04);
    transition: all 0.22s ease;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(63, 84, 106, 0.1);
}

.social-share [data-copy-url].copied {
    background-color: #6a927e;
    color: #fbfcfe;
    border-color: #6a927e;
}

/* ============================================
   15. Bootstrap Accordion override
   ============================================ */
.accordion-button:not(.collapsed) {
    background-color: #edf3f8;
    color: #425a75;
    box-shadow: inset 0 -1px 0 rgba(94, 116, 139, 0.08);
}

.accordion-button:focus {
    outline: 1px solid rgba(111, 139, 168, 0.24);
    box-shadow: 0 0 0 0.2rem rgba(111, 139, 168, 0.16);
}

/* ============================================
   16. Modal (用于 SocialShare 微信二维码)
   ============================================ */
.modal-content {
    border: none;
    border-radius: 6px;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fb 100%);
    box-shadow: 0 14px 28px rgba(56, 75, 96, 0.14), 0 4px 10px rgba(56, 75, 96, 0.08);
    backdrop-filter: blur(6px);
}

/* ============================================
   17. Tooltip (Bootstrap)
   ============================================ */
.tooltip-inner {
    background-color: #31465d;
    color: #f8fbfd;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(49, 70, 93, 0.12);
    font-size: 0.85rem;
}

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