* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background-color: #e2f1ec;
    color: #1f2d27;
}
a { text-decoration: none; color: inherit; }

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 12px 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    flex-wrap: wrap;
}
.navbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: #0f5132;
}
.navbar .brand img { height: 36px; width: auto; }
.navbar .nav-actions button {
    background: #0f5132;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.navbar .nav-actions button:hover { background: #0b3d26; }

.container { max-width: 1100px; margin: 0 auto; padding: 20px 16px; }

.card {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.form-group input[type=text],
.form-group input[type=email],
.form-group input[type=password],
.form-group textarea,
.form-group input[type=file] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cfe4da;
    border-radius: 6px;
    font-size: 14px;
    background: #fafffd;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.btn {
    display: inline-block;
    background: #0f5132;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.btn:hover { background: #0b3d26; }
.btn-danger { background: #b3261e; }
.btn-danger:hover { background: #8c1d17; }
.btn-secondary { background: #6c7f77; }

.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #d4f4e2; color: #0f5132; border: 1px solid #a7e3c1; }
.alert-error { background: #fbe1e1; color: #8c1d17; border: 1px solid #f3a9a9; }

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.login-box { width: 100%; max-width: 380px; }
.login-box .logo-center { text-align: center; margin-bottom: 20px; }
.login-box .logo-center img { height: 60px; }

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 20px;
}
@media (max-width: 900px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .posts-grid { grid-template-columns: 1fr; }
    .navbar { flex-direction: column; align-items: flex-start; gap: 10px; }
}

.post-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.post-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.post-card .post-body { padding: 14px; }
.post-card h3 { margin: 0 0 6px; font-size: 16px; color: #0f5132; }
.post-card p { margin: 0 0 12px; font-size: 13px; color: #4a5b53; line-height: 1.4; }
.post-card .post-actions { display: flex; gap: 8px; }
.post-card .post-actions a, .post-card .post-actions button {
    font-size: 13px; padding: 6px 12px; border-radius: 5px; border: none; cursor: pointer;
}

.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.gallery-thumbs .thumb { position: relative; }
.gallery-thumbs img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; }
.gallery-thumbs label { display: flex; flex-direction: column; align-items: center; font-size: 11px; gap: 4px; }

.page-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }

/* ---------- Pagination ---------- */
.mgc-pagination { margin: 24px 0 10px; text-align: center; }
.mgc-pagination .mgc-pages {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
}
.mgc-pagination .mgc-pages li a,
.mgc-pagination .mgc-pages li span {
    display: inline-block; min-width: 36px; padding: 8px 12px;
    border-radius: 6px; border: 1px solid #b7d3c4; background: #fff;
    color: #0f5132; font-size: 14px; line-height: 1.2;
    text-decoration: none; text-align: center;
}
.mgc-pagination .mgc-pages li a:hover { background: #0f5132; color: #fff; border-color: #0f5132; }
.mgc-pagination .mgc-pages li.active span { background: #0f5132; color: #fff; border-color: #0f5132; font-weight: 700; }
.mgc-pagination .mgc-pages li.disabled span { color: #9aaba2; background: #f1f5f3; cursor: not-allowed; }
.mgc-pagination .mgc-page-info { margin: 12px 0 0; font-size: 13px; color: #4a5b53; }
/* safety: never let stray SVG icons blow up */
.mgc-pagination svg { width: 16px; height: 16px; }
