/* ============================================================
   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(90deg, #fffdf8 0%, #f6efe3 48%, #ffffff 100%);
}

.author-profile h1 {
    color: #3f2d20;
}

.author-profile img.rounded-circle {
    border: 4px solid #fffaf1;
    border-radius: 2rem;
    box-shadow: 0 14px 30px rgba(92, 59, 29, 0.10), 0 4px 12px rgba(170, 125, 78, 0.14);
    filter: saturate(1.02);
}

.author-profile .badge.bg-light {
    background: linear-gradient(90deg, #f7ecdc 0%, #fff9f0 100%) !important;
    color: #5a4432 !important;
    border-color: #e8d3bb !important;
    border-style: solid;
    border-radius: 999px;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.author-profile .badge.bg-light:hover {
    background: linear-gradient(90deg, #8d5a34 0%, #c08a57 100%) !important;
    color: #fffaf4 !important;
    box-shadow: 0 10px 22px rgba(141, 90, 52, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* ============================================
   2. Author Box (AuthorBoxSection)
   ============================================ */
.author-box {
    border-inline-start: 4px solid #b97b44;
    border-radius: 1.25rem;
    transition: all 0.48s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 1px 0 rgba(255, 247, 237, 0.9);
}

.author-box:hover {
    box-shadow: 0 16px 32px rgba(69, 45, 28, 0.10), 0 6px 16px rgba(185, 123, 68, 0.14);
}

.author-box img {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1.1rem;
}

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

/* ============================================
   3. Author Posts List (AuthorPostsListSection)
   ============================================ */
.author-posts-list .card {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    border-radius: 1.35rem;
    box-shadow: 0 2px 10px rgba(63, 45, 32, 0.05);
    border-color: #eadaca;
    border-style: solid;
    background: linear-gradient(180deg, #ffffff 0%, #fffaf3 100%);
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 42px rgba(63, 45, 32, 0.12), 0 8px 20px rgba(192, 138, 87, 0.12);
}

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

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

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

.author-card {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #e9d8c3;
    border-style: solid;
    border-radius: 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #fff8ef 100%);
    box-shadow: 0 10px 24px rgba(77, 53, 36, 0.06);
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 26px 44px rgba(77, 53, 36, 0.12), 0 10px 24px rgba(185, 123, 68, 0.14);
}

.author-card img.rounded-circle {
    border: 3px solid #f2e5d3;
    border-radius: 50%;
    transition: border-color 0.48s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.48s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 8px 18px rgba(88, 61, 38, 0.08);
}

.author-card:hover img.rounded-circle {
    border-color: #b97b44;
    box-shadow: 0 12px 22px rgba(185, 123, 68, 0.18);
}

/* ============================================
   5. FAQ (FaqSection) - <details>/<summary>
   ============================================ */
.faq-section {
    background: linear-gradient(180deg, #221913 0%, #34271f 44%, #fffdf8 44%, #fff8ef 100%);
}

.faq-section h2 {
    font-size: 1.75rem;
    color: #f7e8d3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

/* FAQ item */
.faq-list .faq-item {
    border: 1px solid rgba(114, 79, 49, 0.14);
    border-style: solid;
    border-radius: 1.25rem;
    background: linear-gradient(90deg, rgba(255, 252, 246, 0.96) 0%, rgba(248, 239, 226, 0.94) 100%);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(35, 24, 18, 0.08);
    backdrop-filter: blur(6px);
}

.faq-list .faq-item:hover {
    box-shadow: 0 18px 34px rgba(35, 24, 18, 0.12), 0 6px 18px rgba(185, 123, 68, 0.12) !important;
    transform: translateY(-2px);
}

.faq-list .faq-item[open] {
    border-color: rgba(185, 123, 68, 0.34);
    background: linear-gradient(90deg, #fff5e7 0%, #ffffff 52%, #f9efe1 100%);
    box-shadow: 0 18px 36px rgba(35, 24, 18, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

/* 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: #4e392a;
}

.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: #b97b44;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), color 0.5s cubic-bezier(0.22, 1, 0.36, 1), text-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    line-height: 1;
    text-shadow: 0 3px 10px rgba(185, 123, 68, 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: #9c6337;
}

/* Answer */
.faq-list .faq-answer {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #654c39;
    animation: faqFadeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ============================================
   6. Sidebar Widgets (SidebarWidgetsSection)
   ============================================ */
.sidebar-widgets .card {
    transition: all 0.48s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1.3rem;
    background: linear-gradient(180deg, #ffffff 0%, #fff8ef 100%);
    border-color: #ead8c1;
    border-style: solid;
    box-shadow: 0 10px 24px rgba(69, 45, 28, 0.06);
}

.sidebar-widgets .card:hover {
    box-shadow: 0 18px 36px rgba(69, 45, 28, 0.10), 0 6px 16px rgba(185, 123, 68, 0.10);
}

.sidebar-widgets h5 {
    color: #4c3627;
}

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

.sidebar-widgets .badge:hover {
    background: linear-gradient(90deg, #8d5a34 0%, #c08a57 100%) !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(141, 90, 52, 0.20);
}

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

/* ============================================
   7. Pagination (PaginationSection)
   ============================================ */
.pagination .page-link {
    color: #9c6337;
    border-color: #dec7ae;
    border-style: solid;
    background: linear-gradient(180deg, #fffdfa 0%, #f9f0e4 100%);
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 4px 12px rgba(77, 53, 36, 0.05);
}

.pagination .page-link:hover {
    background: linear-gradient(180deg, #fff4e5 0%, #f4dfc7 100%);
    color: #6d4626;
    border-color: #b97b44;
    box-shadow: 0 10px 20px rgba(185, 123, 68, 0.14);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(90deg, #8d5a34 0%, #c08a57 100%);
    border-color: #9c6337;
    color: #fffaf4;
    box-shadow: 0 12px 24px rgba(141, 90, 52, 0.24);
}

.pagination .page-item.disabled .page-link {
    color: #bca38d;
    background: linear-gradient(180deg, #f8f3ed 0%, #f2e9de 100%);
    opacity: 0.9;
}

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

.search-box-section .input-group-lg .form-control {
    border-radius: 1.5rem 0 0 1.5rem;
    padding-inline-start: 1.5rem;
    border-color: #dcc5ac;
    border-style: solid;
    background: linear-gradient(180deg, #fffefb 0%, #fdf5ea 100%);
    color: #4b3728;
    box-shadow: inset 0 1px 2px rgba(92, 59, 29, 0.05);
    caret-color: #9c6337;
    outline-color: #c08a57;
}

.search-box-section .input-group-lg .btn {
    border-radius: 0 1.5rem 1.5rem 0;
    background: linear-gradient(90deg, #8d5a34 0%, #c08a57 100%);
    border-color: #9c6337;
    border-style: solid;
    color: #fffaf4;
    box-shadow: 0 10px 22px rgba(141, 90, 52, 0.18);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.search-box-section .badge:hover {
    background: linear-gradient(90deg, #8d5a34 0%, #c08a57 100%) !important;
    color: #fff !important;
    border-color: #b97b44 !important;
    box-shadow: 0 10px 18px rgba(141, 90, 52, 0.18);
}

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

.search-result {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1.1rem;
}

.search-result:hover {
    transform: translateX(3px);
    box-shadow: 0 16px 32px rgba(69, 45, 28, 0.10), 0 6px 16px rgba(185, 123, 68, 0.10);
    background: linear-gradient(90deg, rgba(255, 250, 243, 0.96) 0%, rgba(249, 239, 225, 0.92) 100%);
}

.search-result h2 a:hover {
    color: #b97b44 !important;
    text-shadow: 0 2px 8px rgba(185, 123, 68, 0.14);
}

.search-result mark {
    background: linear-gradient(90deg, #fde3a7 0%, #f6c67b 100%);
    color: #5e3a1c;
    padding-inline: 2px;
    border-radius: 0.35rem;
    font-weight: 600;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.45);
}

/* ============================================
   10. Error Page (Error404Section)
   ============================================ */
.error-page h1 {
    background: linear-gradient(135deg, #7f4e2b 0%, #c6925e 50%, #f0d2a5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 8px 34px rgba(127, 78, 43, 0.18), 0 2px 10px rgba(240, 210, 165, 0.18);
    filter: drop-shadow(0 6px 16px rgba(127, 78, 43, 0.12));
}

.recommended-links .badge {
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #decab4;
    border-style: solid;
    border-radius: 999px;
    background: linear-gradient(180deg, #fffdf9 0%, #f8efe3 100%);
    color: #5d4431;
}

.recommended-links .badge:hover {
    background: linear-gradient(90deg, #8d5a34 0%, #c08a57 100%) !important;
    color: #fff !important;
    border-color: #b97b44 !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(141, 90, 52, 0.20);
}

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

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

article :is(h2.h4) {
    color: #734926;
    border-bottom: 2px solid #dfcab4;
    padding-bottom: var(--space-xs);
    margin-bottom: var(--space-sm);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

article .alert-info {
    background: linear-gradient(90deg, #fff3df 0%, #f9e6c6 100%);
    border-color: #e8c798;
    color: #6f4727;
    border-style: solid;
    border-radius: 1rem;
    box-shadow: 0 10px 22px rgba(110, 74, 42, 0.08);
}

article .list-group-item {
    background: transparent;
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
    border-color: rgba(176, 132, 88, 0.14);
}

article .list-group-item:hover {
    background: linear-gradient(90deg, #fff9f0 0%, #f8eddf 100%);
    padding-inline-start: var(--space-sm);
    border-radius: 0.9rem;
}

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

.posts-grid .card {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #e6d5c0;
    border-style: solid;
    overflow: hidden;
    border-radius: 1.4rem;
    background: linear-gradient(180deg, #ffffff 0%, #fff8ef 100%);
    box-shadow: 0 10px 24px rgba(77, 53, 36, 0.06);
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 40px rgba(77, 53, 36, 0.12), 0 8px 18px rgba(185, 123, 68, 0.12);
    border-color: #b97b44;
}

.posts-grid .card-img-top {
    transition: transform 0.58s cubic-bezier(0.22, 1, 0.36, 1), filter 0.58s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.posts-grid .card-title a {
    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: #b97b44 !important;
    text-shadow: 0 2px 8px rgba(185, 123, 68, 0.14);
}

/* ============================================
   13. Related Posts (RelatedPostsSection)
   ============================================ */
.related-posts h3 {
    border-bottom: 3px solid #b97b44;
    padding-bottom: var(--space-xs);
    display: inline-block;
    color: #4d3627;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.related-card {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1.3rem;
    background: linear-gradient(180deg, #ffffff 0%, #fff8ef 100%);
    box-shadow: 0 8px 20px rgba(77, 53, 36, 0.06);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 34px rgba(77, 53, 36, 0.11), 0 6px 16px rgba(185, 123, 68, 0.12);
}

.related-card img {
    transition: transform 0.58s cubic-bezier(0.22, 1, 0.36, 1), filter 0.58s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1rem;
}

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

/* ============================================
   14. Social Share (SocialShareSection)
   ============================================ */
.social-share .btn {
    min-width: 40px;
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 999px;
    border-color: #dbc3a8;
    border-style: solid;
    box-shadow: 0 6px 16px rgba(77, 53, 36, 0.06);
    accent-color: #b97b44;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(77, 53, 36, 0.10), 0 4px 12px rgba(185, 123, 68, 0.12);
    filter: saturate(1.05);
}

.social-share [data-copy-url].copied {
    background: linear-gradient(90deg, #5f7a45 0%, #89a861 100%);
    color: #fff;

    border-color: #6d8c50;
}

/* ============================================
   15. Bootstrap Accordion override
   ============================================ */
.accordion-button:not(.collapsed) {
    background: linear-gradient(90deg, #fff3df 0%, #f7e1bf 100%);
    color: #6f4727;
    box-shadow: inset 0 -1px 0 rgba(185, 123, 68, 0.12);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(192, 138, 87, 0.18), 0 8px 18px rgba(141, 90, 52, 0.08);
    outline-color: #c08a57;
}

/* ============================================
   16. Modal (用于 SocialShare 微信二维码)
   ============================================ */
.modal-content {
    border: none;
    border-radius: 1.5rem;
    background: linear-gradient(180deg, #fffdf9 0%, #f9efe2 100%);
    box-shadow: 0 26px 50px rgba(35, 24, 18, 0.18), 0 10px 24px rgba(185, 123, 68, 0.12);
    backdrop-filter: blur(10px);
}

/* ============================================
   17. Tooltip (Bootstrap)
   ============================================ */
.tooltip-inner {
    background: linear-gradient(90deg, #3b2a1f 0%, #5c4030 100%);
    color: #fff8ef;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    box-shadow: 0 10px 20px rgba(28, 19, 14, 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;
    }
}