/* Community Page Specific Styles */
.community-hero {
    background: linear-gradient(135deg, #3b82f6, #2dd4bf);
    color: white;
    padding: 8rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.community-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?ixlib=rb-1.2.1&auto=format&fit=crop&w=2850&q=80') center/cover;
    opacity: 0.1;
}

.community-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.community-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #e0f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.community-hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Enhanced Filter Styles */
.community-filters {
    margin: 2rem 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    top: 80px;
    z-index: 100;
}

.filters-wrapper {
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid #e5e7eb;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.filter-group label i {
    color: #3b82f6;
}

.filter-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1f2937;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.filter-group select:hover {
    border-color: #3b82f6;
}

.filter-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Active Filter Tags */
.active-filters {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #dbeafe;
    color: #3b82f6;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-tag i {
    font-size: 0.75rem;
}

/* Communities Grid */
#communities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0 4rem;
}

.community-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.community-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #3b82f6, #2dd4bf);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.community-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.community-card:hover::before {
    opacity: 1;
}

.community-icon {
    width: 48px;
    height: 48px;
    background: #dbeafe;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #3b82f6;
    transition: all 0.3s ease;
}

.community-card:hover .community-icon {
    background: #3b82f6;
    color: white;
}

.community-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

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

.community-category i {
    font-size: 0.75rem;
}

.community-description {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.5;
}

.community-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.community-link:hover {
    color: #2563eb;
    gap: 0.75rem;
}

/* Loading and No Results States */
.loading, .no-results {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.loading i, .no-results i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #3b82f6;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

/* Responsive Design */
@media (max-width: 768px) {
    .community-hero h1 {
        font-size: 2.5rem;
    }

    .community-filters {
        margin: 1rem 0;
        position: static;
    }

    .filters-wrapper {
        flex-direction: column;
        padding: 1rem;
    }

    .filter-group {
        width: 100%;
    }

    #communities-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}