/* ============================================
   AMOS MAKOKHA BLOG — Windows 11 Inspired UI
   ============================================ */

/* --- Base & Typography --- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #1a1a2e;
    background-color: #f3f3f3;
}

h1, h2, h3, h4, h5 {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-weight: 700;
    color: #0f0f1a;
    line-height: 1.3;
}

a {
    color: #0067c0;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #004e96;
    text-decoration: underline;
}

p {
    margin-bottom: 1.1rem;
}

/* --- Navbar --- */
.navbar {
    background: #0f0f1a !important;
    padding: 0.9rem 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.navbar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff !important;
}

.navbar-brand:hover {
    color: #cce4ff !important;
    text-decoration: none;
}

/* --- Search bar in navbar --- */
.navbar-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.navbar-search input {
    border-radius: 20px;
    border: none;
    padding: 0.35rem 1rem;
    font-size: 0.875rem;
    background: rgba(255,255,255,0.2);
    color: white;
    outline: none;
    width: 200px;
    transition: background 0.2s, width 0.3s;
}

.navbar-search input::placeholder {
    color: rgba(255,255,255,0.7);
}

.navbar-search input:focus {
    background: rgba(255,255,255,0.3);
    width: 240px;
}

.navbar-search button {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 20px;
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.navbar-search button:hover {
    background: rgba(255,255,255,0.25);
}

/* --- Main Layout --- */
main {
    padding-top: 0.5rem;
    padding-bottom: 3rem;
}

/* --- Post Cards (list view) --- */
.post-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.8rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.05);
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.post-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.post-card h2 a {
    color: #0f0f1a;
    font-size: 1.4rem;
    font-weight: 700;
    transition: color 0.2s;
}

.post-card h2 a:hover {
    color: #0067c0;
    text-decoration: none;
}

.post-meta {
    font-size: 0.82rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.post-meta strong {
    color: #374151;
}

.post-excerpt {
    color: #374151;
    font-size: 0.97rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

/* Tag badges */
.tag-badge {
    display: inline-block;
    background: #eff6ff;
    color: #0067c0;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    padding: 0.15rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    margin-right: 0.3rem;
    margin-bottom: 0.3rem;
    transition: background 0.2s, color 0.2s;
}

.tag-badge:hover {
    background: #0067c0;
    color: #ffffff;
    text-decoration: none;
}

/* Read more button */
.btn-read-more {
    display: inline-block;
    background: #0067c0;
    color: #ffffff;
    border-radius: 8px;
    padding: 0.45rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    transition: background 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.btn-read-more:hover {
    background: #0050a0;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,103,192,0.3);
    text-decoration: none;
}

/* --- Share Buttons --- */
.share-section {
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.share-section p {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.6rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
}

.share-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    text-decoration: none;
}

.share-btn.whatsapp  { background: #25d366; color: #fff; }
.share-btn.twitter   { background: #000000; color: #fff; }
.share-btn.telegram  { background: #229ed9; color: #fff; }
.share-btn.facebook  { background: #1877f2; color: #fff; }
.share-btn.copylink  { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }

/* --- Post Detail Page --- */
.post-detail-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 2.5rem 2.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
}

.post-detail-card h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    color: #0f0f1a;
    margin-bottom: 0.75rem;
}

.post-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #1f2937;
}

.post-body h2 { font-size: 1.4rem; margin-top: 2rem; margin-bottom: 0.75rem; color: #0f0f1a; }
.post-body h3 { font-size: 1.2rem; margin-top: 1.6rem; margin-bottom: 0.6rem; }
.post-body p  { margin-bottom: 1.2rem; }
.post-body ul, .post-body ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.post-body li { margin-bottom: 0.5rem; }
.post-body blockquote {
    border-left: 4px solid #0067c0;
    background: #f0f7ff;
    margin: 1.5rem 0;
    padding: 1rem 1.4rem;
    border-radius: 0 8px 8px 0;
    color: #1e3a5f;
    font-style: italic;
}

/* Code blocks */
pre, code {
    background-color: #1e1e2e;
    color: #cdd6f4;
    padding: 0.2rem 0.5rem;
    font-family: 'Cascadia Code', Consolas, Monaco, 'Courier New', monospace;
    font-size: 0.9rem;
    border-radius: 6px;
    overflow-x: auto;
}

pre {
    padding: 1.2rem 1.5rem;
    margin: 1.2rem 0;
}

pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* --- Similar Posts --- */
.similar-posts-section {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

.similar-posts-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.similar-post-link {
    display: block;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f3f4f6;
    color: #0067c0;
    font-size: 0.95rem;
    font-weight: 500;
}

.similar-post-link:hover {
    color: #0050a0;
    padding-left: 0.4rem;
    transition: padding-left 0.15s;
}

/* --- Comments --- */
.comments-section {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

.comments-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: #0f0f1a;
}

.comment-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin-bottom: 0.9rem;
}

.comment-card .comment-author {
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f0f1a;
}

.comment-card .comment-date {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-left: 0.5rem;
}

.comment-card .comment-body {
    margin-top: 0.4rem;
    font-size: 0.95rem;
    color: #374151;
}

/* Comment Form */
.comment-form-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem 1.8rem;
    margin-top: 1.5rem;
}

.comment-form-box h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #0067c0;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comment-form-box .form-control {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    padding: 0.55rem 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-form-box .form-control:focus {
    border-color: #0067c0;
    box-shadow: 0 0 0 3px rgba(0,103,192,0.12);
    outline: none;
}

.btn-submit-comment {
    background: #0067c0;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit-comment:hover {
    background: #0050a0;
}

/* Back button */
.btn-back {
    display: inline-block;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
    text-decoration: none;
}

.btn-back:hover {
    background: #e5e7eb;
    color: #111827;
    text-decoration: none;
}

/* --- Sidebar --- */
.sidebar-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.4rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
}

.sidebar-card h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #0067c0;
    margin-bottom: 0.9rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid #eff6ff;
}

.sidebar-card p, .sidebar-card li {
    font-size: 0.9rem;
    color: #374151;
}

.sidebar-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-card ul li {
    padding: 0.45rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.sidebar-card ul li:last-child {
    border-bottom: none;
}

.sidebar-card ul li a {
    font-size: 0.9rem;
    color: #1f2937;
    font-weight: 500;
    display: block;
    transition: color 0.2s, padding-left 0.15s;
}

.sidebar-card ul li a:hover {
    color: #0067c0;
    padding-left: 0.3rem;
    text-decoration: none;
}

/* --- Pagination --- */
.pagination-nav {
    margin-top: 1.5rem;
}

.pagination {
    gap: 0.4rem;
}

.page-item .page-link {
    color: #0067c0;
    border: 1px solid #d1d5db;
    border-radius: 8px !important;
    padding: 0.45rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: #ffffff;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.page-item .page-link:hover {
    background: #0067c0;
    color: #ffffff;
    border-color: #0067c0;
    box-shadow: 0 2px 8px rgba(0,103,192,0.25);
}

.page-item.disabled .page-link {
    color: #9ca3af;
    background: #f9fafb;
    border-color: #e5e7eb;
}

/* --- Search Page --- */
.search-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, transform 0.2s;
}

.search-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.09);
    transform: translateY(-2px);
}

/* --- Footer --- */
footer {
    background: #0f0f1a !important;
    border-top: 3px solid #0067c0;
    padding: 2rem 0 !important;
}

footer p, footer small, footer a {
    font-size: 0.875rem;
    color: #9ca3af !important;
}

footer a:hover {
    color: #ffffff !important;
    text-decoration: none;
}

/* --- List page heading --- */
.page-heading {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f0f1a;
    margin-bottom: 1.5rem;
    padding-bottom: 0.6rem;
    border-bottom: 3px solid #0067c0;
    display: inline-block;
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .post-detail-card {
        padding: 1.5rem 1.2rem;
    }

    .post-detail-card h1 {
        font-size: 1.5rem;
    }

    .post-card {
        padding: 1.2rem 1.2rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .col-md-4 {
        margin-top: 1.5rem;
    }

    .navbar-search input {
        width: 130px;
    }
}