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

.author-profile h1 {
    color: #57160e;
}

.author-profile img.rounded-circle {
    border: 4px solid #fdf8ef;
    box-shadow:
        0 14px 30px -10px rgba(44, 25, 10, 0.18),
        0 4px 10px -4px rgba(44, 25, 10, 0.10);
}

.author-profile .badge.bg-light {
    background: #e7dccb !important;
    color: #271d15 !important;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.25s ease, box-shadow 0.35s ease;
}

.author-profile .badge.bg-light:hover {
    background: #b13c2b !important;
    color: #fff8ef !important;
    box-shadow: 0 8px 18px -8px rgba(94, 37, 20, 0.32);
}

/* 2. Author Box */
.author-box {
    border-inline-start: 4px solid #b84b34;
    background: linear-gradient(90deg, #faf4e9 0%, #fdf9f1 100%);
    border-radius: 18px;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.35s ease, transform 0.3s ease;
}

.author-box:hover {
    box-shadow:
        0 18px 36px -14px rgba(44, 25, 10, 0.18),
        0 4px 10px -5px rgba(44, 25, 10, 0.08);
    border-inline-start-color: #8c2917;
}

.author-box img {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

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

/* 3. Author Posts List */
.author-posts-list .card {
    transition: background-color 0.25s ease, border-color 0.3s ease, box-shadow 0.4s ease, transform 0.3s ease;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid #e3d8c6;
    background-color: #fffaf1;
}

.author-posts-list .card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 24px 44px -18px rgba(63, 40, 18, 0.24),
        0 6px 16px -8px rgba(63, 40, 18, 0.10);
    border-color: rgba(177, 60, 43, 0.35);
}

.author-posts-list .card-img-top {
    transition: transform 0.5s ease;
}

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

/* 4. Main Authors */
.main-authors-section {
    background: #ede3d3;
}

.author-card {
    background-color: #fffaf1;
    border: 1px solid #dfd3bf;
    border-radius: 26px;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.4s ease, transform 0.3s ease;
}

.author-card:hover {
    transform: translateY(-8px);
    border-color: rgba(177, 60, 43, 0.3);
    box-shadow:
        0 30px 55px -22px rgba(57, 32, 15, 0.28),
        0 8px 20px -12px rgba(57, 32, 15, 0.10);
}

.author-card img.rounded-circle {
    border: 3px solid #fffaf1;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.author-card:hover img.rounded-circle {
    border-color: #b13c2b;
    box-shadow: 0 0 0 4px rgba(177, 60, 43, 0.12);
}

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

.faq-section h2 {
    font-size: 1.75rem;
    color: #57160e;
}

.faq-list .faq-item {
    border: 1px solid rgba(79, 48, 24, 0.08);
    border-radius: 20px;
    background-color: rgba(255, 251, 244, 0.65);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.35s ease, transform 0.25s ease;
    cursor: pointer;
}

.faq-list .faq-item:hover {
    box-shadow:
        0 16px 30px -16px rgba(58, 31, 12, 0.18),
        0 3px 8px -4px rgba(58, 31, 12, 0.06) !important;
    transform: translateY(-2px);
    border-color: rgba(177, 60, 43, 0.18);
}

.faq-list .faq-item[open] {
    border-color: rgba(177, 60, 43, 0.2);
    background: linear-gradient(90deg, #f5e7dc 0%, #fefbf5 100%);
    box-shadow:
        0 20px 40px -24px rgba(58, 31, 12, 0.16),
        0 2px 6px -3px rgba(58, 31, 12, 0.06);
}

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

.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: #a83a29;
    transition: transform 0.3s ease, color 0.3s ease;
    line-height: 1;
}

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

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

.faq-list .faq-answer {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #332a20;
    animation: faqFadeIn 0.32s ease;
}

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

/* 6. Sidebar Widgets */
.sidebar-widgets .card {
    border-radius: 20px;
    border: 1px solid #e4dac8;
    background-color: #fffaf2;
    transition: border-color 0.3s ease, box-shadow 0.35s ease, transform 0.3s ease;
}

.sidebar-widgets .card:hover {
    box-shadow:
        0 22px 42px -18px rgba(58, 31, 12, 0.2),
        0 6px 14px -8px rgba(58, 31, 12, 0.08);
    border-color: rgba(177, 60, 43, 0.25);
}

.sidebar-widgets h5 {
    color: #57160e;
}

.sidebar-widgets .badge {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.25s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.sidebar-widgets .badge:hover {
    background-color: #b13c2b !important;
    color: #fff8ef !important;
    border-color: #b13c2b !important;
    box-shadow: 0 8px 18px -8px rgba(94, 37, 20, 0.32);
}

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

/* 7. Pagination */
.pagination .page-link {
    color: #9c3524;
    border-color: #d8ccb8;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.pagination .page-link:hover {
    background-color: #efe6d7;
    color: #5d1910;
    border-color: #b84b34;
}

.pagination .page-item.active .page-link {
    background-color: #b13c2b;
    border-color: #b13c2b;
    color: #fff8ef;
    box-shadow: 0 10px 22px -10px rgba(177, 60, 43, 0.5);
}

.pagination .page-item.disabled .page-link {
    color: #a39789;
    background-color: #f6f0e6;
}

/* 8. Search Box */
.search-box-section {
    background: #f0e7d8;
}

.search-box-section .input-group-lg .form-control {
    border-radius: 999px 0 0 999px;
    padding-inline-start: 1.5rem;
    border-color: #d4c6ae;
    background-color: #fffdf7;
    box-shadow: inset 0 2px 4px rgba(72, 43, 18, 0.05);
}

.search-box-section .input-group-lg .btn {
    border-radius: 0 999px 999px 0;
    border-color: #b13c2b;
    background-color: #b13c2b;
    box-shadow: 0 12px 24px -10px rgba(177, 60, 43, 0.45);
}

.search-box-section .badge {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.25s ease, box-shadow 0.3s ease;
}

.search-box-section .badge:hover {
    background-color: #b13c2b !important;
    color: #fff8ef !important;
    border-color: #b13c2b !important;
    box-shadow: 0 8px 18px -8px rgba(94, 37, 20, 0.32);
}

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

.search-result {
    border-radius: 18px;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.35s ease, transform 0.25s ease;
}

.search-result:hover {
    transform: translateX(3px);
    background-color: #fffbf3;
    box-shadow:
        0 18px 36px -16px rgba(58, 31, 12, 0.18),
        0 4px 10px -6px rgba(58, 31, 12, 0.07);
}

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

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

/* 10. Error Page */
.error-page h1 {
    background: linear-gradient(135deg, #c75338 0%, #7d1e13 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 6px 28px rgba(94, 31, 15, 0.24);
}

.recommended-links .badge {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.25s ease, box-shadow 0.3s ease, transform 0.2s ease;
    border: 1px solid #d8ccb8;
    color: #241b13;
}

.recommended-links .badge:hover {
    background-color: #b13c2b !important;
    color: #fff8ef !important;
    border-color: #b13c2b !important;
    transform: translateY(-2px);
    box-shadow:
        0 12px 26px -12px rgba(94, 37, 20, 0.42),
        0 3px 8px -6px rgba(94, 37, 20, 0.16);
}

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

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

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

article .alert-info {
    background-color: #f8e5d7;
    border-color: #dcae9a;
    color: #5d1a11;
    border-radius: 16px;
}

article .list-group-item {
    background: transparent;
    color: #241b13;
    transition: background-color 0.25s ease, color 0.25s ease, padding-left 0.25s ease;
}

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

/* 12. Post List */
.posts-grid .card {
    background-color: #fffaf1;
    border: 1px solid #e1d5c1;
    border-radius: 22px;
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.4s ease, transform 0.3s ease;
}

.posts-grid .card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 24px 46px -18px rgba(63, 40, 18, 0.25),
        0 6px 16px -8px rgba(63, 40, 18, 0.1);
    border-color: rgba(177, 60, 43, 0.4);
}

.posts-grid .card-img-top {
    transition: transform 0.5s ease;
}

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

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

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

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

.related-card {
    background-color: #fffaf1;
    border: 1px solid #e6dccb;
    border-radius: 20px;
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.35s ease, transform 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    border-color: rgba(177, 60, 43, 0.3);
    box-shadow:
        0 20px 40px -18px rgba(58, 31, 12, 0.22),
        0 5px 12px -8px rgba(58, 31, 12, 0.08);
}

.related-card img {
    transition: transform 0.5s ease;
}

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

/* 14. Social Share */
.social-share .btn {
    min-width: 40px;
    transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease, color 0.2s ease;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 22px -12px rgba(177, 60, 43, 0.45),
        0 3px 8px -6px rgba(58, 31, 12, 0.18);
}

.social-share [data-copy-url].copied {
    background-color: #7d5a3a;
    color: #fff8ef;
    border-color: #7d5a3a;
    box-shadow: 0 10px 22px -12px rgba(67, 42, 22, 0.45);
}

/* 15. Bootstrap Accordion override */
.accordion-button:not(.collapsed) {
    background-color: #f7e6da;
    color: #57160e;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(177, 60, 43, 0.18);
}

/* 16. Modal */
.modal-content {
    border: none;
    border-radius: 28px;
    box-shadow:
        0 50px 90px -30px rgba(35, 19, 8, 0.35),
        0 12px 28px -16px rgba(35, 19, 8, 0.12);
}

/* 17. Tooltip */
.tooltip-inner {
    background-color: #4a150d;
    border-radius: 10px;
    font-size: 0.85rem;
    box-shadow: 0 8px 18px -8px rgba(35, 19, 8, 0.3);
}

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