/* ============================================================
   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, #ffffff 0%, #f2f6ff 38%, #f6f7fb 100%);
}

.author-profile h1 {
    color: #0f2a4a;
}

.author-profile img.rounded-circle {
    border: 4px solid #ffffff;
    border-radius: 2px;
    box-shadow:
        4px 4px 0 rgba(14, 165, 233, 0.28),
        0 10px 24px rgba(2, 6, 23, 0.10),
        inset 0 0 0 2px rgba(255, 255, 255, 0.65);
}

.author-profile .badge.bg-light {
    background: #f1f5f9 !important;
    color: #0f2a4a !important;
    border: 2px solid #cbd5e1;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.author-profile .badge.bg-light:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
    box-shadow:
        4px 4px 0 rgba(37, 99, 235, 0.28),
        0 10px 24px rgba(37, 99, 235, 0.18);
}

/* ============================================
   2. Author Box (AuthorBoxSection)
   ============================================ */
.author-box {
    border-inline-start: 4px solid #22c55e;
    border-radius: 0;
    transition:
        box-shadow 0.15s ease,
        transform 0.15s ease,
        border-color 0.15s ease;
}

.author-box:hover {
    box-shadow:
        4px 4px 0 rgba(34, 197, 94, 0.22),
        0 12px 30px rgba(2, 6, 23, 0.10);
}

.author-box img {
    transition: transform 0.15s ease, filter 0.15s ease;
    filter: saturate(1.02) contrast(1.02);
}

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

/* ============================================
   3. Author Posts List (AuthorPostsListSection)
   ============================================ */
.author-posts-list .card {
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease,
        filter 0.15s ease;
    overflow: hidden;
    border-radius: 2px;
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    box-shadow:
        4px 4px 0 rgba(59, 130, 246, 0.28),
        0 16px 36px rgba(2, 6, 23, 0.12);
}

.author-posts-list .card-img-top {
    transition: transform 0.15s ease;
}

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

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

.author-card {
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
    border: 3px solid #dbeafe;
    border-radius: 2px;
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow:
        4px 4px 0 rgba(37, 99, 235, 0.26),
        0 18px 44px rgba(2, 6, 23, 0.14);
    border-color: #60a5fa;
}

.author-card img.rounded-circle {
    border: 3px solid #eef2ff;
    border-radius: 2px;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.author-card:hover img.rounded-circle {
    border-color: #2563eb;
    box-shadow:
        4px 4px 0 rgba(37, 99, 235, 0.22),
        0 12px 26px rgba(37, 99, 235, 0.16);
}

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

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

/* FAQ item */
.faq-list .faq-item {
    border: 3px solid rgba(2, 6, 23, 0.06);
    border-radius: 2px;
    transition:
        box-shadow 0.15s ease,
        transform 0.15s ease,
        background-color 0.15s ease,
        border-color 0.15s ease;
    cursor: pointer;
    background: #ffffff;
}

.faq-list .faq-item:hover {
    box-shadow:
        4px 4px 0 rgba(59, 130, 246, 0.22) !important,
        0 18px 40px rgba(2, 6, 23, 0.10) !important;
    transform: translateY(-2px);
}

.faq-list .faq-item[open] {
    border-color: rgba(37, 99, 235, 0.45);
    background: linear-gradient(90deg, #e0f2fe 0%, #ffffff 55%, #fefeff 100%);
    box-shadow:
        4px 4px 0 rgba(37, 99, 235, 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;
}

.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: #2563eb;
    transition: transform 0.15s 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: #1d4ed8;
}

/* Answer */
.faq-list .faq-answer {
    font-size: 0.95rem;
    line-height: 1.8;
    animation: faqFadeIn 0.15s ease;
}

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

/* ============================================
   6. Sidebar Widgets (SidebarWidgetsSection)
   ============================================ */
.sidebar-widgets .card {
    transition:
        box-shadow 0.15s ease,
        transform 0.15s ease,
        border-color 0.15s ease;
    border-radius: 2px;
}

.sidebar-widgets .card:hover {
    box-shadow:
        4px 4px 0 rgba(37, 99, 235, 0.18),
        0 16px 34px rgba(2, 6, 23, 0.10);
}

.sidebar-widgets h5 {
    color: #0f2a4a;
}

.sidebar-widgets .badge {
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
    border-radius: 2px;
    border: 2px solid rgba(2, 6, 23, 0.10);
}

.sidebar-widgets .badge:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
    transform: translateY(-1px);
    box-shadow:
        4px 4px 0 rgba(37, 99, 235, 0.22);
}

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

/* ============================================
   7. Pagination (PaginationSection)
   ============================================ */
.pagination .page-link {
    color: #1d4ed8;
    border-color: #c7d2fe;
    background: #ffffff;
    border-radius: 2px;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
    border-style: solid;
    border-width: 2px;
}

.pagination .page-link:hover {
    background-color: #eff6ff;
    color: #0f2a4a;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow:
        4px 4px 0 rgba(37, 99, 235, 0.18);
}

.pagination .page-item.active .page-link {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow:
        4px 4px 0 rgba(37, 99, 235, 0.28);
}

.pagination .page-item.disabled .page-link {
    color: rgba(15, 42, 74, 0.45);
    border-color: #e5e7eb;
    background: #f8fafc;
}

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

.search-box-section .input-group-lg .form-control {
    border-radius: 999px 0 0 999px;
    padding-inline-start: 1.5rem;
    border: 2px solid #dbeafe;
    background: #ffffff;
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.75);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.search-box-section .input-group-lg .form-control:focus {
    border-color: #60a5fa;
    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: 2px solid rgba(59, 130, 246, 0.25);
    outline-offset: 0;
}

.search-box-section .input-group-lg .btn {
    border-radius: 0 999px 999px 0;
    border: 2px solid #1d4ed8;
    background: #2563eb;
    color: #ffffff;
    box-shadow:
        4px 4px 0 rgba(37, 99, 235, 0.26);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.search-box-section .input-group-lg .btn:hover {
    transform: translateY(-1px);
    background: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow:
        4px 4px 0 rgba(29, 78, 216, 0.28),
        0 16px 30px rgba(29, 78, 216, 0.18);
}

.search-box-section .badge {
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
    border-radius: 2px;
    border: 2px solid rgba(2, 6, 23, 0.10);
}

.search-box-section .badge:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
    transform: translateY(-1px);
    box-shadow:
        4px 4px 0 rgba(37, 99, 235, 0.22);
}

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

.search-result {
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
    border-radius: 2px;
}

.search-result:hover {
    transform: translateX(3px);
    box-shadow:
        4px 4px 0 rgba(34, 197, 94, 0.20),
        0 16px 40px rgba(2, 6, 23, 0.10);
}

.search-result h2 a:hover {
    color: #1d4ed8 !important;
}

.search-result mark {
    background-color: #bff7d2;
    color: #064e3b;
    padding-inline: 2px;
    border-radius: 2px;
    font-weight: 700;
    box-shadow:
        inset 0 0 0 2px rgba(16, 185, 129, 0.25);
}

/* ============================================
   10. Error Page (Error404Section)
   ============================================ */
.error-page h1 {
    background: linear-gradient(135deg, #2563eb, #14b8a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow:
        4px 4px 0 rgba(20, 184, 166, 0.20),
        0 18px 46px rgba(37, 99, 235, 0.22);
}

.recommended-links .badge {
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
    border: 2px solid #cbd5e1;
    border-radius: 2px;
}

.recommended-links .badge:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
    transform: translateY(-2px);
    box-shadow:
        4px 4px 0 rgba(37, 99, 235, 0.22),
        0 14px 28px rgba(2, 6, 23, 0.10);
}

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

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

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

article .alert-info {
    background-color: #e0f2fe;
    border-color: #7dd3fc;
    color: #0f2a4a;
    border-radius: 2px;
    box-shadow:
        4px 4px 0 rgba(14, 165, 233, 0.12);
}

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

article .list-group-item:hover {
    background: #eef2ff;
    padding-inline-start: var(--space-sm);
    box-shadow:
        4px 4px 0 rgba(99, 102, 241, 0.14);
}

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

.posts-grid .card {
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease,
        filter 0.15s ease;
    border: 2px solid #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    box-shadow:
        4px 4px 0 rgba(37, 99, 235, 0.22),
        0 16px 40px rgba(2, 6, 23, 0.12);
    border-color: #60a5fa;
}

.posts-grid .card-img-top {
    transition: transform 0.15s ease;
}

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

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

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

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

.related-card {
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
    border-radius: 2px;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow:
        4px 4px 0 rgba(34, 197, 94, 0.20),
        0 16px 34px rgba(2, 6, 23, 0.10);
}

.related-card img {
    transition: transform 0.15s ease;
}

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

/* ============================================
   14. Social Share (SocialShareSection)
   ============================================ */
.social-share .btn {
    min-width: 40px;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease,
        color 0.15s ease;
    border-radius: 2px;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow:
        4px 4px 0 rgba(37, 99, 235, 0.18),
        0 12px 26px rgba(2, 6, 23, 0.10);
}

.social-share [data-copy-url].copied {
    background-color: #16a34a;
    color: #ffffff;
    border-color: #16a34a;
    box-shadow:
        4px 4px 0 rgba(22, 163, 74, 0.26),
        0 14px 30px rgba(22, 163, 74, 0.16);
    border-style: solid;
    border-width: 2px;
}

/* ============================================
   15. Bootstrap Accordion override
   ============================================ */
.accordion-button:not(.collapsed) {
    background-color: #eff6ff;
    color: #0f2a4a;
    box-shadow: none;
    border-radius: 2px;
    border: 2px solid rgba(37, 99, 235, 0.22);
}

.accordion-button:focus {
    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.15),
        4px 4px 0 rgba(37, 99, 235, 0.18);
}

/* ============================================
   16. Modal (用于 SocialShare 微信二维码)
   ============================================ */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow:
        4px 4px 0 rgba(37, 99, 235, 0.22),
        0 24px 70px rgba(2, 6, 23, 0.22);
    background: #ffffff;
}

/* ============================================
   17. Tooltip (Bootstrap)
   ============================================ */
.tooltip-inner {
    background-color: #0f2a4a;
    border-radius: 2px;
    font-size: 0.85rem;
    border: 2px solid rgba(255, 255, 255, 0.10);
    box-shadow:
        4px 4px 0 rgba(15, 42, 74, 0.18),
        0 14px 34px rgba(2, 6, 23, 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;
    }
}