body {
    background-color: #fefefe;
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.main-title {
    text-align: center;
    color: #1a1463;
    font-size: 36px;
    margin-bottom: 20px;
}

.blogs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Add gap between cards */
    justify-content: flex-start; /* Align items to the start (left) */
}

.blog-card {
    background-color: #ffffff;
    border: 1px solid #bdbebe;
    border-radius: 10px;
    padding: 20px;
    width: calc(33% - 20px); /* Adjust width to account for gap */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: scale(1.05);
}

.blog-image {
    width: 100%;
    height: auto;
    border-radius: 10px 10px 0 0;
    object-fit: cover;
}

.blog-heading {
    color: #220058;
    font-size: 24px;
    margin-top: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-subheading {
    color: #902bf5;
    font-size: 20px;
    margin-top: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-content {
    color: #6c6c6c;
    font-size: 16px;
    margin-top: 10px;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.explore-button {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 10px 20px;
    margin-top: 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    align-self: flex-end;
}

.explore-button:hover {
    background-color: #28a745;
    color: #fefefe;
}
.search-form {
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    width: auto;
}

.search-form input[type="text"] {
    padding: 12px 20px;
    width: 50%;
    max-width: 500px;
    border: 2px solid #902bf5;
    border-radius: 25px;
    font-size: 18px;
    transition: all 0.3s ease-in-out;
    outline: none;
}

.search-form input[type="text"]::placeholder {
    color: #bdbebe;
}

.search-form input[type="text"]:focus {
    border-color: #1a1463;
    box-shadow: 0 0 10px rgba(26, 20, 99, 0.5);
}

.search-form::after {
    content: '';
    display: block;
    width: 30px;
    height: 30px;
    background-size: contain;
    position: absolute;
    top: 50%;
    right: calc(25% + 10px); /* Adjust right position based on input width and padding */
    transform: translateY(-50%);
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    .blog-card {
        width: calc(50% - 20px); /* Adjust width to account for gap */
    }
}

@media (max-width: 768px) {
    .blog-card {
        width: 100%;
    }

    .blog-heading, .blog-subheading, .blog-content {
        white-space: normal; /* Allow text to wrap on smaller screens */
    }
}
