/* ===== Global Styles ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

a {
    color: #0d6efd;
    transition: color 0.2s ease;
}

a:hover {
    color: #0a58ca;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

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

.post-content blockquote {
    border-left: 4px solid #0d6efd;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #555;
}

.post-content code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-content pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ===== Cards ===== */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

/* ===== Sidebar ===== */
.sidebar .card {
    margin-bottom: 1.5rem;
}

.sidebar .list-group-item {
    border-left: none;
    border-right: none;
    padding: 0.75rem 1rem;
}

.sidebar .list-group-item:first-child {
    border-top: none;
}

.sidebar .list-group-item:last-child {
    border-bottom: none;
}

.sidebar .list-group-item a {
    text-decoration: none;
    color: #333;
}

.sidebar .list-group-item a:hover {
    color: #0d6efd;
}

/* ===== Comments ===== */
.comment {
    border-left: 3px solid #0d6efd;
}

.reply {
    border-left: 2px solid #dee2e6;
}

.comment:hover {
    background-color: #f0f0f0 !important;
}

/* ===== Badges ===== */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
}

.badge.bg-primary {
    background-color: #0d6efd !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* ===== Pagination ===== */
.pagination .page-link {
    border-radius: 4px;
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* ===== Navbar ===== */
.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,0.85);
    transition: color 0.2s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

/* ===== Footer ===== */
footer {
    margin-top: auto;
}

footer h5 {
    font-weight: 700;
}

footer p, footer a {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .sidebar .widget {
        padding: 15px;
    }
}

@media (max-width: 992px) {
    .post-card .card-body {
        padding: 1.25rem;
    }
    .sidebar {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .post-content {
        font-size: 1rem;
        line-height: 1.7;
    }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    .navbar-brand { font-size: 1.1rem; }
    .card { margin-bottom: 1rem; }
    .btn { padding: 0.5rem 1rem; }
    .pagination { flex-wrap: wrap; }
    .post-meta { font-size: 0.85rem; }
    .container.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
    footer .footer-col { text-align: center; margin-bottom: 1.5rem; }
    footer .social-icons { justify-content: center; }
}

@media (max-width: 576px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    .navbar-nav { padding: 0.5rem 0; }
    .d-flex.me-3 { margin-bottom: 0.5rem !important; }
}

/* ===== Avatar ===== */
.avatar {
    font-weight: 600;
    text-transform: uppercase;
}

/* ===== Alerts ===== */
.alert {
    border-radius: 8px;
    border: none;
}

/* ===== Forms ===== */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.15);
}

/* ===== Utilities ===== */
.shadow-sm {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}

.shadow {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
}

/* ===== Page Content ===== */
.page-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}