.container {
    width: 90%;
    margin: 0px auto;
    text-align: center;
}
h1 {
    color: #333;
    margin-top: auto;
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.blog-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s;
}
.blog-card:hover {
    transform: scale(1.05);
}
.blog-card img {
    width: 100%;
    border-radius: 10px;
}
.blog-card h3 {
    margin: 10px 0;
    color: #333;
}
.blog-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}
.blog-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 600px;
    text-align: center;
}
.blog-content img {
    width: 100%;
    border-radius: 10px;
}
.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 25px;
    cursor: pointer;
    color: white;
}
.horizontal-blog-container {
    width: 90%;
    margin: 100px auto;
    text-align: center;
}

.horizontal-blog-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

/* Responsive Flexbox Layout for Centering */
.horizontal-blog-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Ensures wrapping based on screen width */
    gap: 20px;
    padding: 10px;
}

.horizontal-blog-list a{
    text-decoration: none;
    color: inherit; /* Inherit color from parent */
}

/* Individual Blog Cards */
.horizontal-blog-item {
    flex: 1 1 calc(33.33% - 20px); /* Default: 3 blogs per row */
    max-width: 300px; /* Ensures uniform size */
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s;
    text-align: center;
}

.horizontal-blog-item:hover {
    transform: scale(1.05);
}

.horizontal-blog-item img {
    width: 100%;
    border-radius: 8px;
}

.horizontal-blog-item h3 {
    margin-top: 10px;
    font-size: 16px;
    color: #3e0078;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .horizontal-blog-item {
        flex: 1 1 calc(50% - 20px); /* 2 blogs per row */
    }
}

@media (max-width: 768px) {
    .horizontal-blog-item {
        flex: 1 1 calc(100% - 20px); /* 1 blog per row */
    }
}