/* ============================================================
   MODULE.CSS v3.1 - Component Styles (Gradient Rich)
   ============================================================ */

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

.author-profile h1 {
    color: #4c1d95;
    text-shadow: 0 2px 14px rgba(76, 29, 149, 0.14);
}

.author-profile img.rounded-circle {
    border: 4px solid #fffdf8;
    box-shadow: 0 2px 4px rgba(76, 29, 149, 0.04), 0 14px 30px rgba(76, 29, 149, 0.15);
}

.author-profile .badge.bg-light {
    background: #f0ebe3 !important;
    color: #4338ca !important;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.author-profile .badge.bg-light:hover {
    background: #7c3aed !important;
    color: #ffffff !important;
}

/* ============================================
   2. Author Box
   ============================================ */
.author-box {
    border-inline-start: 4px solid #ec4899;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.07) 0%, #ffffff 60%, #f2edf9 100%);
    border-radius: 24px;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.author-box:hover {
    box-shadow: 0 6px 14px rgba(76, 29, 149, 0.04), 0 20px 44px rgba(76, 29, 149, 0.13);
}

.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 {
    border-radius: 18px;
    background: linear-gradient(180deg, #f43f5e 0%, #f43f5e 4px, #ffffff 5px, #faf7ff 100%);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    border-color: #d6c7f5;
    box-shadow: 0 4px 10px rgba(76, 29, 149, 0.05), 0 18px 42px rgba(76, 29, 149, 0.16);
}

.author-posts-list .card-img-top {
    transition: transform 0.55s 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: radial-gradient(circle at 85% 10%, rgba(236, 72, 153, 0.08) 0%, rgba(236, 72, 153, 0) 32%), linear-gradient(180deg, #f4f0eb 0%, #e9e4f2 100%);
}

.author-card {
    border: 1px solid #e6dfd8;
    border-radius: 22px;
    background: linear-gradient(180deg, #ec4899 0%, #ec4899 5px, #ffffff 6px, #faf6fe 100%);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.author-card:hover {
    transform: translateY(-8px);
    border-color: #cbb8f2;
    box-shadow: 0 4px 8px rgba(76, 29, 149, 0.04), 0 24px 50px rgba(76, 29, 149, 0.16), 0 2px 4px rgba(236, 72, 153, 0.08);
}

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

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

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

.faq-section h2 {
    font-size: 1.75rem;
    color: #4c1d95;
}

.faq-list .faq-item {
    border: 1px solid rgba(124, 58, 237, 0.08);
    border-radius: 18px;
    background: linear-gradient(145deg, #ffffff 0%, #fbf7ff 100%);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
}

.faq-list .faq-item:hover {
    box-shadow: 0 8px 16px rgba(76, 29, 149, 0.05), 0 18px 44px rgba(76, 29, 149, 0.12) !important;
    transform: translateY(-2px);
}

.faq-list .faq-item[open] {
    border-color: rgba(236, 72, 153, 0.22);
    background: linear-gradient(115deg, #fff0f4 0%, #faf4ff 48%, #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: #7c3aed;
    transition: transform 0.5s 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: #ec4899;
}

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

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

/* ============================================
   6. Sidebar Widgets
   ============================================ */
.sidebar-widgets .card {
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fdfaf7 100%);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-widgets .card:hover {
    box-shadow: 0 4px 8px rgba(76, 29, 149, 0.04), 0 14px 36px rgba(76, 29, 149, 0.12);
}

.sidebar-widgets h5 {
    color: #4c1d95;
}

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

.sidebar-widgets .badge:hover {
    background-color: #7c3aed !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.22);
}

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

/* ============================================
   7. Pagination
   ============================================ */
.pagination .page-link {
    color: #6d28d9;
    border-color: #e2d9f2;
    background-color: #ffffff;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.pagination .page-link:hover {
    background-color: #f3edfa;
    color: #4c1d95;
    border-color: #7c3aed;
}

.pagination .page-item.active .page-link {
    background-color: #7c3aed;
    border-color: #7c3aed;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.24);
}

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

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

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

.search-box-section .input-group-lg .btn {
    border-radius: 0 999px 999px 0;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    border-color: #7c3aed;
    color: #ffffff;
}

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

.search-box-section .badge:hover {
    background-color: #7c3aed !important;
    color: #ffffff !important;
    border-color: #7c3aed !important;
}

/* ============================================
   9. Search Results
   ============================================ */
.search-results-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8f5f2 100%);
}

.search-result {
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #fbf8ff 100%);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.search-result:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(76, 29, 149, 0.05), 0 16px 40px rgba(76, 29, 149, 0.12);
}

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

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

/* ============================================
   10. Error Page
   ============================================ */
.error-page h1 {
    background: linear-gradient(135deg, #4338ca 0%, #7c3aed 45%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 4px 30px rgba(124, 58, 237, 0.28);
}

.recommended-links .badge {
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid #e2d9f2;
    background-color: #ffffff;
    color: #4c1d95;
}

.recommended-links .badge:hover {
    background-color: #7c3aed !important;
    color: #ffffff !important;
    border-color: #7c3aed !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 29, 149, 0.05), 0 10px 22px rgba(124, 58, 237, 0.22);
}

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

/* ============================================
   11. Legal Article
   ============================================ */
.legal-article-section,
main:has(> .container > article.bg-white) {
    background: linear-gradient(180deg, #f5f2ef 0%, #ffffff 100%);
}

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

article .alert-info {
    background-color: #f6f0ff;
    border-color: #e1d4fb;
    color: #4c1d95;
}

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

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

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

.posts-grid .card {
    border-radius: 18px;
    border: 1px solid #e6dfd8;
    background: linear-gradient(180deg, #7c3aed 0%, #7c3aed 5px, #ffffff 6px, #ffffff 100%);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    border-color: #7c3aed;
    box-shadow: 0 4px 10px rgba(76, 29, 149, 0.05), 0 18px 42px rgba(76, 29, 149, 0.16);
}

.posts-grid .card-img-top {
    transition: transform 0.55s 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.35s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

.related-card {
    border-radius: 18px;
    background: linear-gradient(180deg, #f59e0b 0%, #f59e0b 5px, #ffffff 6px, #fffdf9 100%);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(76, 29, 149, 0.04), 0 18px 44px rgba(76, 29, 149, 0.13);
}

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

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

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

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(76, 29, 149, 0.06), 0 10px 24px rgba(76, 29, 149, 0.14);
}

.social-share [data-copy-url].copied {
    background-color: #10b981;
    color: #ffffff;
    border-color: #10b981;
}

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

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.18);
}

/* ============================================
   16. Modal
   ============================================ */
.modal-content {
    border: none;
    border-radius: 26px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f0ff 100%);
    box-shadow: 0 12px 24px rgba(30, 20, 50, 0.08), 0 40px 100px rgba(76, 29, 149, 0.22);
}

/* ============================================
   17. Tooltip
   ============================================ */
.tooltip-inner {
    background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 100%);
    border-radius: 10px;
    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;
    }
}