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

.author-profile h1 {
    color: #1a1a1a;
}

.author-profile img.rounded-circle {
    border: 4px solid #fdfaf3;
    box-shadow: 4px 4px 0 #6b705c, 0 0 0 2px #d9cfbe;
}

.author-profile .badge.bg-light {
    background: #e9e0d0 !important;
    color: #1f1c18 !important;
    transition: all 0.15s ease-out;
    border-color: #cfc2aa !important;
    border-style: solid;
    border-radius: 3px;
}

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

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

.author-box:hover {
    box-shadow: 4px 4px 0 #c7b79b, 0 0 0 1px #6b705c;
}

.author-box img {
    transition: transform 0.15s ease-out;
    filter: saturate(0.94) contrast(1.03);
}

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

/* ============================================
   3. Author Posts List (AuthorPostsListSection)
   ============================================ */
.author-posts-list .card {
    transition: all 0.15s ease-out;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: 0 0 0 1px #ded3c1;
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    box-shadow: 5px 5px 0 #6b705c, 0 0 0 1px #bcae95;
}

.author-posts-list .card-img-top {
    transition: transform 0.2s ease-out;
    filter: sepia(0.08) contrast(1.04);
}

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

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

.author-card {
    transition: all 0.15s ease-out;
    border: 1px solid #d5cab8;
    border-style: solid;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(107, 112, 92, 0.04);
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow: 6px 6px 0 #6b705c, 0 0 0 1px #c2b49a;
}

.author-card img.rounded-circle {
    border: 3px solid #e4dac8;
    transition: border-color 0.15s ease-out;
    box-shadow: 3px 3px 0 #d2c4ab;
}

.author-card:hover img.rounded-circle {
    border-color: #6b705c;
}

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

.faq-section h2 {
    font-size: 1.75rem;
    color: #1a1a1a;
}

.faq-list .faq-item {
    border: 1px solid rgba(38, 30, 20, 0.12);
    transition: all 0.15s ease-out;
    cursor: pointer;
    border-style: solid;
    border-radius: 2px;
    background: rgba(253, 250, 243, 0.92);
}

.faq-list .faq-item:hover {
    box-shadow: 4px 4px 0 rgba(107, 112, 92, 0.9) !important, 0 0 0 1px rgba(107, 112, 92, 0.18);
    transform: translateY(-2px);
}

.faq-list .faq-item[open] {
    border-color: rgba(107, 112, 92, 0.35);
    background: linear-gradient(90deg, #e8e0d0 0%, #f8f4ec 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: #201c17;
}

.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: #6b705c;
    transition: transform 0.15s ease-out;
    line-height: 1;
    text-shadow: 1px 1px 0 #e5dccd;
}

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

.faq-list .faq-answer {
    font-size: 0.95rem;
    line-height: 1.8;
    animation: faqFadeIn 0.2s ease-out;
    color: #3a342c;
    opacity: 0.96;
}

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

/* ============================================
   6. Sidebar Widgets (SidebarWidgetsSection)
   ============================================ */
.sidebar-widgets .card {
    transition: all 0.15s ease-out;
    border-radius: 2px;
    box-shadow: 0 0 0 1px #ddd2bf;
}

.sidebar-widgets .card:hover {
    box-shadow: 4px 4px 0 #c9b99d, 0 0 0 1px #6b705c;
}

.sidebar-widgets h5 {
    color: #1a1a1a;
}

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

.sidebar-widgets .badge:hover {
    background-color: #6b705c !important;
    color: #fbf8f1 !important;
    transform: translateY(-1px);
    box-shadow: 3px 3px 0 #d6cab5;
}

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

/* ============================================
   7. Pagination (PaginationSection)
   ============================================ */
.pagination .page-link {
    color: #6b705c;
    border-color: #cdbfa8;
    transition: all 0.15s ease-out;
    border-style: solid;
    border-radius: 2px;
    background-color: #fcf9f2;
    box-shadow: 0 0 0 1px rgba(107, 112, 92, 0.03);
}

.pagination .page-link:hover {
    background-color: #ece2d2;
    color: #1a1a1a;
    border-color: #6b705c;
    box-shadow: 3px 3px 0 #d0c1a6;
}

.pagination .page-item.active .page-link {
    background-color: #6b705c;
    border-color: #6b705c;
    color: #fffaf2;
    box-shadow: 3px 3px 0 #cdbfa6;
}

.pagination .page-item.disabled .page-link {
    color: #9a907f;
    background-color: #f1ebdf;
    border-color: #ddd1bf;
    opacity: 0.78;
}

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

.search-box-section .input-group-lg .form-control {
    border-radius: 3px 0 0 3px;
    padding-inline-start: 1.5rem;
    border-color: #cbbb9f;
    border-style: solid;
    background-color: #fdfaf3;
    color: #1d1a16;
    caret-color: #6b705c;
    box-shadow: inset 0 0 0 1px rgba(107, 112, 92, 0.03);
}

.search-box-section .input-group-lg .btn {
    border-radius: 0 3px 3px 0;
    background: #6b705c;
    color: #fcf8f0;
    border-color: #6b705c;
    border-style: solid;
    box-shadow: 3px 3px 0 #c8b89b;
    transition: all 0.15s ease-out;
}

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

.search-box-section .badge:hover {
    background-color: #6b705c !important;
    color: #fffaf2 !important;
    border-color: #6b705c !important;
    box-shadow: 3px 3px 0 #d3c4aa;
}

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

.search-result {
    transition: all 0.15s ease-out;
    border-radius: 2px;
}

.search-result:hover {
    transform: translateX(3px);
    box-shadow: 4px 4px 0 #cdbda2, 0 0 0 1px #6b705c;
}

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

.search-result mark {
    background-color: #d8c6a1;
    color: #1a1a1a;
    padding-inline: 2px;
    border-radius: 1px;
    font-weight: 600;
    box-shadow: inset 0 -1px 0 #b39f75;
}

/* ============================================
   10. Error Page (Error404Section)
   ============================================ */
.error-page h1 {
    background: linear-gradient(135deg, #6b705c, #3f4337);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 4px 4px 0 rgba(201, 189, 165, 0.7);
}

.recommended-links .badge {
    transition: all 0.15s ease-out;
    border: 1px solid #cdbfa8;
    border-style: solid;
    border-radius: 2px;
    background-color: #f9f5ed;
    color: #28231d;
}

.recommended-links .badge:hover {
    background-color: #6b705c !important;
    color: #fffaf2 !important;
    border-color: #6b705c !important;
    transform: translateY(-2px);
    box-shadow: 3px 3px 0 #d0c2a8;
}

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

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

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

article .alert-info {
    background-color: #e7dfd1;
    border-color: #c7b79b;
    color: #2d2b24;
    border-style: solid;
    border-radius: 2px;
    box-shadow: 4px 4px 0 rgba(107, 112, 92, 0.14);
}

article .list-group-item {
    background: transparent;
    transition: all 0.15s ease-out;
    color: #2a251f;
}

article .list-group-item:hover {
    background: #f3ede2;
    padding-inline-start: var(--space-sm);
    box-shadow: inset 3px 0 0 #6b705c;
}

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

.posts-grid .card {
    transition: all 0.15s ease-out;
    border: 1px solid #d6cbb8;
    overflow: hidden;
    border-style: solid;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(107, 112, 92, 0.03);
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 5px 5px 0 #6b705c, 0 0 0 1px #c2b59d;
    border-color: #6b705c;
}

.posts-grid .card-img-top {
    transition: transform 0.2s ease-out;
    filter: sepia(0.06) contrast(1.05);
}

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

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

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

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

.related-card {
    transition: all 0.15s ease-out;
    border-radius: 2px;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 4px 4px 0 #ccbca1, 0 0 0 1px #6b705c;
}

.related-card img {
    transition: transform 0.2s ease-out;
    filter: saturate(0.96) contrast(1.03);
}

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

/* ============================================
   14. Social Share (SocialShareSection)
   ============================================ */
.social-share .btn {
    min-width: 40px;
    transition: all 0.15s ease-out;
    border-radius: 2px;
    accent-color: #6b705c;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 3px 3px 0 #d1c3aa;
    border-color: #6b705c;
}

.social-share [data-copy-url].copied {
    background-color: #6b705c;
    color: #fffaf2;
    border-color: #6b705c;
}

/* ============================================
   15. Bootstrap Accordion override
   ============================================ */
.accordion-button:not(.collapsed) {
    background-color: #e9e1d2;
    color: #1f1d18;
    box-shadow: inset 3px 0 0 #6b705c;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(107, 112, 92, 0.2);
    outline-color: #6b705c;
    outline-style: solid;
}

/* ============================================
   16. Modal (用于 SocialShare 微信二维码)
   ============================================ */
.modal-content {
    border: none;
    border-radius: 4px;
    box-shadow: 7px 7px 0 #6b705c, 0 0 0 1px #d1c3a9;
    background: #fcf9f2;
}

/* ============================================
   17. Tooltip (Bootstrap)
   ============================================ */
.tooltip-inner {
    background-color: #1a1a1a;
    border-radius: 2px;
    font-size: 0.85rem;
    color: #f6f1e8;
    box-shadow: 3px 3px 0 #6b705c;
}

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