
/* Community Header */
.community-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.header-content-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-content-section p {
    color: #64748b;
    font-size: 1.125rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: #ef4444;
    color: white;
}

.btn-primary:hover {
    background: #dc2626;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Community Layout */
.community-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.sidebar-section .sidebar-title {
    display: flex
;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    overflow: hidden;
}

.sidebar-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.sidebar-title i {
    color: #dc2626;
}

.rank {
    min-width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
}

.keyword {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.publish-time {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6b7280;
    font-size: 14px;
}

.rank.up {
    background: #dc2626;
}

/* Categories */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #64748b;
    transition: all 0.2s;
}

.category-item:hover,
.category-item.active {
    background: #f1f5f9;
    color: #ef4444;
}

.category-item .count {
    margin-left: auto;
    background: #e2e8f0;
    color: #64748b;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.category-item.active .count {
    background: #ef4444;
    color: white;
}


/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Post Filters */
.post-filters {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
}

.filter-tab {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    min-width: 60px;
}

.filter-tab.active,
.filter-tab:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background: white;
    font-size: 0.875rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 0.75rem;
    color: #64748b;
}

.search-box input {
    padding: 0.5rem 0.5rem 0.5rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    width: 200px;
}

.search-box input:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Posts Feed */
.posts-feed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    transition: all 0.2s;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Post Header */
.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.verified-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.625rem;
    border: 2px solid white;
}

.author-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.author-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
}

.post-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
}

.action-btn:hover {
    background: #e2e8f0;
    color: #475569;
}

/* Post Content */
.post-content {
    margin-bottom: 1rem;
}

.post-category {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #f1f5f9;
    color: #475569;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word; /* ✅ 너무 긴 단어 줄바꿈 */
}

.post-excerpt {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-media {
    margin: 1rem 0;
}

.post-media img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* Collaboration Details */
.collaboration-details {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
}

.collab-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.collab-item:last-child {
    margin-bottom: 0;
}

/* Resource List */
.resource-list {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.resource-item:last-child {
    margin-bottom: 0;
}

.resource-item i {
    color: #f59e0b;
}

/* Post Footer */
.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.engagement-stats {
    display: flex;
    gap: 1rem;
}

.engagement-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s;
    font-size: 0.875rem;
}

.engagement-btn:hover {
    color: #475569;
}

.engagement-btn.active {
    color: #ef4444;
}

.post-meta {
    font-size: 0.75rem;
    color: #64748b;
}

/* Load More */
.load-more-section {
    text-align: center;
    margin-top: 2rem;
}

.btn-load-more {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-load-more:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.page_bottom{
    display:flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
}

.pagination li{
    display:inline;
    border: none;
}

.page-item a{
    display: block;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.05);
    padding: 5px 10px;
    float: left;
    margin-right: 5px;
}

.active{
    font-weight:600;
    color: white;
}

.active a{
    background-color: rgb(234 51 35);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {

    .community-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .community-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sidebar {
        order: 1;
    }
    
    .main-content {
        order: 0;
    }
    
    .search-box input {
        width: 150px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .author-info {
        width: 100%;
    }
    
    .post-actions {
        align-self: flex-end;
    }
}