/* ============================================================
   MODULE.CSS v4.0 - 组件样式 · card-mosaic / airy-rhythm
   ============================================================ */

/* ============================================
   1. Author Profile
   ============================================ */
.author-profile {
    background: linear-gradient(135deg, #FFFDFA 0%, #F4F1EC 100%);
}

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

.author-profile img.rounded-circle {
    border: 4px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 12px 32px rgba(109, 91, 208, 0.18), 0 4px 12px rgba(109, 91, 208, 0.10);
}

.author-profile .badge.bg-light {
    background: #EDE9E2 !important;
    color: #3D2F91 !important;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ============================================
   2. Author Box
   ============================================ */
.author-box {
    border-inline-start: 4px solid #FF7A5C;
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.author-box:hover {
    box-shadow: 0 20px 40px rgba(255, 122, 92, 0.18), 0 6px 16px rgba(255, 122, 92, 0.12);
}

.author-box img {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ============================================
   3. Author Posts List
   ============================================ */
.author-posts-list .card {
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    border-radius: 1.5rem;
    background: linear-gradient(145deg, #FFFFFF 0%, #F4F0FF 100%);
    box-shadow: 0 4px 20px rgba(109, 91, 208, 0.06);
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 48px rgba(109, 91, 208, 0.16), 0 8px 20px rgba(109, 91, 208, 0.10);
}

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

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

/* ============================================
   4. Main Authors
   ============================================ */
.main-authors-section {
    background: linear-gradient(135deg, #F7F2ED 0%, #EFEBE4 100%);
}

.author-card {
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #E3DDD3;
    border-radius: 1.5rem;
    background: linear-gradient(145deg, #FFFFFF 0%, #F7F0FF 100%);
    box-shadow: 0 6px 24px rgba(109, 91, 208, 0.07);
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 56px rgba(109, 91, 208, 0.18), 0 10px 24px rgba(109, 91, 208, 0.10);
}

.author-card img.rounded-circle {
    border: 3px solid #EFEAE3;
    transition: border-color 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ============================================
   5. FAQ
   ============================================ */
.faq-section {
    background: linear-gradient(180deg, #F2F6F1 0%, #FCFCFA 100%);
}

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

.faq-list .faq-item {
    border: 1px solid #E5E0D7;
    border-radius: 1.25rem;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.60);
    box-shadow: 0 2px 12px rgba(244, 168, 37, 0.06);
}

.faq-list .faq-item:hover {
    box-shadow: 0 18px 36px rgba(244, 168, 37, 0.16), 0 6px 14px rgba(244, 168, 37, 0.10) !important;
    transform: translateY(-2px);
    border-color: #F0B94F;
}

.faq-list .faq-item[open] {
    border-color: rgba(244, 168, 37, 0.35);
    background: linear-gradient(90deg, #FEF7EC 0%, #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;
}

.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: #F4A825;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    line-height: 1;
}

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

.faq-list .faq-answer {
    font-size: 0.95rem;
    line-height: 1.8;
    animation: faqFadeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ============================================
   6. Sidebar Widgets
   ============================================ */
.sidebar-widgets .card {
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1.25rem;
    background: linear-gradient(145deg, #FFFFFF 0%, #EFFAF5 100%);
    box-shadow: 0 4px 20px rgba(23, 177, 132, 0.06);
}

.sidebar-widgets .card:hover {
    box-shadow: 0 20px 40px rgba(23, 177, 132, 0.16), 0 8px 16px rgba(23, 177, 132, 0.10);
}

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

.sidebar-widgets .badge {
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
}

.sidebar-widgets .badge:hover {
    background-color: #17B184 !important;
    color: white !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: #6D5BD0 !important;
}

/* ============================================
   7. Pagination
   ============================================ */
.pagination .page-link {
    color: #6D5BD0;
    border-color: #E3DDD3;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.pagination .page-link:hover {
    background-color: #EFEAE3;
    color: #5847B8;
    border-color: #B9ACEC;
}

.pagination .page-item.active .page-link {
    background-color: #6D5BD0;
    border-color: #6D5BD0;
    color: #FFFFFF;
}

.pagination .page-item.disabled .page-link {
    color: #A8A29A;
}

/* ============================================
   8. Search Box
   ============================================ */
.search-box-section {
    background: linear-gradient(120deg, #F1F0FE 0%, #F6F4EF 100%);
}

.search-box-section .input-group-lg .form-control {
    border-radius: 999px 0 0 999px;
    padding-inline-start: 1.5rem;
}

.search-box-section .input-group-lg .btn {
    border-radius: 0 999px 999px 0;
}

.search-box-section .badge {
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.search-box-section .badge:hover {
    background-color: #6D5BD0 !important;
    color: #FFFFFF !important;
    border-color: #6D5BD0 !important;
}

/* ============================================
   9. Search Results
   ============================================ */
.search-results-section {
    background: #F8F6F2;
}

.search-result {
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1.25rem;
    box-shadow: 0 4px 20px rgba(109, 91, 208, 0.06);
}

.search-result:hover {
    transform: translateX(3px);
    box-shadow: 0 18px 36px rgba(109, 91, 208, 0.14), 0 6px 14px rgba(109, 91, 208, 0.08);
}

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

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

/* ============================================
   10. Error Page
   ============================================ */
.error-page h1 {
    background: linear-gradient(135deg, #FF7A5C 0%, #6D5BD0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 8px 40px rgba(109, 91, 208, 0.35);
}

.recommended-links .badge {
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #E3DDD3;
    border-radius: 999px;
}

.recommended-links .badge:hover {
    background-color: #6D5BD0 !important;
    color: #fff !important;
    border-color: #6D5BD0 !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(109, 91, 208, 0.25);
}

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

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

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

article .alert-info {
    background-color: #F1F0FE;
    border-color: #C8C3F5;
    color: #3D2F91;
    border-radius: 1rem;
}

article .list-group-item {
    background: transparent;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

article .list-group-item:hover {
    background: #F0EDE6;
    padding-inline-start: var(--space-sm);
}

/* ============================================
   12. Post List
   ============================================ */
.posts-grid {
    /* Container */
}

.posts-grid .card {
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #E5DFD5;
    border-radius: 1.5rem;
    overflow: hidden;
    background: linear-gradient(145deg, #FFFFFF 0%, #F6F1FF 100%);
    box-shadow: 0 6px 24px rgba(109, 91, 208, 0.08);
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 28px 56px rgba(109, 91, 208, 0.18), 0 10px 22px rgba(109, 91, 208, 0.10);
    border-color: #B9ACEC;
}

.posts-grid .card-img-top {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

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

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

.related-card {
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1.25rem;
    background: linear-gradient(145deg, #FFFFFF 0%, #EDFBF4 100%);
    box-shadow: 0 4px 20px rgba(23, 177, 132, 0.08);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(23, 177, 132, 0.18), 0 8px 16px rgba(23, 177, 132, 0.10);
}

.related-card img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1rem;
}

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

/* ============================================
   14. Social Share
   ============================================ */
.social-share .btn {
    min-width: 40px;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 999px;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(109, 91, 208, 0.18);
}

.social-share [data-copy-url].copied {
    background-color: #20C997;
    color: #FFFFFF;
    border-color: #20C997;
}

/* ============================================
   15. Bootstrap Accordion override
   ============================================ */
.accordion-button:not(.collapsed) {
    background-color: #F1F0FE;
    color: #3D2F91;
    box-shadow: inset 0 -2px 0 #C8C3F5;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(109, 91, 208, 0.18);
}

/* ============================================
   16. Modal
   ============================================ */
.modal-content {
    border: none;
    border-radius: 1.75rem;
    box-shadow: 0 32px 64px rgba(61, 47, 145, 0.20), 0 12px 24px rgba(61, 47, 145, 0.14);
}

/* ============================================
   17. Tooltip
   ============================================ */
.tooltip-inner {
    background-color: #3D2F91;
    border-radius: 0.75rem;
    font-size: 0.85rem;
}

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