/* Enhanced blog styling for iBoost theme */
.blog-listing {
    padding: 2rem 0;
    background: #181e29;
    width: 100%;
    min-height: 100vh;
}

.blog-listing .container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Fix layout for desktop */
.blog-listing .row {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.blog-post-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    background: #222a38;
    margin-bottom: 3rem;
    border-bottom: 3px solid #2d3a5a;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.blog-post-card .card-img-top {
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #2d3a5a;
}

@media (min-width: 1200px) {
    .blog-post-card .card-img-top {
        height: 160px;
    }
}

.blog-post-card .card-body {
    padding: 1.5rem;
}

.blog-post-card .card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

@media (min-width: 1200px) {
    .blog-post-card .card-title {
        font-size: 1.1rem;
    }
}

.blog-post-card .card-title a {
    color: #ffb347;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-post-card .card-title a:hover {
    color: #fff;
    text-decoration: none;
}

.blog-post-card .card-text {
    color: #e0e6ed;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.blog-post-card .btn-primary {
    background: #ffb347;
    border: none;
    border-radius: 30px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    transition: background 0.2s;
    align-self: flex-start;
}

.blog-post-card .btn-primary:hover {
    background: #fff;
    color: #222a38;
}

/* Blog sidebar styling */
.blog-sidebar {
    margin-top: 2rem;
}

.blog-sidebar .card {
    border: none;
    border-radius: 16px;
    background: #222a38;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    overflow: hidden;
}

.blog-sidebar .card-header {
    background: #2d3a5a;
    color: #ffb347;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1rem 1.5rem;
    border: none;
}

.blog-sidebar .card-body {
    padding: 1.5rem;
}

.blog-sidebar .card-body a {
    color: #e0e6ed;
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.blog-sidebar .card-body a:hover {
    color: #ffb347;
}

.blog-sidebar .card-body a:last-child {
    border-bottom: none;
}

/* Image placeholder styling */
.post-image-placeholder {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2d3a5a;
    border-bottom: 1px solid #384766;
}

.placeholder-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
}

.post-meta {
    color: #a0a7b9;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.post-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-date i {
    color: #ffb347;
}

/* Pagination styling */
.pagination {
    margin-top: 3rem;
}

.pagination .page-link {
    background: #222a38;
    border-color: #2d3a5a;
    color: #e0e6ed;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin: 0 0.25rem;
}

.pagination .page-item.active .page-link {
    background: #ffb347;
    border-color: #ffb347;
    color: #222a38;
}

.pagination .page-link:hover {
    background: #2d3a5a;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    background: #1b222f;
    color: #6c757d;
    border-color: #2d3a5a;
}

/* Blog header and category dropdown styling */
.blog-header {
    margin-bottom: 3rem;
}

/* Category navigation styling */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: #222a38;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 2rem;
    width: 100%;
}

.category-label {
    font-weight: bold;
    margin-right: 1rem;
    padding: 0.5rem 0;
    color: #ffb347;
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cat-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #2d3a5a;
    color: #e0e6ed;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.2s;
}

.cat-link:hover {
    background: #384766;
    color: #fff;
}

.cat-link.active {
    background: #ffb347;
    color: #222;
    font-weight: 500;
}

.blog-header h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: #ffb347;
    padding-bottom: 0.5rem;
    margin-right: 1rem;
}

.category-dropdown .btn {
    background-color: #ffb347;
    color: #222;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.3s;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.category-dropdown .btn:hover {
    background-color: #384766;
    border-color: #ffb347;
}

.category-dropdown .dropdown-menu {
    background-color: #222a38;
    border: 1px solid #384766;
    border-radius: 6px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.category-dropdown .dropdown-item {
    color: #e0e6ed;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.category-dropdown .dropdown-item:hover {
    background-color: #2d3a5a;
    color: #ffb347;
}

.category-dropdown .dropdown-item.active {
    background-color: #384766;
    color: #ffb347;
    font-weight: 500;
}

/* Make card text smaller on desktop to fit better */
.blog-post-card .card-text {
    font-size: 0.95rem;
}

@media (min-width: 1200px) {
    .blog-post-card .card-text {
        font-size: 0.9rem;
    }
}

/* Responsive improvements */
@media (min-width: 992px) {
    .blog-listing .container {
        padding: 0 2rem;
    }
    
    .blog-sidebar {
        margin-top: 0;
        padding-left: 1.5rem;
        position: sticky;
        top: 1rem;
    }
    
    .blog-post-grid {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        row-gap: 5rem;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .blog-post-grid > div {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        margin-bottom: 3rem;
    }
}

@media (max-width: 991px) {
    .blog-sidebar {
        margin-top: 3rem;
    }
}

@media (max-width: 767px) {
    .blog-post-card .card-img-top,
    .post-image-placeholder {
        height: 200px;
    }
    
    .blog-post-grid .col-md-6 {
        margin-bottom: 2rem;
    }
    
    .blog-listing h1 {
        font-size: 1.8rem;
        margin-top: 1rem;
    }
}
