/* ============================================================
   MODULE.CSS v3.0 - 组件样式
   ============================================================
   匹配 Section 模板:
   - AuthorBoxSection / AuthorProfileSection / AuthorPostsListSection / MainAuthorsSection
   - FaqSection
   - SidebarWidgetsSection
   - PaginationSection
   - SearchBoxSection / SearchResultsSection
   - Error404Section
   - LegalArticleSection
   - PostListSection / RelatedPostsSection
   - SocialShareSection
   ============================================================ */

:root{
    --color-stage:#0f0f1a;
    --color-paper:#fbfbff;
    --color-ink:#1b1b2a;
    --color-gold:#d6b25e;
    --color-gold-deep:#a78035;
    --color-purple:#6d28d9;
    --color-purple-deep:#3b1aa8;
    --color-ice:#eaf0ff;
    --color-border-soft-2: rgba(255,255,255,0.14);
    --color-border-soft-3: rgba(16,16,30,0.12);

    --color-bg-soft: rgba(234,240,255,0.55);
    --color-bg: rgba(15,15,26,0.04);
    --color-bg-muted: rgba(234,240,255,0.9);
    --color-text: #1b1b2a;
    --color-text-light: rgba(27,27,42,0.62);

    --color-primary: var(--color-purple);
    --color-primary-dark: #4c1aa8;
    --color-primary-darker: #2b0e63;
    --color-accent: var(--color-gold);

    --color-border: rgba(109,40,217,0.55);
    --color-border-soft: rgba(109,40,217,0.22);

    --shadow-xs: 2px 2px 0 rgba(109,40,217,0.25);
    --shadow-sm: 3px 3px 0 rgba(214,178,94,0.35);
    --shadow-md: 4px 4px 0 rgba(59,26,168,0.35), 10px 10px 26px rgba(0,0,0,0.10);
    --shadow-lg: 4px 4px 0 rgba(214,178,94,0.45), 14px 18px 42px rgba(0,0,0,0.16);
    --shadow-xl: 4px 4px 0 rgba(109,40,217,0.50), 18px 22px 56px rgba(0,0,0,0.18);

    --radius-sm: 2px;
    --radius-pill: 999px;
    --radius-lg: 4px;

    --transition-fast: 0.15s cubic-bezier(.2,.8,.2,1);
    --transition-base: 0.15s cubic-bezier(.2,.8,.2,1);
    --transition-slow: 0.35s cubic-bezier(.2,.8,.2,1);
    --space-xs: 0.75rem;
    --space-sm: 1rem;
    --color-success:#16a34a;

    --text-shadow-strong: 3px 3px 0 rgba(10,10,20,0.55), 0 10px 28px rgba(109,40,217,0.25);
}

/* ============================================
   1. Author Profile (AuthorProfileSection)
   ============================================ */
.author-profile {
    background: linear-gradient(135deg, rgba(251,251,255,1) 0%, rgba(234,240,255,0.55) 55%, rgba(15,15,26,0.06) 100%);
}

.author-profile h1 {
    color: var(--color-primary-darker);
    text-shadow: 2px 2px 0 rgba(214,178,94,0.18);
}

.author-profile img.rounded-circle {
    border: 4px solid rgba(255,255,255,0.96);
    border-radius: 2px;
    box-shadow: var(--shadow-xs), 12px 14px 30px rgba(0,0,0,0.12);
}

.author-profile .badge.bg-light {
    background: rgba(234,240,255,0.98) !important;
    color: rgba(27,27,42,0.9) !important;
    border: 2px solid rgba(109,40,217,0.18);
    transition: all 0.15s cubic-bezier(.2,.8,.2,1);
    border-radius: 2px;
}

.author-profile .badge.bg-light:hover {
    background: linear-gradient(135deg, rgba(109,40,217,1) 0%, rgba(59,26,168,1) 100%) !important;
    color: #fff !important;
    border-color: rgba(214,178,94,0.65);
    box-shadow: 4px 4px 0 rgba(214,178,94,0.40), 10px 18px 34px rgba(109,40,217,0.22);
}

/* ============================================
   2. Author Box (AuthorBoxSection)
   ============================================ */
.author-box {
    border-inline-start: 4px solid rgba(214,178,94,1);
    transition: all 0.15s cubic-bezier(.2,.8,.2,1);
}

.author-box:hover {
    box-shadow: var(--shadow-sm);
}

.author-box img {
    transition: transform 0.15s cubic-bezier(.2,.8,.2,1), filter 0.15s cubic-bezier(.2,.8,.2,1);
}

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

/* ============================================
   3. Author Posts List (AuthorPostsListSection)
   ============================================ */
.author-posts-list .card {
    transition: all 0.15s cubic-bezier(.2,.8,.2,1);
    overflow: hidden;
    border-radius: 2px;
    border: 2px solid rgba(255,255,255,0.12);
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    box-shadow: 4px 4px 0 rgba(109,40,217,0.35), 16px 20px 46px rgba(0,0,0,0.18);
    border-color: rgba(214,178,94,0.70);
}

.author-posts-list .card-img-top {
    transition: transform 0.35s cubic-bezier(.2,.8,.2,1), filter 0.35s cubic-bezier(.2,.8,.2,1);
}

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

/* ============================================
   4. Main Authors (MainAuthorsSection)
   ============================================ */
.main-authors-section {
    background: radial-gradient(1200px 500px at 50% 0%, rgba(109,40,217,0.16) 0%, rgba(15,15,26,0.04) 55%, rgba(15,15,26,0.02) 100%);
    border-top: 1px solid rgba(214,178,94,0.18);
    border-bottom: 1px solid rgba(109,40,217,0.16);
}

.author-card {
    transition: all 0.15s cubic-bezier(.2,.8,.2,1);
    border: 2px solid rgba(109,40,217,0.16);
    border-radius: 2px;
    background: rgba(251,251,255,0.9);
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow: 4px 4px 0 rgba(214,178,94,0.42), 18px 24px 62px rgba(0,0,0,0.20);
    border-color: rgba(109,40,217,0.38);
}

.author-card img.rounded-circle {
    border: 3px solid rgba(234,240,255,0.98);
    border-radius: 2px;
    transition: border-color 0.15s cubic-bezier(.2,.8,.2,1), box-shadow 0.15s cubic-bezier(.2,.8,.2,1);
}

.author-card:hover img.rounded-circle {
    border-color: rgba(214,178,94,1);
    box-shadow: 3px 3px 0 rgba(214,178,94,0.35);
}

/* ============================================
   5. FAQ (FaqSection) - <details>/<summary>
   ============================================ */
.faq-section {
    background: linear-gradient(180deg, rgba(234,240,255,0.55) 0%, rgba(251,251,255,1) 100%);
    border-top: 1px solid rgba(109,40,217,0.14);
}

.faq-section h2 {
    font-size: 1.75rem;
    color: var(--color-primary-darker);
    text-shadow: 2px 2px 0 rgba(214,178,94,0.18);
}

/* FAQ item */
.faq-list .faq-item {
    border: 2px solid rgba(16,16,30,0.08);
    transition: all 0.15s cubic-bezier(.2,.8,.2,1);
    cursor: pointer;
    border-radius: 2px;
    background: rgba(255,255,255,0.65);
}

.faq-list .faq-item:hover {
    box-shadow: 4px 4px 0 rgba(109,40,217,0.24) !important, 18px 22px 54px rgba(0,0,0,0.14) !important;
    transform: translateY(-2px);
    border-color: rgba(214,178,94,0.45);
}

.faq-list .faq-item[open] {
    border-color: rgba(214,178,94,0.65);
    background: linear-gradient(90deg, rgba(234,240,255,0.95) 0%, rgba(255,255,255,0.95) 100%);
    box-shadow: 4px 4px 0 rgba(214,178,94,0.25);
}

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

.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: rgba(109,40,217,1);
    transition: transform 0.15s cubic-bezier(.2,.8,.2,1), color 0.15s cubic-bezier(.2,.8,.2,1);
    line-height: 1;
    text-shadow: 1px 1px 0 rgba(214,178,94,0.25);
}

.faq-list .faq-item[open] summary::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
    color: rgba(214,178,94,1);
}

/* Q number */
.faq-list .faq-q-num {
    font-weight: 700;
    font-size: 0.95rem;
    color: rgba(109,40,217,1);
    text-shadow: 1px 1px 0 rgba(214,178,94,0.18);
}

/* Answer */
.faq-list .faq-answer {
    font-size: 0.95rem;
    line-height: 1.8;
    animation: faqFadeIn 0.15s cubic-bezier(.2,.8,.2,1);
}

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

/* ============================================
   6. Sidebar Widgets (SidebarWidgetsSection)
   ============================================ */
.sidebar-widgets .card {
    transition: all 0.15s cubic-bezier(.2,.8,.2,1);
    border-radius: 2px;
}

.sidebar-widgets .card:hover {
    box-shadow: var(--shadow-md);
}

.sidebar-widgets h5 {
    color: var(--color-primary-darker);
    text-shadow: 2px 2px 0 rgba(214,178,94,0.16);
}

.sidebar-widgets .badge {
    transition: all 0.15s cubic-bezier(.2,.8,.2,1);
    cursor: pointer;
    border-radius: 2px;
    border: 2px solid rgba(109,40,217,0.18);
}

.sidebar-widgets .badge:hover {
    background-color: rgba(109,40,217,1) !important;
    color: #fff !important;
    border-color: rgba(214,178,94,0.75) !important;
    transform: translateY(-1px);
    box-shadow: 4px 4px 0 rgba(214,178,94,0.30);
}

.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: var(--color-primary) !important;
}

/* ============================================
   7. Pagination (PaginationSection)
   ============================================ */
.pagination .page-link {
    color: rgba(109,40,217,1);
    border-color: rgba(109,40,217,0.35);
    transition: all 0.15s cubic-bezier(.2,.8,.2,1);
    border-radius: 2px;
}

.pagination .page-link:hover {
    background-color: rgba(234,240,255,0.95);
    color: rgba(75,26,168,1);
    border-color: rgba(214,178,94,0.65);
    box-shadow: 4px 4px 0 rgba(214,178,94,0.25);
}

.pagination .page-item.active .page-link {
    background-color: rgba(109,40,217,1);
    border-color: rgba(109,40,217,1);
    color: #fff;
    box-shadow: 4px 4px 0 rgba(214,178,94,0.28), 18px 22px 46px rgba(109,40,217,0.22);
}

.pagination .page-item.disabled .page-link {
    color: rgba(27,27,42,0.52);
    border-color: rgba(16,16,30,0.12);
    background: rgba(255,255,255,0.45);
}

/* ============================================
   8. Search Box (SearchBoxSection)
   ============================================ */
.search-box-section {
    background: linear-gradient(180deg, rgba(234,240,255,0.55) 0%, rgba(15,15,26,0.03) 100%);
    border-top: 1px solid rgba(214,178,94,0.14);
}

.search-box-section .input-group-lg .form-control {
    border-radius: var(--radius-pill) 0 0 var(--radius-pill);
    padding-inline-start: 1.5rem;
    border: 2px solid rgba(109,40,217,0.22);
    background: rgba(255,255,255,0.70);
    color: rgba(27,27,42,0.92);
    box-shadow: none;
    caret-color: rgba(109,40,217,1);
}

.search-box-section .input-group-lg .btn {
    border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
    border: 2px solid rgba(109,40,217,0.35);
    background: linear-gradient(135deg, rgba(109,40,217,1) 0%, rgba(59,26,168,1) 100%);
    color: #fff;
    box-shadow: 4px 4px 0 rgba(214,178,94,0.25);
}

.search-box-section .badge {
    transition: all 0.15s cubic-bezier(.2,.8,.2,1);
    border-radius: 2px;
    border: 2px solid rgba(109,40,217,0.18);
}

.search-box-section .badge:hover {
    background-color: rgba(109,40,217,1) !important;
    color: #fff !important;
    border-color: rgba(109,40,217,1) !important;
    box-shadow: 4px 4px 0 rgba(214,178,94,0.25);
}

/* ============================================
   9. Search Results (SearchResult
sSection)
   ============================================ */
.search-results-section {
    background: linear-gradient(180deg, rgba(15,15,26,0.02) 0%, rgba(234,240,255,0.35) 100%);
}

.search-result {
    transition: all 0.15s cubic-bezier(.2,.8,.2,1);
    border-radius: 2px;
}

.search-result:hover {
    transform: translateX(3px);
    box-shadow: 4px 4px 0 rgba(109,40,217,0.25), 14px 18px 40px rgba(0,0,0,0.12);
}

.search-result h2 a:hover {
    color: rgba(109,40,217,1) !important;
    text-shadow: 2px 2px 0 rgba(214,178,94,0.16);
}

.search-result mark {
    background-color: rgba(214,178,94,0.22);
    padding-inline: 2px;
    border-radius: 2px;
    font-weight: 700;
    border: 2px solid rgba(214,178,94,0.45);
    color: rgba(43,14,99,1);
}

/* ============================================
   10. Error Page (Error404Section)
   ============================================ */
.error-page h1 {
    background: linear-gradient(135deg, rgba(214,178,94,1), rgba(109,40,217,1), rgba(59,26,168,1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: var(--text-shadow-strong);
    filter: drop-shadow(0 18px 30px rgba(0,0,0,0.15));
}

.recommended-links .badge {
    transition: all 0.15s cubic-bezier(.2,.8,.2,1);
    border: 2px solid rgba(109,40,217,0.25);
    border-radius: 2px;
    background: rgba(255,255,255,0.55);
    color: rgba(27,27,42,0.9);
}

.recommended-links .badge:hover {
    background-color: rgba(109,40,217,1) !important;
    color: #fff !important;
    border-color: rgba(214,178,94,0.75) !important;
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 rgba(214,178,94,0.30), 18px 22px 44px rgba(109,40,217,0.22);
}

.recommended-links .badge:hover .text-warning {
    color: rgba(214,178,94,1) !important;
}

/* ============================================
   11. Legal Article (LegalArticleSection)
   ============================================ */
.legal-article-section,
main:has(> .container > article.bg-white) {
    background: linear-gradient(180deg, rgba(234,240,255,0.55) 0%, rgba(255,255,255,0.88) 100%);
    border-top: 1px solid rgba(109,40,217,0.14);
}

article :is(h2.h4) {
    color: rgba(43,14,99,1);
    border-bottom: 2px solid rgba(214,178,94,0.65);
    padding-bottom: var(--space-xs);
    margin-bottom: var(--space-sm);
    text-shadow: 1px 1px 0 rgba(214,178,94,0.14);
}

article .alert-info {
    background-color: rgba(234,240,255,0.92);
    border-color: rgba(109,40,217,0.22);
    color: rgba(43,14,99,1);
    border-width: 2px;
    border-style: solid;
    border-radius: 2px;
}

article .list-group-item {
    background: transparent;
    transition: all 0.15s cubic-bezier(.2,.8,.2,1);
    border-radius: 2px;
    border: 2px solid transparent;
}

article .list-group-item:hover {
    background: rgba(234,240,255,0.45);
    padding-inline-start: var(--space-sm);
    border-color: rgba(109,40,217,0.18);
    box-shadow: 4px 4px 0 rgba(214,178,94,0.16);
}

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

.posts-grid .card {
    transition: all 0.15s cubic-bezier(.2,.8,.2,1);
    border: 2px solid rgba(109,40,217,0.18);
    overflow: hidden;
    border-radius: 2px;
    background: rgba(255,255,255,0.65);
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 4px 4px 0 rgba(109,40,217,0.30), 18px 22px 54px rgba(0,0,0,0.16);
    border-color: rgba(214,178,94,0.70);
}

.posts-grid .card-img-top {
    transition: transform 0.35s cubic-bezier(.2,.8,.2,1), filter 0.35s cubic-bezier(.2,.8,.2,1);
}

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

.posts-grid .card-title a {
    transition: color 0.15s cubic-bezier(.2,.8,.2,1), text-shadow 0.15s cubic-bezier(.2,.8,.2,1);
}

.posts-grid .card-title a:hover {
    color: rgba(109,40,217,1) !important;
    text-shadow: 2px 2px 0 rgba(214,178,94,0.16);
}

/* ============================================
   13. Related Posts (RelatedPostsSection)
   ============================================ */
.related-posts h3 {
    border-bottom: 3px solid rgba(214,178,94,1);
    padding-bottom: var(--space-xs);
    display: inline-block;
    text-shadow: 1px 1px 0 rgba(109,40,217,0.18);
}

.related-card {
    transition: all 0.15s cubic-bezier(.2,.8,.2,1);
    border-radius: 2px;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 4px 4px 0 rgba(214,178,94,0.30), 16px 20px 44px rgba(0,0,0,0.14);
}

.related-card img {
    transition: transform 0.35s cubic-bezier(.2,.8,.2,1), filter 0.35s cubic-bezier(.2,.8,.2,1);
}

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

/* ============================================
   14. Social Share (SocialShareSection)
   ============================================ */
.social-share .btn {
    min-width: 40px;
    transition: all 0.15s cubic-bezier(.2,.8,.2,1);
    border-radius: 2px;
    border: 2px solid transparent;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 rgba(109,40,217,0.25), 14px 18px 36px rgba(0,0,0,0.12);
}

.social-share [data-copy-url].copied {
    background-color: rgba(22,163,74,0.95);
    color: #fff;

    border-color: rgba(22,163,74,0.95);
    box-shadow: 4px 4px 0 rgba(214,178,94,0.18), 16px 20px 44px rgba(0,0,0,0.12);
    border-radius: 2px;
}

/* ============================================
   15. Bootstrap Accordion override
   ============================================ */
.accordion-button:not(.collapsed) {
    background-color: rgba(234,240,255,0.92);
    color: rgba(43,14,99,1);
    box-shadow: none;
    border-radius: 2px;
    border: 2px solid rgba(109,40,217,0.16);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(214,178,94,0.20);
    border-radius: 2px;
}

/* ============================================
   16. Modal (用于 SocialShare 微信二维码)
   ============================================ */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 4px 4px 0 rgba(109,40,217,0.35), 26px 34px 80px rgba(0,0,0,0.22);
    background: rgba(251,251,255,0.92);
    border: 2px solid rgba(109,40,217,0.16);
}

/* ============================================
   17. Tooltip (Bootstrap)
   ============================================ */
.tooltip-inner {
    background-color: rgba(43,14,99,0.96);
    border-radius: 2px;
    font-size: 0.85rem;
    border: 2px solid rgba(214,178,94,0.35);
    box-shadow: 4px 4px 0 rgba(214,178,94,0.18), 16px 20px 44px rgba(0,0,0,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;
    }
}