/* Search Form Styling */
.search-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.search-input-container,
.search-select-container,
.search-button-container {
    flex: 1;
    max-width: 300px;
}

.search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: #ce9efb;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.search-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    background-color: #fff;
}

.search-select:focus {
    outline: none;
    border-color: #ce9efb;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.search-button {
    width: 100%;
    padding: 10px;
    background-color: #ce9efb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: #cc9ef8;
}

.search-button:focus {
    outline: none;
    box-shadow: 0 0 5px #ce9efb;
}

/* Center and make the search section responsive */
.search-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
}

/* Responsive Design for Search Form */
@media (max-width: 768px) {
    .search-row {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

/* Posts Container Styling */
.posts-container {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Adjust column size dynamically */
    gap: 1rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 1200px;
    padding: 1rem;
}

/* Responsive Design for Posts Container */
@media (max-width: 1200px) {
    .posts-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Adjust for medium screens */
    }
}

@media (max-width: 768px) {
    .posts-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Adjust for smaller screens */
    }
}

@media (max-width: 530px) {
    .posts-container {
        grid-template-columns: 1fr; /* Single column for very small screens */
    }

    .search-section {
        padding: 0.5rem; /* Reduce padding for smaller screens */
    }

    .post-item {
        margin-bottom: 1rem; /* Add spacing between posts */
    }
}

.post-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.post-item .post-thumb img {
    width: 100%; /* Ensure images fit within their container */
    height: auto;
    max-width: 150px; /* Limit the size of the images */
    border-radius: 8px; /* Optional: Add rounded corners */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Optional: Add shadow */
    border: none; /* Ensure no border or dotted line is displayed */
    text-decoration: none; /* Remove any dotted underline */
}

.post-item .post-thumb a {
    text-decoration: none; /* Remove any dotted underline */
    border: none; /* Ensure no border is applied */
}

/* Pagination Controls Styling */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 10px 20px;
    background-color: #ce9efb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pagination button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.pagination button:hover:not(:disabled) {
    background-color: #cc9ef8;
}

.pagination span {
    font-size: 1rem;
    font-weight: bold;
}
