/* ============================================================
   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, #fff8f1 0%, #eef6ff 52%, var(--color-bg-soft) 100%);
}

.author-profile h1 {
    color: #243b53;
    text-shadow: 0 2px 12px rgba(36, 59, 83, 0.08);
}

.author-profile img.rounded-circle {
    border: 4px solid #fff7ed;
    border-radius: 26px;
    box-shadow: 0 10px 28px rgba(54, 83, 107, 0.12), 0 2px 8px rgba(255, 138, 76, 0.12);
}

.author-profile .badge.bg-light {
    background: #fff1e6 !important;
    color: #425466 !important;
    border-radius: 999px;
    transition: all 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.author-profile .badge.bg-light:hover {
    background: #ff8a4c !important;
    color: #fffaf5 !important;
    box-shadow: 0 8px 20px rgba(255, 138, 76, 0.24);
}

/* ============================================
   2. Author Box (AuthorBoxSection)
   ============================================ */
.author-box {
    border-inline-start: 4px solid #ff8a4c;
    border-radius: 22px;
    transition: all 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 6px 20px rgba(58, 83, 107, 0.06);
}

.author-box:hover {
    box-shadow: 0 18px 38px rgba(44, 62, 80, 0.12), 0 4px 14px rgba(255, 138, 76, 0.12);
}

.author-box img {
    border-radius: 20px;
    transition: transform 0.24s ease-out, filter 0.24s ease-out;
    filter: saturate(1.02) contrast(1.01);
}

.author-box:hover img {
    transform: scale(1.05);
    filter: saturate(1.08) contrast(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: 24px;
    box-shadow: 0 8px 24px rgba(37, 57, 75, 0.06);
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 42px rgba(38, 54, 71, 0.14), 0 6px 16px rgba(111, 168, 220, 0.14);
}

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

.author-posts-list .card:hover .card-img-top {
    transform: scale(1.05);
    filter: brightness(1.03) saturate(1.08);
}

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

.author-card {
    transition: all 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #c9d8ea;
    border-style: solid;
    border-radius: 24px;
    box-shadow: 0 10px 26px rgba(54, 78, 99, 0.08);
    background: linear-gradient(180deg, rgba(255, 250, 245, 0.96) 0%, rgba(238, 246, 255, 0.96) 100%);
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(39, 57, 76, 0.14), 0 8px 20px rgba(255, 138, 76, 0.12);
}

.author-card img.rounded-circle {
    border: 3px solid #ffe3cf;
    border-radius: 24px;
    transition: border-color 0.34s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 8px 22px rgba(47, 74, 97, 0.1);
}

.author-card:hover img.rounded-circle {
    border-color: #ff8a4c;
    box-shadow: 0 14px 28px rgba(255, 138, 76, 0.18);
}

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

.faq-section h2 {
    font-size: 1.75rem;
    color: #243b53;
    text-shadow: 0 2px 10px rgba(36, 59, 83, 0.08);
}

/* FAQ item */
.faq-list .faq-item {
    border: 1px solid rgba(115, 140, 168, 0.24);
    border-style: solid;
    border-radius: 22px;
    transition: all 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    background: linear-gradient(180deg, rgba(255, 250, 245, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
    box-shadow: 0 8px 22px rgba(46, 67, 88, 0.05);
}

.faq-list .faq-item:hover {
    box-shadow: 0 18px 36px rgba(45, 66, 86, 0.12), 0 4px 14px rgba(111, 168, 220, 0.12) !important;
    transform: translateY(-2px);
}

.faq-list .faq-item[open] {
    border-color: rgba(255, 138, 76, 0.38);
    background: linear-gradient(90deg, #fff1e6 0%, #f4f9ff 100%);
    box-shadow: 0 18px 34px rgba(41, 61, 81, 0.12);
}

/* 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: #30475b;
}

.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: #ff8a4c;
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), color 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    line-height: 1;
    text-shadow: 0 2px 8px rgba(255, 138, 76, 0.18);
}

.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: #6fa8dc;
}

/* Answer */
.faq-list .faq-answer {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #516170;
    animation: faqFadeIn 0.34s ease-out;
}

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

/* ============================================
   6. Sidebar Widgets (SidebarWidgetsSection)
   ============================================ */
.sidebar-widgets .card {
    transition: all 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 22px;
    box-shadow: 0 8px 24px rgba(39, 57, 74, 0.06);
    background: linear-gradient(180deg, rgba(255, 249, 243, 0.95) 0%, rgba(241, 248, 255, 0.96) 100%);
}

.sidebar-widgets .card:hover {
    box-shadow: 0 18px 38px rgba(41, 60, 79, 0.12), 0 5px 14px rgba(255, 138, 76, 0.12);
}

.sidebar-widgets h5 {
    color: #243b53;
    text-shadow: 0 1px 8px rgba(36, 59, 83, 0.08);
}

.sidebar-widgets .badge {
    transition: all 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    border-radius: 999px;
}

.sidebar-widgets .badge:hover {
    background-color: #ff8a4c !important;
    color: #fff9f4 !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(255, 138, 76, 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: #6fa8dc !important;
}

/* ============================================
   7. Pagination (PaginationSection)
   ============================================ */
.pagination .page-link {
    color: #4f7ca3;
    border-color: #c9d8ea;
    border-style: solid;
    transition: all 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(42, 60, 79, 0.05);
    background-color: rgba(255, 250, 245, 0.95);
}

.pagination .page-link:hover {
    background-color: #fff1e6;
    color: #243b53;
    border-color: #ff8a4c;
    box-shadow: 0 10px 22px rgba(255, 138, 76, 0.16);
}

.pagination .page-item.active .page-link {
    background-color: #ff8a4c;
    border-color: #ff8a4c;
    color: #fffaf6;
    box-shadow: 0 12px 24px rgba(255, 138, 76, 0.24);
}

.pagination .page-item.disabled .page-link {
    color: #9aa8b5;
    opacity: 0.78;
}

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

.search-box-section .input-group-lg .form-control {
    border-radius: 20px 0 0 20px;
    padding-inline-start: 1.5rem;
    border-color: #c9d8ea;
    border-style: solid;
    box-shadow: inset 0 1px 2px rgba(52, 75, 97, 0.05);
    caret-color: #ff8a4c;
    accent-color: #ff8a4c;
}

.search-box-section .input-group-lg .btn {
    border-radius: 0 20px 20px 0;
    background: linear-gradient(135deg, #ff8a4c 0%, #ffb36b 100%);
    border-color: #ff8a4c;
    border-style: solid;
    color: #fffaf5;
    box-shadow: 0 10px 22px rgba(255, 138, 76, 0.22);
}

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

.search-box-section .badge:hover {
    background-color: #6fa8dc !important;
    color: #f9fcff !important;
    border-color: #6fa8dc !important;
    box-shadow: 0 10px 18px rgba(111, 168, 220, 0.2);
}

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

.search-result {
    transition: all 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 22px;
    box-shadow: 0 8px 20px rgba(40, 58, 77, 0.05);
}

.search-result:hover {
    transform: translateX(3px);
    box-shadow: 0 18px 34px rgba(42, 61, 80, 0.11), 0 4px 12px rgba(111, 168, 220, 0.12);
}

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

.search-result mark {
    background-color: #ffe3b3;
    color: #5c3b1e;
    padding-inline: 2px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 179, 107, 0.18);
}

/* ============================================
   10. Error Page (Error404Section)
   ============================================ */
.error-page h1 {
    background: linear-gradient(135deg, #ff8a4c, #6fa8dc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 8px 34px rgba(111, 168, 220, 0.18);
    filter: drop-shadow(0 6px 18px rgba(255, 138, 76, 0.14));
}

.recommended-links .badge {
    transition: all 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #c9d8ea;
    border-style: solid;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(45, 63, 81, 0.05);
    background: rgba(255, 250, 245, 0.96);
}

.recommended-links .badge:hover {
    background-color: #ff8a4c !important;
    color: #fffaf5 !important;
    border-color: #ff8a4c !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(255, 138, 76, 0.22);
}

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

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

article :is(h2.h4) {
    color: #35506a;
    border-bottom: 2px solid #c9d8ea;
    padding-bottom: var(--space-xs);
    margin-bottom: var(--space-sm);
    text-shadow: 0 1px 8px rgba(53, 80, 106, 0.06);
}

article .alert-info {
    background-color: #f4f9ff;
    border-color: #9fc3e6;
    color: #35506a;
    border-style: solid;
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(68, 100, 128, 0.08);
}

article .list-group-item {
    background: transparent;
    transition: all 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 16px;
}

article .list-group-item:hover {
    background: #fff1e6;
    padding-inline-start: var(--space-sm);
    box-shadow: 0 8px 18px rgba(255, 138, 76, 0.1);
}

/* ============================================
   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 #d3dfec;
    border-style: solid;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 10px 24px rgba(43, 62, 81, 0.06);
    background: linear-gradient(180deg, rgba(255, 250, 245, 0.96) 0%, rgba(245, 250, 255, 0.96) 100%);
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 44px rgba(40, 58, 77, 0.14), 0 6px 16px rgba(255, 138, 76, 0.12);
    border-color: #ff8a4c;
}

.posts-grid .card-img-top {
    transition: transform 0.46s cubic-bezier(0.22, 1, 0.36, 1), filter 0.46s cubic-bezier(0.22, 1, 0.36, 1);
    filter: saturate(1.02) brightness(0.99);
}

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

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

.posts-grid .card-title a:hover {
    color: #ff8a4c !important;
    text-shadow: 0 2px 10px rgba(255, 138, 76, 0.14);
}

/* ============================================
   13. Related Posts (RelatedPostsSection)
   ============================================ */
.related-posts h3 {
    border-bottom: 3px solid #6fa8dc;
    padding-bottom: var(--space-xs);
    display: inline-block;
    color: #243b53;
    text-shadow: 0 1px 8px rgba(36, 59, 83, 0.08);
}

.related-card {
    transition: all 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 22px;
    box-shadow: 0 8px 22px rgba(42, 60, 79, 0.06);
    background: linear-gradient(180deg, rgba(255, 248, 241, 0.95) 0%, rgba(244, 249, 255, 0.95) 100%);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 38px rgba(42, 60, 79, 0.12), 0 5px 14px rgba(111, 168, 220, 0.12);
}

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

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

/* ============================================
   14. Social Share (SocialShareSection)
   ============================================ */
.social-share .btn {
    min-width: 40px;
    transition: all 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 18px;
    box-shadow: 0 6px 16px rgba(40, 59, 77, 0.06);
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(43, 61, 80, 0.14), 0 4px 12px rgba(255, 138, 76, 0.14);
    filter: saturate(1.08);
}

.social-share [data-copy-url].copied {
    background-color: #53b483;
    color: #f7fff9;
    border-color: #53b483;
    border-style: solid;
    box-shadow: 0 14px 24px rgba(83, 180, 131, 0.22);
}

/* ============================================
   15. Bootstrap Accordion override
   ============================================ */
.accordion-button:not(.collapsed) {
    background-color: #f4f9ff;
    color: #35506a;
    box-shadow: none;
    border-radius: 20px;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(111, 168, 220, 0.2);
    outline-color: rgba(255, 138, 76, 0.22);
    outline-style: solid;
}

/* ============================================
   16. Modal (用于 SocialShare 微信二维码)
   ============================================ */
.modal-content {
    border: none;
    border-radius: 26px;
    box-shadow: 0 28px 56px rgba(35, 52, 68, 0.18), 0 10px 24px rgba(111, 168, 220, 0.12);
    background: linear-gradient(180deg, #fffaf5 0%, #f4f9ff 100%);
    backdrop-filter: blur(10px);
}

/* ============================================
   17. Tooltip (Bootstrap)
   ============================================ */
.tooltip-inner {
    background-color: #243b53;
    color: #fffaf6;
    border-radius: 14px;
    font-size: 0.85rem;
    box-shadow: 0 10px 24px rgba(36, 59, 83, 0.2);
}

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