/**
 * Nothin but the Blog Website - Custom Styles
 */

:root {
    --font-size-base: 1rem;
    --content-width: 100%;
}

/* Global Styles */
body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: var(--font-size-base);
}

[data-bs-theme="dark"] {
    --bs-body-bg: #121212;
    --bs-body-color: #e9ecef;
    --bs-border-color: #495057;
}

[data-bs-theme="dark"] body {
    color: #e9ecef;
    background-color: #121212;
}

[data-bs-theme="dark"] .card {
    background-color: #242424;
    border-color: #495057;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #242424 !important;
}

a {
    color: #0d6efd;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.content-container {
    max-width: var(--content-width);
    margin: 0 auto;
}

/* Header & Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(33, 37, 41, 0.95) !important;
    backdrop-filter: blur(10px);
}

/* Dark Mode Toggle */
.dark-mode-toggle button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.dark-mode-toggle button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .dark-mode-toggle button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Timeline and Cards */
.timeline {
    position: relative;
    padding: 20px 0;
}

.post-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.post-image {
    height: 220px;
    background-color: #e9ecef;
    position: relative;
    overflow: hidden;
}

/* Placeholder for images */
.post-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #6c757d;
    font-size: 24px;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.post-date {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #212529;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 1;
}

[data-bs-theme="dark"] .post-date {
    background-color: rgba(52, 58, 64, 0.9);
    color: #f8f9fa;
}

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-excerpt {
    color: #6c757d;
    margin-bottom: 15px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

[data-bs-theme="dark"] .post-excerpt {
    color: #adb5bd;
}

.post-meta {
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[data-bs-theme="dark"] .post-meta {
    color: #adb5bd;
}

.post-category {
    display: inline-block;
    padding: 2px 8px;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-bs-theme="dark"] .post-category {
    background-color: #343a40;
    color: #e9ecef;
}

/* Category Sections */
.section-heading {
    position: relative;
    margin-bottom: 30px;
    padding-bottom: 15px;
    font-size: 1.75rem;
    font-weight: 700;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #0d6efd;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-box {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 20px;
    margin-bottom: 25px;
}

[data-bs-theme="dark"] .sidebar-box {
    background-color: #242424;
}

.sidebar-heading {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

[data-bs-theme="dark"] .sidebar-heading {
    border-color: #495057;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    color: #495057;
    transition: color 0.2s ease;
}

[data-bs-theme="dark"] .category-list a {
    color: #e9ecef;
}

.category-list a:hover {
    color: #0d6efd;
    text-decoration: none;
}

.category-count {
    background-color: #e9ecef;
    color: #495057;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 0.75rem;
}

[data-bs-theme="dark"] .category-count {
    background-color: #343a40;
    color: #e9ecef;
}

/* Advertisement Box */
.ad-box {
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    padding: 20px;
    text-align: center;
    margin-bottom: 25px;
    border-radius: 8px;
}

[data-bs-theme="dark"] .ad-box {
    background-color: #343a40;
    border-color: #495057;
}

.ad-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

/* Footer */
footer {
    margin-top: 3rem;
    background-color: #343a40;
    color: #f8f9fa;
    padding: 3rem 0;
}

/* Infinite Scroll */
.loading-spinner {
    text-align: center;
    padding: 20px 0;
    display: none;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        margin-top: 2rem;
    }
    
    .post-image {
        height: 180px;
    }
    
    .settings-panel {
        right: 10px;
        width: 200px;
    }
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0d6efd;
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Add these properties to existing post-card styles */
.post-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .post-card {
    background-color: #242424;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #343a40;
}

/* Update post-image-placeholder for dark mode */
[data-bs-theme="dark"] .post-image-placeholder {
    background: linear-gradient(135deg, #2c3034 0%, #343a40 100%);
    color: #adb5bd;
}

/* Add better styling for post titles in dark mode */
[data-bs-theme="dark"] .post-title {
    color: #f8f9fa;
}

/* Make sure link colors work in dark mode */
[data-bs-theme="dark"] a {
    color: #6ea8fe;
}

[data-bs-theme="dark"] a:hover {
    color: #a1c4fe;
}

/* Smooth transitions for theme changes */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.card, .post-card, .post-content, .sidebar-box, .btn {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
} 