/* Стили для страницы Wiki */

body {
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.wiki-container {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.wiki-header {
    padding: 3rem 1rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #43506C 0%, #3D619B 100%);
    color: #fff;
}

.wiki-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.wiki-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

.wiki-sidebar {
    position: sticky;
    top: 90px;
    border: none;
    border-radius: 1rem;
    background: #fff;
}

.wiki-sidebar .card-title {
    color: #43506C;
    font-weight: 700;
}

.wiki-nav .list-group-item {
    border: none;
    padding: 0.75rem 0;
    background: transparent;
}

.wiki-nav a {
    color: #43506C;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
    display: block;
}

.wiki-nav a:hover {
    color: #3D619B;
}

.wiki-nav a.active {
    color: #3D619B;
    font-weight: 600;
    background-color: rgba(61, 97, 155, 0.1);
    border-radius: 0.5rem;
    padding-left: 0.5rem;
}

.wiki-content {
    background: #fff;
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
}

.wiki-section {
    margin-bottom: 5rem;
    padding-bottom: 3rem;
    position: relative;
}

.wiki-section:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
    opacity: 0.6;
}

.wiki-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.wiki-section:last-child::after {
    display: none;
}

.wiki-section h2 {
    color: #43506C;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #3D619B;
}

.wiki-section h3 {
    color: #43506C;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.35rem;
}

.wiki-section h4 {
    color: #43506C;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
}

.wiki-section h6 {
    color: #43506C;
}

.wiki-section p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.wiki-section ul,
.wiki-section ol {
    color: #555;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.wiki-section li {
    margin-bottom: 0.5rem;
}

.wiki-section li strong {
    color: #43506C;
}

.wiki-section .accordion-button:not(.collapsed) {
    background-color: rgba(67, 80, 108, 0.05);
    color: #43506C;
    font-weight: 600;
}

.wiki-section .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(67, 80, 108, 0.25);
}

.wiki-section pre {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.wiki-section code {
    color: #d63384;
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}

.wiki-section pre code {
    color: #212529;
    background-color: transparent;
    padding: 0;
}

.screenshot-placeholder {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
}

.screenshot-placeholder i {
    opacity: 0.5;
}

.wiki-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.wiki-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.wiki-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wiki-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.wiki-card h4 {
    color: #43506C;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.wiki-card p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 0;
}

.wiki-card-icon {
    font-size: 2rem;
    color: #3D619B;
    margin-bottom: 1rem;
}

.wiki-highlight-box {
    background: linear-gradient(135deg, rgba(67, 80, 108, 0.05) 0%, rgba(61, 97, 155, 0.05) 100%);
    border-left: 4px solid #3D619B;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.wiki-highlight-box h4 {
    color: #43506C;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.wiki-highlight-box p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    .wiki-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .wiki-title {
        font-size: 1.75rem;
    }

    .wiki-content {
        padding: 1.25rem;
    }

    .wiki-grid-2,
    .wiki-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Тёмная тема */
body.dark-theme {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-theme .navbar {
    background-color: #1a1a1a !important;
}

body.dark-theme .wiki-content {
    background: #2a2a2a;
    color: #e0e0e0;
}

body.dark-theme .wiki-card {
    background: #333333;
    border-color: #444444;
}

body.dark-theme .wiki-card h4 {
    color: #e0e0e0;
}

body.dark-theme .wiki-card p {
    color: #b0b0c0;
}

body.dark-theme .wiki-highlight-box {
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.15) 0%, rgba(120, 120, 120, 0.15) 100%);
    border-left-color: #666666;
}

body.dark-theme .wiki-highlight-box h4 {
    color: #e0e0e0;
}

body.dark-theme .wiki-highlight-box p {
    color: #b0b0c0;
}

body.dark-theme .wiki-section h2 {
    color: #e0e0e0;
    border-bottom-color: #666666;
}

body.dark-theme .wiki-section:not(:last-child)::after {
    background: linear-gradient(90deg, transparent, #444444, transparent);
}

body.dark-theme .wiki-section h3 {
    color: #e0e0e0;
}

body.dark-theme .wiki-section h4 {
    color: #e0e0e0;
}

body.dark-theme .wiki-section h6 {
    color: #e0e0e0;
}

body.dark-theme .wiki-section p {
    color: #b0b0c0;
}

body.dark-theme .wiki-section ul,
body.dark-theme .wiki-section ol {
    color: #b0b0c0;
}

body.dark-theme .wiki-section li strong {
    color: #e0e0e0;
}

body.dark-theme .wiki-nav a {
    color: #b0b0c0;
}

body.dark-theme .wiki-nav a:hover {
    color: #e0e0e0;
}

body.dark-theme .wiki-nav a.active {
    color: #666666;
    background-color: rgba(102, 102, 102, 0.15);
}

body.dark-theme .screenshot-placeholder {
    border-color: #444444;
    background: #333333;
}

body.dark-theme .screenshot-placeholder p {
    color: #b0b0c0;
}

body.dark-theme .alert-warning {
    background-color: #3a3a2a;
    border-color: #5a5a3a;
    color: #e0e0e0;
}

body.dark-theme .wiki-sidebar {
    background: #2a2a2a;
    border-color: #444444;
}

body.dark-theme .wiki-sidebar h5 {
    color: #e0e0e0;
}

body.dark-theme .wiki-container {
    background: #1a1a1a;
}

body.dark-theme .wiki-header h1 {
    color: #e0e0e0;
}

body.dark-theme .wiki-header p {
    color: #b0b0c0;
}

body.dark-theme footer {
    background-color: #1a1a1a !important;
}

body.dark-theme .accordion-button {
    background-color: #333333;
    color: #e0e0e0;
}

body.dark-theme .accordion-button:not(.collapsed) {
    background-color: #444444;
    color: #e0e0e0;
}

body.dark-theme .accordion-body {
    background-color: #2a2a2a;
    color: #b0b0c0;
}

body.dark-theme .accordion-item {
    background-color: #333333;
    border-color: #444444;
}

/* Кнопка переключения темы */
#themeToggle {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: none;
}

#themeToggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#themeToggle:active {
    transform: scale(0.95);
}

body.dark-theme #themeToggle {
    background-color: #666666 !important;
    border-color: #666666 !important;
}

body.dark-theme #themeToggle:hover {
    background-color: #555555 !important;
}

/* Scroll reveal анимация */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Стили для фильтров кейсов */
#caseFilters {
    margin-bottom: 2rem;
}

#caseFilters .btn {
    border: 2px solid #43506C;
    color: #43506C;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    transition: all 0.3s ease;
    margin: 0.25rem;
}

#caseFilters .btn:hover {
    background-color: #43506C;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(67, 80, 108, 0.2);
}

#caseFilters .btn.active {
    background-color: #43506C;
    color: #fff;
    border-color: #43506C;
    box-shadow: 0 4px 12px rgba(67, 80, 108, 0.3);
}

#caseFilters .btn:focus {
    box-shadow: 0 0 0 3px rgba(67, 80, 108, 0.25);
}

/* Стили для интерактивных карточек кейсов */
.case-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.case-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #43506C 0%, #3D619B 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.case-card:hover::before {
    transform: scaleX(1);
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 1.5rem rgba(67, 80, 108, 0.15);
}

.case-preview {
    margin-bottom: 0;
    position: relative;
}

.case-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
    opacity: 0.5;
}

.case-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #dee2e6;
}

.toggle-case {
    border: 2px solid #43506C;
    color: #43506C;
    font-weight: 500;
    border-radius: 1.5rem;
    padding: 0.4rem 1rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.toggle-case:hover {
    background-color: #43506C;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(67, 80, 108, 0.2);
}

.toggle-case:focus {
    box-shadow: 0 0 0 3px rgba(67, 80, 108, 0.25);
}

/* Тёмная тема для фильтров и кейсов */
body.dark-theme #caseFilters .btn {
    border-color: #666666;
    color: #b0b0c0;
}

body.dark-theme #caseFilters .btn:hover {
    background-color: #666666;
    color: #e0e0e0;
}

body.dark-theme #caseFilters .btn.active {
    background-color: #666666;
    color: #e0e0e0;
    border-color: #666666;
}

body.dark-theme .case-card::before {
    background: linear-gradient(90deg, #666666 0%, #888888 100%);
}

body.dark-theme .case-preview::after {
    background: linear-gradient(90deg, transparent, #444444, transparent);
}

body.dark-theme .case-details {
    border-top-color: #444444;
}

body.dark-theme .toggle-case {
    border-color: #666666;
    color: #b0b0c0;
}

body.dark-theme .toggle-case:hover {
    background-color: #666666;
    color: #e0e0e0;
}

/* Стили для процесса перенаправления */
.wiki-process-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin: 2rem 0;
}

.wiki-process-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 600px;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wiki-process-step:hover {
    transform: translateX(5px);
    box-shadow: 0 0.5rem 1rem rgba(67, 80, 108, 0.1);
}

.wiki-process-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #43506C 0%, #3D619B 100%);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
}

.wiki-process-content {
    flex: 1;
}

.wiki-process-content h5 {
    color: #43506C;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.wiki-process-content p {
    color: #555;
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.wiki-process-arrow {
    color: #3D619B;
    font-size: 1.5rem;
    margin: 0.5rem 0;
}

/* Тёмная тема для процесса перенаправления */
body.dark-theme .wiki-process-step {
    background: #333333;
    border-color: #444444;
}

body.dark-theme .wiki-process-step:hover {
    box-shadow: 0 0.5rem 1rem rgba(100, 100, 100, 0.2);
}

body.dark-theme .wiki-process-icon {
    background: linear-gradient(135deg, #666666 0%, #888888 100%);
}

body.dark-theme .wiki-process-content h5 {
    color: #e0e0e0;
}

body.dark-theme .wiki-process-content p {
    color: #b0b0c0;
}

body.dark-theme .wiki-process-arrow {
    color: #888888;
}

/* Тёмная тема для text-muted */
body.dark-theme .text-muted {
    color: #888888 !important;
}
