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

.author-profile h1 {
    color: #5d4037;
}

.author-profile img.rounded-circle {
    border: 4px solid #fffaf0;
    border-radius: 2rem;
    box-shadow: 0 14px 34px rgba(109, 76, 65, 0.16), 0 4px 12px rgba(191, 145, 92, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.78);
    filter: saturate(1.04) contrast(1.02);
}

.author-profile .badge.bg-light {
    background: linear-gradient(90deg, #fff8e8 0%, #f2e4c9 100%) !important;
    color: #6d4c41 !important;
    border-color: #d7be95 !important;
    border-style: solid !important;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(178, 144, 99, 0.14);
    transition: all 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.author-profile .badge.bg-light:hover {
    background: linear-gradient(90deg, #7a4b32 0%, #a1663f 100%) !important;
    color: #fffdf8 !important;
    box-shadow: 0 10px 24px rgba(122, 75, 50, 0.28), 0 2px 8px rgba(161, 102, 63, 0.24);
}

/* ============================================
   2. Author Box (AuthorBoxSection)
   ============================================ */
.author-box {
    border-inline-start: 4px solid #c2864b;
    border-radius: 1.35rem;
    background: linear-gradient(180deg, rgba(255, 252, 245, 0.92) 0%, rgba(246, 235, 214, 0.9) 100%);
    box-shadow: 0 10px 26px rgba(125, 92, 72, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.74);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.author-box:hover {
    box-shadow: 0 18px 40px rgba(93, 64, 55, 0.16), 0 6px 16px rgba(194, 134, 75, 0.2);
}

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

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

/* ============================================
   3. Author Posts List (AuthorPostsListSection)
   ============================================ */
.author-posts-list .card {
    transition: all 0.52s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    border-color: #e7d7bd;
    border-style: solid;
    border-radius: 1.4rem;
    background: linear-gradient(180deg, #fffdf8 0%, #f7efe0 100%);
    box-shadow: 0 10px 28px rgba(119, 89, 73, 0.08), 0 2px 8px rgba(204, 168, 120, 0.08);
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 48px rgba(93, 64, 55, 0.16), 0 8px 20px rgba(194, 134, 75, 0.18);
}

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

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

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

.author-card {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #e0cba8;
    border-style: solid;
    border-radius: 1.5rem;
    background: linear-gradient(180deg, #fffdf8 0%, #f8f0e3 100%);
    box-shadow: 0 12px 30px rgba(111, 78, 55, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 52px rgba(93, 64, 55, 0.18), 0 10px 24px rgba(194, 134, 75, 0.18);
}

.author-card img.rounded-circle {
    border: 3px solid #efe0c4;
    border-radius: 2rem;
    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(152, 117, 83, 0.12);
}

.author-card:hover img.rounded-circle {
    border-color: #a1663f;
    box-shadow: 0 14px 30px rgba(161, 102, 63, 0.22);
}

/* ============================================
   5. FAQ (FaqSection) - <details>/<summary>
   ============================================ */
.faq-section {
    background: linear-gradient(180deg, #2f241f 0%, #4b382f 26%, #fffef9 26.1%, #f7efe1 100%);
}

.faq-section h2 {
    font-size: 1.75rem;
    color: #5f4337;
    text-shadow: 0 2px 12px rgba(175, 135, 93, 0.18);
}

/* FAQ item */
.faq-list .faq-item {
    border: 1px solid rgba(173, 136, 95, 0.22);
    border-style: solid;
    border-radius: 1.35rem;
    background: linear-gradient(180deg, rgba(255, 253, 248, 0.96) 0%, rgba(248, 239, 225, 0.92) 100%);
    box-shadow: 0 10px 24px rgba(73, 54, 45, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
    transition: all 0.52s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
}

.faq-list .faq-item:hover {
    box-shadow: 0 18px 36px rgba(73, 54, 45, 0.14), 0 6px 16px rgba(173, 136, 95, 0.16) !important;
    transform: translateY(-2px);
}

.faq-list .faq-item[open] {
    border-color: rgba(161, 102, 63, 0.38);
    background: linear-gradient(90deg, #f4e5cd 0%, #fffaf1 48%, #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: #503a31;
}

.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: #a1663f;
    text-shadow: 0 2px 8px rgba(161, 102, 63, 0.24);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), color 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    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: #8a5a3b;
}

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

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

/* ============================================
   6. Sidebar Widgets (SidebarWidgetsSection)
   ============================================ */
.sidebar-widgets .card {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1.35rem;
    background: linear-gradient(180deg, #fffef9 0%, #f7efdf 100%);
    border-color: #e4d1b0;
    border-style: solid;
    box-shadow: 0 10px 28px rgba(102, 73, 57, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.sidebar-widgets .card:hover {
    box-shadow: 0 18px 38px rgba(93, 64, 55, 0.15), 0 6px 16px rgba(194, 134, 75, 0.16);
}

.sidebar-widgets h5 {
    color: #5d4037;
    text-shadow: 0 2px 10px rgba(175, 135, 93, 0.14);
}

.sidebar-widgets .badge {
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(177, 139, 98, 0.12);
}

.sidebar-widgets .badge:hover {
    background-color: #8a5a3b !important;
    color: #fffaf3 !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(138, 90, 59, 0.24);
}

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

/* ============================================
   7. Pagination (PaginationSection)
   ============================================ */
.pagination .page-link {
    color: #8a5a3b;
    border-color: #dcc5a4;
    border-style: solid;
    background: linear-gradient(180deg, #fffdf8 0%, #f4e8d1 100%);
    border-radius: 1rem;
    box-shadow: 0 6px 16px rgba(114, 83, 63, 0.08);
    transition: all 0.44s cubic-bezier(0.22, 1, 0.36, 1);
}

.pagination .page-link:hover {
    background-color: #f0dfc0;
    color: #6e4835;
    border-color: #a1663f;
    box-shadow: 0 10px 24px rgba(161, 102, 63, 0.18);
}

.pagination .page-item.active .page-link {
    background-color: #7a4b32;
    border-color: #7a4b32;
    color: #fffaf3;
    box-shadow: 0 12px 28px rgba(122, 75, 50, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.pagination .page-item.disabled .page-link {
    color: #b79e86;
    opacity: 0.72;
}

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

.search-box-section .input-group-lg .form-control {
    border-radius: 2rem 0 0 2rem;
    padding-inline-start: 1.5rem;
    border-color: #d8bf9c;
    border-style: solid;
    background: linear-gradient(180deg, #fffefb 0%, #f8f0e1 100%);
    color: #5b4035;
    caret-color: #9a633f;
    box-shadow: inset 0 2px 6px rgba(126, 95, 72, 0.06), 0 6px 16px rgba(184, 145, 101, 0.08);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.search-box-section .input-group-lg .btn {
    border-radius: 0 2rem 2rem 0;
    background: linear-gradient(135deg, #8a5a3b 0%, #b27647 100%);
    border-color: #8a5a3b;
    border-style: solid;
    color: #fffaf3;
    box-shadow: 0 8px 18px rgba(138, 90, 59, 0.2);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.search-box-section .badge:hover {
    background-color: #8a5a3b !important;
    color: #fffaf3 !important;
    border-color: #8a5a3b !important;
    box-shadow: 0 10px 22px rgba(138, 90, 59, 0.24);
}

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

.search-result {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1.25rem;
    border-color: #ead8bc;
    border-style: solid;
    box-shadow: 0 8px 24px rgba(109, 81, 63, 0.07);
    background: linear-gradient(180deg, rgba(255, 253, 248, 0.92) 0%, rgba(248, 239, 225, 0.9) 100%);
}

.search-result:hover {
    transform: translateX(3px);
    box-shadow: 0 18px 36px rgba(93, 64, 55, 0.14), 0 6px 16px rgba(194, 134, 75, 0.14);
}

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

.search-result mark {
    background: linear-gradient(90deg, #f5d49a 0%, #ffe9b8 100%);
    color: #5f4031;
    padding-inline: 2px;
    border-radius: 0.4rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(213, 164, 86, 0.18);
}

/* ============================================
   10. Error Page (Error404Section)
   ============================================ */
.error-page h1 {
    background: linear-gradient(135deg, #7a4b32 0%, #c2864b 55%, #5b4035 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 8px 28px rgba(161, 102, 63, 0.22);
    filter: drop-shadow(0 10px 24px rgba(122, 75, 50, 0.12));
}

.recommended-links .badge {
    transition: all 0.46s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #dcc5a4;
    border-style: solid;
    border-radius: 999px;
    background: linear-gradient(180deg, #fffdf8 0%, #f4e8d1 100%);
    box-shadow: 0 6px 16px rgba(114, 83, 63, 0.08);
}

.recommended-links .badge:hover {
    background-color: #8a5a3b !important;
    color: #fffaf3 !important;
    border-color: #8a5a3b !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(138, 90, 59, 0.22), 0 4px 12px rgba(194, 134, 75, 0.16);
}

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

/* ============================================
   11. Legal Article (LegalArticleSection)
   ============================================ */
.legal-article-section,
main:has(> .container > article.bg-white) {
    background: linear-gradient(180deg, #2f241f 0%, #46342c 18%, #f7efdf 18.1%, #fffef9 100%);
}

article :is(h2.h4) {
    color: #6e4835;
    border-bottom: 2px solid #dfc9a7;
    padding-bottom: var(--space-xs);
    margin-bottom: var(--space-sm);
    text-shadow: 0 2px 8px rgba(188, 146, 101, 0.14);
}

article .alert-info {
    background-color: #f8ead1;
    border-color: #e5c798;
    color: #6a4635;
    border-style: solid;
    border-radius: 1.1rem;
    box-shadow: 0 10px 24px rgba(124, 91, 67, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

article .list-group-item {
    background: linear-gradient(180deg, rgba(255, 253, 248, 0) 0%, rgba(248, 239, 225, 0) 100%);
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    border-color: #ecdcc2;
    border-style: dashed;
}

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

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

.posts-grid .card {
    transition: all 0.52s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #e1cba7;
    border-style: solid;
    overflow: hidden;
    border-radius: 1.45rem;
    background: linear-gradient(180deg, #fffef9 0%, #f7efdf 100%);
    box-shadow: 0 10px 28px rgba(109, 81, 63, 0.08), 0 3px 10px rgba(194, 134, 75, 0.08);
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 46px rgba(93, 64, 55, 0.16), 0 8px 20px rgba(194, 134, 75, 0.18);
    border-color: #a1663f;
}

.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);
    filter: saturate(1.02);
}

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

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

.posts-grid .card-title a:hover {
    color: #8a5a3b !important;
    text-shadow: 0 2px 10px rgba(161, 102, 63, 0.16);
}

/* ============================================
   13. Related Posts (RelatedPostsSection)
   ============================================ */
.related-posts h3 {
    border-bottom: 3px solid #c2864b;
    padding-bottom: var(--space-xs);
    display: inline-block;
    color: #5d4037;
    text-shadow: 0 2px 10px rgba(175, 135, 93, 0.16);
}

.related-card {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1.35rem;
    background: linear-gradient(180deg, #fffef9 0%, #f6edde 100%);
    box-shadow: 0 10px 26px rgba(102, 73, 57, 0.08), 0 2px 8px rgba(194, 134, 75, 0.08);
    border-color: #e4d1b0;
    border-style: solid;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(93, 64, 55, 0.15), 0 6px 16px rgba(194, 134, 75, 0.16);
}

.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: 1.1rem;
    filter: saturate(1.03);
}

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

/* ============================================
   14. Social Share (SocialShareSection)
   ============================================ */
.social-share .btn {
    min-width: 40px;
    transition: all 0.44s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1rem;
    box-shadow: 0 6px 16px rgba(113, 82, 62, 0.1);
    border-color: #dcc5a4;
    border-style: solid;
    accent-color: #8a5a3b;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(93, 64, 55, 0.16), 0 4px 12px rgba(194, 134, 75, 0.16);
    filter: saturate(1.08);
}

.social-share [data-copy-url].copied {
    background-color: #6f8b5f;
    color: #fffdf8;
    border-color: #6f8b5f;
    border-style: solid;
    box-shadow: 0 12px 24px rgba(111, 139, 95, 0.22);
}

/* ============================================
   15. Bootstrap Accordion override
   ============================================ */
.accordion-button:not(.collapsed) {
    background-color: #f7e8cd;
    color: #6e4835;
    box-shadow: inset 0 -1px 0 rgba(212, 181, 136, 0.38);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(161, 102, 63, 0.18);
    outline: 1px solid rgba(194, 134, 75, 0.4);
    outline-color: rgba(194, 134, 75, 0.4);
    outline-style: solid;
}

/* ============================================
   16. Modal (用于 SocialShare 微信二维码)
   ============================================ */
.modal-content {
    border: none;
    border-radius: 1.6rem;
    background: linear-gradient(180deg, #fffef9 0%, #f6edde 100%);
    box-shadow: 0 26px 60px rgba(64, 47, 39, 0.22), 0 10px 24px rgba(194, 134, 75, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px) saturate(1.08);
}

/* ============================================
   17. Tooltip (Bootstrap)
   ============================================ */
.tooltip-inner {
    background-color: #4a342d;
    color: #fff8ee;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    box-shadow: 0 10px 24px rgba(74, 52, 45, 0.24);
}

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