body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 20px auto;
    background: #f8f9fa;
}

.success {
    color: green;
    border: 1px solid green;
    padding: 10px;
    margin-bottom: 15px;
    background-color: #eafbea;
}

.error {
    color: red;
    border: 1px solid red;
    padding: 10px;
    background-color: #ffecec;
    margin-bottom: 15px;
}

h1, h2 {
    color: #333;
}

.post-card {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    background-color: #fff;
}

.post-card img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.create-btn, .back-btn {
    display: inline-block;
    margin-bottom: 20px;
    background: #007BFF;
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 4px;
}

.create-btn:hover, .back-btn:hover {
    background: #0056b3;
}

form input[type="text"], form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

form button {
    padding: 8px 16px;
    background: green;
    color: white;
    border: none;
    border-radius: 4px;
}

.card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: stretch;
}

.post-card {
    flex: 1 1 calc(33.333% - 20px);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    background: #fff;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.post-card h2 {
    margin-top: auto;
    font-size: 1.2rem;
}

.card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.read-more {
    margin-top: auto;
    display: inline-block;
    background: #eb345e;
    color: white;
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
}

.read-more:hover {
    background: #bd284a;
}



/* Responsive Breakpoints */
@media (max-width: 992px) {
    .post-card {
        flex: 1 1 calc(50% - 20px);
    }
}

@media (max-width: 600px) {
    .post-card {
        flex: 1 1 100%;
    }
}
