/* Articles and theme support styles for rrtech.su */

/* Theme variables */
:root {
    --bs-body-color: #212529;
    --bs-body-bg: #ffffff;
}

[data-bs-theme="dark"] {
    --bs-body-color: #dee2e6;
    --bs-body-bg: #212529;
}

/* Navigation styles */
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.flag-icon {
    font-family: monospace;
    font-size: 1.1em;
    font-weight: 600;
}

.theme-toggle {
    cursor: pointer;
    font-size: 1.2em;
}

.user-greeting {
    font-size: 0.9em;
    color: var(--bs-navbar-color);
}

/* Sticky footer */
html, body {
    height: 100%;
    background-color: var(--bs-body-bg);
}

.wrapper {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

footer {
    margin-top: auto;
}

/* Footer theme support */
footer {
    transition: background-color 0.3s ease, border-color 0.3s ease;
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

footer a.text-muted {
    transition: color 0.2s ease;
}

footer a.text-muted:hover {
    color: #495057 !important;
    text-decoration: underline;
}

[data-bs-theme="dark"] footer {
    background-color: #1a1a1a !important;
    border-color: #333 !important;
}

[data-bs-theme="dark"] footer .text-muted {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] footer a.text-muted {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] footer a.text-muted:hover {
    color: #f8f9fa !important;
    text-decoration: underline;
}

/* Article content styles */
.article-content {
    line-height: 1.7;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-content h1 {
    font-size: 2.5rem;
    border-bottom: 2px solid var(--bs-primary);
    padding-bottom: 0.5rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content code {
    background-color: rgba(108, 117, 125, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.article-content pre {
    background-color: rgba(108, 117, 125, 0.1);
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.article-content pre code {
    background-color: transparent;
    padding: 0;
}

.article-content blockquote {
    border-left: 4px solid var(--bs-primary);
    padding-left: 1rem;
    margin-left: 0;
    font-style: italic;
    color: var(--bs-secondary-color);
}

/* Dark theme support for articles */
[data-bs-theme="dark"] .article-content code {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .article-content pre {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .article-content pre code {
    background-color: transparent;
}

[data-bs-theme="dark"] .article-content h1 {
    border-bottom-color: var(--bs-primary);
}

/* Article images */
.article-content .article-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 0.375rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-content .article-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Responsive images */
@media (max-width: 576px) {
    .article-content .article-image {
        margin: 1rem auto;
        border-radius: 0.25rem;
    }
}

/* Dark theme support for images */
[data-bs-theme="dark"] .article-content .article-image {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .article-content .article-image:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}