/* ============================================================
   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, #f7f1e8 0%, #e5ddd0 100%);
}

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

.author-profile img.rounded-circle {
    border: 4px solid #f9f4ec;
    box-shadow: 0 2px 6px rgba(53, 38, 28, 0.10), 0 0 0 1px rgba(109, 84, 63, 0.12);
    border-radius: 6px;
}

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

.author-profile .badge.bg-light:hover {
    background: #8a5a44 !important;
    color: #fdf9f4 !important;
}

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

.author-box:hover {
    box-shadow: 0 3px 10px rgba(82, 54, 41, 0.10), 0 0 0 1px rgba(184, 107, 82, 0.16);
}

.author-box img {
    transition: transform 0.2s ease-out;
    border-radius: 4px;
}

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

/* ============================================
   3. Author Posts List (AuthorPostsListSection)
   ============================================ */
.author-posts-list .card {
    transition: all 0.3s ease;
    overflow: hidden;
    border-radius: 5px;
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 14px rgba(57, 41, 31, 0.10), 0 0 0 1px rgba(143, 91, 66, 0.14);
}

.author-posts-list .card-img-top {
    transition: transform 0.42s cubic-bezier(0.2, 0.65, 0.2, 1);
}

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

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

.author-card {
    transition: all 0.3s ease;
    border: 1px solid #cdbdac;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(66, 46, 35, 0.06);
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 18px rgba(61, 43, 33, 0.11), 0 0 0 1px rgba(154, 93, 67, 0.18);
}

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

.author-card:hover img.rounded-circle {
    border-color: #9a5d43;
}

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

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

/* FAQ item */
.faq-list .faq-item {
    border: 1px solid rgba(92, 67, 50, 0.12);
    transition: all 0.28s ease;
    cursor: pointer;
    border-radius: 4px;
    background: rgba(255, 250, 244, 0.75);
    backdrop-filter: blur(2px);
}

.faq-list .faq-item:hover {
    box-shadow: 0 4px 12px rgba(72, 49, 37, 0.08) !important;
    transform: translateY(-2px);
}

.faq-list .faq-item[open] {
    border-color: rgba(154, 93, 67, 0.28);
    background: linear-gradient(90deg, #efe2d3 0%, #fbf6ef 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: #41322b;
}

.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: #9f5f47;
    transition: transform 0.28s ease;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255, 248, 240, 0.8);
}

.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: #9a5d43;
}

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

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

/* ============================================
   6. Sidebar Widgets (SidebarWidgetsSection)
   ============================================ */
.sidebar-widgets .card {
    transition: all 0.28s ease;
    border-radius: 4px;
}

.sidebar-widgets .card:hover {
    box-shadow: 0 4px 10px rgba(63, 45, 35, 0.08), 0 0 0 1px rgba(153, 103, 79, 0.12);
}

.sidebar-widgets h5 {
    color: #3c2d27;
}

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

.sidebar-widgets .badge:hover {
    background-color: #8f5a43 !important;
    color: #fffaf5 !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: #9a5d43 !important;
}

/* ============================================
   7. Pagination (PaginationSection)
   ============================================ */
.pagination .page-link {
    color: #8e563e;
    border-color: #c7b39f;
    transition: all 0.2s ease;
    border-radius: 4px;
    box-shadow: none;
}

.pagination .page-link:hover {
    background-color: #eee2d3;
    color: #654233;
    border-color: #8e563e;
}

.pagination .page-item.active .page-link {
    background-color: #8e563e;
    border-color: #8e563e;
    color: #fff8f1;
    box-shadow: 0 2px 6px rgba(88, 56, 40, 0.14);
}

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

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

.search-box-section .input-group-lg .form-control {
    border-radius: 5px 0 0 5px;
    padding-inline-start: 1.5rem;
    border-color: #bda893;
    caret-color: #8f5a43;
    accent-color: #8f5a43;
    box-shadow: inset 0 1px 2px rgba(82, 58, 45, 0.05);
}

.search-box-section .input-group-lg .btn {
    border-radius: 0 5px 5px 0;
    background: linear-gradient(180deg, #9a6248 0%, #80503d 100%);
    border-color: #7b4d3b;
    color: #fff8f2;
    transition: all 0.22s ease;
}

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

.search-box-section .badge:hover {
    background-color: #945c45 !important;
    color: #fffaf4 !important;
    border-color: #945c45 !important;
}

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

.search-result {
    transition: all 0.28s ease;
    border-radius: 4px;
}

.search-result:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(62, 43, 33, 0.08), 0 0 0 1px rgba(160, 102, 76, 0.12);
}

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

.search-result mark {
    background-color: #e9c97f;
    color: #433128;
    padding-inline: 2px;
    border-radius: 2px;
    font-weight: 600;
    box-shadow: inset 0 -1px 0 rgba(110, 72, 34, 0.14);
}

/* ============================================
   10. Error Page (Error404Section)
   ============================================ */
.error-page h1 {
    background: linear-gradient(135deg, #7f4d3b, #c4835f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 3px 18px rgba(143, 90, 67, 0.18);
    filter: saturate(1.05);
}

.recommended-links .badge {
    transition: all 0.2s ease;
    border: 1px solid #cbb7a3;
    border-radius: 3px;
    background: #f9f3ea;
    color: #4b3a31;
}

.recommended-links .badge:hover {
    background-color: #8f5a43 !important;
    color: #fff9f3 !important;
    border-color: #8f5a43 !important;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(77, 52, 38, 0.12);
}

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

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

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

article .alert-info {
    background-color: #efe3d4;
    border-color: #d5bba4;
    color: #6b4738;
    border-radius: 5px;
    box-shadow: inset 0 0 0 1px rgba(142, 92, 64, 0.05);
}

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

article .list-group-item:hover {
    background: #f1e5d8;
    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 #cfbba8;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(63, 45, 35, 0.05);
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 14px rgba(61, 42, 32, 0.10), 0 0 0 1px rgba(154, 93, 67, 0.16);
    border-color: #9a5d43;
}

.posts-grid .card-img-top {
    transition: transform 0.42s cubic-bezier(0.2, 0.65, 0.2, 1);
}

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

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

.related-card {
    transition: all 0.28s ease;
    border-radius: 4px;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(61, 42, 32, 0.09), 0 0 0 1px rgba(168, 105, 78, 0.12);
}

.related-card img {
    transition: transform 0.42s cubic-bezier(0.2, 0.65, 0.2, 1);
    border-radius: 4px;
}

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

/* ============================================
   14. Social Share (SocialShareSection)
   ============================================ */
.social-share .btn {
    min-width: 40px;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(67, 46, 35, 0.12);
    filter: saturate(1.04);
}

.social-share [data-copy-url].copied {
    background-color: #7f684f;
    color: #fffaf3;
    border-color: #7f684f;
}

/* ============================================
   15. Bootstrap Accordion override
   ============================================ */
.accordion-button:not(.collapsed) {
    background-color: #efe1d2;
    color: #6a4535;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(154, 93, 67, 0.14);
    outline: 1px solid rgba(154, 93, 67, 0.2);
    outline-color: rgba(154, 93, 67, 0.2);
}

/* ============================================
   16. Modal (用于 SocialShare 微信二维码)
   ============================================ */
.modal-content {
    border: none;
    border-radius: 6px;
    box-shadow: 0 10px 24px rgba(53, 37, 28, 0.14), 0 0 0 1px rgba(126, 87, 64, 0.08);
    background: #fbf6ef;
    backdrop-filter: blur(6px);
}

/* ============================================
   17. Tooltip (Bootstrap)
   ============================================ */
.tooltip-inner {
    background-color: #3d2f29;
    border-radius: 3px;
    font-size: 0.85rem;
    color: #fff8f2;
    box-shadow: 0 2px 8px rgba(43, 30, 23, 0.16);
}

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