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

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

.author-profile img.rounded-circle {
    border: 4px solid #fffaf2;
    box-shadow: 0 1px 2px rgba(59, 47, 36, 0.08), 0 8px 20px rgba(122, 90, 58, 0.12);
    border-radius: 6px;
}

.author-profile .badge.bg-light {
    background: #efe6d7 !important;
    color: #4b3b2f !important;
    transition: all 0.18s ease-out;
    border-radius: 4px;
}

.author-profile .badge.bg-light:hover {
    background: #6f5740 !important;
    color: #fffaf4 !important;
}

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

.author-box:hover {
    box-shadow: 0 1px 3px rgba(52, 40, 28, 0.08), 0 10px 18px rgba(141, 107, 79, 0.12);
}

.author-box img {
    transition: transform 0.18s 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.26s ease;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 2px 4px rgba(57, 44, 32, 0.08), 0 12px 22px rgba(111, 87, 64, 0.12);
}

.author-posts-list .card-img-top {
    transition: transform 0.38s ease;
    border-radius: 4px 4px 0 0;
}

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

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

.author-card {
    transition: all 0.26s ease;
    border: 1px solid #ddd1c1;
    border-style: solid;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(49, 39, 29, 0.05);
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 2px 5px rgba(56, 43, 31, 0.08), 0 14px 24px rgba(125, 98, 71, 0.14);
}

.author-card img.rounded-circle {
    border: 3px solid #ece2d2;
    transition: border-color 0.26s ease;
    border-radius: 6px;
}

.author-card:hover img.rounded-circle {
    border-color: #7a5a3a;
}

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

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

.faq-list .faq-item {
    border: 1px solid rgba(96, 74, 53, 0.12);
    transition: all 0.26s ease;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(61, 47, 34, 0.04);
    background: rgba(255, 252, 247, 0.9);
}

.faq-list .faq-item:hover {
    box-shadow: 0 1px 3px rgba(59, 45, 31, 0.07) !important, 0 8px 16px rgba(125, 96, 68, 0.1) !important;
    transform: translateY(-2px);
}

.faq-list .faq-item[open] {
    border-color: rgba(122, 90, 58, 0.24);
    background: linear-gradient(90deg, #f4ebdf 0%, #fffdf9 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: #413328;
}

.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: #7a5a3a;
    transition: transform 0.26s ease;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255, 250, 242, 0.8);
}

.faq-list .faq-item[open] summary::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
}

.faq-list .faq-q-num {
    font-weight: 700;
    font-size: 0.95rem;
    color: #876646;
}

.faq-list .faq-answer {
    font-size: 0.95rem;
    line-height: 1.8;
    animation: faqFadeIn 0.26s ease;
    color: #5a493a;
}

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

/* ============================================
   6. Sidebar Widgets (SidebarWidgetsSection)
   ============================================ */
.sidebar-widgets .card {
    transition: all 0.26s ease;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(58, 45, 33, 0.05);
}

.sidebar-widgets .card:hover {
    box-shadow: 0 2px 4px rgba(54, 41, 29, 0.07), 0 10px 18px rgba(122, 90, 58, 0.1);
}

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

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

.sidebar-widgets .badge:hover {
    background-color: #74583f !important;
    color: #fffaf4 !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: #7a5a3a !important;
}

/* ============================================
   7. Pagination (PaginationSection)
   ============================================ */
.pagination .page-link {
    color: #7a5a3a;
    border-color: #d7c8b7;
    transition: all 0.18s ease-out;
    border-style: solid;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(61, 48, 34, 0.04);
}

.pagination .page-link:hover {
    background-color: #f2e8da;
    color: #5f4731;
    border-color: #8a6745;
    box-shadow: 0 1px 3px rgba(92, 70, 48, 0.08);
}

.pagination .page-item.active .page-link {
    background-color: #72553c;
    border-color: #72553c;
    color: #fffaf5;
    box-shadow: 0 1px 2px rgba(70, 52, 35, 0.08), 0 6px 14px rgba(114, 85, 60, 0.14);
}

.pagination .page-item.disabled .page-link {
    color: #b7a696;
    border-color: #e5dbcf;
    background-color: #fffdf9;
    opacity: 0.82;
}

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

.search-box-section .input-group-lg .form-control {
    border-radius: 6px 0 0 6px;
    padding-inline-start: 1.5rem;
    border-color: #d7c7b4;
    box-shadow: inset 0 1px 2px rgba(82, 62, 42, 0.04);
    caret-color: #7a5a3a;
    outline-color: #9f7a56;
}

.search-box-section .input-group-lg .btn {
    border-radius: 0 6px 6px 0;
    background: linear-gradient(180deg, #7e6248 0%, #674d38 100%);
    color: #fffaf4;
    border-color: #674d38;
    border-style: solid;
    box-shadow: 0 1px 2px rgba(60, 45, 31, 0.08);
}

.search-box-section .badge {
    transition: all 0.18s ease-out;
    border-radius: 4px;
}

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

.search-results-section {
    background: #fffdf9;
}

.search-result {
    transition: all 0.26s ease;
    border-radius: 5px;
}

.search-result:hover {
    transform: translateX(3px);
    box-shadow: 0 1px 3px rgba(55, 42, 30, 0.07), 0 10px 18px rgba(123, 94, 66, 0.1);
}

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

.search-result mark {
    background-color: #efe1b0;
    padding-inline: 2px;
    border-radius: 3px;
    font-weight: 600;
    color: #4f3d2c;
}

/* ============================================
   10. Error Page (Error404Section)
   ============================================ */
.error-page h1 {
    background: linear-gradient(135deg, #8a6746, #4a392b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 3px 18px rgba(111, 83, 58, 0.18);
    filter: drop-shadow(0 2px 10px rgba(96, 71, 49, 0.08));
}

.recommended-links .badge {
    transition: all 0.18s ease-out;
    border: 1px solid #d8cbbb;
    border-style: solid;
    border-radius: 4px;
    color: #5f4a36;
    background: #fffdf9;
}

.recommended-links .badge:hover {
    background-color: #73573f !important;
    color: #fffaf4 !important;
    border-color: #73573f !important;
    transform: translateY(-2px);
    box-shadow: 0 1px 3px rgba(66, 50, 35, 0.08), 0 6px 12px rgba(115, 87, 63, 0.12);
}

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

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

article :is(h2.h4) {
    color: #624a34;
    border-bottom: 2px solid #d9cbbc;
    padding-bottom: var(--space-xs);
    margin-bottom: var(--space-sm);
    text-shadow: 0 1px 0 rgba(255, 251, 245, 0.7);
}

article .alert-info {
    background-color: #f3eadf;
    border-color: #dac8b2;
    color: #614a35;
    border-style: solid;
    border-radius: 5px;
    box-shadow: inset 0 1px 0 rgba(255, 253, 249, 0.8);
}

article .list-group-item {
    background: transparent;
    transition: all 0.18s ease-out;
    border-radius: 4px;
    color: #584635;
}

article .list-group-item:hover {
    background: #efe5d7;
    padding-inline-start: var(--space-sm);
    box-shadow: inset 3px 0 0 rgba(125, 94, 66, 0.2);
}

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

.posts-grid .card {
    transition: all 0.26s ease;
    border: 1px solid #ddd0c1;
    border-style: solid;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(60, 46, 33, 0.05);
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 2px 4px rgba(59, 45, 32, 0.07), 0 12px 20px rgba(118, 90, 64, 0.12);
    border-color: #7b5b3b;
}

.posts-grid .card-img-top {
    transition: transform 0.38s ease;
    border-radius: 4px 4px 0 0;
}

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

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

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

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

.related-card {
    transition: all 0.26s ease;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(57, 43, 30, 0.04);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 2px 4px rgba(54, 41, 29, 0.07), 0 10px 18px rgba(121, 92, 65, 0.1);
}

.related-card img {
    transition: transform 0.38s ease;
    border-radius: 4px;
}

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

/* ============================================
   14. Social Share (SocialShareSection)
   ============================================ */
.social-share .btn {
    min-width: 40px;
    transition: all 0.18s ease-out;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(59, 45, 32, 0.05);
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 1px 3px rgba(58, 44, 31, 0.07), 0 8px 14px rgba(114, 86, 61, 0.1);
    filter: saturate(1.02);
}

.social-share [data-copy-url].copied {
    background-color: #6c8a62;
    color: #fffdf8;
    border-color: #6c8a62;
    border-style: solid;
}

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

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(138, 103, 70, 0.14);
    outline-color: rgba(138, 103, 70, 0.2);
}

/* ============================================
   16. Modal (用于 SocialShare 微信二维码)
   ============================================ */
.modal-content {
    border: none;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(48, 36, 26, 0.08), 0 18px 32px rgba(95, 72, 51, 0.14);
    backdrop-filter: blur(8px);
    background: rgba(255, 252, 248, 0.96);
}

/* ============================================
   17. Tooltip (Bootstrap)
   ============================================ */
.tooltip-inner {
    background-color: #3b2f24;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #fffaf5;
    box-shadow: 0 2px 8px rgba(45, 34, 24, 0.14);
}

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