/* --- Base and Light Theme Variables --- */
:root {
    --bs-body-bg: #f8f9fa;
    --bs-body-color: #212529;
    --bs-border-color: #dee2e6;
    --card-bg: #ffffff;
    --card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --link-color: #0d6efd;
    --link-hover-color: #0a58ca;
}

/* --- Dark Theme Variables --- */
[data-bs-theme="dark"] {
    --bs-body-bg: #212529;
    --bs-body-color: #dee2e6;
    --bs-border-color: #495057;
    --card-bg: #343a40;
    --card-shadow: 0 0.125rem 0.25rem rgba(255, 255, 255, 0.05);
    --link-color: #6ea8fe;
    --link-hover-color: #9ec5fe;
    --bs-secondary-bg: #343a40; /* Fix for dropdown background in dark mode */
}

/* --- General Styles --- */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.post-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid var(--bs-border-color);
    background-color: var(--card-bg);
    box-shadow: var(--card-shadow);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.post-card a {
    text-decoration: none;
    color: inherit;
}

.post-card-img {
    height: 200px;
    object-fit: cover;
}

.post-card .badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.post-card .card-title {
    color: var(--bs-body-color);
}

/* --- Live Search Snippets --- */
#search-snippets {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

#search-snippets .list-group-item {
    display: flex;
    align-items: center;
}

#search-snippets img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 15px;
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--bs-border-color);
}

