﻿
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    background-color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

.navbar-brand {
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}

.nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    padding: 0.5rem 0.75rem !important;
    transition: color 0.3s ease, background-color 0.3s ease;
}

    .nav-link:hover {
        color: #fff !important;
        background-color: rgba(255,255,255,0.1);
        border-radius: 6px;
    }

    .nav-link.active {
        font-weight: 600;
        border-bottom: 3px solid #fff;
    }

.btn-outline-light.btn-sm {
    padding: 4px 10px;
    font-size: 0.85rem;
}

.btn-create {
    background: #007bff;
    border: none;
    color: white;
    padding: 5px 12px;
    margin-left: 10px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9em;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

    .btn-create:hover {
        background: #0056b3;
    }

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.me-1 {
    margin-right: 0.25rem !important;
}

.me-3 {
    margin-right: 1rem !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Main content container */
.blog-container {
    max-width: 1150px;
    margin: 30px auto;
    padding: 0 15px;
}

/* Featured post */
.featured-post {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.featured-img {
    width: 50%;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-title a {
    color: #222;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

    .featured-title a:hover {
        color: #007bff;
    }

.featured-meta {
    color: #888;
    margin: 10px 0;
    font-style: italic;
}

.featured-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

/* Side posts */
.side-posts {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.side-post {
    flex: 1 1 calc(23% - 20px); /* wider cards (≈4 per row) */
    display: flex;
    flex-direction: column;
    background: #fafafa;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

    .side-post:hover {
        box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    }

.side-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
}

.side-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 10px 12px;
}

.side-title {
    font-size: 1.1rem;
    margin: 0 0 8px;
    font-weight: 600;
}

    .side-title a {
        color: #333;
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .side-title a:hover {
            color: #007bff;
        }

.side-meta {
    font-size: 0.85rem;
    color: #777;
    font-style: italic;
    margin-bottom: auto;
}

/* Category list */
.category-list {
    margin-bottom: 40px;
}

    .category-list h4 {
        margin-bottom: 15px;
        font-weight: 600;
        color: #222;
    }

    .category-list ul {
        padding-left: 0;
        margin: 0;
        list-style: none;
    }

    .category-list li {
        margin-bottom: 10px;
    }

    .category-list a {
        display: block;
        color: #007bff;
        font-weight: 500;
        font-size: 1rem;
        text-decoration: none;
        padding: 6px 10px;
        border-left: 4px solid transparent;
        transition: all 0.3s ease;
        border-radius: 3px;
    }

        .category-list a.active-category {
            color: #004085;
            font-weight: 700;
            background-color: #cce5ff;
            border-left-color: #004085;
            box-shadow: 2px 0 5px rgba(0, 64, 133, 0.3);
        }

        .category-list a:hover,
        .category-list a:focus {
            color: #0056b3;
            border-left-color: #0056b3;
            background-color: #f0f5ff;
            outline: none;
        }

/* Footer */
footer {
    background-color: #222;
    color: white;
    padding-top: 30px;
}

    footer h5 {
        font-weight: 700;
        margin-bottom: 15px;
    }

    footer p.small {
        color: #bbb;
        font-size: 0.9rem;
    }

    footer ul {
        list-style: none;
        padding: 0;
    }

        footer ul li {
            margin-bottom: 8px;
        }

            footer ul li a {
                color: white;
                text-decoration: none;
                transition: color 0.3s ease;
            }

                footer ul li a:hover {
                    color: #007bff;
                }

    footer .bg-secondary {
        background-color: #444 !important;
    }

/* Responsive */
@media (max-width: 768px) {
    .featured-post {
        flex-direction: column;
    }

    .featured-img, .featured-content {
        width: 100%;
    }

    .side-posts {
        flex-direction: column;
    }

    .side-post {
        flex: 1 1 100%;
    }
}

/* Post actions (uniform for all posts) */
.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding: 8px 12px;
    border-top: 1px solid #eee;
    flex-wrap: nowrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    padding: 6px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #555;
    border-radius: 6px;
    transition: all 0.2s ease;
}

    .btn-action i {
        font-size: 16px;
    }

    .btn-action .like-count {
        font-size: 0.85rem;
        color: #666;
    }

    .btn-action .btn-text {
        font-size: 0.9rem;
    }

    .btn-action:hover {
        background: #f6f6f6;
        color: #007bff;
    }

    .btn-action:active {
        transform: scale(0.95);
    }

    .btn-action.dropdown-toggle::after {
        display: none;
    }
