/* ─── Community Tips & Q&A ─────────────────────────────── */

/* Category Tabs */
.community-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}
.community-tabs a {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px;
    text-decoration: none;
    color: #444;
    background: #f5f5f5;
    border: 1px solid #ddd;
    transition: all 0.2s;
}
.community-tabs a:hover {
    background: #fefce8;
    border-color: #f4da70;
    color: #333;
}
.community-tabs a.active {
    background: #f4da70;
    border-color: #ee8d00;
    color: #333;
    font-weight: 600;
}

/* Post Card Grid */
.community-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}
@media (max-width: 991px) {
    .community-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 575px) {
    .community-grid {
        grid-template-columns: 1fr;
    }
}

.community-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.community-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.community-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.community-card-img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #fefce8 0%, #f4da70 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}
.community-card-body {
    padding: 18px;
}
.community-card-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ee8d00;
    margin-bottom: 8px;
}
.community-card-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #222;
    margin: 0 0 8px;
    line-height: 1.3;
}
.community-card-title a {
    color: #222;
    text-decoration: none;
}
.community-card-title a:hover {
    color: #ee8d00;
}
.community-card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
}
.community-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #999;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.community-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
}
.community-card-author img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.community-card-stats {
    display: flex;
    gap: 12px;
}
.community-card-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Sidebar */
.community-sidebar-box {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.community-sidebar-box h4 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #222;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f4da70;
}
.community-sidebar-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.community-sidebar-box ul li {
    margin-bottom: 10px;
}
.community-sidebar-box ul li a {
    color: #444;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.community-sidebar-box ul li a:hover {
    color: #ee8d00;
}
.community-sidebar-box .popular-date {
    font-size: 12px;
    color: #999;
    display: block;
}
.community-cta-box {
    background: linear-gradient(135deg, #fefce8 0%, #f4da70 100%);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
}
.community-cta-box h4 {
    border-bottom: none;
    margin-bottom: 10px;
}
.community-cta-box p {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
}
.community-cta-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #ee8d00;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}
.community-cta-btn:hover {
    background: #dc3e03;
    color: #fff;
}

/* Single Post Page */
.community-post-header {
    margin-bottom: 30px;
}
.community-post-header .category-badge {
    display: inline-block;
    padding: 4px 14px;
    background: #fefce8;
    border: 1px solid #f4da70;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
    color: #ee8d00;
    margin-bottom: 12px;
}
.community-post-header h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #222;
    line-height: 1.2;
    margin: 0 0 15px;
}
.community-post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: #888;
}
.community-post-meta .author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.community-post-meta .author-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.community-post-meta .author-info .author-details a {
    color: #333;
    font-weight: 600;
    text-decoration: none;
}
.community-post-meta .author-info .author-details a:hover {
    color: #ee8d00;
}
.community-post-meta .author-info .author-details .farm-label {
    font-size: 12px;
    color: #999;
}
.community-post-featured-img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 30px;
}
.community-post-body {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 30px;
}
.community-post-body p {
    margin-bottom: 16px;
}

/* Like Button */
.community-like-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
}
.like-btn:hover {
    border-color: #ee8d00;
    color: #ee8d00;
}
.like-btn.liked {
    background: #fefce8;
    border-color: #ee8d00;
    color: #ee8d00;
}

/* Comments Section */
.community-comments {
    margin-top: 30px;
}
.community-comments h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}
.comment-item {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f4da70;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    flex-shrink: 0;
}
.comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.comment-content {
    flex: 1;
}
.comment-author {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}
.comment-author .seller-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: #ee8d00;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}
.comment-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
}
.comment-body {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
}
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 10px;
}
.comment-form textarea:focus {
    outline: none;
    border-color: #ee8d00;
}
.comment-form button {
    padding: 8px 20px;
    background: #f4da70;
    border: none;
    border-radius: 6px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    box-shadow: 2px 2px 4px rgba(238,141,0,0.3);
    transition: background 0.2s;
}
.comment-form button:hover {
    background: #ee8d00;
    color: #fff;
}
.comment-login-prompt {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    color: #666;
}
.comment-login-prompt a {
    color: #ee8d00;
    font-weight: 600;
}

/* Related Posts */
.related-posts {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f4da70;
}
.related-posts h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Pagination */
.community-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}
.community-pagination a,
.community-pagination span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    color: #444;
    border: 1px solid #ddd;
    transition: all 0.2s;
}
.community-pagination a:hover {
    background: #fefce8;
    border-color: #f4da70;
}
.community-pagination .current {
    background: #f4da70;
    border-color: #ee8d00;
    font-weight: 600;
}

/* CMS Post Management */
.community-cms-list {
    width: 100%;
}
.community-cms-list th {
    background: #f4da70;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    font-size: 14px;
}
.community-cms-list td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    vertical-align: middle;
}
.community-cms-list tr:hover td {
    background: #fefce8;
}
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}
.status-badge.published {
    background: #d4edda;
    color: #155724;
}
.status-badge.draft {
    background: #f0f0f0;
    color: #666;
}
.cms-post-form label {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: #333;
    margin-bottom: 5px;
}
.cms-post-form input[type="text"],
.cms-post-form select,
.cms-post-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px;
    margin-bottom: 15px;
}
.cms-post-form textarea {
    min-height: 250px;
    resize: vertical;
    line-height: 1.7;
}
.cms-post-form input:focus,
.cms-post-form select:focus,
.cms-post-form textarea:focus {
    outline: none;
    border-color: #ee8d00;
}
.cms-post-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
