/* Custom CSS for o.toplist.cz design match */

/* General body styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

/* Header/Navigation */
.navbar {
    background-color: #2c3e50 !important;
    border-bottom: 3px solid #e74c3c !important;
}

.navbar-brand {
    color: white !important;
    font-weight: bold !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Add logo before navbar brand text */
.navbar-brand::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    background-image: url('../images/toplist-logo.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.nav-link {
    color: #ecf0f1 !important;
    padding: 15px 20px !important;
}

.nav-link:hover,
.nav-link:focus {
    background-color: #e74c3c !important;
    color: white !important;
}

.nav-link.active {
    background-color: #e74c3c !important;
    color: white !important;
}

/* Main content area */
.md-main__inner {
    display: block;
}

/* Content container */
.md-content {
    background-color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 30px;
    margin-bottom: 30px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #2c3e50;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

h1 {
    font-size: 2.2em;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 10px;
}

img[src*="toplist-logo.svg"] {
    max-width: 150px;
    display: block;
    margin: 0 auto 20px auto;
}

h2 {
    font-size: 1.8em;
    color: #34495e;
}

/* Links */
a {
    color: #e74c3c;
    text-decoration: none;
}

a:hover {
    color: #c0392b;
    text-decoration: underline;
}

/* Code blocks */
code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

pre {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
}

/* Blockquotes */
blockquote {
    border-left: 4px solid #e74c3c;
    margin: 0;
    padding: 15px 20px;
    background-color: #f8f9fa;
    color: #555;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #2c3e50;
    color: white;
}

/* Buttons and CTAs */
.md-button {
    background-color: #e74c3c !important;
    color: white !important;
    padding: 15px 30px !important;
    border-radius: 5px !important;
    text-decoration: none !important;
    font-weight: bold !important;
}

.md-button:hover {
    background-color: #c0392b !important;
    color: white !important;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 30px 20px;
    text-align: center;
    margin-top: 40px;
}

footer a {
    color: #ecf0f1 !important;
    text-decoration: underline;
}

footer a:hover {
    color: #e74c3c !important;
    text-decoration: none;
}

/* Blog post listing styles */
.blog-post {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.blog-post h3 {
    font-size: 1.4em;
    margin-top: 0;
}

.blog-post h3 a {
    color: #e74c3c !important;
}

.blog-post-meta {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.blog-post img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Search styling */
.md-search__form {
    background-color: #ecf0f1;
    border-radius: 20px;
}

.md-search__input {
    padding-right: 30px;
}

.md-search__icon {
    right: 10px;
}

/* Sidebar navigation */
/* This targets the table of contents sidebar on pages */
.card .nav-link,
.navbar-expand-md .bs-sidebar .nav-link {
    color: #2c3e50 !important;
}

.navbar-expand-md .bs-sidebar .nav-link:hover,
.navbar-expand-md .bs-sidebar .nav-link:focus {
    background-color: #f0f0f0 !important;
    color: #2c3e50 !important;
}

.navbar-expand-md .bs-sidebar .nav-link.active {
    background-color: #e74c3c !important;
    color: white !important;
}

/* Breadcrumbs */
.md-breadcrumbs {
    margin-bottom: 20px;
    font-size: 0.9em;
}

.md-breadcrumbs a {
    color: #7f8c8d;
}

.md-breadcrumbs a:hover {
    color: #e74c3c;
}

/* Blog publication dates (rendered from article frontmatter) */
.blog-post-date,
.blog-post-meta {
    font-size: 0.9em;
    color: #7f8c8d;
}

.blog-post-date {
    margin-bottom: 10px;
}

.blog-post-date time,
.blog-post-meta time {
    color: #555;
}

/* One-row top navbar (desktop >=lg): five menu items only, matching o.toplist.cz */
@media (min-width: 992px) {
    .navbar.fixed-top .navbar-collapse {
        flex-wrap: nowrap;
    }
    /* Theme chrome (search modal, prev/next page) leaves the top row; below lg it stays in the hamburger. */
    .navbar.fixed-top .navbar-nav.ms-md-auto {
        display: none;
    }
    .navbar.fixed-top .nav-link {
        padding: 15px 14px !important;
        white-space: nowrap;
    }
}

/* Markdown download link (rendered at the end of every page) */
.md-download {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.md-download a {
    color: #e74c3c !important;
    font-weight: bold;
}
